# SeismicElements

Seismic-specific fields appended to every `TxSeismic` transaction. These carry the encryption parameters and block-expiry metadata.

## Definition

```python
@dataclass(frozen=True)
class SeismicElements:
    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` | [`CompressedPublicKey`](/clients/python/api-reference/types/compressed-public-key.md) | TEE's compressed secp256k1 key for ECDH-derived encryption |
| `encryption_nonce`  | [`EncryptionNonce`](/clients/python/api-reference/types/encryption-nonce.md)          | 12-byte AES-GCM nonce                                      |
| `message_version`   | `int`                                                                                 | Signing mode — `0` for raw, `2` for EIP-712                |
| `recent_block_hash` | [`Bytes32`](/clients/python/api-reference/types/bytes32.md)                           | Hash of a recent block (freshness proof)                   |
| `expires_at_block`  | `int`                                                                                 | Block number after which the tx is invalid                 |
| `signed_read`       | `bool`                                                                                | `True` for signed `eth_call` reads, `False` for writes     |

## Example

```python
from seismic_web3 import (
    SeismicElements,
    CompressedPublicKey,
    EncryptionNonce,
    Bytes32,
)
import os

elements = SeismicElements(
    encryption_pubkey=CompressedPublicKey(...),  # from get_tee_public_key()
    encryption_nonce=EncryptionNonce(os.urandom(12)),
    message_version=2,
    recent_block_hash=Bytes32(...),
    expires_at_block=12345678,
    signed_read=False,
)
```

In practice the SDK constructs `SeismicElements` automatically — override specific fields via [`SeismicSecurityParams`](/clients/python/api-reference/transaction-types/seismic-security-params.md).

## See Also

* [SeismicSecurityParams](/clients/python/api-reference/transaction-types/seismic-security-params.md) — user-facing overrides for defaults
* [UnsignedSeismicTx](/clients/python/api-reference/transaction-types/unsigned-seismic-tx.md) — contains SeismicElements
* [TxSeismicMetadata](/clients/python/api-reference/transaction-types/tx-seismic-metadata.md) — uses SeismicElements for AAD


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seismic.systems/clients/python/api-reference/transaction-types/seismic-elements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
