import { DeepBookConfig } from "../utils/config.mjs"; import * as _mysten_sui_transactions126 from "@mysten/sui/transactions"; import { Transaction, TransactionArgument } from "@mysten/sui/transactions"; //#region src/transactions/balanceManager.d.ts /** * BalanceManagerContract class for managing BalanceManager operations. */ 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 a new BalanceManager, manually set the owner. Returns the manager. * @returns A function that takes a Transaction object */ createBalanceManagerWithOwner: (ownerAddress: string) => (tx: Transaction) => _mysten_sui_transactions126.TransactionResult; /** * @description Share the BalanceManager * @param {TransactionArgument} manager The BalanceManager to share * @returns A function that takes a Transaction object */ shareBalanceManager: (manager: TransactionArgument) => (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) => _mysten_sui_transactions126.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) => _mysten_sui_transactions126.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) => _mysten_sui_transactions126.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) => _mysten_sui_transactions126.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) => _mysten_sui_transactions126.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) => _mysten_sui_transactions126.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) => _mysten_sui_transactions126.TransactionResult; /** * @description Set the referral for the BalanceManager for a specific pool * @param {string} managerKey The name of the BalanceManager * @param {string} referral The referral (DeepBookPoolReferral) to set the BalanceManager to * @param {TransactionArgument} tradeCap The tradeCap for permission checking * @returns A function that takes a Transaction object */ setBalanceManagerReferral: (managerKey: string, referral: string, tradeCap: TransactionArgument) => (tx: Transaction) => void; /** * @description Unset the referral for the BalanceManager for a specific pool * @param {string} managerKey The name of the BalanceManager * @param {string} poolKey The key of the pool to unset the referral for * @param {TransactionArgument} tradeCap The tradeCap for permission checking * @returns A function that takes a Transaction object */ unsetBalanceManagerReferral: (managerKey: string, poolKey: string, tradeCap: TransactionArgument) => (tx: Transaction) => void; registerBalanceManager: (managerKey: string) => (tx: Transaction) => void; /** * @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; /** * @description Get the owner of the referral (DeepBookPoolReferral) * @param {string} referralId The ID of the referral to get the owner of * @returns A function that takes a Transaction object */ balanceManagerReferralOwner: (referralId: string) => (tx: Transaction) => _mysten_sui_transactions126.TransactionResult; /** * @description Get the pool ID associated with a referral (DeepBookPoolReferral) * @param {string} referralId The ID of the referral to get the pool ID of * @returns A function that takes a Transaction object */ balanceManagerReferralPoolId: (referralId: string) => (tx: Transaction) => _mysten_sui_transactions126.TransactionResult; /** * @description Get the referral ID from the balance manager for a specific pool * @param {string} managerKey The name of the BalanceManager * @param {string} poolKey Key of the pool to get the referral for * @returns A function that takes a Transaction object */ getBalanceManagerReferralId: (managerKey: string, poolKey: string) => (tx: Transaction) => _mysten_sui_transactions126.TransactionResult; /** * @description Revoke a TradeCap. This also revokes the associated DepositCap and WithdrawCap. * @param {string} managerKey The name of the BalanceManager * @param {string} tradeCapId The ID of the TradeCap to revoke * @returns A function that takes a Transaction object */ revokeTradeCap: (managerKey: string, tradeCapId: string) => (tx: Transaction) => void; } //#endregion export { BalanceManagerContract }; //# sourceMappingURL=balanceManager.d.mts.map