@alchemy/aa-core
Version:
viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts
101 lines (100 loc) • 9.4 kB
TypeScript
import { type Transport } from "viem";
import z from "zod";
import type { SmartAccountSigner } from "../signer/types.js";
export declare const createBaseSmartAccountParamsSchema: <TTransport extends Transport = Transport, TSigner extends SmartAccountSigner<any> = SmartAccountSigner<any>>() => z.ZodObject<{
rpcClient: z.ZodUnion<[z.ZodString, z.ZodType<import("../index.js").BundlerClient<TTransport>, z.ZodTypeDef, import("../index.js").BundlerClient<TTransport>>]>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
rpcClient: z.ZodUnion<[z.ZodString, z.ZodType<import("../index.js").BundlerClient<TTransport>, z.ZodTypeDef, import("../index.js").BundlerClient<TTransport>>]>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
}>, "chain" | "factoryAddress" | "rpcClient" | (undefined extends TSigner ? never : "signer")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
rpcClient: z.ZodUnion<[z.ZodString, z.ZodType<import("../index.js").BundlerClient<TTransport>, z.ZodTypeDef, import("../index.js").BundlerClient<TTransport>>]>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
}>, "chain" | "factoryAddress" | "rpcClient" | (undefined extends TSigner ? never : "signer")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
rpcClient: z.ZodUnion<[z.ZodString, z.ZodType<import("../index.js").BundlerClient<TTransport>, z.ZodTypeDef, import("../index.js").BundlerClient<TTransport>>]>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
}>]: z.baseObjectInputType<{
rpcClient: z.ZodUnion<[z.ZodString, z.ZodType<import("../index.js").BundlerClient<TTransport>, z.ZodTypeDef, import("../index.js").BundlerClient<TTransport>>]>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
}>[k_2]; }>;
export declare const SimpleSmartAccountParamsSchema: <TTransport extends Transport = Transport, TSigner extends SmartAccountSigner<any> = SmartAccountSigner<any>>() => z.ZodObject<{
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
transport: z.ZodType<TTransport, z.ZodTypeDef, TTransport>;
salt: z.ZodOptional<z.ZodBigInt>;
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
transport: z.ZodType<TTransport, z.ZodTypeDef, TTransport>;
salt: z.ZodOptional<z.ZodBigInt>;
}>, "chain" | "factoryAddress" | (undefined extends TTransport ? never : "transport") | (undefined extends TSigner ? never : "signer")> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
transport: z.ZodType<TTransport, z.ZodTypeDef, TTransport>;
salt: z.ZodOptional<z.ZodBigInt>;
}>, "chain" | "factoryAddress" | (undefined extends TTransport ? never : "transport") | (undefined extends TSigner ? never : "signer")>[k]; } : never, z.baseObjectInputType<{
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
transport: z.ZodType<TTransport, z.ZodTypeDef, TTransport>;
salt: z.ZodOptional<z.ZodBigInt>;
}> extends infer T_1 ? { [k_1 in keyof T_1]: z.baseObjectInputType<{
initCode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
chain: z.ZodType<import("viem").Chain, z.ZodTypeDef, import("viem").Chain>;
factoryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
signer: z.ZodType<TSigner, z.ZodTypeDef, TSigner>;
entryPointAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
accountAddress: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
entryPointVersion: z.ZodOptional<z.ZodType<keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>, z.ZodTypeDef, keyof import("../entrypoint/types.js").EntryPointRegistryBase<unknown>>>;
transport: z.ZodType<TTransport, z.ZodTypeDef, TTransport>;
salt: z.ZodOptional<z.ZodBigInt>;
}>[k_1]; } : never>;