/** * JSON-RPC 2.0 transport for the Orbitport SDK. * * Pure transport — takes a token (not a getToken callback). Maps HTTP and * JSON-RPC error codes to typed OrbitportSDKError instances and preserves the * raw RPC code in `error.details.jsonRpcCode` for advanced branching. */ import { OrbitportSDKError } from './errors'; /** * Returns a process-local monotonic JSON-RPC id. * * JSON-RPC ids only need uniqueness per request/response pair, and we match * per-fetch, so this never collides across SDK instances. */ export declare function nextRpcId(): number; export interface JsonRpcCallArgs { url: string; method: string; params: TParams; token: string; } export interface JsonRpcCallOptions { timeout: number; headers?: Record; signal?: AbortSignal; debug?: boolean; } interface JsonRpcErrorPayload { code: number; message: string; data?: unknown; } /** * Executes a JSON-RPC 2.0 call. */ export declare function jsonRpcCall>(args: JsonRpcCallArgs, options: JsonRpcCallOptions): Promise; /** * Maps a JSON-RPC error payload to an OrbitportSDKError. * * Preserves the raw RPC code in `error.details.jsonRpcCode` for advanced * branching by callers. */ export declare function mapJsonRpcError(err: JsonRpcErrorPayload): OrbitportSDKError; export {}; //# sourceMappingURL=jsonrpc.d.ts.map