pub struct DerivedPublicKey { /* private fields */ }Expand description
Public key and chain code used for hierarchical key derivation.
Implementations§
Source§impl DerivedPublicKey
impl DerivedPublicKey
Sourcepub fn to_address(&self, format: AddressFormat) -> Address
pub fn to_address(&self, format: AddressFormat) -> Address
Returns the address of a public key.
Source§impl DerivedPublicKey
impl DerivedPublicKey
Sourcepub fn new(public_key: PublicKey, chain_code: [u8; 32]) -> Self
pub fn new(public_key: PublicKey, chain_code: [u8; 32]) -> Self
Constructs a derived public key from a public key and a chain code.
Sourcepub fn public_key(&self) -> &PublicKey
pub fn public_key(&self) -> &PublicKey
The public key used to verify messages.
Sourcepub fn chain_code(&self) -> &[u8; 32]
pub fn chain_code(&self) -> &[u8; 32]
The chain code used to derive child keys.
Sourcepub fn derive(&self, child: ChildNumber) -> Result<Self>
pub fn derive(&self, child: ChildNumber) -> Result<Self>
Derives a child public key.
Trait Implementations§
Source§impl Clone for DerivedPublicKey
impl Clone for DerivedPublicKey
Source§fn clone(&self) -> DerivedPublicKey
fn clone(&self) -> DerivedPublicKey
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 DerivedPublicKey
impl Debug for DerivedPublicKey
Source§impl PartialEq for DerivedPublicKey
impl PartialEq for DerivedPublicKey
impl Copy for DerivedPublicKey
impl Eq for DerivedPublicKey
impl StructuralPartialEq for DerivedPublicKey
Auto Trait Implementations§
impl Freeze for DerivedPublicKey
impl RefUnwindSafe for DerivedPublicKey
impl Send for DerivedPublicKey
impl Sync for DerivedPublicKey
impl Unpin for DerivedPublicKey
impl UnwindSafe for DerivedPublicKey
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