@citizenwallet/sdk
Version:
An sdk to easily work with citizen wallet.
20 lines • 788 B
TypeScript
/**
* Converts an Ethereum address to a BigInt
* @param address The Ethereum address as a string (with or without '0x' prefix)
* @returns The address as a BigInt
*/
export declare function addressToId(address: string): bigint;
/**
* Converts a BigInt back to an Ethereum address
* @param id The BigInt representation of an Ethereum address
* @returns The Ethereum address as a string with '0x' prefix
*/
export declare function idToAddress(id: bigint): string;
/**
* Limits a string's length to the specified length
* @param str The input string
* @param maxLength The maximum length of the string
* @returns The string truncated to the specified length
*/
export declare function limitStringLength(str: string, maxLength: number): string;
//# sourceMappingURL=utils.d.ts.map