opnet
Version:
The perfect library for building Bitcoin-based applications.
21 lines (20 loc) • 961 B
TypeScript
import { Network } from '@btc-vision/bitcoin';
import Agent from 'undici/types/agent.js';
import { AbstractRpcProvider } from './AbstractRpcProvider.js';
import { JsonRpcPayload } from './interfaces/JSONRpc.js';
import { JsonRpcCallResult } from './interfaces/JSONRpcResult.js';
export declare class JSONRpcProvider extends AbstractRpcProvider {
private readonly timeout;
private readonly fetcherConfigurations;
private useRESTAPI;
private readonly useThreadedParsing;
readonly url: string;
private _fetcherWithCleanup;
constructor(url: string, network: Network, timeout?: number, fetcherConfigurations?: Agent.Options, useRESTAPI?: boolean, useThreadedParsing?: boolean);
private get fetcher();
close(): Promise<void>;
setFetchMode(useRESTAPI: boolean): void;
_send(payload: JsonRpcPayload | JsonRpcPayload[]): Promise<JsonRpcCallResult>;
protected providerUrl(url: string): string;
private parseResponse;
}