import { BlockHash, StorageData, StorageKey } from '@dedot/codecs'; import type { Callback, Unsub } from '@dedot/types'; import { V2Client } from '../client/V2Client.js'; import { BaseStorageQuery } from './BaseStorageQuery.js'; /** * @name NewStorageQuery * @description * Implementation of BaseStorageQuery for the new JSON-RPC API (v2). * This service handles storage queries using the chainHead_storage RPC method * and chainHead events for subscriptions. * * It provides: * - One-time queries using chainHead_storage * - Subscriptions using chainHead 'bestBlock' events * - Efficient change detection for subscriptions */ export declare class NewStorageQuery extends BaseStorageQuery { protected client: V2Client; constructor(client: V2Client); /** * Query multiple storage items in a single call using chainHead_storage * * @param keys - Array of storage keys to query * @param at - Optional block hash to query at (defaults to best block) * @returns Promise resolving to a record mapping storage keys to their values */ query(keys: StorageKey[], at?: BlockHash): Promise>; /** * Subscribe to multiple storage items using chainHead 'bestBlock' events * * @param keys - Array of storage keys to subscribe to * @param callback - Function to call when storage values change * @returns Promise resolving to an unsubscribe function */ subscribe(keys: StorageKey[], callback: Callback>): Promise; }