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.
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.
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:
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.
Hey, this project is not complete. I tried running it today. Initially, while getting the dependencies, it takes a bit of time. I think the developer is trying to obtain a particular build for the bdk_flutter and ldk_node plugins maybe because of some conflicts between the flutter_rust_bridge package. Also, when the app is finally built, it doesn't do anything except generate a mnemonic and that's it. This is the initial screen: https://github.com/kumulynja/ldk_node_flutter_demo/blob/HEAD/lib/screens/onboarding/create_wallet_screen.dart. It simply generates a mnemonic and prints it to the console.
bdk_flutter
andldk_node
plugins maybe because of some conflicts between theflutter_rust_bridge
package. Also, when the app is finally built, it doesn't do anything except generate a mnemonic and that's it. This is the initial screen: https://github.com/kumulynja/ldk_node_flutter_demo/blob/HEAD/lib/screens/onboarding/create_wallet_screen.dart. It simply generates a mnemonic and prints it to the console.