Prepare gas-sponsored transaction
Prepare a gas-sponsored transaction from signed EIP-712 typed data.
Submit the owner’s off-chain signature along with the EIP-712 typed data that was signed. Returns an unsigned transaction for the sender to sign and broadcast.
How gas sponsorship works:
- Call an endpoint with
gas_sponsorship=true(e.g., /earn/transfer, /earn/manage, /credit/transfer) to get EIP-712 typed data - Owner signs the typed data off-chain
- Submit signature + typed data to this endpoint
- Sender signs and broadcasts the returned transaction, paying gas on behalf of the owner
Note: For gas-sponsored deposits via /earn/transfer or /credit/transfer, the owner must first set up a Permit2 allowance using /approve_transfer (once per token).
Body
The wallet address that owns the Product Account.
"0xCE1A77F0abff993d6d3D04d44b70831c6924fb40"
Blockchain network
base, ethereum, arbitrum, hyperevm, tempo "arbitrum"
Response containing EIP-712 typed data for Safe transaction signing.
- BatchedSafeOperationsResponse
- PermitTypedDataResponse
- Permit2TypedData
{
"domain": {
"chainId": 42161,
"name": "USD Coin",
"verifyingContract": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"version": "2"
},
"message": {
"deadline": "1762269774",
"nonce": "0",
"owner": "0xCE1A77F0abff993d6d3D04d44b70831c6924fb40",
"spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
},
"primaryType": "Permit",
"types": {
"EIP712Domain": [
{ "name": "name", "type": "string" },
{ "name": "version", "type": "string" },
{ "name": "chainId", "type": "uint256" },
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{ "name": "owner", "type": "address" },
{ "name": "spender", "type": "address" },
{ "name": "value", "type": "uint256" },
{ "name": "nonce", "type": "uint256" },
{ "name": "deadline", "type": "uint256" }
]
}
}The EIP-712 signed typed data signature.
"0x160d2709ae195f591daa33ad6ab1fb18b8762a39d8c4466c4cbe95cf6881fc3d54d469710ef0e7fd64ecff47c1ba5741d7254903bfaebdacea5aa8289f81ba9a1c"
The address of the wallet which will send the transaction.
"0x02122Ac49b0Be2e0eAD957F2D080805A0127Aa9d"
Which product the gas sponsorship is for. Determines which Product Account (Safe) address to use.
earn, credit, tokenized_assets Response
Successful Response
Transaction to be signed & submitted via the sender to the network.
{
"chainId": "0x2105",
"data": "0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000675f4a3d",
"from": "0x4A83b4413CF41C3244027e1590E35a0F48403F0c",
"gas": "0x7a120",
"maxFeePerGas": "0x59682f00",
"maxPriorityFeePerGas": "0x3b9aca00",
"nonce": "0x5",
"to": "0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",
"value": "0x0"
}