1486 Commits

Author SHA1 Message Date
志宇
c20a4da9fc
Merge bitcoindevkit/bdk#1084: Enhance bdk chain structures
1ff806c67f4da9ba58b7c7689fde0fe41a34a6f5 fix(chain)!: rm weird `From` impl (志宇)
d43ae0231fa4670b98780cad84466c14ae087292 refactor: improve docs, cleanup unnecessary types and improve code (Vladimir Fomene)
41042069809e3eeb4a8cc8a5a8db1af2c57c4a11 feat: impl Append for lots of tuples (LLFourn)
c56728ff1315e0deaf256af07fd1ff5e18fced8a refactor: Remove `scan` and `scan_txout` from SpkTxoutIndex and KeychainTxoutIndex (Vladimir Fomene)
32c40ac939bc514ac7f1d3f1d7cd1080011e20ba feat(electrum)!: change signature of `ElectrumExt` (志宇)
a28748c33976312b9e6671636ab7e305323efb03 refactor: Implement Default for WalletUpdate (Vladimir Fomene)
f42f8b8ff19c2e67888b476487e4e5c9edb0d0ff refactor: Allow for no chain update (Vladimir Fomene)
68572bfd2e32efdeefaa46618e8e248d3a87f143 refactor: move WalletChangeset to wallet module (Vladimir Fomene)
2392e50fd9793902d480556caa4ec225085c82d6 refactor: Move WalletUpdate to wallet module (Vladimir Fomene)
7c12dc994242bf2d7e35c2723f6e7000de97a388 refactor: Remove ForEachTxout trait (Vladimir Fomene)
6bcbb93233824ec391689191b8ca1f5459cec930 refactor: Edit ElectrumExt not to use WalletUpdate (Vladimir Fomene)

Pull request description:

  ### Description

  Fixes #1061

  ### Changelog notice

  - Move WalletUpdate to the wallet module
  - Remove ForEachTxout trait completely
  - Refactor ElectrumExt to not use WalletUpdate.

  ### 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 1ff806c67f4da9ba58b7c7689fde0fe41a34a6f5

Tree-SHA512: 05349713af9d2efa14a522ceaabb7513bb437d786adf2f93055765589a67e4eb68bda36ff415aeba07816c4d30988d4d55bac018e7697019270a219105ed65a2
2023-09-15 09:24:53 +08:00
志宇
1ff806c67f
fix(chain)!: rm weird From impl
And signature of `example_cli::KeychainChangeSet` is changed.
2023-09-14 20:16:00 +08:00
Vladimir Fomene
d43ae0231f
refactor: improve docs, cleanup unnecessary types and improve code 2023-09-13 13:57:58 +03:00
Daniela Brozzoni
59fc1b341b
Merge bitcoindevkit/bdk#1070: Rename methods of esplora ext
20900218ceba728c8051a3c017a6341d74cbaee3 refactor: rename methods in EsploraExt and EsploraExtAsync (Vladimir Fomene)

Pull request description:

  ### Description

  This PR fixes #1058. Built on top of #1040

  ### 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:

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

ACKs for top commit:
  realeinherjar:
    ACK 2090021
  danielabrozzoni:
    ACK 20900218ceba728c8051a3c017a6341d74cbaee3 - code looks good, `example_esplora` and `wallet_esplora_blocking` work just fine.

Tree-SHA512: 5b5285aaa67a0c4e8174e480cceec7d934ec04a74d81740e1c82f6b8673c3e3d9c676dc43257a170320089efe2d3cb0d33123b4a395fc3e7fec63f85bdf70c79
2023-09-12 16:35:46 +02:00
Vladimir Fomene
20900218ce
refactor: rename methods in EsploraExt and EsploraExtAsync 2023-09-12 16:38:49 +03:00
LLFourn
4104206980
feat: impl Append for lots of tuples 2023-09-05 07:53:50 +08:00
Vladimir Fomene
c56728ff13
refactor: Remove scan and scan_txout from SpkTxoutIndex and KeychainTxoutIndex 2023-09-03 01:51:21 +08:00
志宇
32c40ac939
feat(electrum)!: change signature of ElectrumExt
We remove `ElectrumUpdate` and return tuples instead for `ElectrumExt`
methods. We introduce the `IncompleteTxGraph` structure to specifically
hodl the incomplete `TxGraph`.

