estimate_script_cost
Estimate a Kaspa script's compute cost before signing: get script units, compute-mass grams, share of the 500,000-gram block limit, and the minimum per-input compute budget to commit, helping avoid ExceededCommittedScriptUnits.
Instructions
Estimate a Kaspa script's compute cost: script units, compute-mass grams, share of the 500,000-gram block compute limit, and the minimum per-input compute budget to commit. Approximate; use it to size a compute budget before signing and to avoid ExceededCommittedScriptUnits.
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": "estimate_script_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script_hex | Yes | Script bytes as hex. |