UNPKG

@roochnetwork/rooch-sdk

Version:
22 lines (21 loc) 1.06 kB
import { Bytes } from '../types/bytes.js'; declare const CODERS: { utf8: import("@scure/base").BytesCoder; hex: import("@scure/base").BytesCoder; base16: import("@scure/base").BytesCoder; base32: import("@scure/base").BytesCoder; base64: import("@scure/base").BytesCoder; base64url: import("@scure/base").BytesCoder; base58: import("@scure/base").BytesCoder; base58xmr: import("@scure/base").BytesCoder; }; export declare function bytesEqual(a: Uint8Array, b: Uint8Array): boolean; export declare function isBytes(a: unknown): a is Bytes; export type CoderType = keyof typeof CODERS; export declare const bytesToString: (type: CoderType, bytes: Bytes) => string; export declare const str: (type: CoderType, bytes: Bytes) => string; export declare const stringToBytes: (type: CoderType, str: string) => Bytes; export declare function concatBytes(...arrays: Uint8Array[]): Uint8Array; export declare function varintByteNum(input: number): Bytes; export declare const bytes: (type: CoderType, str: string) => Bytes; export {};