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

    Function bigintToCbor

    • Encode a bigint as a CBOR tag 2 or tag 3 bignum.

      Matches Rust's From<BigInt> for CBOR.

      • Non-negative values use tag 2 (positive bignum).
      • Negative values use tag 3 (negative bignum), where the encoded magnitude is |value| - 1 per RFC 8949.

      Parameters

      • value: bigint

        Any bigint value

      Returns Cbor

      CBOR tagged value