From a3245909eed0a8b1465e6e750aa1e48a2bf2b553 Mon Sep 17 00:00:00 2001 From: Monserrat Mendoza <210256392+M0nsxx@users.noreply.github.com> Date: Wed, 11 Nov 2026 20:52:56 -0600 Subject: [PATCH] docs(cli): lead with Audit Trail, fix 0.x scaffold pin and localhost default SCF reviewers open GitHub/npm first and the ask is centered on Audit Trail, so the README now leads with anchor/verify instead of the x402 quickstart. No section content changed, only order, plus one intro sentence. Two real bugs fixed along the way: - `nirium create x402`/`create bot` scaffolded `"nirium": "^0.16.0"`. Under 0.x semver that's `>=0.16.0 <0.17.0` - it silently excludes everything 0.17+ shipped (maxAmountPerPayment, Bazaar discovery). Bumped to ^0.19.0, same as this CLI's own `nirium` dependency. - `status`/`anchor`/`report` defaulted `--url` to `http://localhost:3002`, an agent this repo never runs - a fresh install failed with "unreachable" on every example. Default is now `https://nirium-agent.fly.dev` (testnet), and the stale "the port pnpm dev runs the agent API on in this monorepo" sentence is gone. Telemetry note re-verified against the real published dist/ of nirium 0.19.0 (not just the version bump) - same opt-in behavior as before, only the citation was stale. Verified: npm test (113/113), and `nirium create x402` generating a project that `npm install`s and actually starts (prints "cobrando en http://localhost:3000/premium/signals"). Co-Authored-By: Claude Sonnet 5 --- packages/cli/CHANGELOG.md | 11 ++ packages/cli/README.md | 253 +++++++++++++++++---------------- packages/cli/bin/nirium.js | 12 +- packages/cli/package-lock.json | 14 +- packages/cli/package.json | 4 +- 5 files changed, 153 insertions(+), 141 deletions(-) diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 32593ea..762d3b8 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to the `nirium-cli` package are documented here. ## Unreleased +## 3.2.2 - 2026-11-11 + +### Fixed + +- `nirium create x402` and `nirium create bot` scaffolded a `package.json` pinning `"nirium": "^0.16.0"`. Under 0.x semver, `^0.16.0` means `>=0.16.0 <0.17.0`, so every new project installed an SDK without `maxAmountPerPayment` or the Bazaar discovery extension even after those shipped. Now `^0.19.0`, same as this CLI's own `nirium` dependency. +- `nirium status`, `nirium anchor`, and `nirium report summary|export` defaulted `--url` to `http://localhost:3002`, an agent this repo doesn't run. Now defaults to `https://nirium-agent.fly.dev` (the Nirium testnet agent), so a fresh `npm install -g nirium-cli` works without any agent of your own. + +### Changed + +- README reorders Audit Trail (`anchor`, `verify`) to the top, ahead of the x402 quickstart - SCF reviewers land here first and Audit Trail is the SOW's focus. + ## 3.2.1 - 2026-11-10 ### Fixed diff --git a/packages/cli/README.md b/packages/cli/README.md index f373f83..caeba82 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -6,6 +6,127 @@ Scaffold Stellar agent projects, including one that charges for itself. npm install -g nirium-cli ``` +Audit Trail receipts: anchor a sha-256 hash (optionally signed with ed25519) to IPFS, and anyone can independently verify it with `nirium verify` or at [nirium.xyz/verify](https://nirium.xyz/verify) - no account, no trust in this CLI's own output required. + +## Anchor a record + +```bash +nirium anchor --file evidence.json +nirium anchor --hash <64-hex-sha256> +nirium anchor --record '{"order":"A-12"}' +``` + +Anchors a sha-256 hash (or a small JSON object, up to 8KB) to IPFS via an +Audit Trail node's `POST /api/audit/log`, and prints back the CID. + +- `--file ` computes the sha-256 of the file locally and sends only + the hash - the file's contents are never uploaded. IPFS cannot delete + anything once pinned, so hashing locally means raw evidence never + leaves your machine. +- `--hash ` sends a sha-256 you already have (64 hex chars, optional + `sha-256:` prefix). +- `--record ` anchors a small JSON object verbatim (max 8KB, + enforced here before the request, not just by the server). Don't put + personal data in it - an anchored record can never be deleted. + +Exactly one of the three is required. `--tx ` and `--tag