import { VersionedTransaction } from "@solana/web3.js"; import type { PlacePredictionOrderRequest, PlacePredictionOrderResponse, PredictionEvent, PredictionHistoryEvent, PredictionOrderStatusResponse, PredictionPosition, PredictionPriceInterval, PredictionPricePoint, PredictionTransactionResponse } from "./types.js"; export declare const JUPITER_PREDICTION_API_URL = "https://api.jup.ag/prediction/v1"; export declare const POLYMARKET_CLOB_API_URL = "https://clob.polymarket.com"; export interface JupiterPredictionClientConfig { apiKey: string; baseUrl?: string; polymarketBaseUrl?: string; fetch?: typeof fetch; } export declare class JupiterPredictionApiError extends Error { readonly status: number; readonly code?: string; readonly responseBody: unknown; constructor(status: number, responseBody: unknown); } /** Typed client for the unsigned Jupiter Prediction transaction API. */ export declare class JupiterPredictionClient { private readonly apiKey; private readonly baseUrl; private readonly polymarketBaseUrl; private readonly fetcher; constructor(config: JupiterPredictionClientConfig); listEvents(params?: { category?: string; status?: string; }): Promise; getEvent(eventId: string): Promise; listPositions(ownerPubkey: string): Promise; listHistory(ownerPubkey: string): Promise; getPosition(positionPubkey: string): Promise; placeOrder(request: PlacePredictionOrderRequest): Promise; getOrderStatus(orderPubkey: string): Promise; closePosition(positionPubkey: string, ownerPubkey: string): Promise; closeAllPositions(ownerPubkey: string, minSellPriceSlippageBps?: number): Promise; claimPosition(positionPubkey: string, ownerPubkey: string): Promise; getPriceHistory(clobTokenId: string, interval: PredictionPriceInterval): Promise; private request; } /** Decode an unsigned transaction returned by Jupiter for wallet signing. */ export declare function deserializePredictionTransaction(response: PredictionTransactionResponse): VersionedTransaction;