import { BlockHash, Header } from '@dedot/codecs'; import { HexString } from '@dedot/utils'; import type { BlockExplorer, BlockInfo } from '../../types.js'; import type { V2Client } from '../V2Client.js'; /** * @name V2BlockExplorer * @description Block explorer implementation for V2Client using JSON-RPC v2 (ChainHead API) */ export declare class V2BlockExplorer implements BlockExplorer { #private; constructor(client: V2Client); /** * Convert PinnedBlock to BlockInfo format */ private toBlockInfo; /** * Get the best block */ best(): Promise; /** * Subscribe to the best block */ best(callback: (block: BlockInfo) => void): () => void; /** * Get the finalized block */ finalized(): Promise; /** * Subscribe to the finalized block */ finalized(callback: (block: BlockInfo) => void): () => void; /** * Get the header of a block by number or hash */ header(hash: BlockHash): Promise
; /** * Get the body (transactions) of a block by number or hash */ body(hash: BlockHash): Promise; }