# isValidPaymasterAndData | @aa-sdk/core

> Overview of the isValidPaymasterAndData function from @aa-sdk/core

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

```ts
function isValidPaymasterAndData<TEntryPointVersion>(request): boolean;
```

Defined in: [aa-sdk/core/src/utils/userop.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/utils/userop.ts#L45)

Utility method for asserting a UserOperationRequest has valid fields for the paymaster data

## Type Parameters

<table>
  <thead>
    <tr>
      <th align="left">Type Parameter</th>
      <th align="left">Default type</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `TEntryPointVersion` *extends* `EntryPointVersion`
      </td>

      <td>
        `EntryPointVersion`
      </td>
    </tr>

  </tbody>
</table>

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `request`
      </td>

      <td>
        `UserOperationStruct`\<`TEntryPointVersion`>
      </td>

      <td>
        a UserOperationRequest to validate
      </td>
    </tr>

  </tbody>
</table>

## Returns

`boolean`

a type guard that asserts the UserOperationRequest is a UserOperationRequest