/** * @packageDocumentation * @module API-DexVM */ import LuxCore from "../../lux"; import { JRPCAPI } from "../../common/jrpcapi"; import { GetOrderbookParams, GetOrderbookResponse, PlaceOrderParams, PlaceOrderResponse, CancelOrderParams, Order, Trade, Pool, GetPoolParams, GetQuoteParams, GetQuoteResponse, SwapParams, SwapResponse, AddLiquidityParams, AddLiquidityResponse, RemoveLiquidityParams, RemoveLiquidityResponse, Market, Position, MarginAccount, FundingRate, InsuranceFund, Commitment, MEVStats, ADLStatus, ADLStats, ADLEvent, DexStatus, TradingStats } from "./interfaces"; /** * Class for interacting with the D-Chain (DEX Chain) DexVM API. * * @category RPCAPIs * * @remarks This extends the [[JRPCAPI]] class. This class should not be directly called. * Instead, use the [[Lux.addAPI]] function to register this interface with Lux. */ export declare class DexVMAPI extends JRPCAPI { /** * Get the orderbook for a market. */ getOrderbook: (params: GetOrderbookParams) => Promise; /** * Place an order on the DEX. */ placeOrder: (params: PlaceOrderParams) => Promise; /** * Cancel an existing order. */ cancelOrder: (params: CancelOrderParams) => Promise<{ success: boolean; }>; /** * Get an order by ID. */ getOrder: (params: { orderId: string; }) => Promise; /** * Get recent trades for a market. */ getTrades: (params: { market: string; limit?: number; }) => Promise; /** * Get all liquidity pools. */ getPools: () => Promise; /** * Get a specific pool by ID or token pair. */ getPool: (params: GetPoolParams) => Promise; /** * Get a swap quote without executing. */ getQuote: (params: GetQuoteParams) => Promise; /** * Execute a swap on an AMM pool. */ swap: (params: SwapParams) => Promise; /** * Add liquidity to a pool. */ addLiquidity: (params: AddLiquidityParams) => Promise; /** * Remove liquidity from a pool. */ removeLiquidity: (params: RemoveLiquidityParams) => Promise; /** * Get all perpetual markets. */ getMarkets: () => Promise; /** * Get a specific perpetual market. */ getMarket: (params: { marketId: string; }) => Promise; /** * Get a specific position. */ getPosition: (params: { positionId: string; }) => Promise; /** * Get all positions for an address. */ getPositions: (params: { address: string; marketId?: string; }) => Promise; /** * Get margin account info for an address. */ getAccount: (params: { address: string; }) => Promise; /** * Get the current funding rate for a market. */ getFundingRate: (params: { marketId: string; }) => Promise; /** * Get the insurance fund status. */ getInsuranceFund: () => Promise; /** * Get a specific commitment by ID. */ getCommitment: (params: { commitmentId: string; }) => Promise; /** * Get all pending commitments. */ getCommitments: (params?: { sender?: string; revealed?: boolean; }) => Promise; /** * Get MEV protection statistics. */ getMEVStats: () => Promise; /** * Get ADL status for a market. */ getADLStatus: (params: { marketId: string; }) => Promise; /** * Get aggregate ADL statistics. */ getADLStats: () => Promise; /** * Get ADL events history. */ getADLEvents: (params?: { marketId?: string; limit?: number; }) => Promise; /** * Ping the D-Chain node. */ ping: () => Promise<{ success: boolean; }>; /** * Get D-Chain status and health. */ status: () => Promise; /** * Get trading statistics. */ getStats: () => Promise; constructor(core: LuxCore, baseURL?: string); } //# sourceMappingURL=api.d.ts.map