Skip to content
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

Add GetBalance Method #39

Open
kwuenscher opened this issue Nov 15, 2021 · 2 comments
Open

Add GetBalance Method #39

kwuenscher opened this issue Nov 15, 2021 · 2 comments

Comments

@kwuenscher
Copy link

It would be great if the client could retrieve the balance of the lightning wallet so it can be shown as part of the native interface.

If that is given then you can pretty much recreate a full web3 experience. We have this concrete problem at kollider.xyz where we would like to render the users available balance (their wallet balance) as part of our interface rather than separating the on / off platform balances. However, beside us I think any Lapp's UX would greatly benefit from that.

@wbobeirne
Copy link
Member

I think this is a really tricky thing to get right, because what is a "balance" in Lightning? Is it all sats you have a particular channel? Is it all sats currently in open channels? Is it all sats routable to a particular node? Is it the total of channel sats, or should you only show the largest channel since (pre AMP) you can only send that amount maximum?

Open to the idea, but it definitely needs a lot of thought.

@kwuenscher
Copy link
Author

kwuenscher commented Nov 15, 2021

Good point, I haven't put much thought into this. My naive me would simply expect it to return the channelbalance as well as onchainbalance as this is what you see in most lightning wallets to be your balance.. I'd also think that this is something left to the wallet / node-cli to figure out. I'd expect it to be slightly different for custodial vs non-custodial wallets. Nevertheless there is always a notion of spendable lightning balance even though its just an approximation. If payments fail because there is no route then that just means we haven't made it yet.

That's all I got right now. I wanna find out how channelbalance does in practice and how much of a UX issue it is. I'll be back.

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

No branches or pull requests

2 participants