import type { SmartAccountSigner } from "@aa-sdk/core"; import type { AlchemyTransport } from "@account-kit/infra"; import { type Address, type Chain, type Prettify } from "viem"; import type { InnerWalletApiClientBase } from "../types.ts"; import { type SmartWalletActions } from "./decorator.js"; import type { ToWebAuthnAccountParameters } from "viem/account-abstraction"; export type WebAuthnSigner = { credential: ToWebAuthnAccountParameters["credential"]; getFn?: ToWebAuthnAccountParameters["getFn"] | undefined; rpId?: ToWebAuthnAccountParameters["rpId"] | undefined; }; export type SmartWalletSigner = SmartAccountSigner | WebAuthnSigner; export type SmartWalletClientParams = Prettify<{ transport: AlchemyTransport; chain: Chain; signer: SmartWalletSigner; account?: TAccount | Address | undefined; } & ({ policyId?: string; policyIds?: never; } | { policyIds?: string[]; policyId?: never; })>; export type SmartWalletClient = InnerWalletApiClientBase>; /** * Creates a smart wallet client that can be used to interact with a smart account. * * @param {SmartWalletClientParams} params - The parameters for creating the smart wallet client * @param {AlchemyTransport} params.transport - The Alchemy transport to use * @param {Chain} params.chain - The chain to use * @param {SmartAccountSigner | WebAuthnSigner} params.signer - The signer to use for the smart account * @param {string} [params.policyId] - The policy ID for gas sponsorship (optional) * @param {Address} [params.account] - The smart account address to use (optional) * @returns {SmartWalletClient} - A viem-compatible client * * @example * ```ts * import { LocalAccountSigner } from "@aa-sdk/core"; * import { alchemy, arbitrumSepolia } from "@account-kit/infra"; * import { generatePrivateKey } from "viem/accounts"; * import { createSmartWalletClient } from "@account-kit/wallet-client"; * * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); * const transport = alchemy({ * apiKey: "your-alchemy-api-key", * }); * const client = createSmartWalletClient({ * transport, * chain: arbitrumSepolia, * signer, * }); * ``` */ export declare function createSmartWalletClient(params: SmartWalletClientParams): SmartWalletClient;