Skip to content

defaultPaymasterAndData

Middleware function that sets the paymasterAndData field in the given struct based on the entry point version of the account. This is the default used by createSmartAccountClient and is not necessary to be used directly.

Import

import { defaultPaymasterAndData } from "@aa-sdk/core";

Parameters

struct

UserOperationStruct the user operation structure to be modified

context

{ account: Account } an object containing the account information

Returns

Promise<UserOperationStruct> a promise that resolves to the modified user operation structure