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) -> CallFuture<Vec<Address>, T::Out> ⓘ
pub fn list_accounts(&self) -> CallFuture<Vec<Address>, T::Out> ⓘ
Returns a list of available accounts.
Sourcepub fn new_account(&self, password: &str) -> CallFuture<Address, T::Out> ⓘ
pub fn new_account(&self, password: &str) -> 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>,
) -> CallFuture<bool, T::Out> ⓘ
pub fn unlock_account( &self, address: Address, password: &str, duration: Option<u16>, ) -> 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,
) -> CallFuture<H256, T::Out> ⓘ
pub fn send_transaction( &self, transaction: TransactionRequest, password: &str, ) -> CallFuture<H256, T::Out> ⓘ
Sends a transaction from locked account. Returns transaction hash.
Sourcepub fn sign_transaction(
&self,
transaction: TransactionRequest,
password: &str,
) -> CallFuture<RawTransaction, T::Out> ⓘ
pub fn sign_transaction( &self, transaction: TransactionRequest, password: &str, ) -> 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,
) -> CallFuture<Address, T::Out> ⓘ
pub fn import_raw_key( &self, private_key: &[u8; 32], password: &str, ) -> CallFuture<Address, T::Out> ⓘ
Imports a raw key and protects it with the given password. Returns the address of created account.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Personal<T>where
T: Freeze,
impl<T> RefUnwindSafe for Personal<T>where
T: RefUnwindSafe,
impl<T> Send for Personal<T>where
T: Send,
impl<T> Sync for Personal<T>where
T: Sync,
impl<T> Unpin for Personal<T>where
T: Unpin,
impl<T> UnwindSafe for Personal<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more