pub struct Signer { /* private fields */ }
Expand description
Account-aware signer
Implementations
sourceimpl Signer
impl Signer
sourcepub fn new(accounts: Arc<AccountProvider>) -> Self
pub fn new(accounts: Arc<AccountProvider>) -> Self
Create new instance of signer
Trait Implementations
sourceimpl Accounts for Signer
impl Accounts for Signer
sourcefn sign_transaction(
&self,
filled: FilledTransactionRequest,
chain_id: Option<u64>,
nonce: U256,
password: SignWith
) -> Result<WithToken<SignedTransaction>>
fn sign_transaction(
&self,
filled: FilledTransactionRequest,
chain_id: Option<u64>,
nonce: U256,
password: SignWith
) -> Result<WithToken<SignedTransaction>>
Sign given filled transaction request for the specified chain_id.
sourcefn sign_message(
&self,
address: Address,
password: SignWith,
hash: SignMessage
) -> Result<WithToken<Signature>>
fn sign_message(
&self,
address: Address,
password: SignWith,
hash: SignMessage
) -> Result<WithToken<Signature>>
Sign given message.
sourcefn decrypt(
&self,
address: Address,
password: SignWith,
data: Bytes
) -> Result<WithToken<Bytes>>
fn decrypt(
&self,
address: Address,
password: SignWith,
data: Bytes
) -> Result<WithToken<Bytes>>
Decrypt given message.
sourcefn supports_prospective_signing(
&self,
address: &Address,
password: &SignWith
) -> bool
fn supports_prospective_signing(
&self,
address: &Address,
password: &SignWith
) -> bool
Returns true
if the accounts can sign multiple times.
sourcefn default_account(&self) -> Address
fn default_account(&self) -> Address
Returns default account.
sourcefn is_unlocked(&self, address: &Address) -> bool
fn is_unlocked(&self, address: &Address) -> bool
Returns true if account is unlocked (i.e. can sign without a password)
Auto Trait Implementations
impl !RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl !UnwindSafe for Signer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more