Trait iota_keys::keystore::AccountKeystore

source ·
pub trait AccountKeystore: Send + Sync {
Show 19 methods // Required methods fn add_key( &mut self, alias: Option<String>, keypair: IotaKeyPair, ) -> Result<(), Error>; fn keys(&self) -> Vec<PublicKey>; fn get_key(&self, address: &IotaAddress) -> Result<&IotaKeyPair, Error>; fn sign_hashed( &self, address: &IotaAddress, msg: &[u8], ) -> Result<Signature, Error>; fn sign_secure<T>( &self, address: &IotaAddress, msg: &T, intent: Intent, ) -> Result<Signature, Error> where T: Serialize; fn addresses_with_alias(&self) -> Vec<(&IotaAddress, &Alias)>; fn aliases(&self) -> Vec<&Alias>; fn aliases_mut(&mut self) -> Vec<&mut Alias>; fn get_alias_by_address( &self, address: &IotaAddress, ) -> Result<String, Error>; fn get_address_by_alias(&self, alias: String) -> Result<&IotaAddress, Error>; fn create_alias(&self, alias: Option<String>) -> Result<String, Error>; fn update_alias( &mut self, old_alias: &str, new_alias: Option<&str>, ) -> Result<String, Error>; // Provided methods fn addresses(&self) -> Vec<IotaAddress> { ... } fn alias_names(&self) -> Vec<&str> { ... } fn alias_exists(&self, alias: &str) -> bool { ... } fn update_alias_value( &mut self, old_alias: &str, new_alias: Option<&str>, ) -> Result<String, Error> { ... } fn generate_and_add_new_key( &mut self, key_scheme: SignatureScheme, alias: Option<String>, derivation_path: Option<DerivationPath>, word_length: Option<String>, ) -> Result<(IotaAddress, String, SignatureScheme), Error> { ... } fn import_from_mnemonic( &mut self, phrase: &str, key_scheme: SignatureScheme, derivation_path: Option<DerivationPath>, alias: Option<String>, ) -> Result<IotaAddress, Error> { ... } fn import_from_seed( &mut self, seed: &[u8], key_scheme: SignatureScheme, derivation_path: Option<DerivationPath>, alias: Option<String>, ) -> Result<IotaAddress, Error> { ... }
}

Required Methods§

source

fn add_key( &mut self, alias: Option<String>, keypair: IotaKeyPair, ) -> Result<(), Error>

source

fn keys(&self) -> Vec<PublicKey>

source

fn get_key(&self, address: &IotaAddress) -> Result<&IotaKeyPair, Error>

source

fn sign_hashed( &self, address: &IotaAddress, msg: &[u8], ) -> Result<Signature, Error>

source

fn sign_secure<T>( &self, address: &IotaAddress, msg: &T, intent: Intent, ) -> Result<Signature, Error>
where T: Serialize,

source

fn addresses_with_alias(&self) -> Vec<(&IotaAddress, &Alias)>

source

fn aliases(&self) -> Vec<&Alias>

source

fn aliases_mut(&mut self) -> Vec<&mut Alias>

source

fn get_alias_by_address(&self, address: &IotaAddress) -> Result<String, Error>

Get alias of address

source

fn get_address_by_alias(&self, alias: String) -> Result<&IotaAddress, Error>

source

fn create_alias(&self, alias: Option<String>) -> Result<String, Error>

source

fn update_alias( &mut self, old_alias: &str, new_alias: Option<&str>, ) -> Result<String, Error>

Provided Methods§

source

fn addresses(&self) -> Vec<IotaAddress>

source

fn alias_names(&self) -> Vec<&str>

source

fn alias_exists(&self, alias: &str) -> bool

Check if an alias exists by its name

source

fn update_alias_value( &mut self, old_alias: &str, new_alias: Option<&str>, ) -> Result<String, Error>

source

fn generate_and_add_new_key( &mut self, key_scheme: SignatureScheme, alias: Option<String>, derivation_path: Option<DerivationPath>, word_length: Option<String>, ) -> Result<(IotaAddress, String, SignatureScheme), Error>

source

fn import_from_mnemonic( &mut self, phrase: &str, key_scheme: SignatureScheme, derivation_path: Option<DerivationPath>, alias: Option<String>, ) -> Result<IotaAddress, Error>

source

fn import_from_seed( &mut self, seed: &[u8], key_scheme: SignatureScheme, derivation_path: Option<DerivationPath>, alias: Option<String>, ) -> Result<IotaAddress, Error>

Object Safety§

This trait is not object safe.

Implementors§