GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Your first mainnet receipt: a monthly usage statement for a paid API · Issue #520 · nirium-protocol/nirium

Your first mainnet receipt: a monthly usage statement for a paid API #520

New issue
Copy link
New issue
Copy link
Backlog
Backlog
Your first mainnet receipt: a monthly usage statement for a paid API#520
Copy link
Labels
Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestexample

Description

@Eras256
Eras256
opened on Nov 24, 2026
Issue body actions

An API that bills per request can show the payments on the ledger, but customers dispute usage, not payments. Build an example that, at the end of a billing period, computes a usage statement from request logs and anchors its hash, so the provider can't quietly change the statement later.

Done when:

  • examples/mainnet-receipt-usage-statement/ with a script: input a request log (sample JSONL with fake client ids), output a statement (requests per endpoint, period start and end) and a signed receipt of the statement's sha-256.
  • check <statement.json> <CID> fails if a single count is edited. Covered by a test.
  • No real customer data. The sample log is generated by a script in the folder.
  • The README says the receipt proves the statement wasn't changed after it was anchored, not that the counts are correct.

How to anchor on mainnet (client only):

  • Use the published CLI or SDK against the mainnet node: npx nirium-cli@latest anchor --record '<json>' --sign --key-env NIRIUM_SECRET_KEY --tag wave-mainnet-usage-statement --url https://nirium-agent-mainnet.fly.dev (or the SDK: new Agent({ baseUrl: 'https://nirium-agent-mainnet.fly.dev' }) and anchorAuditRecord(), signing the statement below yourself). Free, no API key. Do not change any Nirium package in this PR.
  • Sign with your own Stellar mainnet key (NIRIUM_SECRET_KEY, statement nirium-audit-v1:<sha256>). Signing a receipt moves no funds.
  • Anchor a hash or a small non-personal record (max 8 KB). Anchored content can stay public for good: no names, emails, addresses or account numbers of real people.
  • Verify with npx nirium-cli@latest verify <CID> --require-signature --json; do not build a new verifier.
  • The README must say what a receipt proves and what it doesn't: the record hasn't changed since it was anchored and which key signed it, not that its content is true. anchoredAt is the Nirium node's clock, not a ledger time.

Evidence (required):

  • Your own Stellar mainnet account: it exists on Horizon and was created and funded by you (a few XLM for the base reserve), never by Nirium or by another contributor. Never commit the key.
  • Two signed receipts on mainnet, anchored on two different UTC days, both produced by running your example, both with the tag wave-mainnet-usage-statement. List both CIDs in the README with the verify --require-signature --json output (it must show signatureStatus: valid and your key). verify does not print the network, so also show the receipt document's network field, which must be stellar:pubnet.
  • Tests run without network: mock the anchor call and cover the happy path plus the case described in "Done when".
  • A short demo video in the PR description: a screen recording of 2 minutes or less. Say whether we may share it on Nirium's channels, with credit to you.

Receipts made for this issue are listed publicly as Stellar Wave activity, not as organic usage. One issue from this series per person.

Out of scope: charging with x402 on mainnet, moving or holding anyone else's funds, changing any Nirium package, Soroban contracts, personal data, and receipts that only repeat a transaction's payer, payee or amount (the ledger already shows those).

Update, 25 Nov 2026 (UTC): corrected the anchor command (--key-env was missing), the SDK option, and how to show the network. The rules did not change.

Drafted with Claude (Opus 5.5) and reviewed by @Eras256.

Activity

  1. Eras256
    added
    enhancementNew feature or request
    example
    Stellar WaveIssues in the Stellar wave program
    on Nov 24, 2026
  2. macsonfleek commented on Nov 25, 2026

    @macsonfleek
    macsonfleek
    on Nov 25, 2026 – with Drips Wave
    More actions

    @macsonfleek has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

    Hi Maintainer! Please assign me to this issue, I can fix it shortly

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @macsonfleek to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestexample

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.