Skip to main content

TxHashable

Trait TxHashable 

Source
pub trait TxHashable: Encodable {
    // Provided methods
    fn tx_hash(&self, signature: &Signature) -> TxHash { ... }
    fn tx_hash_with_signature_type(
        &self,
        signature_type: &SignatureType,
    ) -> TxHash { ... }
}

Provided Methods§

Source

fn tx_hash(&self, signature: &Signature) -> TxHash

Compute transaction hash for a single signature (standard Ethereum format)

Source

fn tx_hash_with_signature_type(&self, signature_type: &SignatureType) -> TxHash

Compute transaction hash for any signature type (single or multi-sig)

Note: multi-sig intentionally hashes the RLP-encoded payload bytes concatenated with raw signature bytes (no list header) to ensure a distinct TxHash from single-sig. Empty multi-sig signature sets are rejected during multi-sig verification (MultiSigError::NoSignatures).

Implementors§

Source§

impl<T: Encodable> TxHashable for T

Auto implement the TxHashable trait for all types that implement Encodable.