Repository navigation
feat(cli): nirium report summary/export - thin client for the Reporting node - #266
Conversation
…ng node Adds `nirium report summary` and `nirium report export anchors|payments|payroll` against GET /api/reporting/summary and GET /api/reporting/export. `export anchors` prints exactly one CID per line on stdout, pipeable straight into `nirium verify` (xargs -n1 or a while-read loop); the row count and the "not certified regulatory reporting" disclaimer print to stderr so neither lands in that pipe. --csv <file> writes the server's CSV instead of printing rows; --json prints the full response (mutually exclusive with --csv). 15 new tests against a local HTTP server standing in for the Reporting node, full suite green. Closes #136 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Eras256
left a comment
There was a problem hiding this comment.
Approving — clean thin client for the Reporting node's summary/export, export anchors pipes one CID per row straight into verify as intended, keeps the "not certified regulatory reporting" disclaimer. CI green (4/4).
# Conflicts: # packages/cli/CHANGELOG.md # packages/cli/bin/nirium.js # packages/cli/package.json
Eras256
left a comment
There was a problem hiding this comment.
Approving - conflict resolution looks correct (interleaved anchor/report blocks in bin/nirium.js, plus package.json/CHANGELOG entries), 91/91 tests pass locally including anchor+report together. CI at 3/4, last check still running, nothing failed - merging once it finishes.
# Conflicts: # packages/cli/CHANGELOG.md # packages/cli/package.json
Eras256
left a comment
There was a problem hiding this comment.
Approving — conflict resolved cleanly (anchor + verify --gateway + report all registered together in bin/nirium.js), 99/99 tests pass locally, CI green (4/4). Merging.
Summary
Adds
nirium report summaryandnirium report export anchors|payments|payroll, thin clients for the Reporting node'sGET /api/reporting/summaryandGET /api/reporting/export:export anchorsprints exactly one CID per line on stdout, nothing else - pipeable straight intonirium verify. The row count and the "not certified regulatory reporting" disclaimer go to stderr so neither ends up in that pipe.--csv <file>writes the server's CSV export to that file instead of printing rows.--jsonprints the full response (type,period,rowCount,rows,disclaimer); mutually exclusive with--csv.Test plan
test/report.test.js(15 cases) against a local HTTP server standing in for the Reporting node: summary JSON/human output, query param forwarding, server-error surfacing; export's CID-only stdout foranchors, the stdout/stderr split,--json,--csv(file write + mutual exclusivity with--json), input validation (badtype, non-positive--limit) before any network call, and query param forwarding.npm test.node --check bin/nirium.jsclean.Closes #136