pub struct MnemonicSecretManager(/* private fields */);Available on crate feature
client only.Expand description
Secret manager that uses only a mnemonic.
Computation are done in-memory. A mnemonic needs to be supplied upon the creation of MnemonicSecretManager.
Implementations§
Source§impl MnemonicSecretManager
impl MnemonicSecretManager
Sourcepub fn try_from_mnemonic(mnemonic: impl Into<Mnemonic>) -> Result<Self, Error>
pub fn try_from_mnemonic(mnemonic: impl Into<Mnemonic>) -> Result<Self, Error>
Create a new MnemonicSecretManager from a BIP-39 mnemonic in English.
For more information, see https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki.
Sourcepub fn try_from_hex_seed(
hex: impl Into<Zeroizing<String>>,
) -> Result<Self, Error>
pub fn try_from_hex_seed( hex: impl Into<Zeroizing<String>>, ) -> Result<Self, Error>
Create a new MnemonicSecretManager from a hex-encoded raw seed string.
Trait Implementations§
Source§impl Debug for MnemonicSecretManager
impl Debug for MnemonicSecretManager
Source§impl From<MnemonicSecretManager> for SecretManager
impl From<MnemonicSecretManager> for SecretManager
Source§fn from(secret_manager: MnemonicSecretManager) -> Self
fn from(secret_manager: MnemonicSecretManager) -> Self
Converts to this type from the input type.
Source§impl SecretManage for MnemonicSecretManager
impl SecretManage for MnemonicSecretManager
type Error = Error
Source§fn generate_ed25519_addresses<'life0, 'async_trait>(
&'life0 self,
coin_type: u32,
account_index: u32,
address_indexes: Range<u32>,
options: impl 'async_trait + Into<Option<GenerateAddressOptions>> + Send,
) -> Pin<Box<dyn Future<Output = Result<Vec<Ed25519Address>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_ed25519_addresses<'life0, 'async_trait>(
&'life0 self,
coin_type: u32,
account_index: u32,
address_indexes: Range<u32>,
options: impl 'async_trait + Into<Option<GenerateAddressOptions>> + Send,
) -> Pin<Box<dyn Future<Output = Result<Vec<Ed25519Address>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generates addresses. Read more
fn generate_evm_addresses<'life0, 'async_trait>(
&'life0 self,
coin_type: u32,
account_index: u32,
address_indexes: Range<u32>,
options: impl 'async_trait + Into<Option<GenerateAddressOptions>> + Send,
) -> Pin<Box<dyn Future<Output = Result<Vec<EvmAddress>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn sign_ed25519<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 [u8],
chain: Bip44,
) -> Pin<Box<dyn Future<Output = Result<Ed25519Signature, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_ed25519<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 [u8],
chain: Bip44,
) -> Pin<Box<dyn Future<Output = Result<Ed25519Signature, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Signs msg using the given
Bip44 using Ed25519.Source§fn sign_secp256k1_ecdsa<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 [u8],
chain: Bip44,
) -> Pin<Box<dyn Future<Output = Result<(PublicKey, RecoverableSignature), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_secp256k1_ecdsa<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 [u8],
chain: Bip44,
) -> Pin<Box<dyn Future<Output = Result<(PublicKey, RecoverableSignature), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Signs msg using the given
Bip44 using Secp256k1.Source§fn sign_transaction_essence<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared_transaction_data: &'life1 PreparedTransactionData,
time: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Unlocks, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_transaction_essence<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared_transaction_data: &'life1 PreparedTransactionData,
time: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Unlocks, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Signs a transaction essence.
fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
prepared_transaction_data: PreparedTransactionData,
) -> Pin<Box<dyn Future<Output = Result<TransactionPayload, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for MnemonicSecretManager
impl RefUnwindSafe for MnemonicSecretManager
impl Send for MnemonicSecretManager
impl Sync for MnemonicSecretManager
impl Unpin for MnemonicSecretManager
impl UnwindSafe for MnemonicSecretManager
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<S> DowncastSecretManager for S
impl<S> DowncastSecretManager for S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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