# parsePaymasterAndData | @aa-sdk/core

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

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

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

```ts
function parsePaymasterAndData(
  paymasterAndData,
): Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData">;
```

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

Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string

## Parameters

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

  <tbody>
    <tr>
      <td>
        `paymasterAndData`
      </td>

      <td>
        `` `0x${string}` ``
      </td>

      <td>
        the paymaster and data hex string to parse.
        The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Pick`\<`UserOperationRequest`\<`"0.7.0"`>, `"paymaster"` | `"paymasterData"`>

the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field