[−][src]Struct bitcoin::util::bip32::ExtendedPubKey
Extended public key
Fields
network: Network
The network this key is to be used on
depth: u8
How many derivations this key is from the master (which is 0)
parent_fingerprint: Fingerprint
Fingerprint of the parent key
child_number: ChildNumber
Child number of the key used to derive from parent (0 for master)
public_key: PublicKey
Public key
chain_code: ChainCode
Chain code
Methods
impl ExtendedPubKey
[src]
pub fn from_private<C: Signing>(
secp: &Secp256k1<C>,
sk: &ExtendedPrivKey
) -> ExtendedPubKey
[src]
secp: &Secp256k1<C>,
sk: &ExtendedPrivKey
) -> ExtendedPubKey
Derives a public key from a private key
pub fn derive_pub<C: Verification, P: AsRef<[ChildNumber]>>(
&self,
secp: &Secp256k1<C>,
path: &P
) -> Result<ExtendedPubKey, Error>
[src]
&self,
secp: &Secp256k1<C>,
path: &P
) -> Result<ExtendedPubKey, Error>
Attempts to derive an extended public key from a path.
The path
argument can be both of type DerivationPath
or Vec<ChildNumber>
.
pub fn ckd_pub_tweak(
&self,
i: ChildNumber
) -> Result<(PrivateKey, ChainCode), Error>
[src]
&self,
i: ChildNumber
) -> Result<(PrivateKey, ChainCode), Error>
Compute the scalar tweak added to this key to get a child key
pub fn ckd_pub<C: Verification>(
&self,
secp: &Secp256k1<C>,
i: ChildNumber
) -> Result<ExtendedPubKey, Error>
[src]
&self,
secp: &Secp256k1<C>,
i: ChildNumber
) -> Result<ExtendedPubKey, Error>
Public->Public child key derivation
pub fn decode(data: &[u8]) -> Result<ExtendedPubKey, Error>
[src]
Decoding extended public key from binary data according to BIP 32
pub fn encode(&self) -> [u8; 78]
[src]
Extended public key binary encoding according to BIP 32
pub fn identifier(&self) -> XpubIdentifier
[src]
Returns the HASH160 of the chaincode
pub fn fingerprint(&self) -> Fingerprint
[src]
Returns the first four bytes of the identifier
Trait Implementations
impl Ord for ExtendedPubKey
[src]
fn cmp(&self, other: &ExtendedPubKey) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<ExtendedPubKey> for ExtendedPubKey
[src]
fn partial_cmp(&self, other: &ExtendedPubKey) -> Option<Ordering>
[src]
fn lt(&self, other: &ExtendedPubKey) -> bool
[src]
fn le(&self, other: &ExtendedPubKey) -> bool
[src]
fn gt(&self, other: &ExtendedPubKey) -> bool
[src]
fn ge(&self, other: &ExtendedPubKey) -> bool
[src]
impl Clone for ExtendedPubKey
[src]
fn clone(&self) -> ExtendedPubKey
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<ExtendedPubKey> for ExtendedPubKey
[src]
fn eq(&self, other: &ExtendedPubKey) -> bool
[src]
fn ne(&self, other: &ExtendedPubKey) -> bool
[src]
impl Eq for ExtendedPubKey
[src]
impl Copy for ExtendedPubKey
[src]
impl Display for ExtendedPubKey
[src]
impl Debug for ExtendedPubKey
[src]
impl Hash for ExtendedPubKey
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromStr for ExtendedPubKey
[src]
Auto Trait Implementations
impl Unpin for ExtendedPubKey
impl Sync for ExtendedPubKey
impl Send for ExtendedPubKey
impl UnwindSafe for ExtendedPubKey
impl RefUnwindSafe for ExtendedPubKey
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,