UNPKG

chaingate

Version:

A complete TypeScript library for connecting to and making transactions on different blockchains

11 lines (10 loc) 767 B
export declare function remove0x(s: string): string; export declare function isHex(s: string): boolean; export declare function hexToBytes(hex: string): Uint8Array; export declare function bytesToHex(bytes: Uint8Array, use0x: boolean): string; export declare function generateSecureRandomBytes(length: number): Uint8Array; export declare function buildUrlWithApiKey(baseUrl: string, apiKey?: string): string; export declare function isBase58(base58: string): boolean; export declare function recordToMap<K extends string, V>(record: Record<K, V>): Map<K, V>; export declare function mapToRecord<K extends string, V>(map: Map<K, V>): Record<K, V>; export declare function transformMap<K, V, U>(originalMap: Map<K, V>, transformFn: (value: V, key: K) => U): Map<K, U>;