pub struct XpubkeyCore {
pub public_key: PublicKey,
pub chain_code: ChainCode,
}Expand description
Deterministic part of the extended public key descriptor
Fields§
§public_key: PublicKeyPublic key
chain_code: ChainCodeBIP32 chain code used for hierarchical derivation
Implementations§
Source§impl XpubkeyCore
impl XpubkeyCore
Sourcepub fn identifier(&self) -> XpubIdentifier
pub fn identifier(&self) -> XpubIdentifier
Computes XpubIdentifier of the key
Sourcepub fn fingerprint(&self) -> Fingerprint
pub fn fingerprint(&self) -> Fingerprint
Computes Fingerprint of the key
Source§impl XpubkeyCore
impl XpubkeyCore
Sourcepub fn derive(
self,
secp: &Secp256k1<VerifyOnly>,
terminal: impl IntoIterator<Item = UnhardenedIndex>,
) -> PublicKey
pub fn derive( self, secp: &Secp256k1<VerifyOnly>, terminal: impl IntoIterator<Item = UnhardenedIndex>, ) -> PublicKey
Derives public key for a given terminal path
Trait Implementations§
Source§impl Clone for XpubkeyCore
impl Clone for XpubkeyCore
Source§fn clone(&self) -> XpubkeyCore
fn clone(&self) -> XpubkeyCore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for XpubkeyCore
impl Debug for XpubkeyCore
Source§impl Display for XpubkeyCore
impl Display for XpubkeyCore
Source§impl From<ExtendedPubKey> for XpubkeyCore
impl From<ExtendedPubKey> for XpubkeyCore
Source§fn from(xpub: ExtendedPubKey) -> Self
fn from(xpub: ExtendedPubKey) -> Self
Converts to this type from the input type.
Source§impl Hash for XpubkeyCore
impl Hash for XpubkeyCore
Source§impl Ord for XpubkeyCore
impl Ord for XpubkeyCore
Source§fn cmp(&self, other: &XpubkeyCore) -> Ordering
fn cmp(&self, other: &XpubkeyCore) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for XpubkeyCore
impl PartialEq for XpubkeyCore
Source§impl PartialOrd for XpubkeyCore
impl PartialOrd for XpubkeyCore
Source§impl StrictDecode for XpubkeyCore
impl StrictDecode for XpubkeyCore
Source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given
std::io::Read instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed. Use io::Cursor over the buffer and
StrictDecode::strict_decode to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed if file contains remaining
data after the object reconstruction.Source§impl StrictEncode for XpubkeyCore
impl StrictEncode for XpubkeyCore
Source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given
std::io::Write instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
functionimpl Copy for XpubkeyCore
impl Eq for XpubkeyCore
impl StructuralPartialEq for XpubkeyCore
Auto Trait Implementations§
impl Freeze for XpubkeyCore
impl RefUnwindSafe for XpubkeyCore
impl Send for XpubkeyCore
impl Sync for XpubkeyCore
impl Unpin for XpubkeyCore
impl UnwindSafe for XpubkeyCore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more