export interface ClientConfig { endpoint: string; headers?: Record; timeout?: number; retries?: number; } export interface JsonRpcRequest { jsonrpc: '2.0'; id: string; method: string; params?: T; } export interface JsonRpcResponse { jsonrpc: '2.0'; id: string; result?: T; error?: JsonRpcError; } export interface JsonRpcError { code: number; message: string; data?: unknown; } export declare class JsonRpcClientError extends Error { code?: number | undefined; data?: unknown | undefined; constructor(message: string, code?: number | undefined, data?: unknown | undefined); } export declare class JsonRpcNetworkError extends Error { originalError?: Error | undefined; responseBody?: unknown | undefined; constructor(message: string, originalError?: Error | undefined, responseBody?: unknown | undefined); } /** * NEAR RPC Client with static function architecture * This client only holds configuration and provides a makeRequest method * Individual RPC methods are provided as standalone functions that take this client as a parameter */ export declare class NearRpcClient { readonly endpoint: string; readonly headers: Record; readonly timeout: number; readonly retries: number; constructor(config: string | ClientConfig); /** * Make a raw JSON-RPC request * This is used internally by the standalone RPC functions */ makeRequest(method: string, params?: TParams): Promise; /** * Create a new client with modified configuration */ withConfig(config: Partial): NearRpcClient; } export declare const defaultClient: NearRpcClient; //# sourceMappingURL=client.d.ts.map