import { type Chain, type Client, type ClientConfig, type CustomTransport, type PublicActions, type PublicRpcSchema, type RpcSchema, type Transport } from "viem"; import { z } from "zod"; import type { SmartContractAccount } from "../account/smartContractAccount.js"; import type { UserOperationContext } from "../actions/smartAccount/types.js"; import type { ClientMiddleware } from "../middleware/types.js"; import type { Prettify } from "../utils/index.js"; import { type BundlerClient } from "./bundlerClient.js"; import { type BundlerActions, type BundlerRpcSchema } from "./decorators/bundlerClient.js"; import { type BaseSmartAccountClientActions } from "./decorators/smartAccountClient.js"; import { SmartAccountClientOptsSchema } from "./schema.js"; import type { ClientMiddlewareConfig } from "./types.js"; type SmartAccountClientOpts = z.output; export type SmartAccountClientConfig = Prettify, "cacheTime" | "chain" | "key" | "name" | "pollingInterval" | "transport" | "type"> & { account?: account; opts?: z.input; /** * A function that adds a breadcrumb to the current context * Note, most implementations will override the client with the default alchemy transport and this * leads to the fact that a transport could be overwritten and not known until later. * * @param crumb A crumb, or span is telling that we are in a next step part of a multi step action * @returns */ addBreadCrumb?: (crumb: string) => T; } & ClientMiddlewareConfig>; export type SmartAccountClientRpcSchema = [ ...BundlerRpcSchema, ...PublicRpcSchema ]; export type SmartAccountClientActions = BaseSmartAccountClientActions & BundlerActions & PublicActions; export type SmartAccountClient = Record, rpcSchema extends RpcSchema = SmartAccountClientRpcSchema, context extends UserOperationContext | undefined = UserOperationContext | undefined> = Prettify>>; export type BaseSmartAccountClient = Prettify; } & SmartAccountClientOpts & BundlerActions & PublicActions>>; export declare function createSmartAccountClient(config: SmartAccountClientConfig): SmartAccountClient; export declare function createSmartAccountClientFromExisting = BundlerClient, TActions extends SmartAccountClientActions = SmartAccountClientActions, TRpcSchema extends SmartAccountClientRpcSchema = SmartAccountClientRpcSchema, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(config: Omit, "transport" | "chain"> & { client: TClient; }): SmartAccountClient; export {};