Cbor
const
Cbor:object
Defined in: packages/agent/src/cbor.ts:60
Type declaration
Section titled “Type declaration”decode()
Section titled “decode()”decode: <
T
>(input
) =>T
Decode a CBOR encoded value into a JavaScript value.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”Uint8Array
The CBOR encoded value
Returns
Section titled “Returns”T
encode()
Section titled “encode()”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.
Parameters
Section titled “Parameters”unknown
The value to encode
Returns
Section titled “Returns”Uint8Array