-
Notifications
You must be signed in to change notification settings - Fork 37
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
Implement BDK Database types for gloo::LocalStorage #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is so epic it might be nice to do a call to review a bit / make sure I understand it. but overall it looks super clean.
if you run cargo clippy
you get some suggestions about unnecessary clones and formats
also some unused imports and dead code
probably a good practice to handle most warnings before merging if possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay I'm happy with this. I'd like to kick the tires from the application code but pretty stoked to have so much bdk stuff in here already
Updated bdk version to bitcoindevkit/bdk#770 as it seems it does not work with wasm without it |
Now that we're using nightly, should we add that to the project configurations? https://stackoverflow.com/a/71978441 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done man, looking good.
Yes you will need the next release of bdk (0.24.0) to work easily with Wasm. There is a way to work around it (see bitcoindevkit/bdk#646 for the whole story), but if you can wait a week we'll have the official release out. |
BTW it's very cool you got this working!! 🤩 |
This has a lot of copy pasting from ldk lite and bdk. I copied ldk lite's Error enum, some of bdk's private helpers for key-value and memory database stuff, and bdk's helpers for testing the database.
One caveat to this is that the database does not actually batch (we just immediately write to LocalStorage, I'm not sure if that will break anything, but should be enough to get started on doing bdk stuff 🚀