Trait ethcore_rpc::v1::traits::parity_accounts::ParityAccounts
[−]
pub trait ParityAccounts: Sized + Send + Sync + 'static { fn all_accounts_info(&self)
-> Result<BTreeMap<String, BTreeMap<String, String>>, Error>; fn new_account_from_phrase(&self, String, String) -> Result<H160, Error>; fn new_account_from_wallet(&self, String, String) -> Result<H160, Error>; fn new_account_from_secret(&self, H256, String) -> Result<H160, Error>; fn test_password(&self, H160, String) -> Result<bool, Error>; fn change_password(&self, H160, String, String) -> Result<bool, Error>; fn kill_account(&self, H160, String) -> Result<bool, Error>; fn remove_address(&self, H160) -> Result<bool, Error>; fn set_account_name(&self, H160, String) -> Result<bool, Error>; fn set_account_meta(&self, H160, String) -> Result<bool, Error>; fn set_account_visibility(&self, H160, H256, bool) -> Result<bool, Error>; fn set_dapps_addresses(&self, DappId, Vec<H160>) -> Result<bool, Error>; fn dapps_addresses(&self, DappId) -> Result<Vec<H160>, Error>; fn set_new_dapps_whitelist(&self, Option<Vec<H160>>) -> Result<bool, Error>; fn new_dapps_whitelist(&self) -> Result<Option<Vec<H160>>, Error>; fn recent_dapps(&self) -> Result<BTreeMap<DappId, u64>, Error>; fn import_geth_accounts(&self, Vec<H160>) -> Result<Vec<H160>, Error>; fn geth_accounts(&self) -> Result<Vec<H160>, Error>; fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... } }
Personal Parity rpc interface.
Required Methods
fn all_accounts_info(&self)
-> Result<BTreeMap<String, BTreeMap<String, String>>, Error>
-> Result<BTreeMap<String, BTreeMap<String, String>>, Error>
Returns accounts information.
fn new_account_from_phrase(&self, String, String) -> Result<H160, Error>
Creates new account from the given phrase using standard brainwallet mechanism. Second parameter is password for the new account.
fn new_account_from_wallet(&self, String, String) -> Result<H160, Error>
Creates new account from the given JSON wallet. Second parameter is password for the wallet and the new account.
fn new_account_from_secret(&self, H256, String) -> Result<H160, Error>
Creates new account from the given raw secret. Second parameter is password for the new account.
fn test_password(&self, H160, String) -> Result<bool, Error>
Returns true if given password
would unlock given account
.
Arguments: account
, password
.
fn change_password(&self, H160, String, String) -> Result<bool, Error>
Changes an account's password.
Arguments: account
, password
, new_password
.
fn kill_account(&self, H160, String) -> Result<bool, Error>
Permanently deletes an account.
Arguments: account
, password
.
fn remove_address(&self, H160) -> Result<bool, Error>
Permanently deletes an address from the addressbook
Arguments: address
fn set_account_name(&self, H160, String) -> Result<bool, Error>
Set an account's name.
fn set_account_meta(&self, H160, String) -> Result<bool, Error>
Set an account's metadata string.
fn set_account_visibility(&self, H160, H256, bool) -> Result<bool, Error>
Sets account visibility
fn set_dapps_addresses(&self, DappId, Vec<H160>) -> Result<bool, Error>
Sets accounts exposed for particular dapp.
fn dapps_addresses(&self, DappId) -> Result<Vec<H160>, Error>
Gets accounts exposed for particular dapp.
fn set_new_dapps_whitelist(&self, Option<Vec<H160>>) -> Result<bool, Error>
Sets accounts exposed for new dapps.
None
means that all accounts will be exposed.
fn new_dapps_whitelist(&self) -> Result<Option<Vec<H160>>, Error>
Gets accounts exposed for new dapps.
None
means that all accounts will be exposed.
fn recent_dapps(&self) -> Result<BTreeMap<DappId, u64>, Error>
Returns identified dapps that recently used RPC Includes last usage timestamp.
fn import_geth_accounts(&self, Vec<H160>) -> Result<Vec<H160>, Error>
Imports a number of Geth accounts, with the list provided as the argument.
fn geth_accounts(&self) -> Result<Vec<H160>, Error>
Returns the accounts available for importing from Geth.
Provided Methods
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Transform this into an IoDelegate
, automatically wrapping
the parameters.
Implementors
impl<C: 'static> ParityAccounts for ParityAccountsClient<C> where C: MiningBlockChainClient