Verify Settlement Record
aps_verify_settlementVerify a signed SettlementRecord against S1-S5 checks: signature, Merkle roots, conservation, residual shape, and optional input-receipt cross-check. Returns valid status and failure reason.
Instructions
Verify a signed SettlementRecord under S1-S5 (signature, Merkle roots, conservation, residual shape, optional input-receipts cross-check). S3 conservation is the strongest invariant: a gateway cannot inflate or suppress any contributor's share without breaking it. Returns {valid: true} or {valid: false, reason, detail}. Pass inputReceipts to also recompute input_receipts_hash.
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": {
"record": "<record>",
"gateway_public_key": "<gateway_public_key>"
},
"name": "aps_verify_settlement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| record | Yes | A signed SettlementRecord | |
| input_receipts | No | Optional — the input Attribution Primitives that fed the settlement. When supplied, S5 cross-checks input_receipts_hash and verifies each receipt individually. | |
| gateway_public_key | Yes | Gateway Ed25519 public key hex |