BC-DCBOR TypeScript Library - v1.0.0-alpha.20
    Preparing search index...

    Function biguintFromUntaggedCbor

    • Decode a BigUint from an untagged CBOR byte string.

      Matches Rust's biguint_from_untagged_cbor().

      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