pub struct Personal<T> { /* private fields */ }
Expand description
Personal
namespace
Implementations§
Source§impl<T: Transport> Personal<T>
impl<T: Transport> Personal<T>
Sourcepub fn list_accounts(
&self,
options: CallOptions,
) -> CallFuture<Vec<Address>, T::Out> ⓘ
pub fn list_accounts( &self, options: CallOptions, ) -> CallFuture<Vec<Address>, T::Out> ⓘ
Returns a list of available accounts.
Sourcepub fn new_account(
&self,
password: &str,
options: CallOptions,
) -> CallFuture<Address, T::Out> ⓘ
pub fn new_account( &self, password: &str, options: CallOptions, ) -> CallFuture<Address, T::Out> ⓘ
Creates a new account and protects it with given password. Returns the address of created account.
Sourcepub fn unlock_account(
&self,
address: Address,
password: &str,
duration: Option<u16>,
options: CallOptions,
) -> CallFuture<bool, T::Out> ⓘ
pub fn unlock_account( &self, address: Address, password: &str, duration: Option<u16>, options: CallOptions, ) -> CallFuture<bool, T::Out> ⓘ
Unlocks the account with given password for some period of time (or single transaction).
Returns true
if the call was successful.
Sourcepub fn send_transaction(
&self,
transaction: TransactionRequest,
password: &str,
options: CallOptions,
) -> CallFuture<H256, T::Out> ⓘ
pub fn send_transaction( &self, transaction: TransactionRequest, password: &str, options: CallOptions, ) -> CallFuture<H256, T::Out> ⓘ
Sends a transaction from locked account. Returns transaction hash.
Sourcepub fn sign(
&self,
data: Bytes,
account: Address,
password: &str,
options: CallOptions,
) -> CallFuture<H520, T::Out> ⓘ
pub fn sign( &self, data: Bytes, account: Address, password: &str, options: CallOptions, ) -> CallFuture<H520, T::Out> ⓘ
Signs an Ethereum specific message with sign(keccak256("\x19Ethereum Signed Message: " + len(data) + data)))
The account does not need to be unlocked to make this call, and will not be left unlocked after. Returns encoded signature.
Sourcepub fn sign_transaction(
&self,
transaction: TransactionRequest,
password: &str,
options: CallOptions,
) -> CallFuture<RawTransaction, T::Out> ⓘ
pub fn sign_transaction( &self, transaction: TransactionRequest, password: &str, options: CallOptions, ) -> CallFuture<RawTransaction, T::Out> ⓘ
Signs a transaction without dispatching it to the network. The account does not need to be unlocked to make this call, and will not be left unlocked after. Returns a signed transaction in raw bytes along with it’s details.
Sourcepub fn import_raw_key(
&self,
private_key: &[u8; 32],
password: &str,
options: CallOptions,
) -> CallFuture<Address, T::Out> ⓘ
pub fn import_raw_key( &self, private_key: &[u8; 32], password: &str, options: CallOptions, ) -> CallFuture<Address, T::Out> ⓘ
Imports a raw key and protects it with the given password. Returns the address of created account.