lightninglabs / lightning-terminal

Lightning Terminal: Your Home for Lightning Liquidity
MIT License
487 stars 82 forks source link

accounts: allow users to see what account they are mapped to #606

Open guggero opened 11 months ago

guggero commented 11 months ago

Another thing that would be very useful: If there is a way to make a GRPC call by the user of the macaroon to find out the name of the account that they are using. For example, say a macaroon is used by some machine to machine interfaces like I described in https://github.com/lightninglabs/lightning-terminal/issues/583, the machine might want to be able to identify the name of the account that it is using so that it can remind the users (of the service that it is enabling) what account they need to refill if its allocated balance starts to get low (and maybe it can tell them on a monitoring screen built into that machine). This takes the burden off the users to keep track of what account is used where and it is one less piece of information to need to configure on the device. For example, say the machine is used in an organization (family, business, club, etc.) and it provides some critical service to the group, there are going to be various people that may be responsible for making sure everything is always running. They might have the ability to send more funds to each machine's account, but they don't have any control of the machines themselves. This feature would also allow you to rename the account and then that new name propagate out to all the devices or wallets that use the account.

Implementing this may be tricky because the RPC Middleware Interceptor doesn't really provide new grpc calls to LND, it just limits existing ones, so you may need to add some new message type to LND for metadata that can be intercepted to make it work.

Originally posted by @AndySchroder in https://github.com/lightninglabs/lightning-terminal/issues/581#issuecomment-1635090498