@mysten/bcs
Version:
BCS - Canonical Binary Serialization implementation for JavaScript
19 lines (18 loc) • 702 B
TypeScript
import type { Encoding } from './types.js';
/**
* Encode data with either `hex` or `base64`.
*
* @param {Uint8Array} data Data to encode.
* @param {String} encoding Encoding to use: base64 or hex
* @returns {String} Encoded value.
*/
export declare function encodeStr(data: Uint8Array, encoding: Encoding): string;
/**
* Decode either `base64` or `hex` data.
*
* @param {String} data Data to encode.
* @param {String} encoding Encoding to use: base64 or hex
* @returns {Uint8Array} Encoded value.
*/
export declare function decodeStr(data: string, encoding: Encoding): Uint8Array;
export declare function splitGenericParameters(str: string, genericSeparators?: [string, string]): string[];