Data to use as a buffer.
Read U128 value from the buffer and shift cursor by 16.
Read U16 value from the buffer and shift cursor by 2.
Read U128 value from the buffer and shift cursor by 32.
Read U32 value from the buffer and shift cursor by 4.
Read U64 value from the buffer and shift cursor by 8.
Read U8 value from the buffer and shift cursor by 1.
Read num
number of bytes from the buffer and shift cursor by num
.
Number of bytes to read.
Read ULEB value - an integer of varying size. Used for enum indexes and vector lengths.
The ULEB value.
Read a BCS vector: read a length and then apply function cb
X times
where X is the length of the vector, defined as ULEB in BCS bytes.
Callback to process elements of vector.
Array of the resulting values, returned by callback.
Shift current cursor position by bytes
.
Number of bytes to
Self for possible chaining.
Class used for reading BCS data chunk by chunk. Meant to be used by some wrapper, which will make sure that data is valid and is matching the desired format.
Example
Example
Param: data
HEX-encoded data (serialized BCS)