Struct parity_rpc::v1::PersonalClient
source · [−]pub struct PersonalClient<D: Dispatcher> { /* private fields */ }
Expand description
Account management (personal) rpc implementation.
Implementations
sourceimpl<D: Dispatcher> PersonalClient<D>
impl<D: Dispatcher> PersonalClient<D>
sourcepub fn new(
accounts: &Arc<AccountProvider>,
dispatcher: D,
allow_experimental_rpcs: bool
) -> Self
pub fn new(
accounts: &Arc<AccountProvider>,
dispatcher: D,
allow_experimental_rpcs: bool
) -> Self
Creates new PersonalClient
Trait Implementations
sourceimpl<D: Dispatcher + 'static> Personal for PersonalClient<D>
impl<D: Dispatcher + 'static> Personal for PersonalClient<D>
sourcefn new_account(&self, pass: String) -> Result<H160>
fn new_account(&self, pass: String) -> Result<H160>
Creates new account (it becomes new current unlocked account) Param is the password for the account. Read more
sourcefn unlock_account(
&self,
account: H160,
account_pass: String,
duration: Option<U128>
) -> Result<bool>
fn unlock_account(
&self,
account: H160,
account_pass: String,
duration: Option<U128>
) -> Result<bool>
Unlocks specified account for use (can only be one unlocked account at one moment)
sourcefn sign(
&self,
data: RpcBytes,
account: H160,
password: String
) -> BoxFuture<H520>
fn sign(
&self,
data: RpcBytes,
account: H160,
password: String
) -> BoxFuture<H520>
Signs the hash of data with given account signature using the given password to unlock the account during the request. Read more
sourcefn sign_191(
&self,
version: EIP191Version,
data: Value,
account: H160,
password: String
) -> BoxFuture<H520>
fn sign_191(
&self,
version: EIP191Version,
data: Value,
account: H160,
password: String
) -> BoxFuture<H520>
Signs an arbitrary message based on the version specified
sourcefn sign_typed_data(
&self,
typed_data: EIP712,
account: H160,
password: String
) -> BoxFuture<H520>
fn sign_typed_data(
&self,
typed_data: EIP712,
account: H160,
password: String
) -> BoxFuture<H520>
Produces an EIP-712 compliant signature with given account using the given password to unlock the account during the request. Read more
sourcefn ec_recover(&self, data: RpcBytes, signature: H520) -> BoxFuture<H160>
fn ec_recover(&self, data: RpcBytes, signature: H520) -> BoxFuture<H160>
Returns the account associated with the private key that was used to calculate the signature in
personal_sign
. Read more
sourcefn sign_transaction(
&self,
meta: Metadata,
request: TransactionRequest,
password: String
) -> BoxFuture<RpcRichRawTransaction>
fn sign_transaction(
&self,
meta: Metadata,
request: TransactionRequest,
password: String
) -> BoxFuture<RpcRichRawTransaction>
Signs transaction. The account is not unlocked in such case.
sourcefn send_transaction(
&self,
meta: Metadata,
request: TransactionRequest,
password: String
) -> BoxFuture<H256>
fn send_transaction(
&self,
meta: Metadata,
request: TransactionRequest,
password: String
) -> BoxFuture<H256>
Sends transaction and signs it in single call. The account is not unlocked in such case.
sourcefn sign_and_send_transaction(
&self,
meta: Metadata,
request: TransactionRequest,
password: String
) -> BoxFuture<H256>
fn sign_and_send_transaction(
&self,
meta: Metadata,
request: TransactionRequest,
password: String
) -> BoxFuture<H256>
@deprecated alias for personal_sendTransaction
.
sourcefn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
Create an IoDelegate
, wiring rpc calls to the trait methods.
Auto Trait Implementations
impl<D> !RefUnwindSafe for PersonalClient<D>
impl<D> Send for PersonalClient<D>
impl<D> Sync for PersonalClient<D>
impl<D> Unpin for PersonalClient<D> where
D: Unpin,
impl<D> !UnwindSafe for PersonalClient<D>
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