Skip to content

Commit

Permalink
More documentation improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlinjin committed Mar 10, 2023
1 parent ae9b19d commit 5dd4ce7
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 6 deletions.
35 changes: 34 additions & 1 deletion crates/esplora/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
# BDK Esplora

BDK Esplora client library for updating the `bdk_chain` structures.
BDK Esplora extends [`esplora_client`](crate::esplora_client) to update [`bdk_chain`] structures
from an Esplora server.

## Usage

There are two versions of the extension trait (blocking and async).

For blocking-only:
```toml
bdk_esplora = { version = "0.1", features = ["blocking"] }
```

For async-only:
```toml
bdk_esplora = { version = "0.1", features = ["async"] }
```

For async-only (with https):
```toml
bdk_esplora = { version = "0.1", features = ["async-https"] }
```

To use the extension trait:

```rust,no_run
// for blocking
use bdk_esplora::EsploraExt;
// for async
use bdk_esplora::EsploraAsyncExt;
```

<!-- BDK Esplora client library for updating the `bdk_chain` structures. -->

<!-- [`esplora_client`]: https://docs.rs/esplora-client/latest -->
6 changes: 1 addition & 5 deletions crates/esplora/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//! This crate is used for updating structures of [`bdk_chain`] with data from an esplora server.
//!
//! The star of the show is the [`EsploraExt::scan`] method which scans for relevant
//! blockchain data (via esplora) and outputs a [`KeychainScan`](bdk_chain::keychain::KeychainScan).
#![doc = include_str!("../README.md")]
use bdk_chain::ConfirmationTime;
use esplora_client::TxStatus;

Expand Down
4 changes: 4 additions & 0 deletions crates/file_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ version = "0.0.1"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/bitcoindevkit/bdk"
documentation = "https://docs.rs/bdk_file_store"
keywords = ["bitcoin", "persist", "persistence", "bdk", "file", "store"]
authors = ["Bitcoin Dev Kit Developers"]
readme = "README.md"

[dependencies]
bdk_chain = { path = "../chain", version = "0.3.1", features = [ "serde", "miniscript" ] }
Expand Down
10 changes: 10 additions & 0 deletions crates/file_store/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# BDK File Store

This is a simple append-only flat file implementation of
[`Persist`](`bdk_chain::keychain::persist::Persist`).

The main structure is [`KeychainStore`](`crate::KeychainStore`), which can be used with [`bdk`]'s
`Wallet` to persist wallet data into a flat file.

[`bdk`]: https://docs.rs/bdk/latest
[`bdk_chain`]: https://docs.rs/bdk_chain/latest
1 change: 1 addition & 0 deletions crates/file_store/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
mod file_store;
use bdk_chain::{
keychain::{KeychainChangeSet, KeychainTracker, PersistBackend},
Expand Down

0 comments on commit 5dd4ce7

Please sign in to comment.