import { BlockHash, Bytes, Option, StorageData, StorageKey } from '@dedot/codecs'; import { SerdeEnum } from './serde.js'; export interface ReadProof { /** * Block hash used to generate the proof */ at: Hash; /** * A proof used to prove that storage entries are included in the storage trie */ proof: Array; } /** * Storage change set */ export interface StorageChangeSet { /** * Block hash */ block: Hash; /** * A list of changes */ changes: Array<[StorageKey, StorageData | null]>; } /** * Container for all related spans and events for the block being traced. */ export interface BlockTrace { blockHash: string; parentHash: string; tracingTargets: string; storageKeys: string; methods: string; spans: Array; events: Array; } /** * Represents a tracing event, complete with recorded data. */ export interface Event { target: string; data: Data; parentId: Option; } /** * Represents a single instance of a tracing span. * Exiting a span does not imply that the span will not be re-entered. */ export interface Span { id: bigint; parentId: Option; name: string; target: string; wasm: boolean; } /** * Holds associated values for a tracing span. */ export interface Data { stringValues: Record; } /** * Error response for the `state_traceBlock` RPC. */ export type TraceError = { error: string; }; /** * Response for the `state_traceBlock` RPC. */ export type TraceBlockResponse = SerdeEnum<{ traceError: TraceError; blockTrace: BlockTrace; }>; /** * Current state migration status. */ export interface MigrationStatusResult { topRemainingToMigrate: bigint; childRemainingToMigrate: bigint; totalTop: bigint; totalChild: bigint; }