志宇
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 Blockchain
s 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
Alekos Filini
21318eb940
[cli] Make the REPL return JSON
2020-08-30 20:36:21 +02:00
Alekos Filini
5777431135
Use miniscript::DescriptorPublicKey
...
This allows us to remove all our custom "ExtendedDescriptor" implementation since that is
now built directly in miniscript.
2020-08-30 20:36:19 +02:00
Alekos Filini
f0a1e670df
[examples] Use MemoryDatabase
in the compiler example
2020-08-08 09:37:25 +02:00
Dominik Spicher
462d413b02
[examples] Fix Miniscript variants issue in compiler example
...
miniscript has extended the `Miniscript` struct to be generic
over a `ScriptContext`. This context is different for the `Sh`
variant (`Legacy`) than for the `Wsh` and `ShWsh` variants
(`Segwitv0`). Therefore, Rust is not happy with the single
`compiled` variable if it is used as an argument for all three
variants.
2020-08-07 16:08:23 +02:00
Dominik Spicher
796a3a5c91
[examples] Fix renamed thresh_m descriptor
...
In miniscript 1.0, `thresh_m` has been renamed to `multi`
2020-08-07 15:17:59 +02:00
Alekos Filini
123984e99d
Remove async, upgrade electrum-client
2020-07-17 09:44:01 +02:00
Alekos Filini
c1b01e4d8c
[descriptors] Transform a descriptor into its "public" version
2020-05-10 17:46:54 +02:00