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
Copy file name to clipboardExpand all lines: examples/policy.rs
+35-31Lines changed: 35 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@
12
12
externcrate bdk_wallet;
13
13
use std::error::Error;
14
14
15
-
use bdk_wallet::bitcoin::Network;
16
-
use bdk_wallet::descriptor::{policy::BuildSatisfaction,ExtractPolicy,IntoWalletDescriptor};
17
-
use bdk_wallet::signer::SignersContainer;
15
+
// use bdk_wallet::bitcoin::Network;
16
+
// use bdk_wallet::descriptor::{policy::BuildSatisfaction, ExtractPolicy, IntoWalletDescriptor};
17
+
// use bdk_wallet::signer::SignersContainer;
18
18
19
19
/// This example describes the use of the BDK's [`bdk_wallet::descriptor::policy`] module.
20
20
///
@@ -27,34 +27,38 @@ use bdk_wallet::signer::SignersContainer;
27
27
/// wallet holds one of the Extend Private key.
28
28
#[allow(clippy::print_stdout)]
29
29
fnmain() -> Result<(),Box<dynError>>{
30
-
let secp = bitcoin::secp256k1::Secp256k1::new();
31
-
32
-
// The descriptor used in the example
33
-
// The form is "wsh(multi(2, <privkey>, <pubkey>))"
34
-
let desc = "wsh(multi(2,tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcLNfjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/*,tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/1/*))";
35
-
36
-
// Use the descriptor string to derive the full descriptor and a keymap.
37
-
// The wallet descriptor can be used to create a new bdk_wallet::wallet.
38
-
// While the `keymap` can be used to create a `SignerContainer`.
39
-
//
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