UNPKG

@onekeyfe/blockchain-libs

Version:
10 lines (9 loc) 579 B
export declare const ERROR_CONTAINS_EMPTY_STRING = "The object contains empty or 0 values. First empty or 0 value encountered during encoding: "; /** * encode encodes objects using msgpack * @param obj - a dictionary to be encoded. Must not contain empty or 0 values. * @returns msgpack representation of the object * @throws Error containing ERROR_CONTAINS_EMPTY_STRING if the object contains empty or zero values */ export declare function encode(obj: Record<string | number | symbol, any>): Uint8Array; export declare function decode(buffer: ArrayLike<number>): unknown;