Expose watchtower APIs on Node - #1031
Draft
vincenzopalazzo wants to merge 1 commit into
Draft
Conversation
Add Node methods so watchtower clients (e.g. an Eye of Satoshi / rust-teos tower) can protect node funds while the node is offline: counterparty_commitment_txs_from_update, initial_counterparty_commitment_tx, sign_to_local_justice_tx. Only plain lightning/bitcoin types cross the API boundary; internal type aliases stay pub(crate). Limitation: to_local output only - revoked HTLC outputs cannot be signed (mirrors ChannelMonitor::sign_to_local_justice_tx).
|
👋 Hi! I see this is a draft PR. |
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Node::counterparty_commitment_txs_from_update,Node::initial_counterparty_commitment_tx, andNode::sign_to_local_justice_txso watchtower clients (e.g. an Eye of Satoshi tower) can build + finalize justice transactions while the node is offlinepub(crate), which is what shaped this API (accessor methods, not a rawChainMonitorhandle)ChannelMonitorNotFound,OnchainTxSigningFailed; UniFFI binding updatedto_localoutput only, mirrorsChannelMonitor::sign_to_local_justice_tx- revoked HTLC outputs cannot be signedTest plan
cargo check,cargo check --tests,cargo fmt --checkgreen locally (clippy on nightly hits pre-existing macro errors on clean HEAD too)DRAFT: soliciting API-shape feedback before marking ready.