@blockchaincommons/dcbor - v1.0.0-beta.1
    Preparing search index...

    Function biguintFromUntaggedCbor

    • Decode a BigUint from an untagged CBOR byte string.

      This function is intended for use in tag summarizers where the tag has already been stripped. It expects a CBOR byte string representing the big-endian magnitude of a positive bignum (tag 2 content).

      Enforces canonical encoding: no leading zero bytes (except empty for zero).

      Parameters

      • cbor: Cbor

        A CBOR value that should be a byte string

      Returns bigint

      Non-negative bigint

      CborError with type WrongType if not a byte string

      CborError with type NonCanonicalNumeric if encoding is non-canonical