Decodes the CBOR-encoded data and returns the decoded value as CBORValue. See decodeCBOR() for details on errors and behavior.

In addition to errors thrown by decodeCBOR(), it will also throw CBORLeftoverBytesError if there are any leftover bytes.


function decodeCBORNoLeftoverBytes(data: Uint8Array, maxDepth: number): CBORValue;


  • data
  • maxDepth: How much nesting is allowed (exclusive) where the first iteration is depth 0.