import { type Context, type RuntimeLog } from '@acala-network/chopsticks-core'; import type { HexString } from '@polkadot/util/types'; import { z } from 'zod'; declare const schema: z.ZodObject<{ includeRaw: z.ZodOptional; includeParsed: z.ZodOptional; includeBlockDetails: z.ZodOptional; parent: z.ZodOptional>>; block: z.ZodObject<{ header: z.ZodAny; extrinsics: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { extrinsics: `0x${string}`[]; header?: any; }, { extrinsics: `0x${string}`[]; header?: any; }>; }, "strip", z.ZodTypeAny, { block: { extrinsics: `0x${string}`[]; header?: any; }; includeRaw?: boolean | undefined; includeParsed?: boolean | undefined; includeBlockDetails?: boolean | undefined; parent?: `0x${string}` | undefined; }, { block: { extrinsics: `0x${string}`[]; header?: any; }; includeRaw?: boolean | undefined; includeParsed?: boolean | undefined; includeBlockDetails?: boolean | undefined; parent?: `0x${string}` | undefined; }>; type Params = z.infer; export interface RunBlockParams { /** * Include raw storage diff. Default to true */ includeRaw: Params['includeRaw']; /** * Include parsed storage diff in json format */ includeParsed: Params['includeParsed']; /** * Include block details such as parsed extrinsics in json format */ includeBlockDetails: Params['includeBlockDetails']; /** * The parent block hash to run on top of. Default to chain head. */ parent: Params['parent']; /** * Block to run */ block: Params['block']; } /** * The phase of an execution. * `number` means the phase is ApplyExtrinsic and the value is the extrinsic index. */ export type Phase = 'Initialization' | 'Finalization' | number; export interface RunBlockResponse { /** * The storage diff of each phase. */ phases: { /** * The phase of the execution. See {@link Phase}. */ phase: Phase; /** * The modified storages of this phase. */ storageDiff: { /** * Raw storage diff in bytes. Only available when `includeRaw` is true. */ raw?: { key: HexString; value: HexString | null; }; /** * Decoded storage diff. Only available when `includeParsed` is true. */ parsed?: { method: string; section: string; key: any[]; value: any; }; }[]; /** * Runtime logs. */ logs?: RuntimeLog[]; }[]; /** * Block details. Only available when `includeBlockDetails` is true. */ blockDetails?: { /** * Block timestamp in ms */ timestamp?: string; /** * Parsed events in this block. */ events?: { phase: Phase; section: string; method: string; args: any[]; argObj: Record; }[]; /** * Parsed extrinsics in this block. */ extrinsics: { section: string; method: string; args: any[]; argObj: Record; success: boolean; signer: string | null; }[]; }; } export declare const name = "runBlock"; /** * Run a set of extrinsics on top of a block and get the storage diff * and optionally the parsed storage diff and block details. * NOTE: The extrinsics should include inherents or tranasctions may have unexpected results. * NOTE: system.events and system.extrinsicData are excluded from storage diff to reduce size. * * This function is a dev rpc handler. Use `dev_runBlock` as the method name when calling it. */ export declare const rpc: ({ chain }: Context, [params]: [RunBlockParams]) => Promise; export {};