import type { Transaction } from '@onelabs/sui/transactions'; import type { DeepBookConfig } from '../utils/config.js'; /** * BalanceManagerContract class for managing BalanceManager operations. */ export declare class BalanceManagerContract { #private; /** * @param {DeepBookConfig} config Configuration for BalanceManagerContract */ constructor(config: DeepBookConfig); /** * @description Create and share a new BalanceManager * @returns A function that takes a Transaction object */ createAndShareBalanceManager: () => (tx: Transaction) => void; /** * @description Create and share a new BalanceManager, manually set the owner * @returns A function that takes a Transaction object */ createAndShareBalanceManagerWithOwner: (ownerAddress: string) => (tx: Transaction) => void; /** * @description Deposit funds into the BalanceManager * @param {string} managerKey The key of the BalanceManager * @param {string} coinKey The key of the coin to deposit * @param {number} amountToDeposit The amount to deposit * @returns A function that takes a Transaction object */ depositIntoManager: (managerKey: string, coinKey: string, amountToDeposit: number) => (tx: Transaction) => void; /** * @description Withdraw funds from the BalanceManager * @param {string} managerKey The key of the BalanceManager * @param {string} coinKey The key of the coin to withdraw * @param {number} amountToWithdraw The amount to withdraw * @param {string} recipient The recipient of the withdrawn funds * @returns A function that takes a Transaction object */ withdrawFromManager: (managerKey: string, coinKey: string, amountToWithdraw: number, recipient: string) => (tx: Transaction) => void; /** * @description Withdraw all funds from the BalanceManager * @param {string} managerKey The key of the BalanceManager * @param {string} coinKey The key of the coin to withdraw * @param {string} recipient The recipient of the withdrawn funds * @returns A function that takes a Transaction object */ withdrawAllFromManager: (managerKey: string, coinKey: string, recipient: string) => (tx: Transaction) => void; /** * @description Check the balance of the BalanceManager * @param {string} managerKey The key of the BalanceManager * @param {string} coinKey The key of the coin to check the balance of * @returns A function that takes a Transaction object */ checkManagerBalance: (managerKey: string, coinKey: string) => (tx: Transaction) => void; /** * @description Generate a trade proof for the BalanceManager. Calls the appropriate function based on whether tradeCap is set. * @param {string} managerKey The key of the BalanceManager * @returns A function that takes a Transaction object */ generateProof: (managerKey: string) => (tx: Transaction) => import("@onelabs/sui/transactions").TransactionResult; /** * @description Generate a trade proof as the owner * @param {string} managerId The ID of the BalanceManager * @returns A function that takes a Transaction object */ generateProofAsOwner: (managerId: string) => (tx: Transaction) => import("@onelabs/sui/transactions").TransactionResult; /** * @description Generate a trade proof as a trader * @param {string} managerId The ID of the BalanceManager * @param {string} tradeCapId The ID of the tradeCap * @returns A function that takes a Transaction object */ generateProofAsTrader: (managerId: string, tradeCapId: string) => (tx: Transaction) => import("@onelabs/sui/transactions").TransactionResult; /** * @description Mint a TradeCap * @param {string} managerKey The name of the BalanceManager * @returns A function that takes a Transaction object */ mintTradeCap: (managerKey: string) => (tx: Transaction) => import("@onelabs/sui/transactions").TransactionResult; /** * @description Mint a DepositCap * @param {string} managerKey The name of the BalanceManager * @returns A function that takes a Transaction object */ mintDepositCap: (managerKey: string) => (tx: Transaction) => import("@onelabs/sui/transactions").TransactionResult; /** * @description Mint a WithdrawalCap * @param {string} managerKey The name of the BalanceManager * @returns A function that takes a Transaction object */ mintWithdrawalCap: (managerKey: string) => (tx: Transaction) => import("@onelabs/sui/transactions").TransactionResult; /** * @description Deposit using the DepositCap * @param {string} managerKey The name of the BalanceManager * @param {string} coinKey The name of the coin to deposit * @param {number} amountToDeposit The amount to deposit * @returns A function that takes a Transaction object */ depositWithCap: (managerKey: string, coinKey: string, amountToDeposit: number) => (tx: Transaction) => void; /** * @description Withdraw using the WithdrawCap * @param {string} managerKey The name of the BalanceManager * @param {string} coinKey The name of the coin to withdraw * @param {number} amountToWithdraw The amount to withdraw * @returns A function that takes a Transaction object */ withdrawWithCap: (managerKey: string, coinKey: string, amountToWithdraw: number) => (tx: Transaction) => import("@onelabs/sui/transactions").TransactionResult; /** * @description Get the owner of the BalanceManager * @param {string} managerKey The key of the BalanceManager * @returns A function that takes a Transaction object */ owner: (managerKey: string) => (tx: Transaction) => void; /** * @description Get the ID of the BalanceManager * @param {string} managerKey The key of the BalanceManager * @returns A function that takes a Transaction object */ id: (managerKey: string) => (tx: Transaction) => void; }