ExtendedPublicKey

Trait ExtendedPublicKey 

Source
pub trait ExtendedPublicKey<C: KeyDerivationCrypto + ?Sized>: Clone {
    // Required methods
    fn derive_normal_child(&self, idx: i32) -> Result<C::ExtendedPublicKey>;
    fn public_key(&self) -> C::PublicKey;
}
Expand description

Extended public key is a neutered extended private key that contains the public key that belongs to the private key in that, but it also contains the chain code so it can be used in normal (public) derivation. Some cryptographic suites do not have normal derivation and those are free to implement extended public keys containing only the public key.

Required Methods§

Source

fn derive_normal_child(&self, idx: i32) -> Result<C::ExtendedPublicKey>

Derive child extended public keys. Useful for auditing hierarchical deterministic wallets, or generating a new address for each on-chain transaction knowing the owner of the corresponding extended private key can spend the received coins.

Source

fn public_key(&self) -> C::PublicKey

Throws away the chain code and gives back only the public key from the extended public key.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§