Skip to content
Alchemy Logo

createSmartAccountClient

function createSmartAccountClient<TTransport, TChain, TAccount, TContext>(
  config,
): SmartAccountClient<TTransport, TChain, TAccount>;

Defined in: aa-sdk/core/src/client/smartAccountClient.ts:131

Type ParameterDefault type

TTransport extends Transport

Transport

TChain extends undefined | Chain

undefined | Chain

TAccount extends | undefined | SmartContractAccount

| undefined | SmartContractAccount

TContext extends | undefined | UserOperationContext

| undefined | UserOperationContext

ParameterTypeDescription

config

{ account?: TAccount; addBreadCrumb?: <T>(crumb) => T; customMiddleware?: ClientMiddlewareFn<TContext>; dummyPaymasterAndData?: ClientMiddlewareFn<TContext>; feeEstimator?: ClientMiddlewareFn<TContext>; gasEstimator?: ClientMiddlewareFn<TContext>; opts?: Object; paymasterAndData?: ClientMiddlewareFn<TContext>; signUserOperation?: ClientMiddlewareFn<TContext>; userOperationSimulator?: ClientMiddlewareFn<TContext>; }

The configuration for creating the smart account client

config.account?

TAccount

config.addBreadCrumb?

<T>(crumb) => T

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.

config.customMiddleware?

ClientMiddlewareFn<TContext>

config.dummyPaymasterAndData?

ClientMiddlewareFn<TContext>

config.feeEstimator?

ClientMiddlewareFn<TContext>

config.gasEstimator?

ClientMiddlewareFn<TContext>

config.opts?

Object

config.paymasterAndData?

ClientMiddlewareFn<TContext>

config.signUserOperation?

ClientMiddlewareFn<TContext>

config.userOperationSimulator?

ClientMiddlewareFn<TContext>

SmartAccountClient<TTransport, TChain, TAccount>

A smart account client capable of handling transactions, message signing, and other operations on a smart account

Was this page helpful?