67 Commits

Author SHA1 Message Date
Alekos Filini
9854fd34ea
Remove deprecated address validators 2022-10-25 11:08:47 +02:00
Alekos Filini
ea47d7a35b
Merge bitcoindevkit/bdk#758: Add HWI example in docs
1437e1ecfe663b819156d98c5e1975fb357a763f Add the hardware_signer example (Daniela Brozzoni)
1a71eb1f4736651ad82e0abd64792b6cc7b16c20 Update the hardwaresigner module documentation (Daniela Brozzoni)
0695e9fb3e41727e5732561a993411147487afd3 Bump HWI to 0.2.3 (Daniela Brozzoni)
a4a43ea86060fa0a62b47dedc7de820459b3a472 Re-export HWI if the hardware-signer feature is set (Daniela Brozzoni)

Pull request description:

  ### Description

  ### Notes to the reviewers

  ### Changelog notice

  - bdk re-exports the `hwi` create when the feature `hardware-signer` is on
  - Add `examples/hardware_signer.rs`

  ### 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:
  afilini:
    ACK 1437e1ecfe663b819156d98c5e1975fb357a763f

Tree-SHA512: 181f4d14dce11e19497fbf30e0af8de21c2c210d37129d7d879ed5670ed09a25be1c8d371389c431e18df9e76870cf5e4afe7b29a6c05fe59b3e1816bc8cf673
2022-10-24 10:53:39 +02:00
Daniela Brozzoni
1437e1ecfe
Add the hardware_signer example 2022-10-13 10:46:49 +01:00
Steve Myers
1331193800
Update psbt_signer example to use descriptor! macro 2022-10-09 21:39:04 -05:00
rajarshimaitra
97b6fb06aa
Add a policy example
Add a new policy example demonstrating the bdk's policy structure
and how to derive it for any descriptor without creating a bdk wallet.
2022-09-16 18:50:26 +05:30
rajarshimaitra
da7670801b
Update compiler example.
Change the compiler clap app into a specific example. Add comment docs
and example description. Remove clap from dependency.
2022-09-16 18:50:26 +05:30
Steve Myers
fa998de4b1
Add psbt_signer.rs example 2022-09-07 20:33:39 -05:00
志宇
ac19c19f21
New RpcBlockchain implementation with various fixes
The new implementation fixes the following:
* We can track more than 100 scriptPubKeys
* We can obtain more than 1000 transactions per sync
* `TransactionDetails` for already-synced transactions are updated when
  new scriptPubKeys are introduced (fixing the missing balance/coins
      issue of supposedly tracked scriptPubKeys)

`RpcConfig` changes:
* Introduce `RpcSyncParams`.
* Remove `RpcConfig::skip_blocks` (this is replaced by
  `RpcSyncParams::start_time`).
2022-08-04 11:27:37 +08:00
志宇
45db468c9b
Deprecate AddressValidator 2022-07-11 17:31:59 +08:00
Alekos Filini
cca69481eb
Bump MSRV to 1.56 2022-05-04 17:29:07 +02:00
Alekos Filini
44758f9483
Simplify the rpcwallet example using the improved keys traits 2022-04-13 12:56:43 +02:00
rajarshimaitra
8a98e69e78
Add rpc wallet creation example
This adds an example wallet creation code with sled DB and RPC
Blockchain.

The backend RPC is managed using electrsd::bitcoind
2022-03-23 11:59:51 +05:30
LLFourn
410a51355b
Add SyncOptions as the second argument to Wallet::sync
The current options are awkward and it would be good if we could
introduce more in the future without breaking changes.
2022-02-24 20:39:00 +11:00
LLFourn
326bfe82a8
Remove Blockchain from wallet
Although somewhat convenient to have, coupling the Wallet with
the blockchain trait causes development friction and complexity.
What if sometimes the wallet is "offline" (no access to the blockchain)
but sometimes its online?
The only thing the Wallet needs the blockchain for is to sync.
But not all applications will even use the sync method and the sync
method doesn't require the full blockchain functionality.
So we instead pass the blockchain in when we want to sync.

