pub trait Accounts: Send + Sync {
    fn sign_transaction(
        &self,
        filled: FilledTransactionRequest,
        chain_id: Option<u64>,
        nonce: U256,
        password: SignWith
    ) -> Result<WithToken<SignedTransaction>>;
fn sign_message(
        &self,
        address: Address,
        password: SignWith,
        hash: SignMessage
    ) -> Result<WithToken<Signature>>;
fn decrypt(
        &self,
        address: Address,
        password: SignWith,
        data: Bytes
    ) -> Result<WithToken<Bytes>>;
fn supports_prospective_signing(
        &self,
        address: &Address,
        password: &SignWith
    ) -> bool;
fn default_account(&self) -> Address;
fn is_unlocked(&self, address: &Address) -> bool; }
Expand description

Abstract transaction signer.

NOTE This signer is semi-correct, it’s a temporary measure to avoid moving too much code. If accounts are ultimately removed all password-dealing endpoints will be wiped out.

Required methods

Sign given filled transaction request for the specified chain_id.

Sign given message.

Decrypt given message.

Returns true if the accounts can sign multiple times.

Returns default account.

Returns true if account is unlocked (i.e. can sign without a password)

Implementors