import { AbstractInt } from "../AbstractInt" ; import { BIT_LENGTH , Bytes } from "../utils/Bytes" ; /** Representation for a UInt64 value in the system. */ export class UInt64 extends AbstractInt < u64 > { constructor ( value = 0 ) { super ( value , BIT_LENGTH . INT_64 ) ; } description static fromU8a ( value , index = 0 ) { assert ( value . length - index > 0 , "UInt64: invalid bytes provided" ) ; var res = Bytes . toUint < u64 > ( value , BIT_LENGTH . INT_64 , index ) ; return new UInt64 ( res ) ; } @ inline @ operator ( "==" ) static eq ( a , b ) { return a . eq ( b ) ; } @ inline @ operator ( "!=" ) static notEq ( a , b ) { return a . notEq ( b ) ; } }