import type { StorageKey } from '@polkadot/types'; import type { HexString } from '@polkadot/util/types'; import type { Block } from '../blockchain/block.js'; import type { Blockchain } from '../blockchain/index.js'; export * from './decoder.js'; export * from './set-storage.js'; export * from './time-travel.js'; export type GetKeys = (startKey?: string) => Promise[]>; export type ProcessKey = (key: StorageKey) => any; export declare function fetchKeys(getKeys: GetKeys, processKey: ProcessKey): Promise; export declare function fetchKeysToArray(getKeys: GetKeys): Promise[]>; export declare const compactHex: (value: Uint8Array) => HexString; export declare const getParaId: (chain: Blockchain) => Promise; export declare const isUrl: (url: string) => boolean; export type Deferred = { resolve: (value: T | PromiseLike) => void; reject: (reason?: any) => void; promise: Promise; }; export declare function defer(): Deferred; export declare const CHILD_PREFIX_LENGTH: number; export declare const PREFIX_LENGTH = 66; export declare const prefixedChildKey: (prefix: HexString, key: HexString) => HexString; export declare const isPrefixedChildKey: (key: HexString) => boolean; export declare const splitChildKey: (key: HexString) => never[] | [`0x${string}`, `0x${string}`]; export declare const stripChildPrefix: (key: HexString) => `0x${string}`; export declare const getCurrentSlot: (head: Block) => Promise; export declare const getCurrentTimestamp: (head: Block) => Promise; export declare const getSlotDuration: (head: Block) => Promise;