Decodes a CBOR-encoded account address into an TokenHolder instance.
This function can handle both the full tagged format (with coin information)
and a simplified format with just the address bytes.
With tagged-coininfo (40305):
40307({ 1:40305({1:919}), // Optional coin information 3:h'abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789' })
Without tagged-coininfo:
40307({ 3:h'abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789' }) // The address is assumed to be a Concordium address
Throws
If the input is not a valid CBOR encoding of an account address.
Returns
The decoded TokenHolder instance.
Parameters
bytes: Uint8Array
The CBOR encoded representation of an account address.
Decodes a CBOR-encoded account address into an TokenHolder instance. This function can handle both the full tagged format (with coin information) and a simplified format with just the address bytes.
tagged-coininfo
(40305):tagged-coininfo
:Throws
Returns
The decoded TokenHolder instance.