Skip to content

multi: add some litd client helpers #476

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

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

ellemouton
Copy link
Member

@ellemouton ellemouton commented Jan 10, 2023

This PR does 2 things:

  1. Adds a litclient package and adds and exports a list of JSON callbacks that a client connecting to lit should register.
  2. Adds a withAllSubServers param to perms.NewManager. This is useful for a client who wants to get a list of all possible permissions available to it without knowing which sub-servers LND was compiled with. This will lead to some false positives if the client tries to call the method of a sub-server that was not compiled within LND.

required for lightninglabs/lightning-node-connect#66

Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@guggero
Copy link
Member

guggero commented Jan 11, 2023

Oops, I clicked the wrong button and added a merge commit. Can you rebase please?

@ellemouton ellemouton force-pushed the addJsonRegistrations branch from 1c93ae3 to c7c15af Compare January 11, 2023 12:32
@ellemouton ellemouton requested a review from kaloudis January 11, 2023 14:57
This commit adds a new litclient package which can hold anything that
LiT clients may want to import. In this commit, we add and export a list
of JSON call back registration functions that a client will have access
to when using Lit.
In this commit, a new withAllSubServers option is added to the
perms.NewManager function. If its value is true, then all LND's
subserver permissions will be added to the active permissions set
regardless of whether LND was actually compiled with the necessary build
tags. This is useful for Lit clients who perhaps can never know which
sub-servers LND was compiled with and so want to assume that it was
compiled with all.
@ellemouton ellemouton force-pushed the addJsonRegistrations branch from c7c15af to bee2d62 Compare January 11, 2023 15:03
@guggero guggero merged commit fa90690 into lightninglabs:master Jan 11, 2023
@ellemouton ellemouton deleted the addJsonRegistrations branch January 11, 2023 18:07
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.

3 participants