Build a settlement, collapsing a child back into its parent
warda_build_settlementAssemble an unsigned transaction that ends a child grant and returns its UNSPENT remainder to the parent's budget, charging the parent only what the child actually spent. This is the other half of delegation: letting a child expire instead returns the money to the PRINCIPAL — to the human — which is no use to an agent mid-task. Returns TWO digests: the parent's half is signed by the parent's agent key, the child's by the revocation key. THIS SERVER NEVER SEES EITHER. prevRoot is the parent's reserve root from before this child was pushed; warda_build_delegation returns it as parentReserveRootBefore. It cannot be derived from anything on chain — a hash chain pops by preimage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| child | Yes | ||
| parent | Yes | The grant, as issued by the principal. | |
| prefix | No | Address prefix: kaspa, kaspatest, kaspasim or kaspadev. Defaults to kaspatest. | |
| feeSompi | No | Defaults to 2000000 — two covenant inputs, so roughly twice a spend's mass. | |
| prevRoot | Yes | The parent's reserve root before this child was pushed. | |
| childUtxo | Yes | ||
| parentUtxo | Yes | The grant's CURRENT UTXO. Its address moves after every spend, so a stale one will not be found. | |
| computeBudget | No |