import type { AccountConfig, AccountConfigSetting, AccountResponse, AccountSummary, ActionStep, ActionType, ActivitiesResponse, ActivityType, FillsResponse, Market, Order, OrdersResponse, PerpsMarket, PerpsSigner, Position, PositionsResponse, ProviderAction, Quote, QuoteSide, SignedActionStep, SigningMethod, TradeType } from '@lifi/perps-types'; import type { Address } from 'viem'; import type { PerpsBaseConfig, PerpsClientSigner, SDKRequestOptions } from './config.js'; export interface PerpsSDKClient { readonly config: PerpsBaseConfig; readonly userWallet?: PerpsClientSigner; readonly providers: PerpsProvider[]; getProvider(key: string): PerpsProvider | undefined; } export interface SignActionsContext { userWallet?: PerpsClientSigner; signers?: PerpsSigner[]; } export interface ActionSignerContribution { signerAddress?: Address; params?: Record; } export interface LiquidationEstimateParams { entryPrice: number; leverage: number; isLong: boolean; } export interface ProviderGetAccountParams { address: Address; } export interface ProviderGetPositionsParams { address: Address; marketId?: string; limit?: number; cursor?: string; } export interface ProviderGetOrdersParams { address: Address; marketId?: string; limit?: number; cursor?: string; } export interface ProviderGetOrderParams { address: Address; id: string; } export interface ProviderGetFillsParams { address: Address; limit?: number; cursor?: string; startTime?: number; endTime?: number; } export interface ProviderGetActivityParams { address: Address; limit?: number; cursor?: string; startTime?: number; endTime?: number; type?: ActivityType[]; } export interface ProviderGetQuoteParams { symbol: string; side: QuoteSide; size: number; type: TradeType; } export type QuoteListener = (quote: Quote) => void; export interface PerpsProviderPlugin { readonly type: string; bind(client: PerpsSDKClient): void; getAccount(params: ProviderGetAccountParams, options?: SDKRequestOptions): Promise; getPositions(params: ProviderGetPositionsParams, options?: SDKRequestOptions): Promise; getOrders(params: ProviderGetOrdersParams, options?: SDKRequestOptions): Promise; getOrder(params: ProviderGetOrderParams, options?: SDKRequestOptions): Promise; getFills(params: ProviderGetFillsParams, options?: SDKRequestOptions): Promise; getActivity(params: ProviderGetActivityParams, options?: SDKRequestOptions): Promise; getQuote(params: ProviderGetQuoteParams, options?: SDKRequestOptions): Promise; getAccountSummary(account: AccountResponse, positions: Position[]): AccountSummary; formatOrderPrice(market: Market, price: number): string; formatOrderSize(market: Market, size: number): string; estimateLiquidationPrice(market: PerpsMarket, params: LiquidationEstimateParams): number | undefined; projectConfig(config: AccountConfig, setup: ProviderAction[], options: ProviderAction[]): AccountConfigSetting[]; resolveSetupParams?(action: ActionType, address: Address): Promise>; resolveActionRequest?(action: ActionType, address: Address, signers: PerpsSigner[]): Promise; signActions?(method: SigningMethod, steps: ActionStep[], address: Address, ctx?: SignActionsContext): Promise; } export type PerpsProvider = Omit; //# sourceMappingURL=provider.d.ts.map