struct_hash
Compute EIP-712 struct hash for TxSeismic
Overview
Signature
def struct_hash(tx: UnsignedSeismicTx) -> bytesParameters
Parameter
Type
Required
Description
Returns
Type
Description
Examples
Basic Usage
from seismic_web3 import struct_hash, UnsignedSeismicTx
unsigned_tx = UnsignedSeismicTx(...)
# Compute struct hash
hash_value = struct_hash(unsigned_tx)
print(f"Struct hash: {hash_value.hex()}")
print(f"Length: {len(hash_value)} bytes") # Always 32Use in Signing Hash
Compare Different Transactions
Debug Field Encoding
How It Works
Field Encoding
Static Types (Left-Padded to 32 Bytes)
Dynamic Types (Hashed with keccak256)
Implementation
Type Hash
Notes
Encoding Details
encryption_nonce Conversion
Address Encoding
Boolean Encoding
See Also
Last updated

