> For the complete documentation index, see [llms.txt](https://docs.seismic.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.seismic.systems/clients/python/api-reference/transaction-types/seismic-security-params.md).

# SeismicSecurityParams

Optional security parameters for shielded transactions

Optional overrides for the SDK's default security parameters when creating shielded transactions. All fields default to `None`.

## Definition

```python
@dataclass(frozen=True)
class SeismicSecurityParams:
    blocks_window: int | None = None
    encryption_nonce: EncryptionNonce | None = None
    recent_block_hash: Bytes32 | None = None
    expires_at_block: int | None = None
```

## Fields

| Field               | Type                                                                                   | Default           | Description                             |
| ------------------- | -------------------------------------------------------------------------------------- | ----------------- | --------------------------------------- |
| `blocks_window`     | `int \| None`                                                                          | `None` → 100      | Number of blocks before the tx expires  |
| `encryption_nonce`  | [`EncryptionNonce`](/clients/python/api-reference/types/encryption-nonce.md) `\| None` | `None` → random   | Explicit AES-GCM nonce                  |
| `recent_block_hash` | [`Bytes32`](/clients/python/api-reference/types/bytes32.md) `\| None`                  | `None` → latest   | Explicit block hash for freshness proof |
| `expires_at_block`  | `int \| None`                                                                          | `None` → computed | Explicit expiry block number            |

## Example

```python
from seismic_web3 import SeismicSecurityParams

# Transaction expires in 200 blocks instead of default 100
security_params = SeismicSecurityParams(blocks_window=200)

result = await contract.write.transfer(
    recipient,
    amount,
    security_params=security_params,
)
```

## Field relationships

* If both `blocks_window` and `expires_at_block` are provided, `expires_at_block` takes precedence
* If neither is provided, defaults to `current_block + 100`

## See Also

* [SeismicElements](/clients/python/api-reference/transaction-types/seismic-elements.md) — constructed from these params
* [EncryptionNonce](/clients/python/api-reference/types/encryption-nonce.md) — type for `encryption_nonce`
* [Bytes32](/clients/python/api-reference/types/bytes32.md) — type for `recent_block_hash`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.seismic.systems/clients/python/api-reference/transaction-types/seismic-security-params.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
