games_app/backend/dist-test-faq/services/hotLiquidityService.d.ts

35 lines
1.2 KiB
TypeScript

/**
* Pre-flight checks: platform hot wallet has enough USDT + native gas
* to pay a withdrawal on the chosen rail (cross-network float model).
*/
/** ~3 TRX — enough for a typical TRC20 transfer under energy rental / burned TRX. */
export declare const MIN_TRX_SUN_FOR_WITHDRAWAL = 3000000n;
/** ~0.001 BNB — buffer above a simple ERC-20 transfer on BSC. */
export declare const MIN_BNB_WEI_FOR_WITHDRAWAL = 1000000000000000n;
export type HotLiquidityVerdict = {
ok: true;
} | {
ok: false;
reason: 'usdt' | 'gas';
needed: string;
available: string;
};
/**
* Pure comparison of hot balances vs required payout (ledger amount is always 6-dec micro-USDT).
*/
export declare function evaluateHotLiquidity(input: {
network: 'TRON' | 'BSC';
usdtBalanceRaw: bigint;
nativeBalanceRaw: bigint;
ledgerAmountRaw: bigint;
}): HotLiquidityVerdict;
/**
* Reads on-chain hot balances and throws if the platform cannot pay `ledgerAmountRaw` on `network`.
*/
export declare function assertHotWalletCanPay(params: {
network: 'TRON' | 'BSC';
hotAddress: string;
ledgerAmountRaw: bigint;
usdtContract: string;
}): Promise<void>;
//# sourceMappingURL=hotLiquidityService.d.ts.map