UNPKG

@unstoppabledomains/resolution

Version:
32 lines (31 loc) 1.13 kB
/** * All functionality below came from here https://github.com/Zilliqa/Zilliqa-JavaScript-Library/tree/dev/packages/zilliqa-js-crypto/src */ /** * toChecksumAddress * * takes hex-encoded string and returns the corresponding address * @param {string} address * @returns {string} */ export declare const toChecksumAddress: (address: string) => string; /** * toBech32Address * * Encodes a canonical 20-byte Ethereum-style address as a bech32 zilliqa * address. * * The expected format is zil1<address><checksum> where address and checksum * are the result of bech32 encoding a Buffer containing the address bytes. * @param {string} address 20 byte canonical address * @param {boolean} testnet * @returns {string} 38 char bech32 encoded zilliqa address */ export declare function toBech32Address(address: string, testnet?: boolean): string; /** * fromBech32Address * @param {string} address - a valid Zilliqa bech32 address * @param {boolean} testnet * @returns {string} a canonical 20-byte Ethereum-style address */ export declare function fromBech32Address(address: string, testnet?: boolean): string;