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

FEATURE: Seed initial balance #114

Open
jblachly opened this issue Feb 21, 2022 · 6 comments
Open

FEATURE: Seed initial balance #114

jblachly opened this issue Feb 21, 2022 · 6 comments

Comments

@jblachly
Copy link

Given a local node N with a balance of X million sats, a user may wish to create LNDHub.go / Alby / BlueWallet accounts for themself (daily spending) and for friends or family members constructed from some portion of the existing balance, rather than accepting in additional funds from outside sources (Strike, Cash App, Boltz, etc.).

A very useful feature would be to seed an initial balance at wallet (account) creation time. I haven't yet quite internalized the data model, but this looks like it may require a simulated invoice?

@raucao
Copy link

raucao commented Feb 21, 2022

It seems to me like this could also be a useful feature for a migration path from LndHub to lndhub.go.

@bumi
Copy link
Contributor

bumi commented Feb 23, 2022

Good idea. thanks for raising this topic and indeed this would making it easier to write a migration script.

Right now every transaction entry in the DB assumes it is associated with an invoice but I think this does not need to be a hard requirement.
Then such an initial balance would simply be a transaction from the incoming account to the current account.
Open question is when/how to create such a funding transaction?

@raucao
Copy link

raucao commented Feb 23, 2022

Right now every transaction entry in the DB assumes it is associated with an invoice

How does that work when sending between accounts on the same node? Shouldn't that already have a different association?

@jblachly
Copy link
Author

Open question is when/how to create such a funding transaction?

From an admin dashboard perhaps

@jblachly
Copy link
Author

Right now every transaction entry in the DB assumes it is associated with an invoice

How does that work when sending between accounts on the same node? Shouldn't that already have a different association?

Indeed; Bluewallet can send transactions between accounts on the same host without creating invoice -- LNDHub intercepts them and just updates internal (well, Redis) state

@bumi
Copy link
Contributor

bumi commented Feb 24, 2022

you can do that here, too. If it is an internal transaction from one lndhub account to another one there is still an invoice involved.
lndhub then sees that the invoice is internal and does a simple transaction entry.

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

3 participants