@alchemy/aa-core
Version:
viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts
13 lines (12 loc) • 1.09 kB
TypeScript
import { type Chain, type Client, type PublicActions, type PublicRpcSchema, type Transport } from "viem";
import type { SmartContractAccount } from "../account/smartContractAccount.js";
import type { BundlerActions, BundlerRpcSchema } from "../client/decorators/bundlerClient.js";
import type { ClientMiddlewareConfig } from "../client/types.js";
import type { ClientMiddleware } from "./types.js";
export type MiddlewareClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined> = Client<TTransport, TChain, TAccount, [
...BundlerRpcSchema,
...PublicRpcSchema
], PublicActions & BundlerActions>;
export declare const middlewareActions: (overrides: ClientMiddlewareConfig) => <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: MiddlewareClient<TTransport, TChain, TAccount>) => {
middleware: ClientMiddleware;
};