This change is motivated by @LLFourn's comment: 794bf37e63 (r1305432603)
2023-09-03 01:51:20 +08:00
Vladimir Fomene
a28748c339
refactor: Implement Default for WalletUpdate 2023-09-03 01:51:20 +08:00
Vladimir Fomene
f42f8b8ff1
refactor: Allow for no chain update 2023-09-03 01:51:20 +08:00
Vladimir Fomene
68572bfd2e
refactor: move WalletChangeset to wallet module
Consequently, remove the `WalletChangeset` dependency from
`example_electrum` and `example_esplora` examples.
2023-09-03 01:48:01 +08:00
Vladimir Fomene
2392e50fd9
refactor: Move WalletUpdate to wallet module 2023-09-03 00:54:23 +08:00
Vladimir Fomene
7c12dc9942
refactor: Remove ForEachTxout trait 2023-09-03 00:54:23 +08:00
Vladimir Fomene
6bcbb93233
refactor: Edit ElectrumExt not to use WalletUpdate 2023-09-03 00:54:23 +08:00
志宇
2867e88b64
Merge bitcoindevkit/bdk#1093: fix: spks_of_all_keychains() shouldn't return an infinite iterator for non-wildcard descriptors
e48b911c8d23cceab2071cc92085fe6675d55ca9 refactor: Make test errors more readable (Daniela Brozzoni)
a7a1d9b2fb9fda4d86fe17cf90d9c0d46c4d8609 fix: non-wildcard descriptors should return an.. ..spk only if index is equal to 0 (Daniela Brozzoni)
cc1a43c495639f0dbe6da52501cb48f17b8cbbd2 fix: SpkIterator::new_with_range takes wildcards.. ..into account (Daniela Brozzoni)

Pull request description:

  ### Description

  When you pass a non-wildcard descriptor in `new_with_range`, we make
  sure that the range length is at most 1; if that's not the case, we
  shorten it.
  We would previously use `new_with_range` without this check and with a
  non-wildcard descriptor in `spks_of_all_keychains`, this meant creating
  a spkiterator that would go on producing the same spks over and over
  again, causing some issues with syncing on electrum/esplora.

  To reproduce the bug, run in `example-crates/example_electrum`:
  ```
  cargo run "sh(wsh(or_d(c:pk_k(cPGudvRLDSgeV4hH9NUofLvYxYBSRjju3cpiXmBg9K8G9k1ikCMp),c:pk_k(cSBSBHRrzqSXFmrBhLkZMzQB9q4P9MnAq92v8d9a5UveBc9sLX32))))#zp9pcfs9" scan
  ```

  ### Changelog notice

  - Fixed a bug where `KeychainTxOutIndex::spks_of_all_keychains`/`KeychainTxOutIndex::spks_of_keychain` would return an iterator yielding infinite spks even for non-wildcard descriptors.

  ### 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 e48b911c8d23cceab2071cc92085fe6675d55ca9

Tree-SHA512: 87627505049eadcec979a05888ec0d8a25c4743c03696a7db68348d457c2bf006d9b3b69c99e208f7812fc5b0234dd5a98b4a923c2486615c7678c3ab523f8cf
2023-09-01 15:48:10 +08:00
Daniela Brozzoni
e48b911c8d
refactor: Make test errors more readable 2023-09-01 09:13:33 +02:00
Daniela Brozzoni
a7a1d9b2fb
fix: non-wildcard descriptors should return an..
..spk only if index is equal to 0
2023-09-01 09:12:44 +02:00
Steve Myers
8321aaa5c7
Merge bitcoindevkit/bdk#1040: Add cli esplora example
f41cc1cb374d6bae553dd997ebb325ced21025f0 fix: s/index_tx_graph/indexed_tx_graph/g (LLFourn)
da8cfd39e9733f6da12b0fe10b8ccf5e5894e090 feat: add cli example for `esplora` (志宇)

