pub struct Accounts<T> { /* private fields */ }Expand description
Accounts namespace
Implementations§
Source§impl<T: Transport> Accounts<T>
 
impl<T: Transport> Accounts<T>
Sourcepub async fn sign_transaction<K: Key>(
    &self,
    tx: TransactionParameters,
    key: K,
) -> Result<SignedTransaction>
 
pub async fn sign_transaction<K: Key>( &self, tx: TransactionParameters, key: K, ) -> Result<SignedTransaction>
Signs an Ethereum transaction with a given private key.
Transaction signing can perform RPC requests in order to fill missing
parameters required for signing nonce, gas_price and chain_id. Note
that if all transaction parameters were provided, this future will resolve
immediately.
Sourcepub fn sign<S>(&self, message: S, key: impl Key) -> SignedData
 
pub fn sign<S>(&self, message: S, key: impl Key) -> SignedData
Sign arbitrary string data.
The data is UTF-8 encoded and enveloped the same way as with
hash_message. The returned signed data’s signature is in ‘Electrum’
notation, that is the recovery value v is either 27 or 28 (as
opposed to the standard notation where v is either 0 or 1). This
is important to consider when using this signature with other crates.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Accounts<T>where
    T: Freeze,
impl<T> RefUnwindSafe for Accounts<T>where
    T: RefUnwindSafe,
impl<T> Send for Accounts<T>where
    T: Send,
impl<T> Sync for Accounts<T>where
    T: Sync,
impl<T> Unpin for Accounts<T>where
    T: Unpin,
impl<T> UnwindSafe for Accounts<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