Decode one instruction from the provided virtual machine bytecode.
Returns an object with an instruction referencing a
AuthenticationInstructionMaybeMalformed, and a nextIndex indicating
the next index from which to read. If the next index is greater than or equal
to the length of the bytecode, the bytecode has been fully decoded.
The final AuthenticationInstructionMaybeMalformed in the bytecode may
be malformed if 1) the final operation is a push and 2) too few bytes remain
for the push operation to complete.
Parameters
bytecode: Uint8Array
the virtual machine bytecode from which to read the next
instruction
Decode one instruction from the provided virtual machine bytecode.
Returns an object with an
instruction
referencing a AuthenticationInstructionMaybeMalformed, and anextIndex
indicating the next index from which to read. If the next index is greater than or equal to the length of the bytecode, the bytecode has been fully decoded.The final AuthenticationInstructionMaybeMalformed in the bytecode may be malformed if 1) the final operation is a push and 2) too few bytes remain for the push operation to complete.