UNPKG

chaingate

Version:

Multi-chain cryptocurrency SDK for TypeScript — unified API for Bitcoin, Ethereum, Litecoin, Dogecoin, Bitcoin Cash, Polygon, Arbitrum, and any EVM-compatible chain. Create wallets, query balances, send transactions, and manage tokens and NFTs across UTXO

28 lines (27 loc) 850 B
/** * Checks whether a string is valid hexadecimal. Supports optional `0x` prefix. * * @param s - The string to validate. * @returns `true` if valid hex. */ export declare function isHex(s: string): boolean; /** * Converts a hex string to bytes. Supports optional `0x` prefix. * * @param hex - The hex string to decode. * @throws {@link InvalidHexError} If the string is not valid hex. */ export declare function hexToBytes(hex: string): Uint8Array; /** * Converts bytes to a lowercase hex string (without `0x` prefix). * * @param bytes - The byte array to encode. */ export declare function bytesToHex(bytes: Uint8Array): string; /** * Checks whether a string contains only valid Base58 characters. * * @param s - The string to validate. * @returns `true` if valid Base58. */ export declare function isBase58(s: string): boolean;