Skip to content

Cbor

const Cbor: object

Defined in: packages/agent/src/cbor.ts:60

decode: <T>(input) => T

Decode a CBOR encoded value into a JavaScript value.

T

Uint8Array

The CBOR encoded value

T

encode: (value) => Uint8Array

Encode a JavaScript value into CBOR. If the value is an instance of ToCborValue, the ToCborValue.toCborValue method will be called to get the value to encode.

unknown

The value to encode

Uint8Array