plugClient

Creating sync and async Seismic clients

The Seismic Python SDK provides two client types for interacting with Seismic nodes:

  • Wallet client — Full capabilities (shielded writes, signed reads, deposits). Requires a private key.

  • Public client — Read-only (transparent reads, TEE public key, deposit queries). No private key needed.

Both clients are available in sync and async variants.

Quick Start

Installation

pip install seismic-web3

Or with uvarrow-up-right:

uv add seismic-web3

Wallet Client (Sync)

import os
from seismic_web3 import SEISMIC_TESTNET, PrivateKey

pk = PrivateKey.from_hex_str(os.environ["PRIVATE_KEY"])
w3 = SEISMIC_TESTNET.wallet_client(pk)

This gives you a standard Web3 instance with an extra w3.seismic namespace. Everything from web3.py works as usual — w3.eth.get_block(...), w3.eth.wait_for_transaction_receipt(...), etc.

Wallet Client (Async)

Every method on w3.seismic and on ShieldedContract is await-able when using the async client.

Public Client

The public client's w3.seismic namespace has limited methods: get_tee_public_key(), get_deposit_root(), get_deposit_count(), and contract() (with .tread only).

Client Factory Functions

Wallet Clients (Require Private Key)

Function
Type
Description

Sync

Create sync wallet client from RPC URL

Async

Create async wallet client from RPC URL

Public Clients (No Private Key)

Function
Type
Description

Sync

Create sync public client from RPC URL

Async

Create async public client from RPC URL

Chain-Based Creation

The recommended approach is to use chain configuration objects:

See Chains Configuration for more details.

Encryption

The wallet client automatically handles encryption setup:

  1. Fetches the network's TEE public key

  2. Derives a shared AES-GCMarrow-up-right key via ECDHarrow-up-right

  3. Uses this key to encrypt calldata for all shielded transactions and signed reads

You don't need to manage this manually, but the encryption state is accessible at w3.seismic.encryption if needed.

Encryption Components

Component
Description

Holds AES key and encryption keypair

Derives encryption state from TEE public key

Client Capabilities

Wallet Client (w3.seismic)

Public Client (w3.seismic)

See Also

Last updated