1486 Commits

Author SHA1 Message Date
志宇
feafaaca31
Merge bitcoindevkit/bdk#1023: Update rust bitcoin
1da3b304bb0aa29e3bb013e0a583c34ec390b32d ci: Pin rustls to keep the MSRV (Daniela Brozzoni)
792b39fa92bfa1218a33bd6ded257fc105aec67c Explicitly deny multipath keys (Daniela Brozzoni)
b73385dbd2e4c46d0553fa6990e564743b705507 Update wallet_electrum to rust-bitcoin 0.30.0 (Daniela Brozzoni)
3dac3f9bba790e8c40a157aa6c9dc3fdf026255e Update example_electrum to rust-bitcoin 0.30.0 (Daniela Brozzoni)
2949bdc7b8ab40c44803fad8fccb2a8f420d1566 Update example_cli to rust-bitcoin 0.30.0 (Daniela Brozzoni)
468d2a0a3b349adb12564847d50a5e5b30c9df3e Update tmp_plan to rust-bitcoin 0.30.0 (Daniela Brozzoni)
b8ac16d03c070ead550d4b458ddad3159cea0001 Update coin_select to rust-bitcoin 0.30.0 (Daniela Brozzoni)
6c29e53ee8b20bfa73a693ef88a14a925492a19b Update wallet_esplora and wallet_esplora_async to... ...rust-bitcoin 0.30.0 (Daniela Brozzoni)
6eb079576f4387db41ec1b9fe729e1d9ab4f8c01 Update crates/esplora to rust-bitcoin 0.30.0 (Daniela Brozzoni)
91b0f0ba2913287449925c86761f363583e59190 Update crates/electrum to bitcoin 0.30.0 (Daniela Brozzoni)
f4e3ba3265fc61bf61ffb54486abfe005ce236d7 Update bdk to bitcoin 0.30.0 (Daniela Brozzoni)
853d3617514edebd0d7b6542a78b5874225a5473 Update bdk_chain to bitcoin 0.30.0 (Daniela Brozzoni)

Pull request description:

  ### Description

  Updates to rust-bitcoin 0.30.0 and miniscript 0.10.0

  Not covered in this PR:
  - https://github.com/bitcoindevkit/bdk/issues/1036. Although the latter is deprecated, I think it's better if I update it in a separate PR, as this one is pretty big already.
  - https://github.com/bitcoindevkit/bdk/issues/1037
  - https://github.com/bitcoindevkit/bdk/issues/1038

  Heads up, I'm explicitly denying multipath descriptors until we have better tests for them. See the commit message of 23fba7aee9b55bf59db73c296b9fb025a256502e

  ### Changelog notice

  - Update to `rust-bitcoin` 0.30.0 and `miniscript` 10.0.0

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  evanlinjin:
    ACK 1da3b304bb0aa29e3bb013e0a583c34ec390b32d

