import type { Chain, Client, ClientConfig, Transport } from "viem"; import { type SmartAccount } from "../accounts/types"; import { type Middleware } from "../actions/smartAccount/prepareUserOperationRequest"; import type { Prettify } from "../types"; import { type BundlerRpcSchema } from "../types/bundler"; import type { EntryPoint } from "../types/entrypoint"; import { type SmartAccountActions } from "./decorators/smartAccount"; /** * TODO: * - Add docs * - Fix typing, 'accounts' is required to signMessage, signTypedData, signTransaction, but not needed here, since account is embedded in the client */ export type SmartAccountClient | undefined = SmartAccount | undefined> = Prettify, SmartAccountActions>>; export type SmartAccountClientConfig | undefined = SmartAccount | undefined> = Prettify, "cacheTime" | "chain" | "key" | "name" | "pollingInterval"> & Middleware & { account: account; bundlerTransport: Transport; } & { entryPoint?: entryPoint; }>; /** * Creates a EIP-4337 compliant Bundler Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html). * * - Docs: https://docs.pimlico.io/permissionless/reference/clients/smartAccountClient * * A Bundler Client is an interface to "erc 4337" [JSON-RPC API](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) methods such as sending user operation, estimating gas for a user operation, get user operation receipt, etc through Bundler Actions. * * @param parameters - {@link WalletClientConfig} * @returns A Bundler Client. {@link SmartAccountClient} * * @example * import { createPublicClient, http } from 'viem' * import { mainnet } from 'viem/chains' * * const smartAccountClient = createSmartAccountClient({ * chain: mainnet, * transport: http(BUNDLER_URL), * }) */ export declare function createSmartAccountClient | undefined, TTransport extends Transport = Transport, TChain extends Chain | undefined = undefined, TEntryPoint extends EntryPoint = TSmartAccount extends SmartAccount ? U : never>(parameters: SmartAccountClientConfig): SmartAccountClient; //# sourceMappingURL=createSmartAccountClient.d.ts.map