pub struct EthereumMnemonic<N: EthereumNetwork, W: EthereumWordlist> { /* private fields */ }Expand description
Represents an Ethereum mnemonic
Implementations§
Source§impl<N: EthereumNetwork, W: EthereumWordlist> EthereumMnemonic<N, W>
impl<N: EthereumNetwork, W: EthereumWordlist> EthereumMnemonic<N, W>
Sourcepub fn verify_phrase(phrase: &str) -> bool
pub fn verify_phrase(phrase: &str) -> bool
Compares the given phrase against the phrase extracted from its entropy.
Trait Implementations§
Source§impl<N: Clone + EthereumNetwork, W: Clone + EthereumWordlist> Clone for EthereumMnemonic<N, W>
impl<N: Clone + EthereumNetwork, W: Clone + EthereumWordlist> Clone for EthereumMnemonic<N, W>
Source§fn clone(&self) -> EthereumMnemonic<N, W>
fn clone(&self) -> EthereumMnemonic<N, W>
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<N: Debug + EthereumNetwork, W: Debug + EthereumWordlist> Debug for EthereumMnemonic<N, W>
impl<N: Debug + EthereumNetwork, W: Debug + EthereumWordlist> Debug for EthereumMnemonic<N, W>
Source§impl<N: EthereumNetwork, W: EthereumWordlist> Display for EthereumMnemonic<N, W>
impl<N: EthereumNetwork, W: EthereumWordlist> Display for EthereumMnemonic<N, W>
Source§impl<N: EthereumNetwork, W: EthereumWordlist> FromStr for EthereumMnemonic<N, W>
impl<N: EthereumNetwork, W: EthereumWordlist> FromStr for EthereumMnemonic<N, W>
Source§impl<N: Hash + EthereumNetwork, W: Hash + EthereumWordlist> Hash for EthereumMnemonic<N, W>
impl<N: Hash + EthereumNetwork, W: Hash + EthereumWordlist> Hash for EthereumMnemonic<N, W>
Source§impl<N: EthereumNetwork, W: EthereumWordlist> Mnemonic for EthereumMnemonic<N, W>
impl<N: EthereumNetwork, W: EthereumWordlist> Mnemonic for EthereumMnemonic<N, W>
Source§fn from_phrase(phrase: &str) -> Result<Self, MnemonicError>
fn from_phrase(phrase: &str) -> Result<Self, MnemonicError>
Returns the mnemonic for the given phrase.
Source§fn to_phrase(&self) -> Result<String, MnemonicError>
fn to_phrase(&self) -> Result<String, MnemonicError>
Returns the phrase of the corresponding mnemonic.
Source§fn to_private_key(
&self,
password: Option<&str>,
) -> Result<Self::PrivateKey, MnemonicError>
fn to_private_key( &self, password: Option<&str>, ) -> Result<Self::PrivateKey, MnemonicError>
Returns the private key of the corresponding mnemonic.
Source§fn to_public_key(
&self,
password: Option<&str>,
) -> Result<Self::PublicKey, MnemonicError>
fn to_public_key( &self, password: Option<&str>, ) -> Result<Self::PublicKey, MnemonicError>
Returns the public key of the corresponding mnemonic.
Source§fn to_address(
&self,
password: Option<&str>,
format: &Self::Format,
) -> Result<Self::Address, MnemonicError>
fn to_address( &self, password: Option<&str>, format: &Self::Format, ) -> Result<Self::Address, MnemonicError>
Returns the address of the corresponding mnemonic.
type Address = EthereumAddress
type Format = EthereumFormat
type PrivateKey = EthereumPrivateKey
type PublicKey = EthereumPublicKey
Source§impl<N: EthereumNetwork, W: EthereumWordlist> MnemonicCount for EthereumMnemonic<N, W>
impl<N: EthereumNetwork, W: EthereumWordlist> MnemonicCount for EthereumMnemonic<N, W>
Source§fn new_with_count<R: Rng>(
rng: &mut R,
word_count: u8,
) -> Result<Self, MnemonicError>
fn new_with_count<R: Rng>( rng: &mut R, word_count: u8, ) -> Result<Self, MnemonicError>
Returns a new mnemonic given the word count.
Source§impl<N: EthereumNetwork, W: EthereumWordlist> MnemonicExtended for EthereumMnemonic<N, W>
impl<N: EthereumNetwork, W: EthereumWordlist> MnemonicExtended for EthereumMnemonic<N, W>
Source§fn to_extended_private_key(
&self,
password: Option<&str>,
) -> Result<Self::ExtendedPrivateKey, MnemonicError>
fn to_extended_private_key( &self, password: Option<&str>, ) -> Result<Self::ExtendedPrivateKey, MnemonicError>
Returns the extended private key of the corresponding mnemonic.
Source§fn to_extended_public_key(
&self,
password: Option<&str>,
) -> Result<Self::ExtendedPublicKey, MnemonicError>
fn to_extended_public_key( &self, password: Option<&str>, ) -> Result<Self::ExtendedPublicKey, MnemonicError>
Returns the extended public key of the corresponding mnemonic.
type ExtendedPrivateKey = EthereumExtendedPrivateKey<N>
type ExtendedPublicKey = EthereumExtendedPublicKey<N>
Source§impl<N: Ord + EthereumNetwork, W: Ord + EthereumWordlist> Ord for EthereumMnemonic<N, W>
impl<N: Ord + EthereumNetwork, W: Ord + EthereumWordlist> Ord for EthereumMnemonic<N, W>
Source§fn cmp(&self, other: &EthereumMnemonic<N, W>) -> Ordering
fn cmp(&self, other: &EthereumMnemonic<N, W>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<N: PartialEq + EthereumNetwork, W: PartialEq + EthereumWordlist> PartialEq for EthereumMnemonic<N, W>
impl<N: PartialEq + EthereumNetwork, W: PartialEq + EthereumWordlist> PartialEq for EthereumMnemonic<N, W>
Source§impl<N: PartialOrd + EthereumNetwork, W: PartialOrd + EthereumWordlist> PartialOrd for EthereumMnemonic<N, W>
impl<N: PartialOrd + EthereumNetwork, W: PartialOrd + EthereumWordlist> PartialOrd for EthereumMnemonic<N, W>
impl<N: Eq + EthereumNetwork, W: Eq + EthereumWordlist> Eq for EthereumMnemonic<N, W>
impl<N: EthereumNetwork, W: EthereumWordlist> StructuralPartialEq for EthereumMnemonic<N, W>
Auto Trait Implementations§
impl<N, W> Freeze for EthereumMnemonic<N, W>
impl<N, W> RefUnwindSafe for EthereumMnemonic<N, W>where
N: RefUnwindSafe,
W: RefUnwindSafe,
impl<N, W> Send for EthereumMnemonic<N, W>
impl<N, W> Sync for EthereumMnemonic<N, W>
impl<N, W> Unpin for EthereumMnemonic<N, W>
impl<N, W> UnwindSafe for EthereumMnemonic<N, W>where
N: UnwindSafe,
W: UnwindSafe,
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