Struct parity_rpc::v1::ParityAccountsClient
source · [−]pub struct ParityAccountsClient { /* private fields */ }
Expand description
Account management (personal) rpc implementation.
Implementations
sourceimpl ParityAccountsClient
impl ParityAccountsClient
sourcepub fn new(store: &Arc<AccountProvider>) -> Self
pub fn new(store: &Arc<AccountProvider>) -> Self
Creates new PersonalClient
Trait Implementations
sourceimpl ParityAccounts for ParityAccountsClient
impl ParityAccounts for ParityAccountsClient
sourcefn all_accounts_info(&self) -> Result<BTreeMap<H160, ExtAccountInfo>>
fn all_accounts_info(&self) -> Result<BTreeMap<H160, ExtAccountInfo>>
Returns accounts information.
sourcefn new_account_from_phrase(
&self,
phrase: String,
pass: Password
) -> Result<H160>
fn new_account_from_phrase(
&self,
phrase: String,
pass: Password
) -> Result<H160>
Creates new account from the given phrase using standard brainwallet mechanism. Second parameter is password for the new account. Read more
sourcefn new_account_from_wallet(&self, json: String, pass: Password) -> Result<H160>
fn new_account_from_wallet(&self, json: String, pass: Password) -> Result<H160>
Creates new account from the given JSON wallet. Second parameter is password for the wallet and the new account. Read more
sourcefn new_account_from_secret(&self, secret: H256, pass: Password) -> Result<H160>
fn new_account_from_secret(&self, secret: H256, pass: Password) -> Result<H160>
Creates new account from the given raw secret. Second parameter is password for the new account. Read more
sourcefn test_password(&self, account: H160, password: Password) -> Result<bool>
fn test_password(&self, account: H160, password: Password) -> Result<bool>
Returns true if given password
would unlock given account
.
Arguments: account
, password
. Read more
sourcefn change_password(
&self,
account: H160,
password: Password,
new_password: Password
) -> Result<bool>
fn change_password(
&self,
account: H160,
password: Password,
new_password: Password
) -> Result<bool>
Changes an account’s password.
Arguments: account
, password
, new_password
. Read more
sourcefn kill_account(&self, account: H160, password: Password) -> Result<bool>
fn kill_account(&self, account: H160, password: Password) -> Result<bool>
Permanently deletes an account.
Arguments: account
, password
. Read more
sourcefn remove_address(&self, addr: H160) -> Result<bool>
fn remove_address(&self, addr: H160) -> Result<bool>
Permanently deletes an address from the addressbook
Arguments: address
Read more
sourcefn set_account_meta(&self, addr: H160, meta: String) -> Result<bool>
fn set_account_meta(&self, addr: H160, meta: String) -> Result<bool>
Set an account’s metadata string.
sourcefn close_vault(&self, name: String) -> Result<bool>
fn close_vault(&self, name: String) -> Result<bool>
Close previously opened vault.
sourcefn list_vaults(&self) -> Result<Vec<String>>
fn list_vaults(&self) -> Result<Vec<String>>
List all vaults.
sourcefn list_opened_vaults(&self) -> Result<Vec<String>>
fn list_opened_vaults(&self) -> Result<Vec<String>>
List all currently opened vaults.
sourcefn change_vault_password(
&self,
name: String,
new_password: Password
) -> Result<bool>
fn change_vault_password(
&self,
name: String,
new_password: Password
) -> Result<bool>
Change vault password.
sourcefn change_vault(&self, address: H160, new_vault: String) -> Result<bool>
fn change_vault(&self, address: H160, new_vault: String) -> Result<bool>
Change vault of the given address.
sourcefn get_vault_meta(&self, name: String) -> Result<String>
fn get_vault_meta(&self, name: String) -> Result<String>
Get vault metadata string.
sourcefn set_vault_meta(&self, name: String, meta: String) -> Result<bool>
fn set_vault_meta(&self, name: String, meta: String) -> Result<bool>
Set vault metadata string.
sourcefn derive_key_index(
&self,
addr: H160,
password: Password,
derivation: Vec<DeriveHierarchicalItem>,
save_as_account: bool
) -> Result<H160>
fn derive_key_index(
&self,
addr: H160,
password: Password,
derivation: Vec<DeriveHierarchicalItem>,
save_as_account: bool
) -> Result<H160>
Derive new address from given account address using hierarchical derivation (sequence of 32-bit integer indices). Resulting address can be either saved as a new account (with the same password). Read more
sourcefn derive_key_hash(
&self,
addr: H160,
password: Password,
derivation: DeriveHash,
save_as_account: bool
) -> Result<H160>
fn derive_key_hash(
&self,
addr: H160,
password: Password,
derivation: DeriveHash,
save_as_account: bool
) -> Result<H160>
Derive new address from given account address using specific hash. Resulting address can be either saved as a new account (with the same password). Read more
sourcefn export_account(&self, addr: H160, password: Password) -> Result<KeyFile>
fn export_account(&self, addr: H160, password: Password) -> Result<KeyFile>
Exports an account with given address if provided password matches.
sourcefn sign_message(
&self,
addr: H160,
password: Password,
message: H256
) -> Result<H520>
fn sign_message(
&self,
addr: H160,
password: Password,
message: H256
) -> Result<H520>
Sign raw hash with the key corresponding to address and password.
sourcefn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.
sourceimpl ParityAccountsInfo for ParityAccountsClient
impl ParityAccountsInfo for ParityAccountsClient
sourcefn accounts_info(&self) -> Result<BTreeMap<H160, AccountInfo>>
fn accounts_info(&self) -> Result<BTreeMap<H160, AccountInfo>>
Returns accounts information.
sourcefn default_account(&self) -> Result<H160>
fn default_account(&self) -> Result<H160>
Returns default account for dapp.
sourcefn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.
Auto Trait Implementations
impl !RefUnwindSafe for ParityAccountsClient
impl Send for ParityAccountsClient
impl Sync for ParityAccountsClient
impl Unpin for ParityAccountsClient
impl !UnwindSafe for ParityAccountsClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more