Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

SignatureImpl

Fully qualified path: alexandria_evm::signature::SignatureImpl

pub impl SignatureImpl of SignatureTrait;

Impl functions

verify_signature

Verifies an Ethereum signature against a message hash and an Ethereum address.

This function expects a 65-byte signature (r, s, v) in the standard Ethereum format. It extracts the components, builds a Signature struct, and calls the verification routine.

Arguments

  • msg_hash - The hash of the signed message (typically a Keccak256 hash of a message prefix + payload).
  • signature - The 65-byte signature as a ByteArray: r (32 bytes) | s (32 bytes) | v (1 byte).
  • eth_address - The Ethereum address expected to have signed the message.

Fully qualified path: alexandria_evm::signature::SignatureImpl::verify_signature

fn verify_signature(msg_hash: u256, signature: ByteArray, eth_address: EthAddress)