algovoi-x402-receipt-adapter closes that gap. It turns an x402 payment into a
settlement attestation: a small JSON object
canonicalised under RFC 8785 (JCS) and
content addressed with SHA-256, that any party recomputes and verifies offline
with a JSON parser, JCS, and SHA-256 alone. No issuer call, no account, no
service.
What it produces
x402_payment_refbinds the settlement transaction to the requested amount and currency plus a timestamp, so a transaction hash can no longer be re-bound to a different amount.settlement_refis"sha256:"+ SHA-256(JCS(attestation)), the content address of the whole receipt. Recompute it in any language and it matches byte for byte.
Three ways to capture
Every option produces the samesettlement_ref for the same underlying payment.
| Option | Function | Use when |
|---|---|---|
| Facilitator | receipt_from_settle | you run an x402 facilitator, and emit the receipt from your own SettleResponse at settle time |
| Origin | capture_x402_settlement | you sit behind a managed gateway, and re-verify the transaction on chain (fail closed) before issuing |
| Direct | build_x402_settlement_attestation | you already hold both headers and trust them |
SettleResponse model
(transaction, network, payer); the legacy names txHash and networkId
are accepted as aliases.
Bind it into the Keystone
The settlement binds into the Keystone accountability chain with the publishedalgovoi-substrate binding primitive, introducing no new hashing. One
call ties a payment to the verified agent action that authorised it, so an x402
payment becomes part of an offline-verifiable record that runs from identity
through to settlement.
Install
Apache License 2.0. manylinux wheels for Python 3.11 to 3.13, from the AlgoVoi index:Verify offline
"sha256:" + SHA-256(JCS(attestation)).
Recompute it with any RFC 8785 canonicaliser and a SHA-256 and the reference
matches. No trust in AlgoVoi is required.
See also
- Verifiable x402 receipts the receipt discipline this produces
- Settlement attestation the evidence format
- The Keystone the trust chain it binds into
- Proven on-chain the Keystone carried through real settlements