This method attempts to decode a VM Number, a format in which numeric values
are represented on the stack. (The Satoshi implementation calls this
bytes is a valid VM Number, this method returns the represented number
in BigInt format. If
bytes is not valid, a VmNumberError
All common operations accepting numeric parameters or pushing numeric values to the stack currently use the VM Number format. The binary format of numbers wouldn't be important if they could only be operated on by arithmetic operators, but since the results of these operations may become input to other operations (e.g. hashing), the specific representation is consensus- critical.
a Uint8Array from the stack
The maximum valid number of bytes in a VM Number.
true, this method returns an error when parsing non-minimally
encoded VM Numbers.
Generated using TypeDoc