pub trait TxSignerSync<Signature> {
// Required methods
fn address(&self) -> Address;
fn sign_transaction_sync(
&self,
tx: &mut dyn SignableTransaction<Signature>,
) -> Result<Signature>;
}Expand description
Synchronous transaction signer, capable of signing any SignableTransaction for the given
Signature type.
A signer should hold an optional ChainId value, which is used for EIP-155 replay
protection.
If chain_id is Some, EIP-155 should be applied to the input transaction in
sign_transaction_sync, and to the resulting signature in all
the methods. If chain_id is None, EIP-155 should not be applied.
Synchronous signers should also implement TxSigner, as they are always able to by delegating
the asynchronous methods to the synchronous ones.
Required Methods§
Sourcefn sign_transaction_sync(
&self,
tx: &mut dyn SignableTransaction<Signature>,
) -> Result<Signature>
fn sign_transaction_sync( &self, tx: &mut dyn SignableTransaction<Signature>, ) -> Result<Signature>
Synchronously sign an unsigned transaction.