Transaction signing-hash computation and sender recovery.
Summary
Functions
Recover the authority (signer) of an EIP-7702 authorization tuple.
Recover the sender address from a signed transaction.
Compute the signing hash for a transaction.
Functions
@spec recover_authority(EEVM.Transaction.Authorization.t()) :: {:ok, binary()} | {:error, atom()}
Recover the authority (signer) of an EIP-7702 authorization tuple.
The signed message is keccak256(0x05 || rlp([chain_id, address, nonce])).
Signatures with y_parity outside 0..1, r outside 1..n-1, or a
high s (EIP-2) are rejected with {:error, :invalid_signature}.
@spec recover_sender(EEVM.Transaction.t(), non_neg_integer()) :: {:ok, binary()} | {:error, atom()}
Recover the sender address from a signed transaction.
@spec signing_hash(EEVM.Transaction.t(), non_neg_integer()) :: binary()
Compute the signing hash for a transaction.