import type { EsploraBlock } from '../../types.js'; import type { HttpRequest } from '../http.js'; import type { EsploraProtocol } from './protocol.js'; /** * Block-related Esplora REST API operations. * * Note: The Esplora API always returns the same block format regardless * of any "verbosity" setting (unlike Bitcoin Core RPC). Use the RPC * client if you need verbosity-controlled block responses. */ export declare class BitcoinBlock { private readonly protocol; private readonly exec; constructor(protocol: EsploraProtocol, exec: (req: HttpRequest) => Promise); /** * Returns the blockheight of the most-work fully-validated chain. * @returns {Promise} The current block height. */ count(): Promise; /** * Returns the Esplora block data for a given blockhash or height. * @param {object} params The block hash or height. * @param {string} [params.blockhash] The blockhash of the block to query. * @param {number} [params.height] The block height of the block to query. * @returns {Promise} The block data. * @throws {BitcoinRestError} If neither blockhash nor height is provided. */ get({ blockhash, height }: { blockhash?: string; height?: number; }): Promise; /** * Get the block hash for a given block height. * See {@link https://github.com/blockstream/esplora/blob/master/API.md#get-block-heightheight | Esplora GET /block-height/:height } for details. * @param {number} height The block height (required). * @returns {Promise} The hash of the block at the given height. */ getHash(height: number): Promise; } //# sourceMappingURL=block.d.ts.map