Pull request description:

  ### Description

  This PR builds on top of #1034 and adds a cli-example for our `esplora` chain-src crate.

  ### Notes to the reviewers

  Don't merge this until #1034 is merged. The only relevant commit is 5ff0412d8edba933760c79a40be29c8365719096.

  ### Changelog notice

  * Add cli-example for `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

  #### New Features:

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

ACKs for top commit:
  danielabrozzoni:
    ACK f41cc1cb374d6bae553dd997ebb325ced21025f0
  notmandatory:
    ACK f41cc1cb374d6bae553dd997ebb325ced21025f0

Tree-SHA512: a41fa456a9509f75feea0af013deaaad846cc6b60e5e6671672630a716e8c962361cbc9bb2d62c68e96d5fdb9e580912c19ff5fcab1acaf604b5b4a10eb40cee
2023-08-31 15:27:06 -05:00
Daniela Brozzoni
cc1a43c495
fix: SpkIterator::new_with_range takes wildcards..
..into account

When you pass a non-wildcard descriptor in `new_with_range`, we make
sure that the range length is at most 1; if that's not the case, we
shorten it.
We would previously use `new_with_range` without this check and with a
non-wildcard descriptor in `spks_of_all_keychains`, this meant creating
a spkiterator that would go on producing the same spks over and over
again, causing some issues with syncing on electrum/esplora.

To reproduce the bug, run in `example-crates/example_electrum`:
```
cargo run "sh(wsh(or_d(c:pk_k(cPGudvRLDSgeV4hH9NUofLvYxYBSRjju3cpiXmBg9K8G9k1ikCMp),c:pk_k(cSBSBHRrzqSXFmrBhLkZMzQB9q4P9MnAq92v8d9a5UveBc9sLX32))))#zp9pcfs9" scan
```
2023-08-31 16:48:20 +02:00
LLFourn
f41cc1cb37
fix: s/index_tx_graph/indexed_tx_graph/g 2023-08-31 13:07:19 +02:00
志宇
da8cfd39e9
feat: add cli example for esplora
Co-authored-by: remix <remix7531@pm.me>
Co-authored-by: LLFourn <lloyd.fourn@gmail.com>
Co-authored-by: Daniela Brozzoni <danielabrozzoni@protonmail.com>
2023-08-31 13:07:18 +02:00
志宇
93e8eaf7ee
Merge bitcoindevkit/bdk#1048: Remove TransactionDetails from Wallet API
5fb5061645ae92d37091a215e48e84423fea48a3 ci: fix msrv dependency versions for rustls (Steve Myers)
dd5b8d759954f39baa4523fa10b4a64efe48a25b test(wallet): add check_fee!(wallet,psbt) macro and use it in place of psbt.fee_amount() (Steve Myers)
465d53cc88b32bf8098dc61e9afdbb28d22b213d docs(wallet): update docs for calculate_fee/fee_rate and add_foreign_utxo (Steve Myers)
036299803f9f94c7c8218a75f3c206fa8c4297ab feat(wallet): add Wallet::insert_txout function and updated docs for fee functions (Steve Myers)
d443fe7f6613776a3dce00def0b655c4b2b36728 feat(tx_graph)!: change TxGraph::calculate_fee to return Result<u64,CalculateFeeError> (Steve Myers)
b4c31cd5bad4fea18044aab2cffd657b16ec185b feat(wallet)!: remove TransactionDetails from bdk::Wallet API (Steve Myers)

Pull request description:

  ### Description

  Removed `TransactionDetails` and changed `Wallet::get_tx` to return a `CanonicalTx`, and `TxBuilder::finish` to return only a `PartiallySignedTransaction`. This should fix #922 and fix #1015.

  I also added `Wallet` functions to get a `Transaction` send and receive amounts, fee, and `FeeRate`.

  see: https://github.com/bitcoindevkit/bdk/issues/922#issuecomment-1652814975

  ### Notes to the reviewers

  Alot of wallet tests had to change since `TxBuilder::finish` only returns a PSBT now.

  I added a new `CalculateFeeError` which follows changes coming in #1028.

  ### Changelog notice

  Added
  - Wallet::sent_and_received function
  - Wallet::calculate_fee and Wallet::calculate_fee_rate functions
  - Wallet::error::CalculateFeeError
  - Wallet::insert_txout function to allow inserting foreign TxOuts

  BREAKING CHANGES:

  Removed
  - TransactionDetails struct

  Changed
  - Wallet::get_tx now returns CanonicalTx instead of TransactionDetails
  - TxBuilder::finish now returns only a PartiallySignedTransaction

  ### 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:
  evanlinjin:
    ACK 5fb5061645ae92d37091a215e48e84423fea48a3

Tree-SHA512: 1a0be1c229b8871e5ee23ba6874ff40370170477a0a8bb104c0197e7fd97765d84854285f863dd1b38a34c3b71815e75e4db5b25288c81caea99a14ddaa78254
2023-08-31 13:29:13 +08:00
Steve Myers
5fb5061645
ci: fix msrv dependency versions for rustls 2023-08-30 13:31:35 -05:00
Steve Myers
dd5b8d7599
test(wallet): add check_fee!(wallet,psbt) macro and use it in place of psbt.fee_amount()
- removed test_calculate_fee_with_inserted_foreign_utxo() since it now duplicates test in test_add_foreign_utxo()
2023-08-30 13:31:33 -05:00
Steve Myers
465d53cc88
docs(wallet): update docs for calculate_fee/fee_rate and add_foreign_utxo 2023-08-30 13:31:24 -05:00
Steve Myers
036299803f
feat(wallet): add Wallet::insert_txout function and updated docs for fee functions
added
    - Wallet::insert_txout function to allow inserting foreign TxOuts
    - test to verify error when trying to calculate fee with missing foreign utxo
    - test to calculate fee with inserted foreign utxo

updated
    - docs for Wallet::calculate_fee, Wallet::calculate_fee_rate, and TxGraph::calculate_fee
      with note about missing foreign utxos
2023-08-30 11:55:18 -05:00
Steve Myers
d443fe7f66
feat(tx_graph)!: change TxGraph::calculate_fee to return Result<u64,CalculateFeeError>
added
- tx_graph::CalculateFeeError enum

BREAKING CHANGES:

changed
- TxGraph::calculate_fee function to return Result<u64,CalculateFeeError> instead of Option<i64>
2023-08-30 11:55:17 -05:00
Steve Myers
b4c31cd5ba
feat(wallet)!: remove TransactionDetails from bdk::Wallet API
Added
- Wallet::sent_and_received function
- Wallet::calculate_fee and Wallet::calculate_fee_rate functions
- Wallet::error::CalculateFeeError

BREAKING CHANGES:

Removed
- TransactionDetails struct

Changed
- Wallet::get_tx now returns CanonicalTx instead of TransactionDetails
- TxBuilder::finish now returns only a PartiallySignedTransaction
2023-08-30 11:55:15 -05:00
志宇
e5fb1ec7ff
Merge bitcoindevkit/bdk#1069: Implement Anchor for BlockId
18e8da393779617e8a501d7e21b0a9db1a8b11f1 docs: Add doctest for Anchor implementation on BlockId (Vladimir Fomene)
480c2730de524cbb19a72d8cc8c41cb73ab556df feat: Implement Anchor for BlockId (Vladimir Fomene)

Pull request description:

  ### Description

  This PR fixes #1062.
  It implements the `Anchor` trait on `BlockId`.

  ### 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:
  evanlinjin:
    ACK 18e8da393779617e8a501d7e21b0a9db1a8b11f1

Tree-SHA512: af9da8b4e9c7f2a110340efa4e4c86d9b96ea1275f0a66f08e26a47fcacd89e318a32c845e2a4302f3332eeb4c6a976c3771b1d9881adf4feda90d6ba1a2dd9d
2023-08-28 23:51:27 +08:00
Vladimir Fomene
18e8da3937
docs: Add doctest for Anchor implementation on BlockId 2023-08-28 17:12:03 +03:00
Daniela Brozzoni
8f978f86b8
Merge bitcoindevkit/bdk#1089: fix: Correct the coin type in the derivation path for wallet examples
21206fe773a6ebb9f12c534ccb0bfbd694684b58 fix: Correct the coin type in the derivation path for the three wallet examples (Casey Bowman)

Pull request description:

  Corrects the derivation path for the three wallet examples. For testnet, the coin type should be 1 instead of 0.

  Replaces #1076

ACKs for top commit:
  danielabrozzoni:
    ACK 21206fe773a6ebb9f12c534ccb0bfbd694684b58

Tree-SHA512: c323d90f16f338a1a678e28aa681b28848d8c5f02fd769dbf165d3a13df7804abed14760cf0dbe2be6194b107b25980b54be4703f36a7db63f6484c244dd3728
2023-08-25 14:43:54 +02:00
Casey Bowman
21206fe773
fix: Correct the coin type in the derivation path for the three wallet examples
fix: Correct the coin type in the derivation path for the three wallet examples
2023-08-25 02:24:14 -05:00
志宇
381c560c10
Merge bitcoindevkit/bdk#1092: Use apply_update instead of determine_changeset + apply_changeset around the code
c753584379185b0bd19d130ca39e44c8a6a65e65 refactor(chain): use `apply_update` instead of `determine_changeset` + `apply_changeset` (Wei Chen)

Pull request description:

  This PR implements #1081

ACKs for top commit:
  evanlinjin:
    ACK c753584379185b0bd19d130ca39e44c8a6a65e65

Tree-SHA512: cfb66a427dd76b8d11e07be24de9ba06958cda114b8eec260d492d30fba5a1cecbee2bb3e83b8636f9049eb8e920ad13aa76651a97a01290f53b0c7da8849b41
2023-08-25 15:21:41 +08:00
Wei Chen
c753584379
refactor(chain): use apply_update instead of determine_changeset + apply_changeset 2023-08-25 15:14:56 +08:00
志宇
6125062a5b
Merge bitcoindevkit/bdk#1085: docs: Update README.md
2263a58448f5f04a74e076132aea93f21c584bc0 refactor: Rename `wallet_esplora` to... ...`wallet_esplora_blocking` (Daniela Brozzoni)
11ac26f6b28b6694dfc04e9fc72c208e454632c7 docs: Update README.md (Daniela Brozzoni)

Pull request description:

  ### Description

  - Fixes the release timeline
  - Adds an explanation for the crates under `example-crates`

  ### 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 2263a58448f5f04a74e076132aea93f21c584bc0
  evanlinjin:
    ACK 2263a58448f5f04a74e076132aea93f21c584bc0

Tree-SHA512: fd0eecb4a1051b8f88ae858ad6231b254beaad50f925d656a307c66bd6a20770cf698032d1d7e0179d93ac169cfa5d8c7c3b8def4c91334afc27f7a6f9d7558a
2023-08-24 20:27:03 +08:00
Daniela Brozzoni
2263a58448
refactor: Rename wallet_esplora to...
...`wallet_esplora_blocking`
2023-08-23 16:02:44 +02:00
Daniela Brozzoni
11ac26f6b2
docs: Update README.md
- Fixes the release timeline
- Adds an explanation for the crates under `example-crates`
2023-08-23 16:02:41 +02:00
Steve Myers
fb5cfa3c25
Merge bitcoindevkit/bdk#1091: ci: Pin rustls-webpki to 0.100.1
fa0bead02488d2bcfb9828e61c06a36a3dab70d4 ci: Pin rustls-webpki to 0.100.1 (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:
  notmandatory:
    ACK fa0bead02488d2bcfb9828e61c06a36a3dab70d4

Tree-SHA512: e8d0f21efef5abd222169bce2294e7de22699bd65e8366cd3e9c08e0858efd9163b4c428375b2a335c0358a0e7c591bd64899ee5c909cd09e0d14bfdda3d3633
2023-08-22 11:53:16 -05:00
Daniela Brozzoni
fa0bead024
ci: Pin rustls-webpki to 0.100.1 2023-08-22 17:35:32 +02:00
Daniela Brozzoni
8c4eeb56c0
Merge bitcoindevkit/bdk#1082: docs: add License and Contributing sections to repo top-level README
2d543475e2d7aa5503199699bb9bb4c0e519d0a8 docs: add License and Contributing sections to repo top-level README (Steve Myers)

Pull request description:

  ### Description

  Add explicit "License" and "Contributing" sections to the repo top-level `README.md` file to make it clear that it applies to everything in the project. Also moved license files up to repo top-level directory and did some minor cleanup of bdk/README.md License and Contribution sections to match top-level README.

ACKs for top commit:
  danielabrozzoni:
    ACK 2d543475e2d7aa5503199699bb9bb4c0e519d0a8

Tree-SHA512: 00442adf22258333d7672e8389b2380a8a81219f217bbffd525e253424a2aeeed13dd2316b3fe69d0bbeb13addbf2351697659c2abfec762e8e789fce3bb26e2
2023-08-22 15:20:03 +02:00
Daniela Brozzoni
3b5b829086
Merge bitcoindevkit/bdk#1087: ci: fix msrv dependency versions for reqest and h2
4f37b2a293df57cdc7c4bae7d4ae8e0f04dd8032 ci: fix msrv dependency versions for reqest and h2 (Steve Myers)

Pull request description:

  ### Description

  Fix MSRV dependency versions for `reqwest` and`h2`, both latest version now require 1.63.0.

  ### Notes to the reviewers

  - reqwest 0.11.19 has MSRV 1.63.0+, pin to 0.11.18
  - h2 0.3.21 has MSRV 1.63.0+, pin to 0.3.20

  ### 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:
  danielabrozzoni:
    ACK 4f37b2a293df57cdc7c4bae7d4ae8e0f04dd8032

Tree-SHA512: 6cc5bdc793d57f8b28d10f70041c1faae686da95182e313c3c854d9d58f003a75a381f2e5ca660c9eb41356937197e9f84bc756695e06b3718e281d3e818af51
2023-08-22 11:48:00 +02:00
Steve Myers
4f37b2a293
ci: fix msrv dependency versions for reqest and h2
- reqwest 0.11.19 has MSRV 1.63.0+, pin to 0.11.18
- h2 0.3.21 has MSRV 1.63.0+, pin to 0.3.20
2023-08-21 15:25:57 -05:00
Steve Myers
2d543475e2
docs: add License and Contributing sections to repo top-level README
- moved license files up to repo top-level directory
- minor cleanup of bdk/README.md License and Contribution sections
2023-08-19 13:36:10 -05:00
志宇
d6bcd9b725
Merge bitcoindevkit/bdk#1065: refactor!(chain): Unify ChangeSet nomenclature
62f253103c3fd158ad66a0bba11399e7083226f2 ci: Update tokio version (Daniela Brozzoni)
80f5ecf3be2550808f1bf1870df2504c09395dee feat(chain): Add `initial_changeset` to graphs (Daniela Brozzoni)
ea50b6a932ca492f27ac4aaea93c6b6ba11fa0e8 refactor!(chain): Unify ChangeSet nomenclature (Daniela Brozzoni)

Pull request description:

  Solves #1022

  ### Changelog notice

  Rename `indexed_tx_graph::IndexedAdditions` to `indexed_tx_graph::ChangeSet`
  Rename `indexed_tx_graph::IndexedAdditions::graph_additions` to `indexed_tx_graph::ChangeSet::graph`
  Rename `indexed_tx_graph::IndexedAdditions::index_additions` to `indexed_tx_graph::ChangeSet::indexer`
  Rename `tx_graph::Additions` to `tx_graph::ChangeSet`
  Rename `keychain::DerivationAdditions` to `keychain::ChangeSet`
  Rename `CanonicalTx::node` to `CanonicalTx::tx_node`
  Rename `CanonicalTx::observed_as` to `CanonicalTx::chain_position`
  Rename `LocalChangeSet` to `WalletChangeSet`
  Rename `LocalChangeSet::chain_changeset` to `WalletChangeSet::chain`
  Rename `LocalChangeSet::indexed_additions` to `WalletChangeSet::indexed_tx_graph`
  Rename `LocalUpdate` to `WalletUpdate`
  Make `TxGraph::determine_changeset` `pub(crate)`
  Add `TxGraph::initial_changeset`
  Add `IndexedTxGraph::initial_changeset`
  Remove `TxGraph::insert_txout_preview`
  Remove `TxGraph::insert_tx_preview`
  Remove `insert_anchor_preview`
  Remove `insert_seen_at_preview`

  ### Notes to reviewers

  I'm not sure whether we want to keep `TxGraph::determine_changeset` public or not

  ### 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 62f253103c3fd158ad66a0bba11399e7083226f2

Tree-SHA512: 401bdf49c5f2082971cfcd54725ce98abd08263de7571205a324a2adbb5359be4f48454def415bedadde0a9c81db437b91c13cd6e892ba54b215059f75006dd5
2023-08-18 18:59:15 +08:00
Daniela Brozzoni
62f253103c
ci: Update tokio version 2023-08-18 12:07:11 +02:00
Daniela Brozzoni
80f5ecf3be
feat(chain): Add initial_changeset to graphs
Add `initial_changeset` to TxGraph and IndexedTxGraph
2023-08-18 11:52:31 +02:00
Daniela Brozzoni
ea50b6a932
refactor!(chain): Unify ChangeSet nomenclature
This commit renames:

- indexed_tx_graph::IndexedAdditions -> indexed_tx_graph::ChangeSet
- indexed_tx_graph::IndexedAdditions::graph_additions -> indexed_tx_graph::ChangeSet::graph
- indexed_tx_graph::IndexedAdditions::index_additions -> indexed_tx_graph::ChangeSet::indexer
- tx_graph::Additions -> tx_graph::ChangeSet
- keychain::DerivationAdditions -> keychain::ChangeSet
- CanonicalTx::node -> CanonicalTx::tx_node
- CanonicalTx::observed_as -> CanonicalTx::chain_position
- LocalChangeSet -> WalletChangeSet
- LocalChangeSet::chain_changeset -> WalletChangeSet::chain
- LocalChangeSet::indexed_additions -> WalletChangeSet::indexed_tx_graph
- LocalUpdate -> WalletUpdate

This commit also changes the visibility of TxGraph::determine_changeset
to be pub(crate), and the method accepts a TxGraph instead of &TxGraph

This commit removes:
- `TxGraph::insert_txout_preview`
- `TxGraph::insert_tx_preview`
- `insert_anchor_preview`
- `insert_seen_at_preview`

Solves #1022
2023-08-18 11:51:45 +02:00
Vladimir Fomene
480c2730de
feat: Implement Anchor for BlockId 2023-08-16 18:55:26 +03:00
Daniela Brozzoni
0cd2348166
Merge bitcoindevkit/bdk#1077: fix: msrv issues
b0b91b74186575f11a4fba77ffd64005c482740e fix: msrv issues and update coverage toolchain (Vladimir Fomene)

Pull request description:

  Fix breaking MSRV for 1.57.0

  #### 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 b0b91b74186575f11a4fba77ffd64005c482740e

Tree-SHA512: d872f427da065c66346f0fd3ae19d4d62c535cf4444d236c0d1f6e9a5e169b7fd7773f643693daa23eeccbe6a3ddad6767f91520c7547360c07febc227a88f06
2023-08-16 15:49:20 +02:00
Vladimir Fomene
b0b91b7418
fix: msrv issues and update coverage toolchain 2023-08-16 16:22:28 +03:00