UNPKG

@dfinity/oisy-wallet-signer

Version:

A library designed to facilitate communication between a dApp and the OISY Wallet on the Internet Computer.

12 lines (11 loc) 602 B
/** * Decodes a memo into an utf-8 string. If decoding fails, fallback to hex. * * This is similar to how the decoder for consent messages of the ICP ledger handles the memo. * * @see {@link https://github.com/dfinity/ic/blob/master/packages/icrc-ledger-types/src/icrc21/lib.rs#L348} * * @param {Uint8Array | number[]} memo - The memo to decode. It can be either a `Uint8Array` or an array of numbers. * @returns {string} The decoded string if successful, or the hexadecimal string representation if decoding fails. */ export declare const decodeMemo: (memo: Uint8Array | number[]) => string;