Tree-SHA512: ff1457ed711f9f8cdb446ea10aaf124632f539c02406da94317d8dc38013b321217d3bdcb2df4bd72b2ed92116b52e9c6b98ee91d4d508a579c67449a7caa549
2023-08-04 12:24:07 +08:00
Daniela Brozzoni
1da3b304bb
ci: Pin rustls to keep the MSRV 2023-08-03 10:59:16 +02:00
Daniela Brozzoni
792b39fa92
Explicitly deny multipath keys
Although there is *some* code to handle multipath keys inside bdk,
it's all untested, and from a few quick tests it
seems that it's pretty easy to find buggy edge cases.
Better to deny multipath descs for now, and revisit the
decision once we work on supporting multidescriptor wallets.
2023-08-03 10:59:15 +02:00
Daniela Brozzoni
b73385dbd2
Update wallet_electrum to rust-bitcoin 0.30.0 2023-08-03 10:59:12 +02:00
Daniela Brozzoni
3dac3f9bba
Update example_electrum to rust-bitcoin 0.30.0 2023-08-03 10:59:11 +02:00
Daniela Brozzoni
2949bdc7b8
Update example_cli to rust-bitcoin 0.30.0 2023-08-03 10:59:10 +02:00
Daniela Brozzoni
468d2a0a3b
Update tmp_plan to rust-bitcoin 0.30.0 2023-08-03 10:59:09 +02:00
Daniela Brozzoni
b8ac16d03c
Update coin_select to rust-bitcoin 0.30.0 2023-08-03 10:59:08 +02:00
Daniela Brozzoni
6c29e53ee8
Update wallet_esplora and wallet_esplora_async to...
...rust-bitcoin 0.30.0
2023-08-03 10:59:06 +02:00
Daniela Brozzoni
6eb079576f
Update crates/esplora to rust-bitcoin 0.30.0 2023-08-03 10:59:05 +02:00
Daniela Brozzoni
91b0f0ba29
Update crates/electrum to bitcoin 0.30.0 2023-08-03 10:59:04 +02:00
Daniela Brozzoni
f4e3ba3265
Update bdk to bitcoin 0.30.0 2023-08-03 10:59:02 +02:00
Daniela Brozzoni
853d361751
Update bdk_chain to bitcoin 0.30.0 2023-08-03 10:58:59 +02:00
志宇
d73669e8fa
Merge bitcoindevkit/bdk#1034: Implement linked-list LocalChain and update chain-src crates/examples
b206a985cffaa9b614841219371faa53ba23dfc3 fix: Even more refactoring to code and documentation (志宇)
bea8e5aff4f1e4d61db3970a6efaec86e686dbc3 fix: `TxGraph::missing_blocks` logic (志宇)
db15e03bdce78c6321f906f390b10b3d9e7501b2 fix: improve more docs and more refactoring (志宇)
95312d4d05618b4c464acc0fdff49fb17405ec88 fix: docs and some minor refactoring (志宇)
8bf7a997f70fdffd072fd37e12c385e731728c5a Refactor `debug_assertions` checks for `LocalChain` (志宇)
315e7e0b4b373d7175f21a48ff6480b6e919a2c6 fix: rm duplicate `bdk_tmp_plan` module (志宇)
af705da1a846214f104df8886201a23cfa4b6b74 Add exclusion of example cli `*.db` files in `.gitignore` (志宇)
eabeb6ccb169b32f7b7541c9dc6481693bdeeb8a Implement linked-list `LocalChain` and update chain-src crates/examples (志宇)

