29 Commits

Author SHA1 Message Date
LLFourn
5e79b81a6a
fix: Remove dependency on unnecessary bdk_chain features 2023-10-04 10:52:12 +11:00
Steve Myers
d35668e76a
ci(esplora): fix wasm cargo check by setting workspace resolver to version 2
The resolver version must be set at the workspace level.
See: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
2023-09-25 21:09:45 -05:00
Steve Myers
6a5c9d7a00
fix(esplora): use saturating_add in update_tx_graph()
This fixes overflow error when calling update_tx_graph() from update_tx_graph_without_keychain().
2023-09-25 21:09:42 -05:00
Steve Myers
4d1a9fd47a
test(esplora): add async_ext and blocking_ext integration tests 2023-09-25 21:09:40 -05:00
Steve Myers
94f8fa530b
docs: fix spelling errors 2023-09-16 10:43:26 -05:00
Vladimir Fomene
20900218ce
refactor: rename methods in EsploraExt and EsploraExtAsync 2023-09-12 16:38:49 +03:00
Daniela Brozzoni
6eb079576f
Update crates/esplora to rust-bitcoin 0.30.0 2023-08-03 10:59:05 +02:00
志宇
db15e03bdc
fix: improve more docs and more refactoring
Thank you @vladimirfomene for these suggestions.

* Rename `LocalUpdate::keychain` to `LocalUpdate::last_active_indices`.
* Change docs for `CheckPoint` to be more descriptive.
* Fix incorrect logic in `update_local_chain` for `EsploraExt` and
  `EsploraAsyncExt`.
2023-07-28 11:37:17 +08:00
志宇
95312d4d05
fix: docs and some minor refactoring
Shout out to @LLFourn for these suggestions.

* Improve/fix `LocalChain` documentation
* Refactor `TxGraph::missing_blocks` to make it more explicit that
  `last_block` has state.
* `update_local_chain` method of `EsploraExt` and `EsploraAsyncExt` now
  returns a `local_chain::Update` instead of just a `CheckPoint`.
2023-07-28 11:30:17 +08:00
志宇
eabeb6ccb1
Implement linked-list LocalChain and update chain-src crates/examples
This commit changes the `LocalChain` implementation to have blocks
stored as a linked-list. This allows the data-src thread to hold a
shared ref to a single checkpoint and have access to the whole history
of checkpoints without cloning or keeping a lock on `LocalChain`.

The APIs of `bdk::Wallet`, `esplora` and `electrum` are also updated to
reflect these changes. Note that the `esplora` crate is rewritten to
anchor txs in the confirmation block (using the esplora API's tx status
block_hash). This guarantees 100% consistency between anchor blocks and
their transactions (instead of anchoring txs to the latest tip).
`ExploraExt` now has separate methods for updating the `TxGraph` and
`LocalChain`.

A new method `TxGraph::missing_blocks` is introduced for finding
"floating anchors" of a `TxGraph` update (given a chain).

Additional changes:

* `test_local_chain.rs` is refactored to make test cases easier to
  write. Additional tests are also added.
* Examples are updated.
* Fix `tempfile` dev dependency of `bdk_file_store` to work with MSRV

Co-authored-by: LLFourn <lloyd.fourn@gmail.com>
2023-07-28 11:30:16 +08:00
Steve Myers
f4d2a76661
Bump version to 1.0.0-alpha.1 2023-07-04 12:28:06 -05:00
Steve Myers
7ab84be9c7
Better no-std support
- Use `default-features = false` for `miniscript`,`bitcoin`,and `bdk_chain`
- Introduce `bdk_chain/std` feature
- Add GitHub workflow `check-no-std` (not yet completly working)
- Update GitHub workflow `check-wasm` to disable default `std` features
2023-06-20 15:53:48 -05:00
志宇
1c3cbefa4d
[chain_redesign] Remove old structures
Other changes:

* The `async-https` feature of `bdk_esplora` is no longer default.
* Rename `ObservedAs` to `ChainPosition`.
* Set temporary MSRV to 1.60.0 to compile all workspace members will all
  features.
2023-06-04 03:32:18 +08:00
志宇
5860704b2d
Implement redesigned versions of EsploraExt and EsploraAsyncExt
All associated examples are also updated.
2023-06-04 03:32:18 +08:00
志宇
7261669c09
Add last_seen to the the ConfirmationTime::Unconfirmed variant
This allows us to skip adding an extra input to `Wallet::insert_tx`.

Also remove redundant logic.
2023-06-04 03:32:17 +08:00
Daniela Brozzoni
ac3759254a
Unpin base64
base64 lowered the MSRV to 1.57.0 in version 0.21.2
2023-05-25 15:37:16 +02:00
Daniela Brozzoni
df74b23f31
Pin base64 to 0.21.0 to keep the MSRV to 1.57.0 2023-05-24 16:12:34 +02:00
Steve Myers
82f9caddab
Bump bdk version to 1.0.0-alpha.0
chain to 0.4.0
electrum to 0.2.0
esplora to 0.2.0
file_store to 0.1.0
2023-03-19 23:03:48 -05:00
志宇
877b658787
Add docs for EsploraAsyncExt and make doctests runnable 2023-03-16 13:08:42 +08:00
rajarshimaitra
24df03afd6
Add documentation fixes 2023-03-15 13:00:45 +08:00
LLFourn
2fcf9c4adb
Make async esplora futures Send 2023-03-10 12:19:54 +11:00
志宇
5dd4ce74cf
More documentation improvements 2023-03-10 13:40:27 +13:00
志宇
def0c9ed39
Add wallet_esplora_async example and various fixes
Fixes include:
* Allow `bdk_esplora` to use async with tls
* Reorganize `bdk_esplora` crate to have separate files for
  async vs blocking
* Use optional dependencies for `bdk_esplora` async
2023-03-09 11:07:45 +13:00
Vladimir Fomene
26ab2e2d6c
Implement EsploraExt for Async client
Creates a separate async EsploraAsyncExt trait for the
async client using async-trait crate. It has thesame
methods as the EsploraExt trait for the blocking client.
This trait is implemented on the AsyncClient of the
rust-esplora-client crate.
2023-03-09 09:25:54 +13:00
Daniela Brozzoni
0ba41c5751
Make bdk_esplora wasm compatible again
There's a huge todo!() for the AsyncClient
2023-03-03 17:44:10 +01:00
Steve Myers
3a5d727899
Update workspace dependencies to be relative paths 2023-03-03 17:44:08 +01:00
Daniela Brozzoni
8c9bcebc71
Fix the "repository" field in Cargo.toml 2023-03-03 17:44:04 +01:00
Daniela Brozzoni
c61b3604e1
Fix cargo clippy warnings
Disabled warnings for nursery/tmp_plan as it's going to be replaced
anyways
2023-03-03 17:44:03 +01:00
LLFourn
c069b0fb41
Move everything else over 🎉
This completes the move of things from https://github.com/LLFourn/bdk_core_staging
2023-03-02 10:56:36 +01:00