Classes
- ClientWasm
Manage a client-side WASM
- SerialBuffer
Serialize and deserialize data. This is a subset of eosjs's SerialBuffer.
ClientWasm
Manage a client-side WASM
Kind: global class
new ClientWasm(mod, encoder, decoder)
| Param | Type | Description |
|---|---|---|
| mod | WebAssembly.Module |
module containing the WASM |
| encoder | TextEncoder |
utf8 text encoder |
| decoder | TextDecoder |
utf8 text decoder |
clientWasm.instantiate()
Instantiate the WASM module. Creates a new WebAssembly.Instance with fresh memory.
Kind: instance method of ClientWasm
clientWasm.describeQueryRequest()
Returns a JSON Schema describing requests that createQueryRequest accepts
Kind: instance method of ClientWasm
clientWasm.describeQueryResponse()
Returns a JSON Schema describing responses that createQueryRequest returns
Kind: instance method of ClientWasm
clientWasm.createQueryRequest()
Converts request to the binary format that the server-side WASM expects. request
must be a string containing JSON which matches the schema returned by describeQueryRequest.
Kind: instance method of ClientWasm
clientWasm.decodeQueryResponse()
Converts binary response from a server-side WASM to JSON. The format matches
the schema returned by describeQueryResponse.
Kind: instance method of ClientWasm
SerialBuffer
Serialize and deserialize data. This is a subset of eosjs's SerialBuffer.
Kind: global class
serialBuffer.reserve()
Resize array if needed to have at least size bytes free
Kind: instance method of SerialBuffer
serialBuffer.asUint8Array()
Return data with excess storage trimmed away
Kind: instance method of SerialBuffer
serialBuffer.pushArray()
Append bytes
Kind: instance method of SerialBuffer
serialBuffer.get()
Get a single byte
Kind: instance method of SerialBuffer
serialBuffer.pushVaruint32()
Append a varuint32
Kind: instance method of SerialBuffer
serialBuffer.getVaruint32()
Get a varuint32
Kind: instance method of SerialBuffer
serialBuffer.getUint8Array()
Get len bytes
Kind: instance method of SerialBuffer
serialBuffer.pushBytes()
Append length-prefixed binary data
Kind: instance method of SerialBuffer
serialBuffer.getBytes()
Get length-prefixed binary data
Kind: instance method of SerialBuffer