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
f73596e docs: add wording on required use of xpub for multipath constructor (thunderbiscuit)
Pull request description:
This is just a cherry pick of my #306 PR onto the 2.2 release branch.
ACKs for top commit:
ValuedMammal:
ACK f73596e
oleonardolima:
ACK f73596e
Tree-SHA512: f1e0f2acf9ab832e33fcf071b880de8df09b40bc755236c80f0045c48f667c10e4b38133f50f210acafe6d335e6a62b77037b6a5068d16d44a25dd46e138307c
// You get a Miniscript(Unexpected("Can't make an extended private key with multiple paths
2902
+
// into a public key.")) error.
2903
+
let private_multipath_descriptor = "wpkh(tprv8ZgxMBicQKsPdWAHbugK2tjtVtRjKGixYVZUdL7xLHMgXZS6BFbFi1UDb1CHT25Z5PU1F9j7wGxwUiRhqz9E3nZRztikGUV6HoRDYcqPhM4/84'/1'/0'/<0;1>/*)";
2904
+
let params = Wallet::create_from_two_path_descriptor(private_multipath_descriptor);
2905
+
let wallet = params.network(Network::Testnet).create_wallet_no_persist();
2906
+
assert!(matches!(
2907
+
wallet,
2908
+
Err(DescriptorError::Miniscript(Unexpected(..)))
2909
+
));
2910
+
2897
2911
// Test with invalid 3-path multipath descriptor
2898
2912
let three_path_descriptor = "wpkh([9a6a2580/84'/1'/0']tpubDDnGNapGEY6AZAdQbfRJgMg9fvz8pUBrLwvyvUqEgcUfgzM6zc2eVK4vY9x9L5FJWdX8WumXuLEDV5zDZnTfbn87vLe9XceCFwTu9so9Kks/<0;1;2>/*)";
2899
2913
let params = Wallet::create_from_two_path_descriptor(three_path_descriptor);
0 commit comments