UNPKG

@charterlabs/permissionless

Version:

A utility library for working with ERC-4337

67 lines 1.92 kB
import type { Assign, Prettify } from "viem"; import { type Address, type Client, type Hex } from "viem"; import { type SmartAccount, type SmartAccountImplementation, entryPoint07Abi } from "viem/account-abstraction"; export type ToNexusSmartAccountParameters = Prettify<{ client: Client; version: "1.0.0"; address?: Address | undefined; entryPoint?: { address: Address; version: "0.7"; }; index?: bigint; factoryAddress?: Address; validatorAddress?: Address; attesters?: Address[]; threshold?: number; /** * Validator data containing the public key X and Y coordinates */ validatorData?: { pubKeyX: bigint; pubKeyY: bigint; }; /** * Hash of the authenticator ID */ authenticatorIdHash?: Hex; /** * Array of executor modules with their configuration data */ executors?: { module: Address; data: Hex; }[]; /** * Hook module configuration */ hook?: { module: Address; data: Hex; }; /** * Array of fallback modules with their configuration data */ fallbacks?: { module: Address; data: Hex; }[]; /** * Array of pre-validation hooks */ preValidationHooks?: { hookType: bigint; module: Address; data: Hex; }[]; /** * Address of the registry contract */ registryAddress?: Address; }>; export type NexusSmartAccountImplementation = Assign<SmartAccountImplementation<typeof entryPoint07Abi, "0.7">, { sign: NonNullable<SmartAccountImplementation["sign"]>; }>; export type ToNexusSmartAccountReturnType = Prettify<SmartAccount<NexusSmartAccountImplementation>>; export declare function toNexusSmartAccount(parameters: ToNexusSmartAccountParameters): Promise<ToNexusSmartAccountReturnType>; //# sourceMappingURL=toNexusSmartAccount.d.ts.map