import { AccountInfo, BalanceManager, BaseQuantityIn, BaseQuantityOut, BorrowedShares, CanPlaceLimitOrderParams, CanPlaceMarketOrderParams, DecodedOrderId, Level2Range, Level2TicksFromMid, LockedBalances, ManagerBalance, MarginManager, MarginManagerAssets, MarginManagerBalancesResult, MarginManagerDebts, MarginManagerState, OrderDeepRequiredResult, PoolBookParams, PoolDeepPrice, PoolTradeParams, PythConfig, QuantityOut, QuoteQuantityIn, QuoteQuantityOut, ReferralBalances, VaultBalances } from "./types/index.mjs"; import { CoinMap, DeepbookPackageIds, PoolMap } from "./utils/constants.mjs"; import { BalanceManagerContract } from "./transactions/balanceManager.mjs"; import { DeepBookContract } from "./transactions/deepbook.mjs"; import { DeepBookAdminContract } from "./transactions/deepbookAdmin.mjs"; import { FlashLoanContract } from "./transactions/flashLoans.mjs"; import { GovernanceContract } from "./transactions/governance.mjs"; import { MarginAdminContract } from "./transactions/marginAdmin.mjs"; import { MarginLiquidationsContract } from "./transactions/marginLiquidations.mjs"; import { MarginMaintainerContract } from "./transactions/marginMaintainer.mjs"; import { MarginManagerContract } from "./transactions/marginManager.mjs"; import { MarginPoolContract } from "./transactions/marginPool.mjs"; import { MarginRegistryContract } from "./transactions/marginRegistry.mjs"; import { MarginTPSLContract } from "./transactions/marginTPSL.mjs"; import { PoolProxyContract } from "./transactions/poolProxy.mjs"; import { Transaction } from "@mysten/sui/transactions"; import { ClientWithCoreApi, SuiClientRegistration, SuiClientTypes } from "@mysten/sui/client"; //#region src/client.d.ts interface DeepBookCompatibleClient extends ClientWithCoreApi {} interface DeepBookOptions { address: string; balanceManagers?: { [key: string]: BalanceManager; }; marginManagers?: { [key: string]: MarginManager; }; coins?: CoinMap; pools?: PoolMap; adminCap?: string; marginAdminCap?: string; marginMaintainerCap?: string; packageIds?: DeepbookPackageIds; pyth?: PythConfig; /** * Bearer token for the Hermes serving Pyth's upgraded Core. Matches the option of the * same name in `@mysten/suins`, which takes the same credential. */ pythAccessToken?: string; name?: Name; } interface DeepBookClientOptions extends DeepBookOptions { client: DeepBookCompatibleClient; network: SuiClientTypes.Network; } declare function deepbook({ name, ...options }: DeepBookOptions): SuiClientRegistration; /** * DeepBookClient class for managing DeepBook operations. */ declare class DeepBookClient { #private; balanceManager: BalanceManagerContract; deepBook: DeepBookContract; deepBookAdmin: DeepBookAdminContract; flashLoans: FlashLoanContract; governance: GovernanceContract; marginAdmin: MarginAdminContract; marginMaintainer: MarginMaintainerContract; marginPool: MarginPoolContract; marginManager: MarginManagerContract; marginRegistry: MarginRegistryContract; marginLiquidations: MarginLiquidationsContract; poolProxy: PoolProxyContract; marginTPSL: MarginTPSLContract; /** * Creates a new DeepBookClient instance */ constructor({ client, address, network, balanceManagers, marginManagers, coins, pools, adminCap, marginAdminCap, marginMaintainerCap, packageIds, pyth, pythAccessToken }: DeepBookClientOptions); checkManagerBalance(managerKey: string, coinKey: string): Promise; checkManagerBalanceWithAddress(managerAddress: string, coinKey: string): Promise; checkManagerBalancesWithAddress(managerAddresses: string[], coinKeys: string[]): Promise>>; getBalanceManagerIds(owner: string): Promise; accountExists(poolKey: string, managerKey: string): Promise; whitelisted(poolKey: string): Promise; vaultBalances(poolKey: string): Promise; getPoolIdByAssets(baseType: string, quoteType: string): Promise; midPrice(poolKey: string): Promise; poolTradeParams(poolKey: string): Promise; poolBookParams(poolKey: string): Promise; stablePool(poolKey: string): Promise; registeredPool(poolKey: string): Promise; poolTradeParamsNext(poolKey: string): Promise; quorum(poolKey: string): Promise; poolId(poolKey: string): Promise; canPlaceLimitOrder(params: CanPlaceLimitOrderParams): Promise; canPlaceMarketOrder(params: CanPlaceMarketOrderParams): Promise; checkMarketOrderParams(poolKey: string, quantity: number | bigint): Promise; checkLimitOrderParams(poolKey: string, price: number | bigint, quantity: number | bigint, expireTimestamp: number): Promise; getQuoteQuantityOut(poolKey: string, baseQuantity: number | bigint): Promise; getBaseQuantityOut(poolKey: string, quoteQuantity: number | bigint): Promise; getQuantityOut(poolKey: string, baseQuantity: number | bigint, quoteQuantity: number | bigint): Promise; getQuoteQuantityOutInputFee(poolKey: string, baseQuantity: number | bigint): Promise; getBaseQuantityOutInputFee(poolKey: string, quoteQuantity: number | bigint): Promise; getQuantityOutInputFee(poolKey: string, baseQuantity: number | bigint, quoteQuantity: number | bigint): Promise; getBaseQuantityIn(poolKey: string, targetQuoteQuantity: number | bigint, payWithDeep: boolean): Promise; getQuoteQuantityIn(poolKey: string, targetBaseQuantity: number | bigint, payWithDeep: boolean): Promise; getOrderDeepRequired(poolKey: string, baseQuantity: number | bigint, price: number | bigint): Promise; accountOpenOrders(poolKey: string, managerKey: string): Promise; getOrder(poolKey: string, orderId: string): Promise<{ balance_manager_id: string; order_id: string; client_order_id: string; quantity: string; filled_quantity: string; fee_is_deep: boolean; order_deep_price: { asset_is_base: boolean; deep_per_asset: string; }; epoch: string; status: number; expire_timestamp: string; } | null>; getOrderNormalized(poolKey: string, orderId: string): Promise<{ quantity: string; filled_quantity: string; order_deep_price: { deep_per_asset: string; asset_is_base: boolean; }; isBid: boolean; normalized_price: string; balance_manager_id: string; order_id: string; client_order_id: string; fee_is_deep: boolean; epoch: string; status: number; expire_timestamp: string; } | null>; getOrders(poolKey: string, orderIds: string[]): Promise<{ balance_manager_id: string; order_id: string; client_order_id: string; quantity: string; filled_quantity: string; fee_is_deep: boolean; order_deep_price: { asset_is_base: boolean; deep_per_asset: string; }; epoch: string; status: number; expire_timestamp: string; }[] | null>; getLevel2Range(poolKey: string, priceLow: number | bigint, priceHigh: number | bigint, isBid: boolean): Promise; getLevel2TicksFromMid(poolKey: string, ticks: number): Promise; getAccountOrderDetails(poolKey: string, managerKey: string): Promise<{ balance_manager_id: string; order_id: string; client_order_id: string; quantity: string; filled_quantity: string; fee_is_deep: boolean; order_deep_price: { asset_is_base: boolean; deep_per_asset: string; }; epoch: string; status: number; expire_timestamp: string; }[] | []>; account(poolKey: string, managerKey: string): Promise; lockedBalance(poolKey: string, balanceManagerKey: string): Promise; getPoolDeepPrice(poolKey: string): Promise; balanceManagerReferralOwner(referral: string): Promise; getPoolReferralBalances(poolKey: string, referral: string): Promise; balanceManagerReferralPoolId(referral: string): Promise; poolReferralMultiplier(poolKey: string, referral: string): Promise; getBalanceManagerReferralId(managerKey: string, poolKey: string): Promise; getPriceInfoObject(tx: Transaction, coinKey: string): Promise; getPriceInfoObjects(tx: Transaction, coinKeys: string[]): Promise>; getPriceInfoObjectAge(coinKey: string): Promise; getMarginPoolId(coinKey: string): Promise; isDeepbookPoolAllowed(coinKey: string, deepbookPoolId: string): Promise; getMarginPoolTotalSupply(coinKey: string, decimals?: number): Promise; getMarginPoolSupplyShares(coinKey: string, decimals?: number): Promise; getMarginPoolTotalBorrow(coinKey: string, decimals?: number): Promise; getMarginPoolBorrowShares(coinKey: string, decimals?: number): Promise; getMarginPoolLastUpdateTimestamp(coinKey: string): Promise; getMarginPoolSupplyCap(coinKey: string, decimals?: number): Promise; getMarginPoolMaxUtilizationRate(coinKey: string): Promise; getMarginPoolProtocolSpread(coinKey: string): Promise; getMarginPoolMinBorrow(coinKey: string, decimals?: number): Promise; getMarginPoolInterestRate(coinKey: string): Promise; getUserSupplyShares(coinKey: string, supplierCapId: string, decimals?: number): Promise; getUserSupplyAmount(coinKey: string, supplierCapId: string, decimals?: number): Promise; getMarginManagerOwner(marginManagerKey: string): Promise; getMarginManagerDeepbookPool(marginManagerKey: string): Promise; getMarginManagerMarginPoolId(marginManagerKey: string): Promise; getMarginManagerBorrowedShares(marginManagerKey: string): Promise; getMarginManagerBorrowedBaseShares(marginManagerKey: string): Promise; getMarginManagerBorrowedQuoteShares(marginManagerKey: string): Promise; getMarginManagerHasBaseDebt(marginManagerKey: string): Promise; getMarginManagerBalanceManagerId(marginManagerAddress: string): Promise; getMarginManagerAssets(marginManagerKey: string, decimals?: number): Promise; getMarginManagerDebts(marginManagerKey: string, decimals?: number): Promise; getMarginManagerState(marginManagerKey: string, decimals?: number): Promise; getMarginManagerStates(marginManagers: Record, decimals?: number): Promise>; getMarginManagerBaseBalance(marginManagerKey: string, decimals?: number): Promise; getMarginManagerQuoteBalance(marginManagerKey: string, decimals?: number): Promise; getMarginManagerDeepBalance(marginManagerKey: string, decimals?: number): Promise; getMarginManagerBalances(marginManagers: Record, decimals?: number): Promise>; getConditionalOrderIds(marginManagerKey: string): Promise; getLowestTriggerAbovePrice(marginManagerKey: string): Promise; getHighestTriggerBelowPrice(marginManagerKey: string): Promise; isPoolEnabledForMargin(poolKey: string): Promise; getMarginManagerIdsForOwner(owner: string): Promise; getBaseMarginPoolId(poolKey: string): Promise; getQuoteMarginPoolId(poolKey: string): Promise; getMinWithdrawRiskRatio(poolKey: string): Promise; getMinBorrowRiskRatio(poolKey: string): Promise; /** * Minimum risk ratio required to open a new position on the pool. Gates * position opening, unlike `getMinBorrowRiskRatio`, which gates borrowing. */ getMinOpenRiskRatio(poolKey: string): Promise; getLiquidationRiskRatio(poolKey: string): Promise; getTargetLiquidationRiskRatio(poolKey: string): Promise; getUserLiquidationReward(poolKey: string): Promise; getPoolLiquidationReward(poolKey: string): Promise; getAllowedMaintainers(): Promise; getAllowedPauseCaps(): Promise; decodeOrderId(encodedOrderId: bigint): DecodedOrderId; } //#endregion export { DeepBookClient, DeepBookClientOptions, DeepBookCompatibleClient, DeepBookOptions, deepbook }; //# sourceMappingURL=client.d.mts.map