# defaultPaymasterAndData | @aa-sdk/core

> 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.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
const defaultPaymasterAndData: ClientMiddlewareFn;
```

Defined in: [aa-sdk/core/src/middleware/defaults/paymasterAndData.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/middleware/defaults/paymasterAndData.ts#L12)

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.

## Param

the user operation structure to be modified

## Param

an object containing the account information

## Returns

a promise that resolves to the modified user operation structure