import type { StreamFilterMap, StreamId, StreamPayloadMap } from './streams/index.js'; import type { AccountApi } from './api/account.js'; import type { PerpsApi } from './api/perps.js'; import type { TriggerApi } from './api/trigger.js'; import type { PortfolioApi } from './api/portfolio.js'; import type { SwapApi } from './api/swap.js'; import type { TokensApi } from './api/tokens.js'; import type { ConnectionStateHandler, MessageHandler, SessionResponse, ShurikenClientOptions, ShurikenSubscription, SubscriptionFilter } from './types.js'; /** * High-level client for the Shuriken v2 API. * * Authenticates with an agent key (`sk_...`), provides typed methods for * the REST surface, and manages WebSocket stream subscriptions via the * control-plane bootstrap flow. * * Usage: * ```ts * const client = createShurikenClient({ apiBaseUrl, apiKey: 'sk_...' }) * await client.ws.connect() * * // Subscribe with typed handlers — session expands automatically * client.ws.subscribe('token.swaps', { tokenAddress: 'So111...' }, (event) => { * console.log(event.priceUsd) * }) * ``` */ export interface ShurikenClient { account: AccountApi; perps: PerpsApi; portfolio: PortfolioApi; swap: SwapApi; tokens: TokensApi; trigger: TriggerApi; ws: { connect(): Promise; disconnect(): void; subscribe(stream: S, filter: StreamFilterMap[S], handler: MessageHandler): ShurikenSubscription; subscribe(filter: SubscriptionFilter, handler: MessageHandler): ShurikenSubscription; onConnectionStateChange(handler: ConnectionStateHandler): () => void; getSession(): SessionResponse | null; }; } export declare function createShurikenClient(options: ShurikenClientOptions): ShurikenClient; //# sourceMappingURL=client.d.ts.map