Aggregate Settlement Record
aps_aggregate_settlementAggregate attribution primitives over a half-open settlement period into a signed SettlementRecord with per-contributor totals, Merkle commitments, and residual buckets for verification.
Instructions
Aggregate a batch of Attribution Primitives over a half-open settlement period [t0, t1) into a signed SettlementRecord. Each axis (D, P, G, C) produces a per-contributor total with a balanced-Merkle commitment. Residual buckets pool sub-threshold contributors. Output is a fully signed record ready for third-party verification.
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": {
"receipts": "<receipts>",
"period": "<period>",
"gateway_did": "<gateway_did>",
"gateway_private_key": "<gateway_private_key>"
},
"name": "aps_aggregate_settlement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes | ||
| receipts | Yes | Array of AttributionPrimitives to aggregate | |
| issued_at | No | Override issued_at (canonical ISO-8601 UTC ms + Z); defaults to now | |
| gateway_did | Yes | Gateway DID that signs the record | |
| gateway_private_key | Yes | Ed25519 gateway private key (hex) |