Add accessors for the ExtendedPubKey wrapped by AccountPubKey

This commit is contained in:
Kris Nuttycombe 2022-01-21 14:02:51 -07:00
parent dec395a5b0
commit 00aee09662
1 changed files with 8 additions and 0 deletions

View File

@ -113,6 +113,14 @@ pub mod transparent {
.derive_public_key(KeyIndex::Normal(child_index))
.map(ExternalPubKey)
}
pub fn from_extended_pubkey(extpubkey: ExtendedPubKey) -> Self {
AccountPubKey(extpubkey)
}
pub fn extended_pubkey(&self) -> &ExtendedPubKey {
&self.0
}
}
/// A type representing a private key at the BIP-44 external child