Skip to content

Conversation

@Kukks
Copy link
Contributor

@Kukks Kukks commented Dec 17, 2025

Introduces a new gRPC server-side streaming RPC that emits real-time events for VHTLC and VTXO lifecycle changes:

  • VHTLC_CREATED: New VHTLC address generated
  • VHTLC_FUNDED: Funds received at VHTLC address
  • VHTLC_CLAIMED: VHTLC claimed with preimage (includes preimage)
  • VHTLC_REFUNDED: VHTLC refunded after timeout
  • VTXO_RECEIVED: New VTXOs at subscribed addresses
  • VTXO_SPENT: VTXOs spent from subscribed addresses

Event structure uses oneofs for clean separation:

  • VhtlcEventData: id, txid, preimage (for claims)
  • VtxoEventData: full Vtxo objects, txid

closes #343

Introduces a new gRPC server-side streaming RPC that emits real-time
events for VHTLC and VTXO lifecycle changes:

- VHTLC_CREATED: New VHTLC address generated
- VHTLC_FUNDED: Funds received at VHTLC address
- VHTLC_CLAIMED: VHTLC claimed with preimage (includes preimage)
- VHTLC_REFUNDED: VHTLC refunded after timeout
- VTXO_RECEIVED: New VTXOs at subscribed addresses
- VTXO_SPENT: VTXOs spent from subscribed addresses

Event structure uses oneofs for clean separation:
- VhtlcEventData: id, txid, preimage (for claims)
- VtxoEventData: full Vtxo objects, txid

Includes unit tests for event conversion and listener handling.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch htlc-events

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Introduce htlc event stream

2 participants