You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 18, 2024. It is now read-only.
classABIDecoder{privatepos=0privatedata: DataViewprivatetextDecoder=newTextDecoder('utf-8',{fatal: true})/* declared references */metadata: Record<string,any>={}/* constructor */constructor(privatearray: Uint8Array)/* functions */canRead(bytes=1): boolean/* check not to exceed buffer */privateensure(bytes: number)setPosition(pos: number)getPosition(): numberadvance(bytes: number)/** Read one byte. */readByte(): number/** Read floating point as JavaScript number, 32, 64 bits. Will extend later to 106 bits */readFloat(byteWidth: number)readVaruint32()readVarint32()/** will need to add readVarint64() later with BigInt **/readArray(length: number)readString()decodeBinary(type: ABI.ResolvedType,decoder: ABIDecoder,ctx: DecodingContext): any/** no decode object as we don't have proper types in eosjs (note: could be wrong **/}
exportclassABIEncoder{privatepos=0privatedata: DataViewprivatearray: Uint8ArrayprivatetextEncoder=newTextEncoder()/** User declared metadata, can be used to pass info to instances when encoding. */metadata: Record<string,any>={}/** constructor **/constructor(privatepageSize=1024)/** functions ** private ensure(bytes: number) /** Write a single byte. */writeByte(byte: number)/** Write an array of bytes. */writeArray(bytes: ArrayLike<number>)/** need to extend this later to handle 106 bits **/writeFloat(value: number,byteWidth: number)writeVaruint32(v: number)writeVarint32(v: number)/** need to extend writeVarint64 with BigInt **/writeString(v: string)getData(): Uint8ArraygetBytes(): Bytes
Four or more classes
One or more interfaces