pull down to refresh
0 sats \ 0 replies \ @kumulynja 25 Jun 2023 \ on: LDK Node in Flutter can be used to create a Lightning wallet app bitcoin
Hi!
Now the app has a complete flow implemented from funding the wallet, to opening channels, to generating invoice, making payments and seeing the payments history.
You can check out the code and hope it is of any help in your projects: https://github.com/kumulynja/ldk_node_flutter_demo
demo
Another update on the LDK node Flutter demo app:
- Generating invoices both with as without amount is DONE
Next step:
- Paying and receiving payments through invoices
See and run the latest code on the develop branch on my github
A little update on what I could advance this weekend so far:
- Finished the Lightning Wallet Home screen to have all information and buttons for the actions that I want to have in scoop for this ldk_node_flutter demo app
- Improvements in the structuring of the repository, bloc's and UI.
- The balances and channel information info that can be seen on the home are real and coming from the ldk node already
So the most work was done on the UI actually, of the home screen, and some refactoring of existing code. Next for me to do now is really implement the actions as such:
- Generating a funding action
- Opening a channel
- Closing a channel
- Generating an invoice
- Paying an invoice
- Making a keysend
After those operations, the only thing left is showing an overview of the transactions in the Transaction History panel on the home and the demo app will be ready.
The home looks like this now, just the basic info and buttons, nothing fancy for now:
I could progress a little bit more last weekend:
The node is running, balance is obtained and I am now setting up the code to fund and open a first channel. You can see the most recent code in the lightning-wallet-home branch.
The lightning_node_repository and seed_repository can be used like that in any other wallets too, it is decoupled completely from the app code itself.
Next steps I hope to have after next weekend are:
- Channel opening
- Send payments and receive payments
Any help or feedback is very welcome!
Hi, thanks for having tried out the app already!
This is indeed a work in progress that I just started in my free time a couple of weeks ago. So it is correct, until now it only generates a mnemonic. This weekend I added logic to derive a seed for the ldk_node from the mnemonic following the unified wallet approach as described in the docs of ldk. This way the same mnemonic can be used for both the lightning node wallet as for a separate bitcoin on-chain wallet that can be used for savings for example.
I also worked on structuring the LightningNodeRepository and lightning node BLoC better. The idea here is to abstract all ldk_node internals into the LightningNodeRepository and expose different streams there, like payment stream, channel stream etc. This way a general lightning node bloc can exist, which has general configurations like the network, nodeId, alias etc and can be used to configure, start and stop the node, and other blocs can exist like a wallet or payment bloc and a channel bloc, that can all use the LightningNodeRepository.
I will try to finish this setup as soon as possible and try to get the ldk_node running at least.
Also, every feedback and help is welcome, since I am doing this OpenSource you can always make pull requests so we get this demo app finished sooner and other devs or companies can use it as a starting point or import the repository packages and create their own blocs easily.
GENESIS