Address detect / validate / convert / script (dev tool)
address_toolWork with public crypto addresses: op=detect (every chain/format an address fits; forks share version bytes, so expect several, e.g. a D... address returns doge, dgb and pivx; detect/validate support does not mean SwapChan can scan or sweep that chain), validate (address + chain), convert (address to another chain's format, e.g. BTC→LTC), cashaddr_to_legacy / legacy_to_cashaddr / cashaddr_decode / cashaddr_encode (Bitcoin Cash; prefix for to_cashaddr; encode takes kind p2pkh|p2sh + hash hex [+ prefix]), to_script (address+chain → scriptPubKey hex), from_script (script hex+chain → address), base58_encode (hex data) / base58_decode (base58 data). convert accepts optional from chain. Pure, offline computation (blocktools); nothing is fetched or stored. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).
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": {
"op": "<op>"
},
"name": "address_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| to | No | ||
| data | No | ||
| from | No | ||
| hash | No | ||
| kind | No | ||
| chain | No | ||
| prefix | No | ||
| script | No | ||
| address | No |