Pull request description:

  Fixes #997
  Replaces #1002

  ### Description

  This PR 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.
  * Exclude example-cli `*.db` files in `.gitignore`.
  * Rm duplicate `bdk_tmp_plan` module.

  ### Notes to the reviewers

  This is the smallest possible division of #1002 without resulting in PRs that do not compile. Since we have changed the API of `LocalChain`, we also need to change `esplora`, `electrum` crates and examples alongside `bdk::Wallet`.

  ### Changelog notice

  * Implement linked-list `LocalChain`. 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`.
  * Rewrote `esplora` chain-src crate to anchor txs to their confirmation blocks (using esplora API's tx-status `block_hash`).

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [x] I've added tests for the new feature
  * [x] I've added docs for the new feature

ACKs for top commit:
  LLFourn:
    ACK b206a985cffaa9b614841219371faa53ba23dfc3

Tree-SHA512: a513eecb4f1aae6a5c06a69854e4492961424312a75a42d74377d363b364e3d52415bc81b4aa3fbc3f369ded19bddd07ab895130ebba288e8a43e9d6186e9fcc
2023-08-03 16:05:20 +08:00
Steve Myers
933056706c
Merge bitcoindevkit/bdk#1039: docs: add required style for commit messages
e17f03e7555b7b6f5348b9854f3d4ef559e84d75 docs: add required style for commit messages (Steve Myers)

Pull request description:

  ### Description

  Update CONTRIBUTING.md to specify that new commits should use 'Conventional Commits 1.0' style messages. See https://www.conventionalcommits.org/en/v1.0.0/.  I also fixed our current MSRV in the doc and fixed a spelling error.

  ### Notes to the reviewers

  I'm open to suggestions if anyone has another well documented style for commit messages.

  ### Changelog notice

  None.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  thunderbiscuit:
    ACK e17f03e7555b7b6f5348b9854f3d4ef559e84d75. I've been using conventional commits for Padawan for over 2 years and think it's got good value, particularly on projects with bigger teams and number of contributors.
  danielabrozzoni:
    ACK e17f03e7555b7b6f5348b9854f3d4ef559e84d75 - I was hesitant at first, but I think this would make the commit messages cleaner (and in most cases even shorter). Going forward we should consider adding a CI check enforcing this.

Tree-SHA512: 5f4c42814e35e013ff7846110b2897a35720b8f4b8974f8c8004fc0f5161a10076cac62a7aa711c14295129999f93e238034972f28b77145c1917613f8856b03
2023-08-02 16:54:48 -05:00
志宇
b206a985cf
fix: Even more refactoring to code and documentation
Thank you to @LLFourn and @danielabrozzoni for these suggestions.
2023-08-01 18:31:22 +08:00
志宇
bea8e5aff4
fix: TxGraph::missing_blocks logic
Added additional tests for unnecessary duplicate heights
2023-07-28 11:37:17 +08: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
志宇
8bf7a997f7
Refactor debug_assertions checks for LocalChain 2023-07-28 11:30:16 +08:00
志宇
315e7e0b4b
fix: rm duplicate bdk_tmp_plan module 2023-07-28 11:30:16 +08:00
志宇
af705da1a8
Add exclusion of example cli *.db files in .gitignore 2023-07-28 11:30:16 +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
Daniela Brozzoni
8f38e96e45
Merge bitcoindevkit/bdk#1046: Avoid pinning dependencies, use --precise in ci
ffb7c795e15d2d879f2d857e7607729ca4a53155 ci: Avoid pinning dependencies, use --precise (Daniela Brozzoni)
56b8eea64330044fd7761cb2439d7dcca05106f2 ci: No need to add the llvm repository for wasm (Daniela Brozzoni)

Pull request description:

  Fixes #1035

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  evanlinjin:
    ACK ffb7c795e15d2d879f2d857e7607729ca4a53155

Tree-SHA512: a2e5e0ffea87dc86e27c2f2f3550e6e6429e66f5fd8e0196e85915de5b0f14f0e4ee9d56c87b38b101eb28d86a65868054c20421f32ecd475ca73d00471e2f8d
2023-07-25 17:06:08 +02:00
Daniela Brozzoni
ffb7c795e1
ci: Avoid pinning dependencies, use --precise
Fixes #1035
2023-07-25 13:34:23 +02:00
Daniela Brozzoni
56b8eea643
ci: No need to add the llvm repository for wasm
Adding it fails with "The repository'http://apt.llvm.org/focal
llvm-toolchain-focal Release' does not have a Release file.", and for
some reason it's not needed anymore.
2023-07-25 13:34:19 +02:00
Daniela Brozzoni
cb626e9fc8
Merge bitcoindevkit/bdk#1031: remove duplicate is_empty
f5074ee3aee319137db1ddfa1e99f7e111abcfd4 remove duplicate `is_empty` from DerivationAdditions (Vladimir Fomene)

Pull request description:

  Duplicate `is_empty` method

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  danielabrozzoni:
    ACK f5074ee3aee319137db1ddfa1e99f7e111abcfd4

Tree-SHA512: 1cb48d25c9e57dbe444646ebc33c838e3d58c2523d74b58a75f0d085f68d070ec6a644c46e0bccb8765af7167c8359f079a6222fc9d17ae28ce1e6dda820fc84
2023-07-24 11:21:41 +02:00
Steve Myers
e17f03e755
docs: add required style for commit messages
Update CONTRIBUTING.md to specify that new commits should use 'Conventional Commits 1.0'
style messages. See https://www.conventionalcommits.org/en/v1.0.0/.
2023-07-19 16:15:35 -05:00
Vladimir Fomene
f5074ee3ae
remove duplicate is_empty from DerivationAdditions 2023-07-14 17:52:08 +03:00
Steve Myers
f4d2a76661
Bump version to 1.0.0-alpha.1 v1.0.0-alpha.1 2023-07-04 12:28:06 -05:00
Steve Myers
81c7613391
[ci] fix docsrs error for bdk crate 2023-07-04 09:02:39 -05:00
志宇
26ade11726
Fix cargo features
* `bdk_chain/std` should also enable `miniscript/std`
* use the version of `hashbrown` that `bitcoin` and `miniscript` is
  using
2023-06-26 11:02:06 +08:00
Steve Myers
5d1f922b3b
Merge bitcoindevkit/bdk#894: Better no-std support
7ab84be9c747fd73fc5d1bd0706e7027a66aadb5 Better no-std support (Steve Myers)

Pull request description:

  This replaces #893

  ### Description

  Carrying over relevant maintenance changes from release 0.27.2 to bdk `master`.

  - Use `default-features = false` for `miniscript` and `bitcoin`
  - Introduce `std`  features for `bdk`, `bdk_chain` and `bdk_esplora`

  ### Notes to the reviewers

  The `default-features = false`for `bitcoin` and `miniscript` is to let `bdk` be unbiased for things like no-std.

  ### Changelog notice

  - Set default-features = false for rust-bitcoin and rust-miniscript #894
  - Introduce `std`  features for `bdk`, `bdk_chain` and `bdk_esplora`

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  notmandatory:
    ACK 7ab84be9c747fd73fc5d1bd0706e7027a66aadb5

Tree-SHA512: 217e0ebc04cd59898d4de1c4f8cc6c87de2561659e277cc6e0d969c8bc61142ca62c8bda86643d55676dce39da25891b516a901005a03a31404dae118a5fce76
2023-06-20 16:36:54 -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
Steve Myers
b184e351e5
Merge bitcoindevkit/bdk#840: create taproot descriptor template
e30919ba3a7941e6f54e2f95e94533c05415d831 Create taproot descriptor template (Vladimir Fomene)

Pull request description:

  ### Description

  This PR solves #836. This PR adds a P2TR
  descriptor template and a BIP86 taproot
  descriptor template. With this, users
  can now create a taproot descriptor with templates.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [x] I've added tests for the new feature
  * [x] I've added docs for the new feature

  #### Bugfixes:

  * [ ] This pull request breaks the existing API
  * [ ] I've added tests to reproduce the issue which are now passing
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  notmandatory:
    ACK e30919ba3a7941e6f54e2f95e94533c05415d831

Tree-SHA512: ad171d29e1b22613a9fb5e6ed148d1d3002c76152df1b5aa94e24be134d08d7c90dda9560b7501a8df28e5a7076339745da627bbdde5ed6fa11eab3199c34a99
2023-06-19 15:44:01 -05:00
Daniela Brozzoni
352f5b29ab
Merge bitcoindevkit/bdk#1009: Pin log dependency to 0.4.18 to keep the MSRV to 1.57.0
fa54a2e3a5096b263388b9f729ba1cb42574072e Pin log dependency to 0.4.18 to keep the MSRV to 1.57.0 (Daniela Brozzoni)

Pull request description:

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  evanlinjin:
    ACK fa54a2e3a5096b263388b9f729ba1cb42574072e

Tree-SHA512: 5fc19dd8485fcfe88c2720ff183dac7bfb6cacefa7be0c23aa1e7b345d81d1e41ac0903d84c5606b00adf2314911ee9d25972bfd4f0764e70456c8d8ffb3ab33
2023-06-19 14:12:01 +02:00
Daniela Brozzoni
fa54a2e3a5
Pin log dependency to 0.4.18 to keep the MSRV to 1.57.0 2023-06-19 13:50:59 +02:00
Daniela Brozzoni
97d542cf1c
Merge bitcoindevkit/bdk#976: Reimplement Wallet, ElectrumExt and Esplora{Async}Ext with redesigned structures.
75f8b81d58a985669ce7302fe235ad68eddc0d47 Update documentation (志宇)
cff92111d500fbcdd70015c03bf57b386d473fba [wallet_redesign] Clean up and document address methods (志宇)
a7668a2f3e98b8950a139b7c88fbebff56f49a5f [wallet_redesign] Modified `insert_tx` to use lowest checkpoint (志宇)
ac80829caa4bc94de0acdd0459917d095358559c Rename fields of `tx_graph::Additions` (Shourya742)
1c3cbefa4df7a4f93bc95203534da8ea0186fc5a [chain_redesign] Remove old structures (志宇)
5860704b2dfab5d3883fc89960ce4a69b92b65ef Implement redesigned versions of `EsploraExt` and `EsploraAsyncExt` (志宇)
2952341e5245acef14623b482095526d55b64bd6 Update the `wallet_electrum` example (志宇)
78a7920ba378bb57f0b61d93faf29ec813889a75 `bdk_electrum` API improvements and simplifications (志宇)
92709d03ce8ed979cda127c2c30811bb1c8c5f58 Various tweaks to code arrangement and documentation (志宇)
50425e979bdbe81621fcd54463cdc7c7aeed90f0 Introduce `keychain::LocalChangeSet` (志宇)
a78967e51ba1fa94f00a0f7a580dfc009428a947 [example-cli] simplify new address logic (LLFourn)
6a1ac7f80a7f97cd3c6264fb54f2d1e3b1f95130 [examples_redesign] Implemented `example_electrum` (志宇)
f55974a64bd0f5f2ef9e95831c2fb5d4f92f8282 [examples_redesign] Introduce `example_cli` package (志宇)
2e3cee4bd0568073e42e5670476febddd85a7b36 [electrum_redesign] Introduce redesigned `ElectrumExt` (志宇)
7261669c097791ee2ff8c7da6754868732d02eb3 Add `last_seen` to the the `ConfirmationTime::Unconfirmed` variant (志宇)
aba88130d91b329d8637c450c84fd10af508bdac [wallet_redesign] Move the majority of `Update` to `bdk_chain` (志宇)
e69fccb15fb17ba6eb86e24efad4b9bd96e3bf72 [wallet_redesign] Update `Wallet` with redesigned structures (志宇)

Pull request description:

  ### Description

  Closes #938

  * Update `Wallet` to use redesigned structures.
  * Update `bdk_electrum::ElectrumExt` to produce updates for redesigned structures.
  * Update `bdk_esplora::EsploraExt` and `bdk_esplora::EsploraAsyncExt` to produce updates for redesigned structures.
  * Added `example-crates/example_cli` library for implementing examples with redesigned structures.
  * Added `example-crate/example_electrum` which is an electrum CLI wallet using the redesigned structures.
  * Updated `example-crate/{wallet_electrum|wallet_esplora|wallet_esplora_async}` examples to use redesigned structures.
  * Remove all old structures.

  ### Notes to the reviewers

  ~These changes bump our `all-features` MSRV to `1.60.0` because of the introduction of `bdk_esplora`. As long as the `bdk_chain` and `bdk_wallet` crates hit a MSRV of `1.48.0`, it will be fine (this work is done in #987).~ No longer needed due to #993

  ~I had to comment out the examples that use `Wallet` with our chain sources. Once we update the helper-packages for those chain sources, we can also update the examples.~

  Possible future improvements for `ElectrumExt`:

  * Remove requirement to retry obtaining ALL data after reorg is detected. Transactions can be anchored to a lower block (not block tip), and an `assume_final_depth` value can be used.

  * The logic to finalize an update with confirmation time can be improved during reorgs to not require returning an error.

  * Use the subscription model of electrum, as intended by the API.

  ### Changelog notice

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [x] I've added tests for the new feature
  * [x] I've added docs for the new feature

ACKs for top commit:
  LLFourn:
    ACK 75f8b81d58a985669ce7302fe235ad68eddc0d47
  danielabrozzoni:
    Partial ACK 75f8b81d58a985669ce7302fe235ad68eddc0d47 - the Wallet code looks good to me, I don't have a good enough understanding of the esplora/electrum code to confidently ACK it.

Tree-SHA512: d1d2b79e3c28fbe826044a8b5ef9b122c2dcfc0d371f24cc4aac7f286500b587c2dc3b06ca6461c8721adbc29f56ca41e7566eace560b0a9c541604e6a225c61
2023-06-19 13:38:39 +02:00
志宇
75f8b81d58
Update documentation
* Add `warn(missing_docs)` for `bdk_wallet` and `bdk_chain`.
* Add missing documentation.
* Remove `LocalChain::heights` method.
* Remove old TODOs.
2023-06-04 03:32:19 +08:00
志宇
cff92111d5
[wallet_redesign] Clean up and document address methods 2023-06-04 03:32:19 +08:00
志宇
a7668a2f3e
[wallet_redesign] Modified insert_tx to use lowest checkpoint
Also updated the documentation.
2023-06-04 03:32:19 +08:00
Shourya742
ac80829caa
Rename fields of tx_graph::Additions
* Changed `tx` to `txs`
* Changed `txout` to `txouts`
2023-06-04 03:32:18 +08: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
志宇
2952341e52
Update the wallet_electrum example 2023-06-04 03:32:18 +08:00
志宇
78a7920ba3
bdk_electrum API improvements and simplifications
* `ElectrumUpdate::missing_full_txs` now returns a `Vec<Txid>` so we
  don't keep a reference to the passed-in `graph`.

* `ElectrumUpdate::finalize*` methods now takes in `missing` txids
  instead of `full_txs`. `Client::batch_transaction_get` is called
within the methods.

Other changes:

* `wallet::ChangeSet` is now made public externally. This is required as
  a wallet db should implement `PersistBackend<wallet::ChangeSet>`.
2023-06-04 03:32:18 +08:00
志宇
92709d03ce
Various tweaks to code arrangement and documentation
As per reviews by @danielabrozzoni and @LLFourn
2023-06-04 03:32:18 +08:00
志宇
50425e979b
Introduce keychain::LocalChangeSet
This corresponds to `keychain::KeychainChangeSet` but for the redesigned
structures with `LocalChain`.

This structure is now used in `Wallet` as well as the examples.
2023-06-04 03:32:18 +08:00
LLFourn
a78967e51b
[example-cli] simplify new address logic 2023-06-04 03:32:18 +08:00
志宇
6a1ac7f80a
[examples_redesign] Implemented example_electrum
This is a version of `keychain_tracker_electrum` that uses the
redesigned structures instead.
2023-06-04 03:32:17 +08:00