import { type Address, type Assign, type EncodeDeployDataParameters, type Hex, type SignableMessage } from "viem"; import { type EntryPointVersion, type SmartAccount, type SmartAccountImplementation } from "viem/account-abstraction"; import type { SignAuthorizationReturnType } from "viem/accounts"; import { type EXEC_TYPE } from "../../constants.js"; import type { CallType, EntryPointType, GetEntryPointAbi, GetKernelVersion, KernelPluginManager, KernelPluginManagerParams, PluginMigrationData } from "../../types/kernel.js"; import type { Signer } from "../../types/utils.js"; type SignMessageParameters = { message: SignableMessage; useReplayableSignature?: boolean; }; export type KernelSmartAccountImplementation = Assign, entryPointVersion>, { sign: NonNullable; encodeCalls: (calls: Parameters[0], callType?: CallType | undefined, execType?: EXEC_TYPE | undefined) => Promise; kernelVersion: GetKernelVersion; kernelPluginManager: KernelPluginManager; factoryAddress: Address; accountImplementationAddress: Address; generateInitCode: () => Promise; encodeModuleInstallCallData: () => Promise; encodeDeployCallData: ({ abi, args, bytecode }: EncodeDeployDataParameters) => Promise; signMessage: (parameters: SignMessageParameters) => Promise; eip7702Authorization?: (() => Promise) | undefined; }>; export type CreateKernelAccountReturnType = SmartAccount>; export type CreateKernelAccountParameters> = { entryPoint: EntryPointType; index?: bigint; factoryAddress?: Address; accountImplementationAddress?: Address; metaFactoryAddress?: Address; address?: Address; kernelVersion: GetKernelVersion; initConfig?: KernelVerion extends "0.3.1" ? Hex[] : never; useMetaFactory?: boolean; pluginMigrations?: PluginMigrationData[]; } & ({ eip7702Auth?: SignAuthorizationReturnType | undefined; eip7702Account: Signer; plugins?: Omit, "entryPoint" | "kernelVersion"> | KernelPluginManager | undefined; } | { eip7702Auth?: SignAuthorizationReturnType | undefined; eip7702Account?: Signer | undefined; plugins: Omit, "entryPoint" | "kernelVersion"> | KernelPluginManager; }); /** * Default addresses for kernel smart account */ export declare const KERNEL_ADDRESSES: { ACCOUNT_LOGIC_V0_6: Address; ACCOUNT_LOGIC_V0_7: Address; FACTORY_ADDRESS_V0_6: Address; FACTORY_ADDRESS_V0_7: Address; FACTORY_STAKER: Address; }; /** * Build a kernel smart account from a private key, that use the ECDSA signer behind the scene * @param client * @param privateKey * @param entryPoint * @param index * @param factoryAddress * @param accountImplementationAddress * @param ecdsaValidatorAddress * @param address */ export declare function createKernelAccount>(client: KernelSmartAccountImplementation["client"], { plugins, entryPoint, index, factoryAddress: _factoryAddress, accountImplementationAddress: _accountImplementationAddress, metaFactoryAddress: _metaFactoryAddress, address, kernelVersion, initConfig, useMetaFactory: _useMetaFactory, eip7702Auth, eip7702Account, pluginMigrations }: CreateKernelAccountParameters): Promise>; export {}; //# sourceMappingURL=createKernelAccount.d.ts.map