[−][src]Trait ethereum_rust_utils::storage::KeyfileStorage
Storage for KeyFiles
Required Methods
fn put(&self, kf: &KeyFile) -> Result<(), KeystoreError>
fn delete(&self, addr: &Address) -> Result<(), KeystoreError>
fn hide(&self, addr: &Address) -> Result<bool, KeystoreError>
fn unhide(&self, addr: &Address) -> Result<bool, KeystoreError>
fn update(
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>
Update account for given address with new name and description
Arguments:
- addr - target
Address - name - optional new name
- desc - optional new description
fn list_accounts(
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>
Lists info for Keystore files inside storage
Can include hidden files if flag set.
Arguments
showHidden- flag to show hiddenKeystorefiles
Return:
Array of AccountInfo struct
fn search_by_address(
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>
Search of KeyFile by specified Address
Provides additional meta info for account
Arguments:
- addr - target
Address
Provided Methods
fn is_addr_exist(&self, addr: &Address) -> Result<(), KeystoreError>
Check whether specified address is already inserted into the storage
Arguments
addr- address to check
Implementors
impl KeyfileStorage for DbStorage[src]
impl KeyfileStorage for DbStoragefn put(&self, kf: &KeyFile) -> Result<(), KeystoreError>[src]
fn put(&self, kf: &KeyFile) -> Result<(), KeystoreError>fn delete(&self, addr: &Address) -> Result<(), KeystoreError>[src]
fn delete(&self, addr: &Address) -> Result<(), KeystoreError>fn search_by_address(
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>[src]
fn search_by_address(
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>fn hide(&self, addr: &Address) -> Result<bool, KeystoreError>[src]
fn hide(&self, addr: &Address) -> Result<bool, KeystoreError>fn unhide(&self, addr: &Address) -> Result<bool, KeystoreError>[src]
fn unhide(&self, addr: &Address) -> Result<bool, KeystoreError>fn list_accounts(
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>[src]
fn list_accounts(
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>fn update(
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>[src]
fn update(
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>fn is_addr_exist(&self, addr: &Address) -> Result<(), KeystoreError>[src]
fn is_addr_exist(&self, addr: &Address) -> Result<(), KeystoreError>impl KeyfileStorage for FsStorage[src]
impl KeyfileStorage for FsStoragefn put(&self, kf: &KeyFile) -> Result<(), KeystoreError>[src]
fn put(&self, kf: &KeyFile) -> Result<(), KeystoreError>fn delete(&self, addr: &Address) -> Result<(), KeystoreError>[src]
fn delete(&self, addr: &Address) -> Result<(), KeystoreError>fn search_by_address(
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>[src]
fn search_by_address(
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>fn list_accounts(
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>[src]
fn list_accounts(
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>fn hide(&self, addr: &Address) -> Result<bool, KeystoreError>[src]
fn hide(&self, addr: &Address) -> Result<bool, KeystoreError>fn unhide(&self, addr: &Address) -> Result<bool, KeystoreError>[src]
fn unhide(&self, addr: &Address) -> Result<bool, KeystoreError>fn update(
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>[src]
fn update(
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>fn is_addr_exist(&self, addr: &Address) -> Result<(), KeystoreError>[src]
fn is_addr_exist(&self, addr: &Address) -> Result<(), KeystoreError>