import { BitcoinAddress } from './address.js'; import { BitcoinBlock } from './block.js'; import { BitcoinTransaction } from './transaction.js'; import { EsploraProtocol } from './protocol.js'; import type { RestConfig } from '../../types.js'; import type { HttpExecutor } from '../http.js'; /** * Esplora REST API client for Bitcoin. * * Wraps the sans-I/O {@link EsploraProtocol} with an {@link HttpExecutor} * for convenience. Users who want full control over I/O can access the * protocol layer directly via the {@link protocol} property. */ export declare class BitcoinRestClient { private _config; /** * The sans-I/O protocol layer. Use this to build {@link HttpRequest} * descriptors without performing any I/O. */ readonly protocol: EsploraProtocol; private readonly executor; /** Transaction-related API calls. */ transaction: BitcoinTransaction; /** Block-related API calls. */ block: BitcoinBlock; /** Address-related API calls. */ address: BitcoinAddress; constructor(config: RestConfig, executor?: HttpExecutor); get config(): RestConfig; /** * Execute an {@link HttpRequest} built by the protocol layer, check the status, * then parse the body. The body is read as text first, so an HTML error page * never reaches the JSON parser. * @throws {MethodError} `FAILED_HTTP_REQUEST` for a non-OK status, with the * status, the URL, and the body (JSON if it parses, else an excerpt). * @throws {MethodError} `INVALID_HTTP_RESPONSE` for an OK status with a body * that is not JSON. */ private executeRequest; } //# sourceMappingURL=index.d.ts.map