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

26 lines
1.3 KiB
TypeScript

/**
* On-chain withdrawal service.
* Debits unified USDT ledger (USDT_TRC20, 6 decimals); pays from the chosen
* rail hot wallet (TRC20 or BEP20). Network need not match deposit history —
* liquidity is gated by hot float (USDT + gas), not user inventory.
*/
export type WithdrawalResult = {
transactionId: string;
status: string;
amount: string;
fee: string;
totalDebited: string;
fundRequestId?: string;
blockchainTxId?: string | null;
};
/**
* Submits a withdrawal: locks unified ledger, verifies hot float, pays from rail hot wallet.
* `walletTypeCode` selects the payout rail (USDT_TRC20 or USDT_BEP20).
* `amountRaw` is always in ledger micro-USDT (6 decimals).
*/
export declare function requestWithdrawal(userId: string, walletTypeCode: string, toAddress: string, amountRaw: bigint, totpCode?: string): Promise<WithdrawalResult>;
/** Resume on-chain broadcast after Approvals quorum for a large withdrawal. */
export declare function broadcastApprovedWithdrawal(transactionId: string, approvedBy: string): Promise<Record<string, unknown>>;
/** Unlock ledger and fail tx when a large-withdrawal approval is rejected/cancelled. */
export declare function abandonPendingWithdrawal(transactionId: string, reason: string): Promise<void>;
//# sourceMappingURL=withdrawalService.d.ts.map