Skip to content

feat: Soroban event watcher with signed per-event receipts (testnet example) - #506

Open
Horpeyehmi wants to merge 1 commit into
nirium-protocol:mainfrom
Horpeyehmi:fix/issue-463-build-with-nirium-a-soroban-event-watcher-that
Open

Horpeyehmi wants to merge 1 commit into
nirium-protocol:mainfrom
Horpeyehmi:fix/issue-463-build-with-nirium-a-soroban-event-watcher-that

Conversation

@Horpeyehmi

Copy link
Copy Markdown

Overview

This PR adds a testnet example under examples/soroban-event-receipts/ that watches a Soroban contract's events through Stellar RPC and anchors one signed receipt per selected event. Each receipt records the contract ID, ledger, event data hash, and the off-chain document the event refers to. Restarting the watcher does not anchor the same event twice.

Related Issue

Changes

🧾 Event Watcher

  • [ADD] examples/soroban-event-receipts/src/watcher.ts

    • Polls Stellar RPC for events from a configured testnet contract.
    • Selects events and produces a receipt payload per event (contract ID, ledger, event data hash, referenced off-chain document).
  • [ADD] examples/soroban-event-receipts/src/cursor.ts

    • Persists the last processed event cursor so a restart resumes where it stopped, preventing duplicate anchoring.
  • [ADD] examples/soroban-event-receipts/package.json and tsconfig.json

    • Package and TypeScript configuration for the example.

Verification Results

Verification and evidence are listed below and must be completed before merge:

  • Restart behavior: restarting the watcher does not re-anchor an already processed event.
  • Receipts verify with npx nirium-cli verify <CID>.
  • Testnet transaction hashes signed by the author's own stellar:testnet keys: listed in the example README, linked on Stellar Expert (testnet).
  • Demo video (≤ 2 minutes) attached in the PR description; sharing permission and credit preference stated below.
  • Tests run without network access.
Acceptance Criteria Status
Restarting the watcher does not anchor the same event twice Cursor persistence in cursor.ts resumes from the last processed event
Every receipt verifies with npx nirium-cli verify <CID> To be confirmed with the listed CIDs
README explains what the receipt adds beyond the on-ledger event README section describes the off-chain document reference and signature
Evidence: own testnet keys, transaction hashes, demo video, offline tests Pending: hashes and video to be attached by the author

Notes for Reviewers

  • All keys are the author's own testnet keys; no secrets are committed.
  • Scope is limited to examples/soroban-event-receipts/; no mainnet, no custody.

Closes #463

@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@Horpeyehmi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Eras256 Eras256 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 comment (Claude)

CI is approved and running. The PR still has placeholders where the issue's evidence goes: testnet transaction hashes signed by your own keys (in the README, linked on Stellar Expert), the demo video in the description and the sharing sentence. We'll review it once those are filled in.

@Eras256

Eras256 commented Nov 25, 2026

Copy link
Copy Markdown
Member

AI-assisted comment (Claude)

Wave 11 has closed, so we are tidying up. Thank you for the work here. This PR still has placeholders where the issue's evidence goes (testnet transaction hashes signed by your own keys, the demo video and the sharing sentence).

If you want to finish it, please push those by 2 December 2026 and we will review it. If not, we will close the PR then; you can reopen it whenever the evidence is ready.

@Horpeyehmi
Horpeyehmi force-pushed the fix/issue-463-build-with-nirium-a-soroban-event-watcher-that branch from cf68b3e to b67522a Compare November 26, 2026 09:05
@Horpeyehmi
Horpeyehmi requested a review from M0nsxx as a code owner November 26, 2026 09:05
@drips-wave

drips-wave Bot commented Nov 26, 2026

Copy link
Copy Markdown

Warning

Possible malicious code: please review before merging.

An automated security scan flagged files in this pull request that appear to contain malicious code. Code like this can run automatically when a project is opened in an editor or its dependencies are installed, so it could compromise the machine of anyone who checks out this branch.

Automated scans can be wrong, so this may be a false positive. Maintainers: please review the flagged files carefully before merging, on GitHub in your browser rather than by checking out the branch. The malicious part is often hidden far off to the right of an ordinary-looking line, so scroll sideways through each file.

@Horpeyehmi: this pull request adds or changes these files, possibly without your knowledge. Malware like this spreads by adding itself to repositories on machines it has infected, so your machine and / or GitHub account may be compromised. Please review your machine for a possible malware infection, and rotate your GitHub credentials / SSH keys as needed.

Flagged files at commit b67522a:

Only merge once you're confident these files are safe.

ℹ️ Posted automatically by Drips Wave. Questions? Contact support@drips.network.

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.

Build with Nirium: a Soroban event watcher that anchors a signed receipt per event, on testnet

2 participants