Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions EVIDENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ For what a receipt does and doesn't prove, see [`docs/DESIGN-FAQ.md`](docs/DESIG
| [tx 1](https://stellar.expert/explorer/public/tx/ed5a41cf0b504a674ac621845767994d333aa253b9f9f3f7c5133df389e6d5d4), [tx 2](https://stellar.expert/explorer/public/tx/e0c48c07cbfe55b0034d1133e8a5f4404b3c0e64cf28eab9f320b1f985ecb7f3), [tx 3](https://stellar.expert/explorer/public/tx/0f6250773f9c3311bb27da64f5194c06e5d24cf2507d234a9df8c17ad156994b) | mainnet, 18 Nov 2026 | 3 purchases (0.05 USDC each, `/api/v1/premium/market`) from a second AgentLedger agent wallet `GA7KZG5E...UBH4AWKR`, made with `nirium` 0.19.1 through the pre-sign policy hook (section 2) |
| [Escrow release tx](https://stellar.expert/explorer/public/tx/0c533088ab6326a78b9f79c197b7636ca4662a0d72562968ddea37f370a8192b) | mainnet, 3 Sep 2026 | One escrow release (0.4985 USDC) to our own account, using the team's funds, separate from the x402 payments above |

On testnet, the server snippet on nirium.xyz was run as published with `nirium` 0.20.0 on 25 Nov 2026: 402, then 0.05 USDC paid, then 200 ([tx](https://stellar.expert/explorer/testnet/tx/0ab43362e90d5d123ade51ea906fa760c7d042dfd4d01c5ca8815aa6e6025e24)). Both accounts are our own throwaway ones: a test, not usage.

**Honest limit:** the last payment to the billing account was 24 Nov 2026 ([tx](https://stellar.expert/explorer/public/tx/786db50b8cba033f56f987adb113e53d2dee7d8a08066ed9e5664fc41f3ec336), our own test of `nirium` 0.20.0, checked 25 Nov 2026 UTC). None of the 40 comes from an external customer: 22 came from our own test wallets and 18 from two AgentLedger wallets. Our founder initially funded the first one. AgentLedger's founder joined Nirium part-time in October 2026, after the first 15 payments and before the last 3. Both AgentLedger batches were integration tests, not organic usage. The 29 Sep batch predates the pre-sign hook; the 18 Nov batch went through it.

## 2. Pre-sign policy hook (testnet and mainnet)
Expand Down Expand Up @@ -44,8 +46,8 @@ The runs below used the TypeScript SDK. Since 22 Nov 2026 the same hook is also
| [CID](https://gateway.pinata.cloud/ipfs/QmUoapw3ya1pNkWChZZCLWq1z2yUZffnrEtt5W3LXc2KzM) | testnet, 29 Oct 2026 | Our own workshop dry run: a receipt signed with a Stellar key (`nirium-audit-v1:<sha256>`) |
| [CID](https://gateway.pinata.cloud/ipfs/QmboKKkuwck3zvRx2bqnzUdDFkrEtc1VUHo6rrzm9nyBtD) + [tx](https://stellar.expert/explorer/testnet/tx/95717202be514ed0ae6d59d88c5950d79ff94b40dad709a430691ad6c4449b7b) | testnet, 1 Nov 2026 | Our Pollar adapter anchoring a receipt on a payment's success event. Our own self-test, not a feature Pollar has adopted |
| [CID](https://gateway.pinata.cloud/ipfs/Qmd7yun1FUDZ3p2DK36BxRpLaAA2EQjjWfZ1S77R4Z1v4F), [file](https://nirium.xyz/legal/restricted-jurisdictions-v1.md) | mainnet, 25 Nov 2026 | Our own notice: the hash of version 1.5 of our Restricted Jurisdictions policy as published that day (SHA-256 `4713f04a...bec4`), signed with a Nirium test key `GCE5L5ZA...FZE5Z` (the key of our own 24 Nov payment test). Our own use, never counted as usage. If the policy changes, the live file will stop matching and this receipt still shows v1.5 |
| [Reporting summary](https://nirium-agent-mainnet.fly.dev/api/reporting/summary?network=mainnet) | mainnet, live | 44 anchors over the full history, re-checked 25 Nov 2026, including our own tests and demos. The last three: two on 24 Nov (one is AgentRail's, in section 4; we have not identified the other) and our own notice on 25 Nov, below. The five before them are AgentLedger's, above. Its payment count was corrected on 21 Nov 2026: it also counted rejected payment attempts (3 on mainnet, from 6 Sep 2026: 42 instead of 39); it now counts only received payments and matches section 1 |
| [nirium.xyz/verify](https://nirium.xyz/verify) | live | Anyone can paste any CID. Since 22 Nov 2026 the page recomputes the CID and the hash in the browser from the gateway bytes, so a gateway (or our server) serving a different document shows up as a mismatch; the signature check still runs on nirium.xyz's server. For a check that relies on nothing of ours, run `npx nirium-cli verify <CID>` |
| [Reporting summary](https://nirium-agent-mainnet.fly.dev/api/reporting/summary?network=mainnet) | mainnet, live | 44 anchors over the full history, re-checked 25 Nov 2026, including our own tests and demos. The last three: two on 24 Nov (one is AgentRail's, in section 4; we have not identified the other) and our own notice on 25 Nov, above. The five before them are AgentLedger's, above. Its payment count was corrected on 21 Nov 2026: it also counted rejected payment attempts (3 on mainnet, from 6 Sep 2026: 42 instead of 39); it now counts only received payments and matches section 1 |
| [nirium.xyz/verify](https://nirium.xyz/verify) | live | Anyone can paste any CID. Since 25 Nov 2026 it also shows nine example receipts, grouped by when they matter (before paying, the decision, the delivery, afterwards), each saying whose it is. Since 22 Nov 2026 the page recomputes the CID and the hash in the browser from the gateway bytes, so a gateway (or our server) serving a different document shows up as a mismatch; the signature check still runs on nirium.xyz's server. For a check that relies on nothing of ours, run `npx nirium-cli verify <CID>` |
| `POST /api/audit/log` on [testnet](https://nirium-agent.fly.dev/api/audit/info) and [mainnet](https://nirium-agent-mainnet.fly.dev/api/audit/info) | live | Anyone can anchor a record with no API key, free and rate-limited during the beta. Signing with your own Stellar key is optional. API keys for the rest of the API are at [nirium.xyz/keys](https://nirium.xyz/keys) |
| [`verify-audit-cid`](https://github.com/nirium-protocol/nirium/tree/main/actions/verify-audit-cid) GitHub Action, [PR #259](https://github.com/nirium-protocol/nirium/pull/259), [PR #260](https://github.com/nirium-protocol/nirium/pull/260) | live, 6 Nov 2026 | No longer depends on one public IPFS gateway. Tries a dedicated gateway first, then two public ones as fallback, and reports which one answered. Also fixed: verification of hash-only receipts (no `record` field), which previously always failed. |
| Keep your own copy: [`nirium anchor --save`](packages/cli/README.md#keep-your-own-copy), `nirium cid`, the SDKs' `receiptCid()` / `receipt_cid()`, and the anchor response's `document` (core-private #232) | testnet, 21 Nov 2026 | A receipt stays on IPFS only while someone pins it, so the anchor response now returns the exact document that was pinned. Its bytes give back the same CID if they are ever re-added to IPFS, and `nirium cid` checks a saved copy locally. Checked live with our own self-test anchor [`QmT4poPb...MQHr`](https://nirium.myfilebase.com/ipfs/QmT4poPbBxMaiNis4VDgtUNzU559ENJWLtbDDKXwz9MQHr) (tag `selftest-nirium`, never counted as use): `--save` stored the document from the response, and `nirium cid` gave back the same CID. The local CID computation matches three real mainnet receipts and `ipfs-only-hash` |
Expand All @@ -67,7 +69,7 @@ TIA signs with two keys of its own, used in parallel: `GATT3MOL...BVJV4KXI` for
| Pako Méndez (Costa Rica), [workshop CID](https://gateway.pinata.cloud/ipfs/QmS45Gs3KNExpB4jmmkb9pjN81vhwhB3FbF2Z6rrozNstZ), then [unsigned CID](https://gateway.pinata.cloud/ipfs/QmSXQr1MtxtXHmAWpd2mtJPenfkRWRLH4SCLVLV2HEYTsu) and [signed CID](https://gateway.pinata.cloud/ipfs/QmUzKWHGZUc9sNSFuuzWhEk5Sko15w87EBBaNjVVjevcP6), [issue #243](https://github.com/nirium-protocol/nirium/issues/243) | mainnet, 2 Nov, then testnet, 2-3 Nov (UTC) | Independent user, own key at the workshop. Anchored two more records afterward, with two different tools |
| Brayan / Dynerox, [CID](https://gateway.pinata.cloud/ipfs/QmYsP9hD5CA1PXDu9qqjEGjrvioYn6Fy45ULetKkibxYQZ) | mainnet, 30 Oct | Independent user, own key, workshop attendee |

**Honest limit:** six is a small sample, stated as such. Key ownership and not being funded by the team are self-declared. Self-test anchors (`selftest-nirium`) are never counted.
**Honest limit:** six is a small sample, stated as such. Key ownership and not being funded by the team are self-declared. Self-test anchors (`selftest-nirium`, and the `selftest-...` tags of our own examples) are never counted.

Not counted as users above:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ sequenceDiagram

A Stellar payment is already public and can't be changed: anyone can check the payer, payee, asset and amount from the transaction hash. A receipt that only repeats those fields proves nothing new. Audit Trail is for what the ledger doesn't hold:

- **What a policy decided**, including payments it refused and never signed. No transaction exists for those.
- **What a policy decided**, including payments it refused and never signed (no transaction exists for those) or held until a person approved them.
- **What a payment was for**: the resource, request or delivery it paid for.
- **Documents and events that never touch the chain**: reports, approvals, proof that a task was done.
- **Documents and events that never touch the chain**: quotes, accepted terms, approvals, proof of delivery, and [a later correction](./examples/build-correction-receipt) that keeps the original.
- **Who declared it**, through the optional ed25519 signature.

If everything you want to prove is already in the transaction, link the transaction.
Expand Down
12 changes: 12 additions & 0 deletions docs/DESIGN-FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ A receipt is for what the ledger doesn't hold:
GET /signals, request r-123, response delivered".
- **A policy decision**, including a payment the agent refused and never
signed. No transaction exists for that, so the ledger has nothing to show.
The same goes for one it held until a person approved it.
- **Several parties**, each signing its own part with its own key, so a missing
or out-of-order step can be detected
([example](../examples/build-logistics-checkpoints)).
- **Records that never touch the chain**: a partner's exchange-rate quote, the
evidence behind an escrow release, the invoice or order being paid, which
version of the terms a user accepted.
Expand Down Expand Up @@ -66,6 +70,14 @@ A receipt is an integrity seal: it shows the record hasn't changed since it
was anchored and, if signed, who declared it. It does not prove the record is
true, and it is not notarization or legal proof.

## What if a receipt was wrong?

It can't be edited, so you anchor a second one that names the first by CID and
hash, says what changed and why, and is signed with the same key. Both stay
visible ([example](../examples/build-correction-receipt)). The limit: someone
who holds only the first CID can't tell that a correction exists, so the issuer
has to share the whole chain.

## What if Nirium goes away?

Receipts stay checkable without us. The record lives on IPFS under its CID,
Expand Down
17 changes: 13 additions & 4 deletions docs/FOR-REVIEWERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ and 12 Nov 2026, with two keys of its own (each one listed in EVIDENCE). The
wallets behind its payments are also TIA's own, so we count these as
integration tests, not as paying customers.

The same page has eight more examples, each saying whose receipt it is: a
payment a policy blocked, one held until a person approved it, a shipment
handoff signed by several keys, a proof of delivery, and others. Most are
testnet demos or integration tests, and the page says so.

To see why a receipt can be trusted, change one character of any receipt
and verify it again: the signature still belongs to the original, the file
no longer does, and verification fails.
Expand All @@ -75,7 +80,10 @@ and their 21 test cases now run in our CI (details in EVIDENCE, section 1).
mainnet test of the pre-sign policy hook by AgentLedger, whose founder works
with Nirium part-time. None of them came from an external payer; they are
our own and our integrators' tests.
- **Testnet:** a payment through `nirium-cli` on 10 Nov 2026 settled as
- **Testnet:** the server snippet on nirium.xyz, run as published with
`nirium` 0.20.0 on 25 Nov 2026, settled 0.05 USDC between our own test accounts as
[`0ab43362…6025e24`](https://stellar.expert/explorer/testnet/tx/0ab43362e90d5d123ade51ea906fa760c7d042dfd4d01c5ca8815aa6e6025e24),
and a payment through `nirium-cli` on 10 Nov 2026 settled as
[`4b1427ae…8607ecf3`](https://stellar.expert/explorer/testnet/tx/4b1427ae8328a0c1c70daaa412f941234895a8c9f5fd85c03c49501e8607ecf3).
Settlement on testnet goes through a hosted facilitator and sometimes
fails on the first try; a retry settles.
Expand All @@ -85,7 +93,8 @@ Live counts, each labeled with its source: [nirium.xyz/stats](https://nirium.xyz
## 4. Treasury Node - real money, on mainnet, with a contract that can't take it

Nirium doesn't hold the vault. It holds the `RebalanceManager` role of a
[DeFindex](https://defindex.io) vault the client owns, and DeFindex's own
[DeFindex](https://defindex.io) vault structured for the client to own (the
one below is our own, self-funded), and DeFindex's own
`rebalance()` function never takes a destination address - withdrawal isn't
forbidden, it's inexpressible in the contract. That's not our framing; it's
verifiable in DeFindex's own source.
Expand Down Expand Up @@ -197,5 +206,5 @@ Approvals between the two maintainers (@Eras256 and @M0nsxx) are often AI-assist
*Every number and link on this page was checked live against its source
(Horizon, GitHub's API, the running API itself, `nirium-cli verify`) before
being written down - not copied from an internal doc or an earlier draft.
Last verified: 22 Nov 2026 (the Stellar Wave counts in section 7 were
rechecked on 25 Nov 2026).*
Last verified: 22 Nov 2026 (sections 2 to 4 and the Stellar Wave
counts in section 7 were updated on 25 Nov 2026).*
13 changes: 13 additions & 0 deletions docs/devlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,16 @@ Two earlier ones never made it into this log: [x402#3228](https://github.com/x40
**What broke.** The Reporting card on nirium.xyz showed 42 mainnet payments while the billing account on the ledger had 39. It counted every payment log line, including three refused attempts from 6 Sep 2026.

**Fix.** It now counts only received payments and matches the ledger; EVIDENCE has a dated note. On 22 Nov, /verify started recomputing the CID and the hash in the browser from the gateway bytes, instead of trusting the copy our server read, so a gateway or our server serving a different document shows up as a mismatch.

## 2026-11-25: What a full read of our own pages turned up

**What we got wrong.** We read every public page and compared the text with the code and the live APIs. Found that day:

- /stats counted two Stellar Wave PRs ([#476](https://github.com/nirium-protocol/nirium/pull/476), [#485](https://github.com/nirium-protocol/nirium/pull/485)) as GrantFox work, because their descriptions number their runs "#1" and "#2". It showed 17 linked PRs; 15 are.
- The README of the logistics example ([#484](https://github.com/nirium-protocol/nirium/pull/484)) pasted a `verify` output whose hash was not the receipt's. We had approved it.
- /verify said a blocked-payment receipt is "the only record of the decision". AgentLedger's public ledger has it too (entry 867).
- The x402 seller example in /docs built the `Agent` without `baseUrl`, so it pointed at localhost and the anchor failed.
- `GET /api/nodes` said signals and execute settle on mainnet. They answer 501 there; only `market` charges.
- Our Restricted Jurisdictions policy (v1.4), the Terms and the disclaimers stated legal conclusions that no lawyer has reviewed, such as "lawful in most of the world".

**What we changed.** /stats, /verify, the example README ([#538](https://github.com/nirium-protocol/nirium/pull/538)) and the policy (v1.5) were corrected and checked live the same day; v1.5 is anchored on mainnet as our own notice. The /docs, Terms, disclaimers and API fixes are merged and go live with the next deploys. The example reviews now compare every hash in a README with its receipt.