pub struct Personal<T> { /* private fields */ }Expand description
Personal namespace
Implementations
sourceimpl<T: Transport> Personal<T>
impl<T: Transport> Personal<T>
sourcepub fn list_accounts(&self) -> CallFuture<Vec<Address>, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
pub fn list_accounts(&self) -> CallFuture<Vec<Address>, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
Returns a list of available accounts.
sourcepub fn new_account(&self, password: &str) -> CallFuture<Address, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
pub fn new_account(&self, password: &str) -> CallFuture<Address, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
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>
) -> CallFuture<bool, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
pub fn unlock_account(
&self,
address: Address,
password: &str,
duration: Option<u16>
) -> CallFuture<bool, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
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
) -> CallFuture<H256, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
pub fn send_transaction(
&self,
transaction: TransactionRequest,
password: &str
) -> CallFuture<H256, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
Sends a transaction from locked account. Returns transaction hash.
sourcepub fn sign(
&self,
data: Bytes,
account: Address,
password: &str
) -> CallFuture<H520, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
pub fn sign(
&self,
data: Bytes,
account: Address,
password: &str
) -> CallFuture<H520, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
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
) -> CallFuture<RawTransaction, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
pub fn sign_transaction(
&self,
transaction: TransactionRequest,
password: &str
) -> CallFuture<RawTransaction, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
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
) -> CallFuture<Address, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
pub fn import_raw_key(
&self,
private_key: &[u8; 32],
password: &str
) -> CallFuture<Address, T::Out>ⓘNotable traits for CallFuture<T, F>impl<T, F> Future for CallFuture<T, F>where
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
T: DeserializeOwned,
F: Future<Output = Result<Vec<u8>>>, type Output = Result<T>;
Imports a raw key and protects it with the given password. Returns the address of created account.