UNPKG

gill

Version:

a modern javascript/typescript client library for interacting with the Solana blockchain

15 lines 690 B
/** * Converts a UI amount (human-readable) to raw amount (BigInt) * @param uiAmount The human-readable token amount (e.g., 1.5) * @param decimals The number of decimals for the token * @returns BigInt representation of the amount */ export declare function tokenUiAmountToAmount(uiAmount: number, decimals: number): bigint; /** * Converts a raw amount (BigInt) to UI amount (human-readable) * @param amount The raw token amount as BigInt * @param decimals The number of decimals for the token * @returns UI representation of the amount as a number */ export declare function tokenAmountToUiAmount(amount: bigint, decimals: number): number; //# sourceMappingURL=ui-amount.d.ts.map