import { MarginProposalParams, PlaceMarginLimitOrderParams, PlaceMarginMarketOrderParams } from "../types/index.mjs"; import { DeepBookConfig } from "../utils/config.mjs"; import * as _mysten_sui_transactions186 from "@mysten/sui/transactions"; import { Transaction } from "@mysten/sui/transactions"; //#region src/transactions/poolProxy.d.ts /** * PoolProxyContract class for managing PoolProxy operations. */ declare class PoolProxyContract { #private; /** * @param {DeepBookConfig} config Configuration for PoolProxyContract */ constructor(config: DeepBookConfig); /** * @description Place a limit order. Enforces a post-trade `risk_ratio >= * min_borrow_risk_ratio` invariant on the manager (skipped when the manager * has no debt). * @param {PlaceMarginLimitOrderParams} params Parameters for placing a limit order * @returns A function that takes a Transaction object */ placeLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions186.TransactionResult; /** * @description Place a market order. Enforces a post-trade `risk_ratio >= * min_borrow_risk_ratio` invariant on the manager (skipped when the manager * has no debt). * @param {PlaceMarginMarketOrderParams} params Parameters for placing a market order * @returns A function that takes a Transaction object */ placeMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions186.TransactionResult; /** * @description Place a reduce only limit order. Requires the manager to have * debt on the relevant side; enforces a monotonic `risk_ratio_after >= * risk_ratio_before` invariant so the fill cannot leak value to the * counterparty. * @param {PlaceMarginLimitOrderParams} params Parameters for placing a reduce only limit order * @returns A function that takes a Transaction object */ placeReduceOnlyLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions186.TransactionResult; /** * @description Place a reduce only market order. Requires the manager to * have debt on the relevant side; enforces a monotonic `risk_ratio_after >= * risk_ratio_before` invariant so the fill cannot leak value to the * counterparty. * @param {PlaceMarginMarketOrderParams} params Parameters for placing a reduce only market order * @returns A function that takes a Transaction object */ placeReduceOnlyMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions186.TransactionResult; /** * @description Place a market order and repay the loan from the fill proceeds. * The taker fill settles into the manager's balance, so the proceeds (plus any * idle balance) are repaid into the debt side before the risk check; the gate * is then the *net* post-repay `risk_ratio` being at least the pre-fill ratio. * Unlike {@link placeMarketOrder}, which checks the post-trade ratio against * `min_borrow_risk_ratio`, this lets a deleveraging fill go through in the * `liquidation..min_borrow` band, where a swap alone would be rejected. * @param {PlaceMarginMarketOrderParams} params Parameters for placing a market order * @returns A function that takes a Transaction object */ placeMarketOrderAndRepayLoan: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions186.TransactionResult; /** * @description Place a reduce only limit order and repay the loan from the * fill proceeds. Requires debt on the relevant side (a bid needs base debt; an * ask needs quote debt and sells at most the gross base held); the repay * happens before the monotonic `risk_ratio` gate, so the check is on the net * post-repay ratio. * @param {PlaceMarginLimitOrderParams} params Parameters for placing a reduce only limit order * @returns A function that takes a Transaction object */ placeReduceOnlyLimitOrderAndRepayLoan: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions186.TransactionResult; /** * @description Place a reduce only market order and repay the loan from the * fill proceeds. Same reduce-only direction guard as * {@link placeReduceOnlyMarketOrder}, but the settled proceeds are repaid into * the debt side before the monotonic `risk_ratio` gate, so the check is on the * net post-repay ratio. * @param {PlaceMarginMarketOrderParams} params Parameters for placing a reduce only market order * @returns A function that takes a Transaction object */ placeReduceOnlyMarketOrderAndRepayLoan: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions186.TransactionResult; /** * @description Modify an existing order * @param {string} marginManagerKey The key to identify the MarginManager * @param {string} orderId Order ID to modify * @param {number} newQuantity New quantity for the order * @returns A function that takes a Transaction object */ modifyOrder: (marginManagerKey: string, orderId: string, newQuantity: number) => (tx: Transaction) => void; /** * @description Cancel an existing order * @param {string} marginManagerKey The key to identify the MarginManager * @param {string} orderId Order ID to cancel * @returns A function that takes a Transaction object */ cancelOrder: (marginManagerKey: string, orderId: string) => (tx: Transaction) => void; /** * @description Cancel multiple existing orders * @param {string} marginManagerKey The key to identify the MarginManager * @param {string[]} orderIds Order IDs to cancel * @returns A function that takes a Transaction object */ cancelOrders: (marginManagerKey: string, orderIds: string[]) => (tx: Transaction) => void; /** * @description Cancel all existing orders * @param {string} marginManagerKey The key to identify the MarginManager * @returns A function that takes a Transaction object */ cancelAllOrders: (marginManagerKey: string) => (tx: Transaction) => void; /** * @description Withdraw settled amounts * @param {string} marginManagerKey The key to identify the MarginManager * @returns A function that takes a Transaction object */ withdrawSettledAmounts: (marginManagerKey: string) => (tx: Transaction) => void; /** * @description Stake in the pool * @param {string} marginManagerKey The key to identify the MarginManager * @param {number} stakeAmount The amount to stake * @returns A function that takes a Transaction object */ stake: (marginManagerKey: string, stakeAmount: number) => (tx: Transaction) => void; /** * @description Unstake from the pool * @param {string} marginManagerKey The key to identify the MarginManager * @returns A function that takes a Transaction object */ unstake: (marginManagerKey: string) => (tx: Transaction) => void; /** * @description Submit a proposal * @param {string} marginManagerKey The key to identify the MarginManager * @param {MarginProposalParams} params Parameters for the proposal * @returns A function that takes a Transaction object */ submitProposal: (marginManagerKey: string, params: MarginProposalParams) => (tx: Transaction) => void; /** * @description Vote on a proposal * @param {string} marginManagerKey The key to identify the MarginManager * @param {string} proposalId The ID of the proposal to vote on * @returns A function that takes a Transaction object */ vote: (marginManagerKey: string, proposalId: string) => (tx: Transaction) => void; /** * @description Claim a rebate from a pool * @param {string} marginManagerKey The key to identify the MarginManager * @returns A function that takes a Transaction object */ claimRebate: (marginManagerKey: string) => (tx: Transaction) => void; /** * @description Withdraw settled amounts permissionlessly for a margin manager by ID * @param {string} poolKey The key to identify the pool * @param {string} marginManagerId The object ID of the MarginManager * @returns A function that takes a Transaction object */ withdrawMarginSettledAmounts: (poolKey: string, marginManagerId: string) => (tx: Transaction) => void; /** * @description Update the current price for a pool using Pyth oracle * @param {string} poolKey The key to identify the pool * @returns A function that takes a Transaction object */ updateCurrentPrice: (poolKey: string) => (tx: Transaction) => void; } //#endregion export { PoolProxyContract }; //# sourceMappingURL=poolProxy.d.mts.map