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
// Copyright (c) 2020-2021 Bitcoin Dev Kit Developers
4
+
// Copyright (c) 2020-2025 Bitcoin Dev Kit Developers
5
5
//
6
6
// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
7
7
// or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
@@ -10,11 +10,12 @@
10
10
// licenses.
11
11
12
12
externcrate bdk_wallet;
13
+
13
14
use std::error::Error;
14
15
15
-
use bdk_wallet::bitcoin::Network;
16
16
use bdk_wallet::descriptor::{policy::BuildSatisfaction,ExtractPolicy,IntoWalletDescriptor};
17
17
use bdk_wallet::signer::SignersContainer;
18
+
use bitcoin::NetworkKind;
18
19
19
20
/// This example describes the use of the BDK's [`bdk_wallet::descriptor::policy`] module.
20
21
///
@@ -29,18 +30,17 @@ use bdk_wallet::signer::SignersContainer;
29
30
fnmain() -> Result<(),Box<dynError>>{
30
31
let secp = bitcoin::secp256k1::Secp256k1::new();
31
32
32
-
// The descriptor used in the example
33
-
// The form is "wsh(multi(2, <privkey>, <pubkey>))"
33
+
// The descriptor used in the example. The form is "wsh(multi(2, <privkey>, <pubkey>))".
34
34
let desc = "wsh(multi(2,tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcLNfjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/*,tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/1/*))";
35
35
36
36
// Use the descriptor string to derive the full descriptor and a keymap.
37
37
// The wallet descriptor can be used to create a new bdk_wallet::wallet.
38
38
// While the `keymap` can be used to create a `SignerContainer`.
39
39
//
40
40
// The `SignerContainer` can sign for `PSBT`s.
41
-
// a `bdk_wallet::Wallet` internally uses these to handle transaction signing.
42
-
// But they can be used as independent tools also.
0 commit comments