v1
latestOpenAPI 3.0.02026-07-267331140.7 KBAccount Management
Retrieve Transaction Data for Withdrawing from Safe
Returns the EIP-712 typed data that needs to be signed by the user's wallet to withdraw ERC20 tokens or native tokens (xDAI) from the user's Safe account.
For ERC20 tokens, provide the token contract address. For native token (xDAI) withdrawals, use "0x0000000000000000000000000000000000000000" as the tokenAddress.
This endpoint is used as part of a three-step process:
- Call this endpoint to get the EIP-712 typed data
- Sign the typed data with the user's wallet using EIP-712 signature standard
- Submit the signature to the POST /api/v1/accounts/withdraw endpoint
get/api/v1/accounts/withdraw/transaction-data
Query parameters
tokenAddressstring required
The address of the token to withdraw. Use "0x0000000000000000000000000000000000000000" for native token (xDAI) withdrawals.
tostring required
The address to withdraw to.
amountstring required
The amount to withdraw in the token's base units.
Response
Successfully retrieved EIP-712 typed data for signing.
Example response
{
"data": {
"domain": {
"verifyingContract": "0x3270bf32AB647e90eF94A026c70Aa1daaaDA2382",
"chainId": 100
},
"primaryType": "ModuleTx",
"types": {
"ModuleTx": [
{
"type": "bytes",
"name": "data"
}
]
},
"message": {
"data": "0xa9059cbb0000000000000000000000003270bf32ab647e90ef94a026c70aa1daaaada23820000000000000000000000000000000000000000000000000de0b6b3a7640000",
"salt": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
}
}