games_app/backend/dist-test-faq/utils/usdtUnits.d.ts

12 lines
702 B
TypeScript

/**
* USDT unit helpers: platform ledger uses 6 decimals; BEP20 chain uses 18.
*/
export declare const LEDGER_USDT_DECIMALS = 6;
export declare const BEP20_USDT_DECIMALS = 18;
export type CustodyNetwork = 'TRON' | 'BSC';
/** Truncate chain (18) amount down to ledger micro-USDT (6). */
export declare function scaleChainToLedger(amount: bigint, fromDecimals: number, toDecimals?: number): bigint;
/** Scale ledger micro-USDT (6) up to chain units (e.g. BEP20 18). */
export declare function scaleLedgerToChain(amount: bigint, toDecimals: number, fromDecimals?: number): bigint;
export declare function networkForWalletCode(code: string): CustodyNetwork | null;
//# sourceMappingURL=usdtUnits.d.ts.map