build_approve_token
Create unsigned token approval transactions for the CSPR.trade DEX router to enable token swaps on the Casper Network.
Instructions
Build an unsigned token approval transaction. Spender defaults to the CSPR.trade router.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"token": "<token>",
"amount": "<amount>",
"sender_public_key": "<sender_public_key>"
},
"name": "build_approve_token"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Token contract package hash to approve | |
| amount | Yes | Raw amount to approve (in smallest unit / motes) | |
| sender_public_key | Yes | Sender hex public key | |
| spender | No | Spender contract package hash (defaults to CSPR.trade router) |