puzzle-pieceSeismicElements

Seismic-specific transaction fields

Seismic-specific fields appended to every TxSeismic transaction.

Overview

SeismicElements contains the encryption parameters and block-expiry metadata required for all Seismic transactions. These fields enable calldata encryption and ensure transaction freshness.

Definition

@dataclass(frozen=True)
class SeismicElements:
    """Seismic-specific fields appended to a transaction.

    These fields are required for every TxSeismic and carry the
    encryption parameters plus block-expiry metadata.
    """
    encryption_pubkey: CompressedPublicKey
    encryption_nonce: EncryptionNonce
    message_version: int
    recent_block_hash: Bytes32
    expires_at_block: int
    signed_read: bool

Fields

Field
Type
Description

encryption_pubkey

Compressed secp256k1 public key for ECDH-derived calldata encryption

encryption_nonce

12-byte AES-GCM nonce for encryption

message_version

int

Signing mode — 0 for raw, 2 for EIP-712

recent_block_hash

Hash of a recent block (freshness proof)

expires_at_block

int

Block number after which the transaction is invalid

signed_read

bool

True for signed eth_call reads, False for writes

Examples

Manual Construction

Typical Usage (SDK Handles This)

With Custom Security Parameters

Access from UnsignedSeismicTx

Field Details

encryption_pubkey

The TEE's compressed secp256k1 public key, obtained from w3.seismic.get_tee_public_key(). Used for ECDH key derivation to encrypt calldata.

encryption_nonce

A unique 12-byte nonce for AES-GCM encryption. Must never be reused with the same key. Auto-generated by the SDK if not specified.

message_version

Determines the signing method:

  • 0 - Raw signing (RLP hash of unsigned transaction)

  • 2 - EIP-712 typed data signing (structured, human-readable)

The SDK defaults to 2 (EIP-712) for better UX.

recent_block_hash

Hash of a recent block, proving the transaction was created recently. The node verifies this hash exists in the canonical chain. Auto-fetched by the SDK.

expires_at_block

Block number after which the transaction is considered invalid. Typically current_block + 100. Prevents replay attacks and ensures timely execution.

signed_read

  • True - This is a signed eth_call (read-only, no state changes)

  • False - This is a write transaction (will be broadcast)

Properties

  • Immutable - Cannot be modified after construction (frozen=True)

  • Required - All fields must be present for valid TxSeismic transactions

  • Type-safe - All fields are validated at construction

Notes

See Also

Last updated