โ† Back to Web & Frontend Development

settlement-witness

OpenClaw skill: fetch replay-stable PASS/FAIL receipts

0
Source Code

SettlementWitness (OpenClaw Skill)

Use SettlementWitness to produce a replay-stable receipt (SAR v0.1) for task settlement.

Recommended usage (MCP)

POST https://defaultverifier.com/mcp

Health check: GET https://defaultverifier.com/mcp-healthz

The MCP endpoint returns the exact SettlementWitness receipt JSON.

Direct REST alternative

POST https://defaultverifier.com/settlement-witness GET https://defaultverifier.com/settlement-witness (returns JSON help payload)

Run this now (copy/paste)

Linux/macOS

curl -sS https://defaultverifier.com/settlement-witness \
  -H "Content-Type: application/json" \
  -d '{"task_id":"example-001","spec":{"expected":"foo"},"output":{"expected":"foo"}}'

Windows PowerShell (IMPORTANT)

PowerShell aliases curl to Invoke-WebRequest, which often causes 422 Invalid JSON. Use curl.exe and a file payload:

@'
{"task_id":"example-001","spec":{"expected":"foo"},"output":{"expected":"foo"}}
'@ | Out-File -Encoding ascii -NoNewline body.json

curl.exe -X POST https://defaultverifier.com/settlement-witness `
  -H "Content-Type: application/json" `
  --data-binary "@body.json"

Important: install/download does NOT execute

Many clients will only do discovery (e.g. tools/list). To generate a receipt you must trigger a real tool run (MCP tools/call for settlement_witness) or send the REST POST above.

Required input

  • task_id (string)
  • spec (object)
  • output (object)

Example REST request

{ "task_id": "example-002", "spec": { "expected": "foo" }, "output": { "expected": "foo" } }

Interpretation

  • PASS โ†’ verified completion
  • FAIL โ†’ do not auto-settle
  • INDETERMINATE โ†’ retry or escalate
  • receipt_id โ†’ stable identifier
  • reason_code โ†’ canonical failure reason (ex: SPEC_MISMATCH)

Safety notes

  • Never send secrets in spec/output.
  • Keep spec/output deterministic.