Function compactUintToBigInt

  • Decode a minimally-encoded CompactUint (Satoshi's variable-length, positive integer format) from a Uint8Array, returning the value as a BigInt. This function returns an error if the entire input is not consumed – to read a CompactUint from a position within a larger Uint8Array, use readCompactUintMinimal or readCompactUint.

    For the reverse, see bigIntToCompactUint.

    Parameters

    • bin: Uint8Array

      the Uint8Array from which to read the CompactUint

    Returns string | bigint

Generated using TypeDoc