projectId
, clientKey
, and appId
—you’ll need to use these values within Particle’s AA SDK or the Paymaster RPC to authenticate it).
Once you’ve deposited USDT, you’re can define sponsorship conditions and sponsoring transactions on any supported EVM chain (see Network Coverage).
before_paymaster_sign
and after_paymaster_sign
. The combination of these hooks, expressed through a webhook URL, set the sponsorship conditions (true
,200
or false
, 400
) on whether or not a specific UserOperation should be sponsored).
before_paymaster_sign
before_paymaster_sign
is hit before the Paymaster signs a given user operation (qualifies it as sponsored), thus before_paymaster_sign
will set the core logic behind whether or not a UserOperation should be signed by the Paymaster. This hook should take, as a request body:
projectUuid
- the project ID associated with your application (retrieved from the Particle dashboard).chainId
- the specific chain that sponsorship is requested on.userOp
- a UserOperation object.
sender
nonce
initCode
callData
callGasLimit
paymasterAndData
signature
verificationGasLimit
maxFeePerGas
maxPriorityFeePerGas
preVerificationGas
entryPoint
- the Entry Point address to be used, this should be 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
.parsed
- the UserOperation deconstructed into a standard transaction object.
accountType
- the smart account implementation being used, SIMPLE
, BICONOMY
, or CYBERCONNECT
.txs
- an array of transaction objects.
to
value
data
200
for a confirmed sponsorship, or 400
for a rejected sponsorship. See the below snippet for an example of what this request would look like:
after_paymaster_sign
after_paymaster_sign
will be hit after a signature occurs post-qualification from before_paymaster_sign
, allowing you to define logic to be executed after a confirmed sponsorship. after_paymaster_sign
takes the same parameters as before_paymaster_sign
; a request to an after_paymaster_sign
hook will look similar to the example included below: