Skip to content

Add WatchtowerClient interface #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Jontified
Copy link

Pull Request Checklist

  • PR is opened against correct version branch.
  • Version compatibility matrix in the README and minimal required version
    in lnd_services.go are updated.
  • Update macaroon_recipes.go if your PR adds a new method that is called
    differently than the RPC method it invokes.

This PR adds the WatchtowerClient interface. The reason for adding this is so that it can be used in lndmon in a way described here: lightninglabs/lndmon#118

@Jontified Jontified marked this pull request as draft August 4, 2025 07:00
@Jontified Jontified force-pushed the master branch 2 times, most recently from f11e493 to 4a32fb0 Compare August 19, 2025 12:39
@Jontified Jontified marked this pull request as ready for review August 19, 2025 12:40
@Jontified
Copy link
Author

Jontified commented Aug 19, 2025

This PR should be ready for review now. This lndmon PR uses the changes in this PR, check if out to get some context if needed.

@bitromortac
Copy link
Contributor

This PR should be ready for review now. This lndmon PR uses the changes in this PR, check if out to get some context if needed.

Thank you for this contribution 👍. I took an initial look and the approach looks good. Could you please change your commit structure such that it complies with the dev guidelines (see https://github.com/lightningnetwork/lnd/blob/master/docs/development_guidelines.md)? Specifically, squashing your commits to only contain the essential operations (1. adding the interface/implementation, 2. change of the server name parsing, 3. adding the service). I'd take another look afterwards.

@Jontified
Copy link
Author

This PR should be ready for review now. This lndmon PR uses the changes in this PR, check if out to get some context if needed.

Thank you for this contribution 👍. I took an initial look and the approach looks good. Could you please change your commit structure such that it complies with the dev guidelines (see https://github.com/lightningnetwork/lnd/blob/master/docs/development_guidelines.md)? Specifically, squashing your commits to only contain the essential operations (1. adding the interface/implementation, 2. change of the server name parsing, 3. adding the service). I'd take another look afterwards.

OK! Commit structure should be good now!

Use strings.TrimSuffix instead of strings.ReplaceAll in the macaroon
recipe code. This is necessary because the WtClient macaroon name
contains the word "client" and would be malformed in the old code.
New code just removes the last "client".

Signed-off-by: Jonathan <[email protected]>
Add the wtclient_client.go file which contains the lnd watchtower client
interface.

Signed-off-by: Jonathan <[email protected]>
Add the watchtower client service to the macaroon recipe and to the main
lnd services.
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.

2 participants