decode_script
Decode hex-encoded scriptPubKey to determine its script type and generate the corresponding address, with optional network override.
Instructions
Decode a scriptPubKey to its type and address. Works offline.
Args: script_hex: The hex-encoded script. network: Override the server's network for address rendering.
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": {
"script_hex": "<script_hex>"
},
"name": "decode_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | ||
| script_hex | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |