Policies
Allocate a grant and return the EIP-712 payload the owner signs
Allocates the policy id, validation entity, and session signer, builds the exact installValidation calldata the signature will commit to, and returns the typed data for eth_signTypedData_v4. Stores nothing: a prepare that is never submitted leaves no state behind. The echoed fields must be passed back verbatim to :submit — the gateway recomputes everything from them, so tampering only produces a signature that no longer verifies.
post/wallets/{address}/policies:prepare
Request body
Example request
{
"chainId": 11155111,
"allowedActions": [
{
"target": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
}
],
"erc20SpendCap": {
"token": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
"amount": "500000000"
}
}Response
Payload to sign, plus the allocations submit must echo.
Example response
{
"policyId": "01JG2FE5MDVKBPHEG0PEYSDKAC",
"chainId": 11155111,
"sessionSigner": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
}