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

    Function cborToBiguint

    • Convert CBOR to a non-negative bigint.

      Matches Rust's TryFrom<CBOR> for BigUint.

      Accepts:

      • Major type 0 (unsigned integer)
      • Tag 2 (positive bignum) with canonical byte string

      Rejects:

      • Major type 1 (negative integer) -> OutOfRange
      • Tag 3 (negative bignum) -> OutOfRange
      • Floating-point values -> WrongType
      • Non-canonical bignum encodings -> NonCanonicalNumeric

      Parameters

      • cbor: Cbor

        The CBOR value to convert

      Returns bigint

      Non-negative bigint

      CborError