[−][src]Struct sv::wallet::ExtendedKey
A private or public key in an hierarchial deterministic wallet
Methods
impl ExtendedKey
[src]
impl ExtendedKey
pub fn new_public_key(
network: Network,
depth: u8,
parent_fingerprint: &[u8],
index: u32,
chain_code: &[u8],
public_key: &[u8]
) -> Result<ExtendedKey>
[src]
pub fn new_public_key(
network: Network,
depth: u8,
parent_fingerprint: &[u8],
index: u32,
chain_code: &[u8],
public_key: &[u8]
) -> Result<ExtendedKey>
Creates a new extended public key
pub fn new_private_key(
network: Network,
depth: u8,
parent_fingerprint: &[u8],
index: u32,
chain_code: &[u8],
private_key: &[u8]
) -> Result<ExtendedKey>
[src]
pub fn new_private_key(
network: Network,
depth: u8,
parent_fingerprint: &[u8],
index: u32,
chain_code: &[u8],
private_key: &[u8]
) -> Result<ExtendedKey>
Creates a new extended private key
pub fn version(&self) -> u32
[src]
pub fn version(&self) -> u32
Gets the extended key version byte prefix
pub fn network(&self) -> Result<Network>
[src]
pub fn network(&self) -> Result<Network>
Gets the network
pub fn key_type(&self) -> Result<ExtendedKeyType>
[src]
pub fn key_type(&self) -> Result<ExtendedKeyType>
Gets the key type
pub fn depth(&self) -> u8
[src]
pub fn depth(&self) -> u8
Gets the depth
pub fn parent_fingerprint(&self) -> [u8; 4]
[src]
pub fn parent_fingerprint(&self) -> [u8; 4]
Gets the first 4 bytes of the parent key, or 0 if this is the master key
pub fn index(&self) -> u32
[src]
pub fn index(&self) -> u32
Get the index of this key as derived from the parent
pub fn chain_code(&self) -> [u8; 32]
[src]
pub fn chain_code(&self) -> [u8; 32]
Gets the chain code
pub fn public_key(&self) -> Result<[u8; 33]>
[src]
pub fn public_key(&self) -> Result<[u8; 33]>
Gets the public key if this is an extended public key
pub fn private_key(&self) -> Result<[u8; 32]>
[src]
pub fn private_key(&self) -> Result<[u8; 32]>
Gets the private key if this is an extended private key
pub fn fingerprint(&self) -> Result<[u8; 4]>
[src]
pub fn fingerprint(&self) -> Result<[u8; 4]>
Gets the fingerprint of the public key hash
pub fn extended_public_key(&self) -> Result<ExtendedKey>
[src]
pub fn extended_public_key(&self) -> Result<ExtendedKey>
Gets the extenced public key for this key
pub fn derive_private_key(&self, index: u32) -> Result<ExtendedKey>
[src]
pub fn derive_private_key(&self, index: u32) -> Result<ExtendedKey>
Derives an extended child private key from an extended parent private key
pub fn derive_public_key(&self, index: u32) -> Result<ExtendedKey>
[src]
pub fn derive_public_key(&self, index: u32) -> Result<ExtendedKey>
Derives an extended child public key from an extended parent public key
pub fn encode(&self) -> String
[src]
pub fn encode(&self) -> String
Encodes an extended key into a string
pub fn decode(s: &str) -> Result<ExtendedKey>
[src]
pub fn decode(s: &str) -> Result<ExtendedKey>
Decodes an extended key from a string
Trait Implementations
impl Serializable<ExtendedKey> for ExtendedKey
[src]
impl Serializable<ExtendedKey> for ExtendedKey
fn read(reader: &mut dyn Read) -> Result<ExtendedKey>
[src]
fn read(reader: &mut dyn Read) -> Result<ExtendedKey>
fn write(&self, writer: &mut dyn Write) -> Result<()>
[src]
fn write(&self, writer: &mut dyn Write) -> Result<()>
impl Clone for ExtendedKey
[src]
impl Clone for ExtendedKey
fn clone(&self) -> ExtendedKey
[src]
fn clone(&self) -> ExtendedKey
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for ExtendedKey
[src]
impl Copy for ExtendedKey
impl Eq for ExtendedKey
[src]
impl Eq for ExtendedKey
impl PartialEq<ExtendedKey> for ExtendedKey
[src]
impl PartialEq<ExtendedKey> for ExtendedKey
fn eq(&self, other: &ExtendedKey) -> bool
[src]
fn eq(&self, other: &ExtendedKey) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Debug for ExtendedKey
[src]
impl Debug for ExtendedKey
Auto Trait Implementations
impl Send for ExtendedKey
impl Send for ExtendedKey
impl Sync for ExtendedKey
impl Sync for ExtendedKey
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self