You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it is possible to include a paymaster signature in the `paymasterAndData` field of the `PackedUserOperation`.
7
+
8
+
This paymaster signature is not included when calculating the `UserOperation` hash, same as the `signature` field,
9
+
which allows for the Account and the Paymaster to sign the rest of the `UserOperation` in parallel.
10
+
11
+
## Generating a Paymaster Signature
12
+
13
+
1. Create a `paymasterAndData` bytes array as usual.
14
+
2. Append the `PAYMASTER_SIG_MAGIC` (`0x22e325a297439656`) signature marker to the end of the `paymasterAndData` array.
15
+
3. Build the rest of the `UserOperation` and send it for signing to the Account and the Paymaster services in parallel.
16
+
4. Set the `signature` field of the `UserOperation` to the result of the Account signature as usual.
17
+
5. Calculate the size of the Paymaster Signature and store it in a `uint16 paymasterSignatureSize` variable.
18
+
6. Set the `paymasterSignature` field of the `UserOperation` to exactly `abi.encodePacked(paymasterAndData, paymasterSignatureSize, PAYMASTER_SIG_MAGIC)`.
19
+
20
+
## Summary of `paymasterAndData` format
21
+
22
+
The `paymasterAndData` field in its most complex form is a byte array with the following format:
0 commit comments