import { DeepBookConfig } from "../utils/config.mjs"; import * as _mysten_sui_transactions169 from "@mysten/sui/transactions"; import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions"; //#region src/transactions/marginPool.d.ts /** * MarginPoolContract class for managing MarginPool operations. */ declare class MarginPoolContract { #private; /** * @param {DeepBookConfig} config Configuration for MarginPoolContract */ constructor(config: DeepBookConfig); /** * @description Mint a supplier cap for margin pool * @returns A function that takes a Transaction object */ mintSupplierCap: () => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Supply to a margin pool * @param {string} coinKey The key to identify the pool * @param {TransactionObjectArgument} supplierCap The supplier cap object * @param {number} amountToDeposit The amount to deposit * @param {string} referralId The ID of the referral * @returns A function that takes a Transaction object */ supplyToMarginPool: (coinKey: string, supplierCap: TransactionObjectArgument, amountToDeposit: number, referralId?: string) => (tx: Transaction) => void; /** * @description Withdraw from a margin pool. If amountToWithdraw is not provided, withdraws all. * @param {string} coinKey The key to identify the pool * @param {TransactionObjectArgument} supplierCap The supplier cap object * @param {number} [amountToWithdraw] The amount to withdraw. If omitted, withdraws all. * @returns A function that takes a Transaction object */ withdrawFromMarginPool: (coinKey: string, supplierCap: TransactionObjectArgument, amountToWithdraw?: number) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Mint a referral for a margin pool * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ mintSupplyReferral: (coinKey: string) => (tx: Transaction) => void; /** * @description Withdraw referral fees from a margin pool * @param {string} coinKey The key to identify the pool * @param {string} referralId The ID of the referral * @returns A function that takes a Transaction object */ withdrawReferralFees: (coinKey: string, referralId: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the margin pool ID * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ getId: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Check if a deepbook pool is allowed for borrowing * @param {string} coinKey The key to identify the margin pool * @param {string} deepbookPoolId The ID of the deepbook pool * @returns A function that takes a Transaction object */ deepbookPoolAllowed: (coinKey: string, deepbookPoolId: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the total supply amount * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ totalSupply: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the total supply shares * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ supplyShares: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the total borrow amount * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ totalBorrow: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the total borrow shares * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ borrowShares: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the last update timestamp * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ lastUpdateTimestamp: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the supply cap * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ supplyCap: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the max utilization rate * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ maxUtilizationRate: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the protocol spread * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ protocolSpread: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the minimum borrow amount * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ minBorrow: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get the current interest rate * @param {string} coinKey The key to identify the pool * @returns A function that takes a Transaction object */ interestRate: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get user supply shares for a supplier cap * @param {string} coinKey The key to identify the pool * @param {string} supplierCapId The ID of the supplier cap * @returns A function that takes a Transaction object */ userSupplyShares: (coinKey: string, supplierCapId: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; /** * @description Get user supply amount for a supplier cap * @param {string} coinKey The key to identify the pool * @param {string} supplierCapId The ID of the supplier cap * @returns A function that takes a Transaction object */ userSupplyAmount: (coinKey: string, supplierCapId: string) => (tx: Transaction) => _mysten_sui_transactions169.TransactionResult; } //#endregion export { MarginPoolContract }; //# sourceMappingURL=marginPool.d.mts.map