- To further reduce the coupling with blockchain I removed the get_height call from `new` and just use the height of the
last sync in the database.
- I split up the blockchain trait a bit into subtraits.
2022-02-24 20:39:00 +11:00
Alekos Filini
a348dbdcfe
[ci] Update the stable version to 1.56 2021-10-22 15:57:27 +02:00
Riccardo Casatta
192965413c
Convert upper-case acronyms as suggested by CamelCase convention
see https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
2021-04-07 22:14:54 +02:00
Steve Myers
f3b475ff0e
[wallet] Refactor get_*_address() into get_address(AddressIndex), update CHANGELOG 2021-03-15 08:58:11 -07:00
Steve Myers
12ae1c3479
Update license to Apache 2.0 or MIT, copyright to Bitcoin Dev Kit Developers 2021-03-03 13:23:25 -08:00
Tobin Harding
bfe29c4ef6
Use map instead of and_then
As suggested by Clippy us `map` instead of `and_then` with an inner
option.
2021-02-24 13:30:48 +11:00
Riccardo Casatta
db5e663f05
compact filters balance example 2021-02-10 12:38:07 +01:00
Alekos Filini
fedd92c022
Properly handle the Signet network
Closes #62
2021-02-05 16:51:48 -05:00
Alekos Filini
3d9d6fee07
Update bitcoin, miniscript, electrum-client 2021-02-05 09:11:27 -05:00
LLFourn
6fe3be0243
Derive Clone + Debug for TxBuilder
And make Wallet Debug while I'm at it.
2021-01-22 15:08:30 +11:00
Steve Myers
f74bfdd493
Remove 'cli.rs' module, 'cli-utils' feature and 'repl.rs' example 2020-12-31 09:44:30 -08:00
LLFourn
656c9c9da8
Use () to indicate a missing blockchain
So that:
1. There are no runtime errors
2. There less type annotations needed
3. Less traits and stuff to document
2020-12-23 14:52:29 +11:00
Alekos Filini
1713d621d4
Rename ScriptType to KeychainKind
This avoids confusion with the "type of script".
2020-12-14 17:14:24 +01:00
Evgenii P
c9a05c0deb
Fix the REPL example to have optional esplora 2020-12-11 22:19:08 +07:00
Evgenii P
7d7b78534a
Remove unused macro imports 2020-12-11 22:19:08 +07:00
Steve Myers
364b47bfcb
Update cli module to use StructOpt and add docs 2020-12-03 16:18:47 -08:00
Alekos Filini
d6ac752b65
Merge commit 'refs/pull/191/head' of github.com:bitcoindevkit/bdk 2020-11-30 15:17:09 +01:00
Riccardo Casatta
6d1d5d5f57
use electurm-client updated 2020-11-30 13:25:23 +01:00
Alekos Filini
196c2f5450
Merge commit 'refs/pull/172/head' of github.com:bitcoindevkit/bdk 2020-11-20 12:06:41 +01:00
Riccardo Casatta
73326068f8
Use dirs-next instead of dirs since the latter is unmantained 2020-11-19 17:57:59 +01:00
Justin Moon
b1b2f2abd6
[wallet] Don't wrap SignersContainer arguments in Arc 2020-11-19 10:27:33 -06:00
Riccardo Casatta
c9079a7292
Allow to set concurrency in Esplora config and optionally pass it in repl 2020-11-18 11:55:20 +01:00
Alekos Filini
fe7ecd3dd2
Merge commit 'refs/pull/167/head' of github.com:bitcoindevkit/bdk 2020-11-18 10:44:54 +01:00
Alekos Filini
7a42c5e095
Switch to "mainline" rust-miniscript 2020-11-17 23:57:28 +01:00
Riccardo Casatta
d9985c4bbb
[examples] support esplora blockchain source in repl 2020-11-17 09:39:44 +01:00
LLFourn
5784a95e48
Remove redundant Box around address validators 2020-11-03 16:06:43 +11:00
Steve Myers
4f7355ec82
[ci] Fix all-keys and cli-utils tests 2020-10-28 21:34:04 -07:00
Alekos Filini
100f0aaa0a
Bump rust-bitcoin to 0.25, fix Cargo dependencies
Closes #112, closes #113, closes #124
2020-10-13 10:39:48 +02:00
Alekos Filini
5eee18bed2
[blockchain] Add a trait to create Blockchains from a configuration
This is the first set of changes for #42
2020-09-15 12:03:04 +02:00
Alekos Filini
d7ee38cc52 Rename the library to bdk 2020-09-14 15:13:43 -07:00
Alekos Filini
24fcb38565
[repl] Revert back the repl example to use Electrum 2020-09-09 17:06:35 +02:00
Alekos Filini
43cb0331bf
Rename the crate to just "magical" 2020-09-04 17:01:33 +02:00
Alekos Filini
ac06e35c49
Add docs for Wallet 2020-09-04 16:29:25 +02:00
Alekos Filini
eee75219e0
Write more docs, make TxBuilder::with_recipients take Scripts 2020-09-04 16:07:41 +02:00
Alekos Filini
c0867a6adc
General cleanup for the docs 2020-08-31 15:04:27 +02:00
Alekos Filini
d61e974dbe
Add the license to every file 2020-08-31 11:48:25 +02:00
Alekos Filini
557f7ef8c9
[wallet] Add AddressValidators 2020-08-30 20:36:25 +02:00