diff --git a/src/util/bip32.rs b/src/util/bip32.rs index 3fd8fc2b..060a55ad 100644 --- a/src/util/bip32.rs +++ b/src/util/bip32.rs @@ -345,6 +345,11 @@ impl fmt::Debug for DerivationPath { } } +/// Full information on the used extended public key: fingerprint of the +/// master extended public key and a derivation path from it. +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +pub struct KeySource(pub Fingerprint, pub DerivationPath); + /// A BIP32 error #[derive(Clone, PartialEq, Eq, Debug)] pub enum Error { diff --git a/src/util/psbt/map/input.rs b/src/util/psbt/map/input.rs index 05a24432..72f33942 100644 --- a/src/util/psbt/map/input.rs +++ b/src/util/psbt/map/input.rs @@ -17,7 +17,7 @@ use std::collections::BTreeMap; use blockdata::script::Script; use blockdata::transaction::{SigHashType, Transaction, TxOut}; use consensus::encode; -use util::bip32::{DerivationPath, Fingerprint}; +use util::bip32::KeySource; use util::key::PublicKey; use util::psbt; use util::psbt::map::Map; @@ -48,7 +48,7 @@ pub struct Input { pub witness_script: Option