import { TransactionArgument, TransactionObjectArgument } from "@mysten/sui/transactions"; //#region src/types/index.d.ts interface BalanceManager { address: string; tradeCap?: string; depositCap?: string; withdrawCap?: string; } interface MarginManager { address: string; poolKey: string; } interface Coin { address: string; type: string; scalar: number; feed?: string; currencyId?: string; priceInfoObjectId?: string; } /** State objects identifying the Pyth deployment margin prices against. */ interface PythConfig { pythStateId: string; wormholeStateId: string; /** Hermes endpoint serving update data for this deployment. */ hermesEndpoint?: string; /** * Bearer token for the Hermes endpoint. The one serving Pyth's upgraded Core answers * 401 without it, so pushing price updates needs this set. * * Prefer the client-level `pythAccessToken` option, which sets this without having to * restate the state object ids. Supply the token at runtime — do not commit it. */ accessToken?: string; } interface Pool { address: string; baseCoin: string; quoteCoin: string; } interface MarginPool { address: string; type: string; } declare enum OrderType { NO_RESTRICTION = 0, IMMEDIATE_OR_CANCEL = 1, FILL_OR_KILL = 2, POST_ONLY = 3 } declare enum SelfMatchingOptions { SELF_MATCHING_ALLOWED = 0, CANCEL_TAKER = 1, CANCEL_MAKER = 2 } interface PlaceLimitOrderParams { poolKey: string; balanceManagerKey: string; clientOrderId: string; price: number | bigint; quantity: number | bigint; isBid: boolean; expiration?: number | bigint; orderType?: OrderType; selfMatchingOption?: SelfMatchingOptions; payWithDeep?: boolean; } interface PlaceMarketOrderParams { poolKey: string; balanceManagerKey: string; clientOrderId: string; quantity: number | bigint; isBid: boolean; selfMatchingOption?: SelfMatchingOptions; payWithDeep?: boolean; } interface CanPlaceLimitOrderParams { poolKey: string; balanceManagerKey: string; price: number | bigint; quantity: number | bigint; isBid: boolean; payWithDeep: boolean; expireTimestamp: number; } interface CanPlaceMarketOrderParams { poolKey: string; balanceManagerKey: string; quantity: number | bigint; isBid: boolean; payWithDeep: boolean; } interface PlaceMarginLimitOrderParams { poolKey: string; marginManagerKey: string; clientOrderId: string; price: number | bigint; quantity: number | bigint; isBid: boolean; expiration?: number | bigint; orderType?: OrderType; selfMatchingOption?: SelfMatchingOptions; payWithDeep?: boolean; } interface PlaceMarginMarketOrderParams { poolKey: string; marginManagerKey: string; clientOrderId: string; quantity: number | bigint; isBid: boolean; selfMatchingOption?: SelfMatchingOptions; payWithDeep?: boolean; } interface PendingLimitOrderParams { clientOrderId: string; orderType?: OrderType; selfMatchingOption?: SelfMatchingOptions; price: number | bigint; quantity: number | bigint; isBid: boolean; payWithDeep?: boolean; expireTimestamp?: number | bigint; } interface PendingMarketOrderParams { clientOrderId: string; selfMatchingOption?: SelfMatchingOptions; quantity: number | bigint; isBid: boolean; payWithDeep?: boolean; } interface AddConditionalOrderParams { marginManagerKey: string; conditionalOrderId: string; triggerBelowPrice: boolean; triggerPrice: number | bigint; pendingOrder: PendingLimitOrderParams | PendingMarketOrderParams; } interface ProposalParams { poolKey: string; balanceManagerKey: string; takerFee: number | bigint; makerFee: number | bigint; stakeRequired: number | bigint; } interface MarginProposalParams { takerFee: number | bigint; makerFee: number | bigint; stakeRequired: number | bigint; } interface SwapParams { poolKey: string; amount: number | bigint; deepAmount: number | bigint; minOut: number | bigint; deepCoin?: TransactionObjectArgument; baseCoin?: TransactionObjectArgument; quoteCoin?: TransactionObjectArgument; } interface SwapWithManagerParams { poolKey: string; balanceManagerKey: string; tradeCap: string; depositCap: string; withdrawCap: string; amount: number | bigint; minOut: number | bigint; baseCoin?: TransactionObjectArgument; quoteCoin?: TransactionObjectArgument; } interface CreatePoolAdminParams { baseCoinKey: string; quoteCoinKey: string; tickSize: number | bigint; lotSize: number | bigint; minSize: number | bigint; whitelisted: boolean; stablePool: boolean; } interface CreatePermissionlessPoolParams { baseCoinKey: string; quoteCoinKey: string; tickSize: number | bigint; lotSize: number | bigint; minSize: number | bigint; deepCoin?: TransactionObjectArgument; } interface SetEwmaParams { alpha: number | bigint; zScoreThreshold: number | bigint; additionalTakerFee: number | bigint; } interface PoolConfigParams { minWithdrawRiskRatio: number | bigint; minBorrowRiskRatio: number | bigint; liquidationRiskRatio: number | bigint; targetLiquidationRiskRatio: number | bigint; userLiquidationReward: number | bigint; poolLiquidationReward: number | bigint; } interface MarginPoolConfigParams { supplyCap: number | bigint; maxUtilizationRate: number | bigint; protocolSpread: number | bigint; minBorrow: number | bigint; rateLimitCapacity?: number | bigint; rateLimitRefillRatePerMs?: number | bigint; rateLimitEnabled?: boolean; } interface InterestConfigParams { baseRate: number | bigint; baseSlope: number | bigint; optimalUtilization: number | bigint; excessSlope: number | bigint; } interface Config { DEEPBOOK_PACKAGE_ID: string; REGISTRY_ID: string; DEEP_TREASURY_ID: string; } interface ManagerBalance { coinType: string; balance: number; } interface VaultBalances { base: number; quote: number; deep: number; } interface LockedBalances { base: number; quote: number; deep: number; } interface ReferralBalances { base: number; quote: number; deep: number; } interface PoolTradeParams { takerFee: number; makerFee: number; stakeRequired: number; } interface PoolBookParams { tickSize: number; lotSize: number; minSize: number; } type PoolDeepPrice = { asset_is_base: true; deep_per_base: number; } | { asset_is_base: false; deep_per_quote: number; }; interface QuoteQuantityOut { baseQuantity: number; baseOut: number; quoteOut: number; deepRequired: number; } interface BaseQuantityOut { quoteQuantity: number; baseOut: number; quoteOut: number; deepRequired: number; } interface QuantityOut { baseQuantity: number; quoteQuantity: number; baseOut: number; quoteOut: number; deepRequired: number; } interface BaseQuantityIn { baseIn: number; quoteOut: number; deepRequired: number; } interface QuoteQuantityIn { baseOut: number; quoteIn: number; deepRequired: number; } interface OrderDeepRequiredResult { deepRequiredTaker: number; deepRequiredMaker: number; } interface Level2Range { prices: number[]; quantities: number[]; } interface Level2TicksFromMid { bid_prices: number[]; bid_quantities: number[]; ask_prices: number[]; ask_quantities: number[]; } interface AccountBalances { base: number; quote: number; deep: number; } interface AccountInfo { epoch: string; open_orders: { contents: string[]; }; taker_volume: number; maker_volume: number; active_stake: number; inactive_stake: number; created_proposal: boolean; voted_proposal: string | null; unclaimed_rebates: AccountBalances; settled_balances: AccountBalances; owed_balances: AccountBalances; } interface DecodedOrderId { isBid: boolean; price: number; orderId: number; } interface MarginManagerState { managerId: string; deepbookPoolId: string; riskRatio: number; baseAsset: string; quoteAsset: string; baseDebt: string; quoteDebt: string; basePythPrice: string; basePythDecimals: number; quotePythPrice: string; quotePythDecimals: number; currentPrice: bigint; lowestTriggerAbovePrice: bigint; highestTriggerBelowPrice: bigint; } interface MarginManagerAssets { baseAsset: string; quoteAsset: string; } interface MarginManagerDebts { baseDebt: string; quoteDebt: string; } interface MarginManagerBalancesResult { base: string; quote: string; deep: string; } interface BorrowedShares { baseShares: string; quoteShares: string; } /** * Parameters for depositing into a margin manager. * Either `amount` (number) or `coin` (TransactionArgument) must be provided, but not both. */ type DepositParams = { managerKey: string; } & ({ amount: number | bigint; coin?: never; } | { amount?: never; coin: TransactionArgument; }); /** * Parameters for depositing during margin manager initialization. * Either (`coinType` + `amount`) or (`coinType` + `coin`) must be provided. * `coinType` should be a coin key from config (e.g., 'SUI', 'DBUSDC', 'DEEP'). */ type DepositDuringInitParams = { manager: TransactionArgument; poolKey: string; coinType: string; } & ({ amount: number | bigint; coin?: never; } | { amount?: never; coin: TransactionArgument; }); //#endregion export { AccountBalances, AccountInfo, AddConditionalOrderParams, BalanceManager, BaseQuantityIn, BaseQuantityOut, BorrowedShares, CanPlaceLimitOrderParams, CanPlaceMarketOrderParams, Coin, Config, CreatePermissionlessPoolParams, CreatePoolAdminParams, DecodedOrderId, DepositDuringInitParams, DepositParams, InterestConfigParams, Level2Range, Level2TicksFromMid, LockedBalances, ManagerBalance, MarginManager, MarginManagerAssets, MarginManagerBalancesResult, MarginManagerDebts, MarginManagerState, MarginPool, MarginPoolConfigParams, MarginProposalParams, OrderDeepRequiredResult, OrderType, PendingLimitOrderParams, PendingMarketOrderParams, PlaceLimitOrderParams, PlaceMarginLimitOrderParams, PlaceMarginMarketOrderParams, PlaceMarketOrderParams, Pool, PoolBookParams, PoolConfigParams, PoolDeepPrice, PoolTradeParams, ProposalParams, PythConfig, QuantityOut, QuoteQuantityIn, QuoteQuantityOut, ReferralBalances, SelfMatchingOptions, SetEwmaParams, SwapParams, SwapWithManagerParams, VaultBalances }; //# sourceMappingURL=index.d.mts.map