pub struct PublicKeyWithChainCode {
pub public_key: PublicKey,
pub chain_code: ChainCode,
}Expand description
HDWallet extended public key (Ed25519 public key + BIP32 ChainCode)
Fields§
§public_key: PublicKeyEd25519 public key
chain_code: ChainCodeBIP32 ChainCode
Implementations§
Source§impl PublicKeyWithChainCode
impl PublicKeyWithChainCode
Sourcepub fn derive(
&self,
derivation_index: U31,
) -> Result<Self, PublicDerivationError>
pub fn derive( &self, derivation_index: U31, ) -> Result<Self, PublicDerivationError>
BIP32 Derivation
May fail in 2 cases :
- The derivation is of the hardened type
- The public key is not issued from a private key of HD wallet type
Trait Implementations§
Source§impl Clone for PublicKeyWithChainCode
impl Clone for PublicKeyWithChainCode
Source§fn clone(&self) -> PublicKeyWithChainCode
fn clone(&self) -> PublicKeyWithChainCode
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 PublicKeyWithChainCode
impl Debug for PublicKeyWithChainCode
Source§impl PartialEq for PublicKeyWithChainCode
impl PartialEq for PublicKeyWithChainCode
impl Copy for PublicKeyWithChainCode
impl StructuralPartialEq for PublicKeyWithChainCode
Auto Trait Implementations§
impl Freeze for PublicKeyWithChainCode
impl RefUnwindSafe for PublicKeyWithChainCode
impl Send for PublicKeyWithChainCode
impl Sync for PublicKeyWithChainCode
impl Unpin for PublicKeyWithChainCode
impl UnwindSafe for PublicKeyWithChainCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more