import { type Context } from '@acala-network/chopsticks-core'; import { z } from 'zod'; declare const schema: z.ZodObject<{ raw: z.ZodOptional; html: z.ZodOptional; extrinsic: z.ZodOptional, z.ZodObject<{ call: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>; address: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>; }, "strip", z.ZodTypeAny, { call: `0x${string}`; address: `0x${string}`; }, { call: `0x${string}`; address: `0x${string}`; }>]>>; hrmp: z.ZodOptional, z.ZodArray; }, "strip", z.ZodTypeAny, { data: `0x${string}`; sentAt: number; }, { data: `0x${string}`; sentAt: number; }>, "many">>>; dmp: z.ZodOptional; }, "strip", z.ZodTypeAny, { sentAt: number; msg: `0x${string}`; }, { sentAt: number; msg: `0x${string}`; }>, "many">>; ump: z.ZodOptional, z.ZodArray, "many">>>; at: z.ZodOptional>>; }, "strip", z.ZodTypeAny, { at?: `0x${string}` | undefined; extrinsic?: `0x${string}` | { call: `0x${string}`; address: `0x${string}`; } | undefined; html?: boolean | undefined; raw?: boolean | undefined; hrmp?: Record | undefined; dmp?: { sentAt: number; msg: `0x${string}`; }[] | undefined; ump?: Record | undefined; }, { at?: `0x${string}` | undefined; extrinsic?: `0x${string}` | { call: `0x${string}`; address: `0x${string}`; } | undefined; html?: boolean | undefined; raw?: boolean | undefined; hrmp?: Record | undefined; dmp?: { sentAt: number; msg: `0x${string}`; }[] | undefined; ump?: Record | undefined; }>; type Params = z.infer; export interface DryRunParams { /** * Return the raw storage diff */ raw: Params['raw']; /** * Return the html storage diff */ html: Params['html']; /** * The extrinsic to run */ extrinsic: Params['extrinsic']; /** * The horizontal messages to run */ hrmp: Params['hrmp']; /** * The downward messages to run */ dmp: Params['dmp']; /** * The upward messages to run */ ump: Params['ump']; /** * The block hash or number to run the extrinsic at */ at: Params['at']; } /** * Dry run an extrinsic or messages. * If `html` is true, return the generated storage diff html string. * If `raw` is true, return the raw storage diff. * Otherwise, return `{ oldState, newState, delta }`. * * This function is a dev rpc handler. Use `dev_dryRun` as the method name when calling it. * * @param context - The context object of the rpc handler * @param params - The parameters of the rpc handler * * @example Dry run an dmp * ```ts * import { WsProvider } from '@polkadot/rpc-provider' * const ws = new WsProvider(`ws://localhost:8000`) * const params = [ { raw: false, dmp: [ // https://acala.subscan.io/xcm_message/polkadot-2ab22918c567455af3563989d852f307f4cc1250 { sentAt: 14471353, msg: '0x02100104000100000b00280b9bba030a13000100000b00280b9bba03010300286bee0d0100040001010070c53d8e216f9c0f2e3b11c53f5f4bf3e078b995d5f0ed590f889f41e20e6531', }, ], }, ] * await ws.send('dev_dryRun', params) * ``` */ export declare const rpc: (context: Context, [params]: [DryRunParams]) => Promise; export {};