Trait ethstore::SecretStore [−][src]
pub trait SecretStore: SimpleSecretStore { fn raw_secret(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<OpaqueSecret, Error>; fn import_presale(
&self,
vault: SecretVaultRef,
json: &[u8],
password: &Password
) -> Result<StoreAccountRef, Error>; fn import_wallet(
&self,
vault: SecretVaultRef,
json: &[u8],
password: &Password,
gen_id: bool
) -> Result<StoreAccountRef, Error>; fn copy_account(
&self,
new_store: &SimpleSecretStore,
new_vault: SecretVaultRef,
account: &StoreAccountRef,
password: &Password,
new_password: &Password
) -> Result<(), Error>; fn test_password(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<bool, Error>; fn public(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<Public, Error>; fn uuid(&self, account: &StoreAccountRef) -> Result<Uuid, Error>; fn name(&self, account: &StoreAccountRef) -> Result<String, Error>; fn meta(&self, account: &StoreAccountRef) -> Result<String, Error>; fn set_name(
&self,
account: &StoreAccountRef,
name: String
) -> Result<(), Error>; fn set_meta(
&self,
account: &StoreAccountRef,
meta: String
) -> Result<(), Error>; fn local_path(&self) -> PathBuf; fn list_geth_accounts(&self, testnet: bool) -> Vec<Address>; fn import_geth_accounts(
&self,
vault: SecretVaultRef,
desired: Vec<Address>,
testnet: bool
) -> Result<Vec<StoreAccountRef>, Error>; fn sign_with_secret(
&self,
secret: &OpaqueSecret,
message: &Message
) -> Result<Signature, Error> { ... } }
Secret Store API
Required Methods
fn raw_secret(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<OpaqueSecret, Error>
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<OpaqueSecret, Error>
Returns a raw opaque Secret that can be later used to sign a message.
fn import_presale(
&self,
vault: SecretVaultRef,
json: &[u8],
password: &Password
) -> Result<StoreAccountRef, Error>
&self,
vault: SecretVaultRef,
json: &[u8],
password: &Password
) -> Result<StoreAccountRef, Error>
Imports presale wallet
fn import_wallet(
&self,
vault: SecretVaultRef,
json: &[u8],
password: &Password,
gen_id: bool
) -> Result<StoreAccountRef, Error>
&self,
vault: SecretVaultRef,
json: &[u8],
password: &Password,
gen_id: bool
) -> Result<StoreAccountRef, Error>
Imports existing JSON wallet
fn copy_account(
&self,
new_store: &SimpleSecretStore,
new_vault: SecretVaultRef,
account: &StoreAccountRef,
password: &Password,
new_password: &Password
) -> Result<(), Error>
&self,
new_store: &SimpleSecretStore,
new_vault: SecretVaultRef,
account: &StoreAccountRef,
password: &Password,
new_password: &Password
) -> Result<(), Error>
Copies account between stores and vaults.
fn test_password(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<bool, Error>
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<bool, Error>
Checks if password matches given account.
fn public(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<Public, Error>
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<Public, Error>
Returns a public key for given account.
fn uuid(&self, account: &StoreAccountRef) -> Result<Uuid, Error>
Returns uuid of an account.
fn name(&self, account: &StoreAccountRef) -> Result<String, Error>
Returns account's name.
fn meta(&self, account: &StoreAccountRef) -> Result<String, Error>
Returns account's metadata.
fn set_name(&self, account: &StoreAccountRef, name: String) -> Result<(), Error>
Modifies account metadata.
fn set_meta(&self, account: &StoreAccountRef, meta: String) -> Result<(), Error>
Modifies account name.
fn local_path(&self) -> PathBuf
Returns local path of the store.
fn list_geth_accounts(&self, testnet: bool) -> Vec<Address>
Lists all found geth accounts.
fn import_geth_accounts(
&self,
vault: SecretVaultRef,
desired: Vec<Address>,
testnet: bool
) -> Result<Vec<StoreAccountRef>, Error>
&self,
vault: SecretVaultRef,
desired: Vec<Address>,
testnet: bool
) -> Result<Vec<StoreAccountRef>, Error>
Imports geth accounts to the store/vault.
Provided Methods
fn sign_with_secret(
&self,
secret: &OpaqueSecret,
message: &Message
) -> Result<Signature, Error>
&self,
secret: &OpaqueSecret,
message: &Message
) -> Result<Signature, Error>
Signs a message with raw secret.
Implementors
impl SecretStore for EthStore