import { type OmniAddress } from "../types/index.js"; export interface TokenDecimals { decimals: number; origin_decimals: number; } /** * Normalizes an amount from one decimal precision to another using BigInt math * @param amount The amount to normalize as a bigint * @param fromDecimals The source decimal precision * @param toDecimals The target decimal precision * @returns The normalized amount as a bigint */ export declare function normalizeAmount(amount: bigint, fromDecimals: number, toDecimals: number): bigint; /** * Verifies if a transfer amount will be valid after normalization * @param amount The amount to transfer * @param fee The fee to be deducted * @param originDecimals The decimals of the token on the source chain * @param destinationDecimals The decimals of the token on the destination chain * @returns true if the normalized amount (minus fee) will be greater than 0 */ export declare function verifyTransferAmount(amount: bigint, fee: bigint, originDecimals: number, destinationDecimals: number): boolean; /** * Get the minimum number of decimals between origin and destination chains * @param contractId The NEAR contract to query * @param sourceToken The source token address * @param destinationToken The destination token address * @returns The minimum number of decimals * @throws Error if either token is not registered (returns null from getTokenDecimals) */ export declare function getMinimumDecimals(contractId: string, sourceToken: OmniAddress, destinationToken: OmniAddress): Promise; /** * Gets token decimals from the NEAR contract * @param contractId The NEAR contract ID to query * @param tokenAddress The Omni token address to check * @returns Promise resolving to the token's decimal information, or null if token is not registered */ export declare function getTokenDecimals(contractId: string, tokenAddress: OmniAddress): Promise; /** * Gets the minimum transferable amount for a token pair accounting for decimal normalization * @param originDecimals The decimals of the source token * @param destinationDecimals The decimals of the destination token * @returns The minimum transferable amount as a bigint */ export declare function getMinimumTransferableAmount(originDecimals: number, destinationDecimals: number): bigint; //# sourceMappingURL=decimals.d.ts.map