Function bigIntToCompactUint

  • Encode a positive BigInt as a CompactUint (Satoshi's variable-length, positive integer format).

    Note: the maximum value of a CompactUint is 0xffff_ffff_ffff_ffff (18446744073709551615). This method will return an incorrect result for values outside of the range 0 to 0xffff_ffff_ffff_ffff. If applicable, applications should handle such cases prior to calling this method.


    • value: bigint

      the BigInt to encode (must be no larger than 0xffff_ffff_ffff_ffff)

    Returns Uint8Array

Generated using TypeDoc