bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Simplify /examples

Open notmandatory opened this issue 6 months ago • 1 comments

Describe the enhancement

Our bdk examples should be simplified since combining them all into a cli tool adds a lot of boilerplate code that obscures the core logic needed to use common functions. Also now that we have the bdk-cli updated to bdk_wallet 1.0+ it makes more sense to maintain that as a full working bdk based CLI wallet example.

I suggest we remove the examples/ folder and add smaller focused code examples to the commonly used functions in the rust docs.

Use case

Having smaller easy to digest examples within the rust docs will make it easier for new devs to understand how bdk functions are ment to be used. It will also reduce duplicate work of maintaining the bd-cli tool and similar code in the bdk/examples folder.

Additional context

This was originally brought up by @matthiasdebernardini who maintains the bitcoindevkit/bdk-sqlx crate.

notmandatory avatar Jun 09 '25 17:06 notmandatory

@notmandatory @matthiasdebernardini I've been using BDK for a while now and thought it would be worth to give back to the community. Thought this was a good issue to start with, so I put up a PR here and looking for feedback: https://github.com/bitcoindevkit/bdk/pull/2006

kwsantiago avatar Aug 01 '25 13:08 kwsantiago