@hashgraph/sdk
Version:
19 lines (18 loc) • 703 B
TypeScript
declare namespace _default {
export { decode };
export { encode };
}
export default _default;
/**
* Decodes the rfc4648 base32 string into a {@link Uint8Array}. If the input string is null, returns null.
* @param {string} str the base32 string.
* @returns {Uint8Array | ''}
*/
declare function decode(str: string): Uint8Array | "";
/**
* Encodes the byte array into a rfc4648 base32 string without padding. If the input is null, returns null. Note with
* the rfc4648 loose = true option, it allows lower case letters, padding, and auto corrects 0 -> O, 1 -> L, 8 -> B
* @param {Buffer|Uint8Array} data
* @returns {string}
*/
declare function encode(data: Buffer | Uint8Array): string;