Skip to content

feat(sdk): receiptCid / receipt_cid, release nirium 0.19.7 and PyPI 0.12.8 - #431

Merged
M0nsxx merged 1 commit into
mainfrom
release/sdk-0.19.7-pypi-0.12.8
Nov 21, 2026
Merged

M0nsxx merged 1 commit into
mainfrom
release/sdk-0.19.7-pypi-0.12.8

Conversation

@Eras256

@Eras256 Eras256 commented Nov 21, 2026

Copy link
Copy Markdown
Member

This commit was pushed to #430's branch after #430 was already merged, so it never reached main (#430 shipped only the CLI 3.2.7 / MCP 0.6.10 bump). Same commit, cherry-picked onto main.

  • TypeScript SDK nirium 0.19.6 → 0.19.7: new receiptCid(bytes | string | document), which recomputes a kept receipt's CIDv0 locally with no IPFS node and no new dependency, plus the optional AuditAnchor.document type from feat(cli): keep your own copy of a receipt (anchor --save, cid) #429.
  • Python SDK nirium (PyPI) 0.12.7 → 0.12.8: same as nirium.receipt_cid(). A dict is serialized as compact JSON with UTF-8 kept, which is what the node pins. Also ships test(sdk-python): cover every Treasury method with the HTTP layer mocked #370's Treasury tests and the README re-check. The README stays ASCII (PyPI metadata rule).
  • Both READMEs gain "Keep your own copy" next to the Audit Trail section; versions in package.json/lock, pyproject.toml, setup.py, __version__; changelogs.

Checked

  • 6 new tests per SDK, using two real mainnet receipts as fixtures (shared with the CLI's).
  • CLI, TS SDK, Python SDK and ipfs-only-hash give the same CID on ASCII and non-ASCII input.
  • SDK: tsc clean, jest 108/108.
  • Python: 62 passed locally (the langchain test needs the test extras, which CI installs).

🤖 Generated with Claude Code

…PI 0.12.8

Same local CIDv0 check the CLI got in #429, for SDK users: recompute a
kept receipt's CID with no IPFS node and no new dependency.

- TypeScript: export receiptCid(bytes | string | document object).
- Python: nirium.receipt_cid(bytes | str | dict); a dict is serialized as
  compact JSON with UTF-8 kept, which is what the node pinned.
- READMEs: "Keep your own copy" next to the Audit Trail section.
- 6 tests each, with two real mainnet receipts as fixtures. Cross-checked
  CLI, TS, Python and ipfs-only-hash on ASCII and non-ASCII input: same CID.
- Versions: nirium 0.19.6 -> 0.19.7 (npm), nirium 0.12.7 -> 0.12.8 (PyPI:
  pyproject, setup.py, __version__), changelogs.

SDK: tsc clean, jest 108/108. Python: 62 passed (langchain test needs the
test extras, as in CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Eras256
Eras256 requested a review from M0nsxx as a code owner November 21, 2026 08:50

@M0nsxx M0nsxx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-assisted review (Claude)

Read the diff. Same commit that missed #430: the SDKs gain receiptCid / receipt_cid, the same local CIDv0 check as the CLI, with 6 tests each on real mainnet receipts and the same CID as ipfs-only-hash; READMEs explain keeping a copy (Python README stays ASCII); bumps nirium 0.19.7 and PyPI 0.12.8. LGTM.

@M0nsxx
M0nsxx merged commit fa9ada7 into main Nov 21, 2026
23 checks passed
@M0nsxx
M0nsxx deleted the release/sdk-0.19.7-pypi-0.12.8 branch November 21, 2026 08:51
Eras256 added a commit to comandanto/nirium that referenced this pull request Nov 21, 2026
Resolves the conflict with the 0.12.8 release (nirium-protocol#431): __init__ keeps
both the X402Policy* exports and receipt_cid; CHANGELOG keeps the
Unreleased policy-hook notes above the 0.12.8 entry. 94 tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants