snakePython — seismic-web3

Python SDK for Seismic, built on web3.py

Python SDK for Seismicarrow-up-right, built on web3.pyarrow-up-right. Requires Python 3.10+.

pip install seismic-web3

Or with uvarrow-up-right:

uv add seismic-web3

Quick Example

import os
from seismic_web3 import SEISMIC_TESTNET, PrivateKey

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

# Wallet client — full capabilities (requires private key)
w3 = SEISMIC_TESTNET.wallet_client(pk)

contract = w3.seismic.contract(address="0x...", abi=ABI)

# Shielded write — calldata is encrypted
tx_hash = contract.write.setNumber(42)
receipt = w3.eth.wait_for_transaction_receipt(tx_hash)

# Signed read — encrypted eth_call, proves your identity
result = contract.read.getNumber()

Documentation Navigation

Getting Started

Section
Description

Create sync/async wallet and public clients

Chain configuration (SEISMIC_TESTNET, SANVIL)

Interact with shielded and public contracts

Guides & Examples

Section
Description

Step-by-step tutorials for common workflows

Complete runnable code examples

API Reference

Section
Description

Complete API documentation for all types and functions

Primitive types (Bytes32, PrivateKey, etc.)

Seismic transaction dataclasses

EIP-712 typed data signing functions

Advanced Features

Section
Description

w3.seismic namespace methods

Privacy-preserving cryptographic functions

SRC20 token standard support

Built-in contract ABIs and helpers

By Task

By Component

Features

  • 🔒 Shielded Transactions - Encrypt calldata with TEE public key

  • 📝 Signed Reads - Prove identity in eth_call

  • 🪙 SRC20 Support - Built-in support for private tokens

  • ⚡ Async/Await - Full async support with AsyncWeb3

  • 🔑 EIP-712 - Structured typed data signing

  • 🛠️ Precompiles - Access Mercury EVM cryptographic precompiles

  • 🌐 Web3.py Compatible - Standard Web3 instance with Seismic extensions

Architecture

The SDK extends web3.py with a custom w3.seismic namespace:

Next Steps

  1. Install and setup a client - Get connected to Seismic

  2. Explore the API reference - Deep dive into all types and functions

  3. Check out examples - See complete runnable code

Last updated