decodeKeyTuple(
bytes): readonlyKeyTuplePart[]
Defined in: packages/key-encoding/src/tuple.ts:302
Decode an encodeKeyTuple key back into its parts. Every decoded part carries an explicit direction.
Accepts exactly the bytes encodeKeyTuple writes: re-encoding the result reproduces the input byte for byte. An empty
array decodes to an empty tuple.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”readonly KeyTuplePart[]
Throws
Section titled “Throws”INVALID_KEY_VALUE when bytes is not a Uint8Array.
Throws
Section titled “Throws”UNKNOWN_PART_TAG for a tag that names no kind; TRUNCATED_KEY when a payload or
terminator is cut off; INVALID_ESCAPE_SEQUENCE for a 0x00 not followed by 0xff or 0x00; INVALID_UTF8 for a
string payload that is not well-formed UTF-8; NON_CANONICAL_FLOAT64 for a NaN or -0 bit pattern.