Merge commit 'refs/pull/223/head' of github.com:bitcoindevkit/bdk

This commit is contained in:
Alekos Filini
2020-12-16 11:11:38 +01:00
5 changed files with 14 additions and 7 deletions

View File

@@ -114,7 +114,9 @@ use crate::descriptor::XKeyUtils;
/// multiple of them
#[derive(Debug, Clone, Ord, PartialOrd, PartialEq, Eq, Hash)]
pub enum SignerId {
/// Bitcoin HASH160 (RIPEMD160 after SHA256) hash of an ECDSA public key
PkHash(hash160::Hash),
/// The fingerprint of a BIP32 extended key
Fingerprint(Fingerprint),
}
@@ -325,6 +327,7 @@ impl From<(SignerId, SignerOrdering)> for SignersContainerKey {
pub struct SignersContainer(BTreeMap<SignersContainerKey, Arc<dyn Signer>>);
impl SignersContainer {
/// Create a map of public keys to secret keys
pub fn as_key_map(&self, secp: &SecpCtx) -> KeyMap {
self.0
.values()