UNPKG

@goequitize/rwa-token-sdk

Version:

SDK for creating and managing RWA token transactions with compliance features

27 lines (26 loc) 1.07 kB
/** * Validates if a string is a valid Ethereum address * @param address The address to validate * @returns True if the address is valid, false otherwise */ export declare function isValidAddress(address: string): boolean; /** * Converts a number to a string with the correct decimal places for a token * @param amount The amount to convert * @param decimals The number of decimals the token has * @returns The formatted amount as a string */ export declare function formatTokenAmount(amount: number, decimals: number): string; /** * Converts a string token amount from wei to a human-readable number * @param amount The amount in wei (smallest unit) * @param decimals The number of decimals the token has * @returns The formatted amount as a number */ export declare function parseTokenAmount(amount: string, decimals: number): number; /** * Normalizes a chain ID to its numerical value * @param chainId The chain ID as a string or number * @returns The chain ID as a number */ export declare function normalizeChainId(chainId: string | number): number;