You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c7a43d9 Remove unused code (Alekos Filini)
1ffd59d Upgrade to rust-bitcoin 0.29 (Alekos Filini)
ae4f4e5 Upgrade `rand` to `0.8` (Alekos Filini)
9854fd3 Remove deprecated address validators (Alekos Filini)
Pull request description:
### Description
Upgrade BDK to rust-bitcoin 0.29
Missing pieces:
- [x] rust-miniscript `update_output_with_descriptor` - rust-bitcoin/rust-miniscript#465
- [x] rust-miniscript 8.0.0 release - rust-bitcoin/rust-miniscript#462
- [x] Upgrade rust-hwi to bitcoin 0.29 bitcoindevkit/rust-hwi#50
- [x] Upgrade esplora-client to bitcoin 0.29 bitcoindevkit/rust-esplora-client#20
- [x] Upgrade rand to 0.8 like secp256k1 did
### Notes to the reviewers
The commits still need to be reordered and cleaned up
### Changelog notice
- Upgrade rust-bitcoin to 0.29
- Remove deprecated "address validators"
### 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 c7a43d9
Tree-SHA512: 718a1baf3613b31ec1de39fe63467ebee38617963a4ce0670a617e20fe4f46a57c5786933cdde6cfad9fc76ce0af08843f58844fb4a89f5948cb42c697f802ef
use bdk::{Wallet, SignOptions, database::MemoryDatabase};
134
134
135
-
use bitcoin::base64;
135
+
use base64;
136
136
use bitcoin::consensus::deserialize;
137
137
138
138
fn main() -> Result<(), bdk::Error> {
@@ -171,6 +171,17 @@ cargo test --features test-electrum
171
171
The other options are `test-esplora`, `test-rpc` or `test-rpc-legacy` which runs against an older version of Bitcoin Core.
172
172
Note that `electrs` and `bitcoind` binaries are automatically downloaded (on mac and linux), to specify you already have installed binaries you must use `--no-default-features` and provide `BITCOIND_EXE` and `ELECTRS_EXE` as environment variables.
173
173
174
+
## Running under WASM
175
+
176
+
If you want to run this library under WASM you will probably have to add the following lines to you `Cargo.toml`:
177
+
178
+
```toml
179
+
[dependencies]
180
+
getrandom = { version = "0.2", features = ["js"] }
181
+
```
182
+
183
+
This enables the `rand` crate to work in environments where JavaScript is available. See [this link](https://docs.rs/getrandom/0.2.8/getrandom/#webassembly-support) to learn more.
let internal_secret_xkey = DescriptorSecretKey::from_str("[e9824965/84'/1'/0']tprv8fvem7qWxY3SGCQczQpRpqTKg455wf1zgixn6MZ4ze8gRfHjov5gXBQTadNfDgqs9ERbZZ3Bi1PNYrCCusFLucT39K525MWLpeURjHwUsfX/1/*").unwrap();
34
34
35
35
let secp = Secp256k1::new();
36
-
let external_public_xkey = external_secret_xkey.as_public(&secp).unwrap();
37
-
let internal_public_xkey = internal_secret_xkey.as_public(&secp).unwrap();
36
+
let external_public_xkey = external_secret_xkey.to_public(&secp).unwrap();
37
+
let internal_public_xkey = internal_secret_xkey.to_public(&secp).unwrap();
38
38
39
39
let signing_external_descriptor = descriptor!(wpkh(external_secret_xkey)).unwrap();
40
40
let signing_internal_descriptor = descriptor!(wpkh(internal_secret_xkey)).unwrap();
0 commit comments