# 1. Suggest hooks
POST https://bundler.superform.xyz/hooks/suggest
Content-Type: application/json
{
"account": "0xUSER_SMART_ACCOUNT_ADDRESS",
"companion_mode": false,
"actions": [
{
"type": "DEPOSIT",
"slippage": 50,
"sources": [
{
"address": "0xb20000000000000000000078ee7ce2fe4908108c",
"chain_id": 8453,
"amount": "100000000"
}
],
"targets": [
{
"address": "0xc441a2cc3a528b6312740448a70cc4d40f4d7bfc",
"chain_id": 8453,
"vault_type": "SUPERVAULT",
"amount_proportion": 1
}
],
"route_type": "OUTPUT",
"outputs": []
}
]
}
# 2. Build UserOps
POST https://bundler.superform.xyz/executor/build
Content-Type: application/json
{
"account": "0xUSER_SMART_ACCOUNT_ADDRESS",
"hooks": [ /* hooks[] from suggest response */ ],
"fee_tokens_to_use": [ /* from suggest response */ ],
"token_balance_changes": [ /* from suggest response */ ],
"signer_type": "EIP4337"
}
# 3. Sign merkle_root then execute
# signature = wallet.signMessage(build_response.merkle_root)
POST https://bundler.superform.xyz/executor/execute
Content-Type: application/json
{
"expiry": 1234567890,
"merkle_root": "0x...",
"user_ops": [ /* from build response */ ],
"valid_after": "0",
"fees_tokens": [ /* from build response */ ],
"signature": "0xUSER_SIGNATURE"
}
# 4. Poll
GET https://bundler.superform.xyz/executor/transactions/{id}
# status: "PENDING" | "CONFIRMED" | "FAILED"