-
Notifications
You must be signed in to change notification settings - Fork 68
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 BDK RPC backend tutorial #54
Conversation
Looks cool. I didn't execute the code, but the text is easy to follow and understand. |
Very good article, made a few minor suggestions. @dennisreimann can we set up preview links? |
@ConorOkus Yes, I just messaged you on Slack with details on how to set it up. |
❌ Deploy Preview for bdk-docs-preview failed. 🔨 Explore the source changes: 072df9a 🔍 Inspect the deploy log: https://app.netlify.com/sites/bdk-docs-preview/deploys/6186928c2bfd8b0008e29121 |
Thanks @ConorOkus for the feedback and corrections. Updated with all those changes.. |
@dennisreimann let me know if I have to update anything in the text to pass the netlify deployment.. |
Unlike other tutorials, we will not use `bdk-cli` tools, but instead write rust code directly using `BDK` devkit. In the end we will end up with our own simple bitcoin wallet. | ||
|
||
### Prerequisite | ||
To run with this tutorial you would need to have a bitcoin core node running in regtest mode. Get the bitcoin core binary either from the [bitcoin core repo](https://bitcoincore.org/bin/bitcoin-core-0.21.1/) or [build from source](https://github.com/bitcoin/bitcoin/blob/v0.21.1/doc/build-unix.md). Alternatively you can use the `bitcoin-regtest-box` docker file maintained by BDK project [here](https://github.com/bitcoindevkit/bitcoin-regtest-box). |
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.
It looks like the bitcoin-regtest-box
has been updated to support cookie auth now. I had to use the docker images before this commit to get it working.
What can we do to make this a bit clearer?
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.
Ah ok, I need to update the tutorial to handle cookie auth i think..
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.
I'd like archive bitcoin-regtest-box
and update our docs/blogs to not use it. As a start I've created bitcoindevkit/bitcoin-regtest-box#12 with alternative instructions for local regtest testing.
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.
Opted for using Polar which is basically using Docker under the hood. We could probably remove mentioning bitcoin-regtest-box
as it's no longer maintained. Some docs around setting up a regtest bitcoind locally would be handy but that could be separate from this tutorial IMO.
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.
I actually use my own local regtest node instead of bitcoin-regtest-box. Do you think we should add local regtest setup somewhere? Or shift to Polar?
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.
I think we should add local regtest setup somewhere, but I think we can do it in another PR 👍
@rajarshimaitra this is great! I was able to get through this pretty easy. I would just double check you are rebased with master. Still working on the preview links to see it on the actual site and make sure the formatting is okay. |
17e6332
to
502e0d0
Compare
@ConorOkus updated with latest suggestions and rebased on current master. Regarding this #54 (comment), I decided to remove the
|
@rajarshimaitra left a last comment on the link to the v0.10.0 release, I checked this out locally and everything LGTM 👍 |
502e0d0
to
d44db10
Compare
✔️ Deploy Preview for awesome-golick-685c88 ready! 🔨 Explore the source changes: d44db10 🔍 Inspect the deploy log: https://app.netlify.com/sites/awesome-golick-685c88/deploys/619dd0a3cb92050007d64852 😎 Browse the preview: https://deploy-preview-54--awesome-golick-685c88.netlify.app |
Thanks @ConorOkus.. Updated.. |
Added a tutorial to work with BDK wallet using the recently added RPC backend.
Unlike other tutorials I haven't used
bdk-cli
. Instead its a walk through of writing BDK wallet code to work with the backend.Hope this will help new developers to start working with BDK.
Comments and review welcome. :)