games_app/backend/dist/repositories/bonusPoolRepository.d.ts

26 lines
1.3 KiB
TypeScript

export declare function getPoolBalance(walletTypeId: number): Promise<string>;
export declare function listPools(): Promise<Array<{
wallet_type_id: number;
available_balance: string;
}>>;
/** Single fundable pool = unified USDT ledger (USDT_TRC20). */
export declare function listCommissionPools(): Promise<Array<{
wallet_type_id: number;
available_balance: string;
}>>;
export declare function hasPool(walletTypeId: number): Promise<boolean>;
/** Ensure a pool row exists (e.g. after changing commission wallet type). */
export declare function ensurePool(walletTypeId: number): Promise<void>;
/**
* Resolve the fixed commission ledger wallet (USDT_TRC20), ensure its pool exists,
* and drop stray pools for custody rails (e.g. USDT_BEP20) so only one pool remains.
*/
export declare function lockCommissionLedgerPool(): Promise<{
walletTypeId: number;
}>;
/** Admin funds the platform bonus pool (off-chain treasury allocation). */
export declare function fundPool(walletTypeId: number, amount: bigint): Promise<void>;
export declare function debitPool(walletTypeId: number, amount: bigint): Promise<boolean>;
/** Credit pool when reversing a rejected/expired pending referral commission. */
export declare function creditPool(walletTypeId: number, amount: bigint): Promise<void>;
//# sourceMappingURL=bonusPoolRepository.d.ts.map