stakwork / sphinx-relay

Node.js wrapper for communication between sphinx client and lightning node.
MIT License
248 stars 71 forks source link

Home node: Limit apps ability to spend #176

Open pitoi opened 3 years ago

pitoi commented 3 years ago

We should have an option to limit how much of the node's liquidity the app can spend. Right now all of the active channel local balance is added up and available. Options:

tyler-dot-earth commented 3 years ago

This is a big concern for me, thanks for opening a ticket.

I know ln doesn't really have a concept of "accounts" like on-chain wallets tend to, though I know that there are some projects that create an account system — notably, LNbits — so perhaps there's a way to utilize that work for a "Sphinx chat LN account balance"?

dennisreimann commented 3 years ago

Maybe the macaroon bakery by @guggero can help here. I don't know the current state of possible permissions, but maybe it'd be possible to create a macaroon which limits the spendable amount.

guggero commented 3 years ago

Unfortunately, there are no payment limits possible with macaroons yet. I am working on an account system for lnd that could allow for use cases such as that, but that's still very much work in progress.