permissionless
Version:
A utility library for working with ERC-4337
26 lines • 1.36 kB
TypeScript
import { type Account, type Address, type Assign, type Chain, type Client, type JsonRpcAccount, type LocalAccount, type OneOf, type Prettify, type Transport, type WalletClient } from "viem";
import { type SmartAccount, type SmartAccountImplementation, entryPoint07Abi } from "viem/account-abstraction";
import { type EthereumProvider } from "../../utils/toOwner.js";
export type ToNexusSmartAccountParameters = Prettify<{
client: Client<Transport, Chain | undefined, JsonRpcAccount | LocalAccount | undefined>;
owners: [
OneOf<EthereumProvider | WalletClient<Transport, Chain | undefined, Account> | LocalAccount>
];
version: "1.0.0";
address?: Address | undefined;
entryPoint?: {
address: Address;
version: "0.7";
};
index?: bigint;
factoryAddress?: Address;
validatorAddress?: Address;
attesters?: Address[];
threshold?: number;
}>;
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