opnet
Version:
The perfect library for building Bitcoin-based applications.
21 lines (20 loc) • 1.03 kB
TypeScript
import { Network } from '../../node_modules/@btc-vision/bitcoin/build/index.js';
import { default as Agent } from '../fetch/fetch-browser.js/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;
}