pub trait Personal: Sized + Send + Sync + 'static {
    type Metadata: Metadata;
    fn accounts(&self) -> Result<Vec<H160>>;
fn new_account(&self, _: String) -> Result<H160>;
fn unlock_account(
        &self,
        _: H160,
        _: String,
        _: Option<U128>
    ) -> Result<bool>;
fn sign(&self, _: Bytes, _: H160, _: String) -> BoxFuture<H520>;
fn sign_typed_data(&self, _: EIP712, _: H160, _: String) -> BoxFuture<H520>;
fn sign_191(
        &self,
        _: EIP191Version,
        _: Value,
        _: H160,
        _: String
    ) -> BoxFuture<H520>;
fn ec_recover(&self, _: Bytes, _: H520) -> BoxFuture<H160>;
fn sign_transaction(
        &self,
        _: Self::Metadata,
        _: TransactionRequest,
        _: String
    ) -> BoxFuture<RpcRichRawTransaction>;
fn send_transaction(
        &self,
        _: Self::Metadata,
        _: TransactionRequest,
        _: String
    ) -> BoxFuture<H256>;
fn sign_and_send_transaction(
        &self,
        _: Self::Metadata,
        _: TransactionRequest,
        _: String
    ) -> BoxFuture<H256>; fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> { ... } }
Expand description

Personal rpc interface. Safe (read-only) functions.

Associated Types

RPC Metadata

Required methods

Lists all stored accounts

Creates new account (it becomes new current unlocked account) Param is the password for the account.

Unlocks specified account for use (can only be one unlocked account at one moment)

Signs the hash of data with given account signature using the given password to unlock the account during the request.

Produces an EIP-712 compliant signature with given account using the given password to unlock the account during the request.

Signs an arbitrary message based on the version specified

Returns the account associated with the private key that was used to calculate the signature in personal_sign.

Signs transaction. The account is not unlocked in such case.

Sends transaction and signs it in single call. The account is not unlocked in such case.

@deprecated alias for personal_sendTransaction.

Provided methods

Create an IoDelegate, wiring rpc calls to the trait methods.

Implementors