StaticencodeEncodes a memo text string into a Uint8Array using UTF-8 encoding.
The memo text to encode, or undefined
Uint8Array of the UTF-8 encoded text (empty array if undefined)
StaticdecodeDecodes a UTF-8 encoded Uint8Array back to a memo text string.
The UTF-8 encoded bytes
The decoded string, or null if the input is empty
StaticencryptCreates encrypted V2 annotation data for a transact note.
Layout (3 blocks of 16 bytes each, AES-CTR encrypted):
Output: [IV (16 bytes)][encrypted block 0 (16 bytes)][encrypted block 1 (16 bytes)][encrypted block 2 (16 bytes)]
The output type (Transfer, BroadcasterFee, Change)
15-byte random value as hex string (30 hex chars)
Wallet source identifier string
32-byte viewing private key used as AES-CTR encryption key
Uint8Array containing IV + encrypted blocks (64 bytes)
StaticdecryptDecrypts V2 annotation data from a transact note.
The encrypted annotation data bytes
32-byte viewing private key used as AES-CTR decryption key
NoteAnnotationData or null if decryption fails
StaticdecryptDecrypts the sender random value from annotation data. Returns the sender random hex string, or MEMO_SENDER_RANDOM_NULL if decryption fails.
The encrypted annotation data bytes
32-byte viewing private key
Hex string of the sender random (30 hex chars), or the null constant
Memo encoding, decoding, and V2 annotation data encryption/decryption.