From 1d7ad3122e74266e0833d7b590eb3f7bf3882655 Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Fri, 4 Apr 2025 20:31:47 -0500 Subject: [PATCH] chore: rename example-crates directory to examples --- .github/workflows/cont_integration.yml | 2 +- Cargo.toml | 8 ++++---- README.md | 14 +++++++------- crates/electrum/src/lib.rs | 2 +- crates/esplora/README.md | 2 +- .../example_bitcoind_rpc_polling/Cargo.toml | 0 .../example_bitcoind_rpc_polling/README.md | 0 .../example_bitcoind_rpc_polling/src/main.rs | 0 .../example_cli/Cargo.toml | 0 .../example_cli/src/lib.rs | 0 .../example_electrum/Cargo.toml | 0 .../example_electrum/src/main.rs | 0 .../example_esplora/Cargo.toml | 0 .../example_esplora/src/main.rs | 0 nursery/README.md | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) rename {example-crates => examples}/example_bitcoind_rpc_polling/Cargo.toml (100%) rename {example-crates => examples}/example_bitcoind_rpc_polling/README.md (100%) rename {example-crates => examples}/example_bitcoind_rpc_polling/src/main.rs (100%) rename {example-crates => examples}/example_cli/Cargo.toml (100%) rename {example-crates => examples}/example_cli/src/lib.rs (100%) rename {example-crates => examples}/example_electrum/Cargo.toml (100%) rename {example-crates => examples}/example_electrum/src/main.rs (100%) rename {example-crates => examples}/example_esplora/Cargo.toml (100%) rename {example-crates => examples}/example_esplora/src/main.rs (100%) diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 8769ca1f..e517c2bf 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -190,5 +190,5 @@ jobs: - name: Rust Cache uses: Swatinem/rust-cache@v2.7.7 - name: Build - working-directory: example-crates/${{ matrix.example-dir }} + working-directory: examples/${{ matrix.example-dir }} run: cargo build diff --git a/Cargo.toml b/Cargo.toml index 3f96ad12..0a62ba43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,10 +8,10 @@ members = [ "crates/esplora", "crates/bitcoind_rpc", "crates/testenv", - "example-crates/example_cli", - "example-crates/example_electrum", - "example-crates/example_esplora", - "example-crates/example_bitcoind_rpc_polling", + "examples/example_cli", + "examples/example_electrum", + "examples/example_esplora", + "examples/example_bitcoind_rpc_polling", ] [workspace.package] diff --git a/README.md b/README.md index e3fc7480..27d5448e 100644 --- a/README.md +++ b/README.md @@ -33,20 +33,20 @@ The workspace in this repository contains several crates in the `/crates` direct | Sub-Directory | Description | Badges | |---------------|-------------|--------| | [`chain`](./crates/chain) | Tools for storing and indexing chain data. | ![Chain Crate Info](https://img.shields.io/crates/v/bdk_chain.svg) ![Chain API Docs](https://img.shields.io/badge/docs.rs-bdk_chain-green) | -| [`core`](./crates/core) | A collection of core structures used by the [`bdk_chain`], [`bdk_wallet`], and bdk chain data source crates. | ![Core Crate Info](https://img.shields.io/crates/v/bdk_core.svg) ![Core API Docs](https://img.shields.io/badge/docs.rs-bdk_core-green) | +| [`core`](./crates/core) | A collection of core structures used by the [`bdk_chain`], [`bdk_wallet`], and BDK's chain data source crates. | ![Core Crate Info](https://img.shields.io/crates/v/bdk_core.svg) ![Core API Docs](https://img.shields.io/badge/docs.rs-bdk_core-green) | | [`esplora`](./crates/esplora) | Extends the [`esplora-client`] crate with methods to fetch chain data from an esplora HTTP server in the form that [`bdk_chain`] and `Wallet` can consume. | ![Esplora Crate Info](https://img.shields.io/crates/v/bdk_esplora.svg) ![Esplora API Docs](https://img.shields.io/badge/docs.rs-bdk_esplora-green) | | [`electrum`](./crates/electrum) | Extends the [`electrum-client`] crate with methods to fetch chain data from an electrum server in the form that [`bdk_chain`] and `Wallet` can consume. | ![Electrum Crate Info](https://img.shields.io/crates/v/bdk_electrum.svg) ![Electrum API Docs](https://img.shields.io/badge/docs.rs-bdk_electrum-green) | -| [`bitcoind_rpc`](./crates/bitcoind_rpc) | Extends [`bitcoincore-rpc`] for emitting blockchain data from the `bitcoind` RPC interface. | ![BitcoinD RPC Crate Info](https://img.shields.io/crates/v/bdk_bitcoind_rpc.svg) ![BitcoinD RPC API Docs](https://img.shields.io/badge/docs.rs-bdk_bitcoind_rpc-green) | +| [`bitcoind_rpc`](./crates/bitcoind_rpc) | Extends [`bitcoincore-rpc`] for emitting blockchain data from the `bitcoind` RPC interface in the form that [`bdk_chain`] and `Wallet` can consume. | ![BitcoinD RPC Crate Info](https://img.shields.io/crates/v/bdk_bitcoind_rpc.svg) ![BitcoinD RPC API Docs](https://img.shields.io/badge/docs.rs-bdk_bitcoind_rpc-green) | | [`file_store`](./crates/file_store) | Persistence backend for storing chain data in a single file. Intended for testing and development purposes, not for production. | ![File Store Crate Info](https://img.shields.io/crates/v/bdk_file_store.svg) ![File Store API Docs](https://img.shields.io/badge/docs.rs-bdk_file_store-green) | The [`bdk_wallet`] repository and crate contains a higher level `Wallet` type that depends on the above lower-level mechanism crates. -Fully working examples of how to use these components are in `/example-crates`: +Fully working examples of how to use these components are in `/examples`: -- [`example_cli`](./example-crates/example_cli): Library used by the `example_*` crates. Provides utilities for syncing, showing the balance, generating addresses and creating transactions without using the bdk_wallet `Wallet`. -- [`example_electrum`](./example-crates/example_electrum): A command line Bitcoin wallet application built on top of `example_cli` and the `electrum` crate. It shows the power of the bdk tools (`chain` + `file_store` + `electrum`), without depending on the main `bdk_wallet` library. -- [`example_esplora`](./example-crates/example_esplora): A command line Bitcoin wallet application built on top of `example_cli` and the `esplora` crate. It shows the power of the bdk tools (`chain` + `file_store` + `esplora`), without depending on the main `bdk_wallet` library. -- [`example_bitcoind_rpc_polling`](./example-crates/example_bitcoind_rpc_polling): A command line Bitcoin wallet application built on top of `example_cli` and the `bitcoind_rpc` crate. It shows the power of the bdk tools (`chain` + `file_store` + `bitcoind_rpc`), without depending on the main `bdk_wallet` library. +- [`example_cli`](examples/example_cli): Library used by the `example_*` crates. Provides utilities for syncing, showing the balance, generating addresses and creating transactions without using the bdk_wallet `Wallet`. +- [`example_electrum`](examples/example_electrum): A command line Bitcoin wallet application built on top of `example_cli` and the `electrum` crate. It shows the power of the bdk tools (`chain` + `file_store` + `electrum`), without depending on the main `bdk_wallet` library. +- [`example_esplora`](examples/example_esplora): A command line Bitcoin wallet application built on top of `example_cli` and the `esplora` crate. It shows the power of the bdk tools (`chain` + `file_store` + `esplora`), without depending on the main `bdk_wallet` library. +- [`example_bitcoind_rpc_polling`](examples/example_bitcoind_rpc_polling): A command line Bitcoin wallet application built on top of `example_cli` and the `bitcoind_rpc` crate. It shows the power of the bdk tools (`chain` + `file_store` + `bitcoind_rpc`), without depending on the main `bdk_wallet` library. [`rust-miniscript`]: https://github.com/rust-bitcoin/rust-miniscript [`rust-bitcoin`]: https://github.com/rust-bitcoin/rust-bitcoin diff --git a/crates/electrum/src/lib.rs b/crates/electrum/src/lib.rs index 8bc87321..d791f962 100644 --- a/crates/electrum/src/lib.rs +++ b/crates/electrum/src/lib.rs @@ -13,7 +13,7 @@ //! //! Refer to [`example_electrum`] for a complete example. //! -//! [`example_electrum`]: https://github.com/bitcoindevkit/bdk/tree/master/example-crates/example_electrum +//! [`example_electrum`]: https://github.com/bitcoindevkit/bdk/tree/master/examples/example_electrum //! [`SyncResponse`]: bdk_core::spk_client::SyncResponse //! [`FullScanResponse`]: bdk_core::spk_client::FullScanResponse diff --git a/crates/esplora/README.md b/crates/esplora/README.md index 244deb20..4a6acb37 100644 --- a/crates/esplora/README.md +++ b/crates/esplora/README.md @@ -41,7 +41,7 @@ use bdk_esplora::EsploraExt; use bdk_esplora::EsploraAsyncExt; ``` -For full examples, refer to [`example_wallet_esplora_blocking`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/example_wallet_esplora_blocking) and [`example_wallet_esplora_async`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/example_wallet_esplora_async). +For full examples, refer to [`example_wallet_esplora_blocking`](https://github.com/bitcoindevkit/bdk/tree/master/examples/example_wallet_esplora_blocking) and [`example_wallet_esplora_async`](https://github.com/bitcoindevkit/bdk/tree/master/examples/example_wallet_esplora_async). [`esplora-client`]: https://docs.rs/esplora-client/ [`bdk_chain`]: https://docs.rs/bdk-chain/ diff --git a/example-crates/example_bitcoind_rpc_polling/Cargo.toml b/examples/example_bitcoind_rpc_polling/Cargo.toml similarity index 100% rename from example-crates/example_bitcoind_rpc_polling/Cargo.toml rename to examples/example_bitcoind_rpc_polling/Cargo.toml diff --git a/example-crates/example_bitcoind_rpc_polling/README.md b/examples/example_bitcoind_rpc_polling/README.md similarity index 100% rename from example-crates/example_bitcoind_rpc_polling/README.md rename to examples/example_bitcoind_rpc_polling/README.md diff --git a/example-crates/example_bitcoind_rpc_polling/src/main.rs b/examples/example_bitcoind_rpc_polling/src/main.rs similarity index 100% rename from example-crates/example_bitcoind_rpc_polling/src/main.rs rename to examples/example_bitcoind_rpc_polling/src/main.rs diff --git a/example-crates/example_cli/Cargo.toml b/examples/example_cli/Cargo.toml similarity index 100% rename from example-crates/example_cli/Cargo.toml rename to examples/example_cli/Cargo.toml diff --git a/example-crates/example_cli/src/lib.rs b/examples/example_cli/src/lib.rs similarity index 100% rename from example-crates/example_cli/src/lib.rs rename to examples/example_cli/src/lib.rs diff --git a/example-crates/example_electrum/Cargo.toml b/examples/example_electrum/Cargo.toml similarity index 100% rename from example-crates/example_electrum/Cargo.toml rename to examples/example_electrum/Cargo.toml diff --git a/example-crates/example_electrum/src/main.rs b/examples/example_electrum/src/main.rs similarity index 100% rename from example-crates/example_electrum/src/main.rs rename to examples/example_electrum/src/main.rs diff --git a/example-crates/example_esplora/Cargo.toml b/examples/example_esplora/Cargo.toml similarity index 100% rename from example-crates/example_esplora/Cargo.toml rename to examples/example_esplora/Cargo.toml diff --git a/example-crates/example_esplora/src/main.rs b/examples/example_esplora/src/main.rs similarity index 100% rename from example-crates/example_esplora/src/main.rs rename to examples/example_esplora/src/main.rs diff --git a/nursery/README.md b/nursery/README.md index 97591628..d76d6500 100644 --- a/nursery/README.md +++ b/nursery/README.md @@ -2,4 +2,4 @@ This is a directory for crates that are experimental and have not been released yet. Keep in mind that they may never be released. -Things in `/example-crates` may use them to demonstrate how things might look in the future. +Things in `/examples` may use them to demonstrate how things might look in the future. -- 2.49.0