Skip to content

Conversation

jalavosus
Copy link

This commit changes core behavior of LndServices; instead of relying on
macaroons for all rpc clients to be available, it instead checks the
permissions of loaded macaroon files, and determines which clients can
be loaded from there.

If a read-only macaroon is not available for client compatibility
checking, or admin permissions are not available for a Lightning client,
the initialization function will return an error.

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.

This commit changes core behavior of LndServices; instead of relying on
macaroons for all rpc clients to be available, it instead checks the
permissions of loaded macaroon files, and determines which clients can
be loaded from there.

If a read-only macaroon is not available for client compatibility
checking, or admin permissions are not available for a Lightning client,
the initialization function will return an error.
@jalavosus
Copy link
Author

This PR would work really nicely with the behavior implemented in #35, and would allow for more selective client usage.

@jalavosus
Copy link
Author

I also acknowledge that this implementation is kinda messy, and any suggestions for cleaning it up are very much welcome.

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.

1 participant