Enum iota_sdk::client::secret::SecretManager
source · #[non_exhaustive]pub enum SecretManager {
Stronghold(StrongholdSecretManager),
LedgerNano(LedgerSecretManager),
Mnemonic(MnemonicSecretManager),
PrivateKey(Box<PrivateKeySecretManager>),
Placeholder,
}
Available on crate feature
client
only.Expand description
Supported secret managers
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stronghold(StrongholdSecretManager)
Available on crate feature
stronghold
only.Secret manager that uses iota_stronghold
as the backing storage.
LedgerNano(LedgerSecretManager)
Available on crate feature
ledger_nano
only.Secret manager that uses a Ledger Nano hardware wallet or Speculos simulator.
Mnemonic(MnemonicSecretManager)
Secret manager that uses a mnemonic in plain memory. It’s not recommended for production use. Use LedgerNano or Stronghold instead.
PrivateKey(Box<PrivateKeySecretManager>)
Available on crate feature
private_key_secret_manager
only.Secret manager that uses a single private key.
Placeholder
Secret manager that’s just a placeholder, so it can be provided to an online wallet, but can’t be used for signing.
Implementations§
source§impl SecretManager
impl SecretManager
sourcepub async fn generate_ed25519_addresses(
&self,
__arg1: GetAddressesOptions
) -> Result<Vec<Bech32Address>>
pub async fn generate_ed25519_addresses( &self, __arg1: GetAddressesOptions ) -> Result<Vec<Bech32Address>>
Get a vector of public bech32 addresses
sourcepub async fn generate_evm_addresses(
&self,
__arg1: GetAddressesOptions
) -> Result<Vec<String>>
pub async fn generate_evm_addresses( &self, __arg1: GetAddressesOptions ) -> Result<Vec<String>>
Get a vector of EVM address strings
source§impl SecretManager
impl SecretManager
sourcepub fn try_from_mnemonic(mnemonic: impl Into<Mnemonic>) -> Result<Self>
pub fn try_from_mnemonic(mnemonic: impl Into<Mnemonic>) -> Result<Self>
Tries to create a SecretManager
from a mnemonic string.
sourcepub fn try_from_hex_seed(seed: impl Into<Zeroizing<String>>) -> Result<Self>
pub fn try_from_hex_seed(seed: impl Into<Zeroizing<String>>) -> Result<Self>
Tries to create a SecretManager
from a seed hex string.
Trait Implementations§
source§impl Debug for SecretManager
impl Debug for SecretManager
source§impl Display for SecretManager
impl Display for SecretManager
source§impl From<&SecretManager> for SecretManagerDto
impl From<&SecretManager> for SecretManagerDto
source§fn from(value: &SecretManager) -> Self
fn from(value: &SecretManager) -> Self
Converts to this type from the input type.
source§impl From<LedgerSecretManager> for SecretManager
impl From<LedgerSecretManager> for SecretManager
source§fn from(secret_manager: LedgerSecretManager) -> Self
fn from(secret_manager: LedgerSecretManager) -> Self
Converts to this type from the input type.
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 From<PrivateKeySecretManager> for SecretManager
impl From<PrivateKeySecretManager> for SecretManager
source§fn from(secret_manager: PrivateKeySecretManager) -> Self
fn from(secret_manager: PrivateKeySecretManager) -> Self
Converts to this type from the input type.
source§impl From<StrongholdAdapter> for SecretManager
impl From<StrongholdAdapter> for SecretManager
source§fn from(secret_manager: StrongholdSecretManager) -> Self
fn from(secret_manager: StrongholdSecretManager) -> Self
Converts to this type from the input type.
source§impl FromStr for SecretManager
impl FromStr for SecretManager
source§impl SecretManage for SecretManager
impl SecretManage for SecretManager
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>>> + 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>>> + 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>> + 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>> + 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,
source§impl SecretManagerConfig for SecretManager
impl SecretManagerConfig for SecretManager
source§impl TryFrom<SecretManagerDto> for SecretManager
impl TryFrom<SecretManagerDto> for SecretManager
Auto Trait Implementations§
impl !Freeze for SecretManager
impl !RefUnwindSafe for SecretManager
impl Send for SecretManager
impl Sync for SecretManager
impl Unpin for SecretManager
impl !UnwindSafe for SecretManager
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