Chains
Network configurations and chain constants
The Seismic SDK provides pre-configured network settings and utilities for connecting to Seismic chains. Chain configurations encapsulate RPC endpoints, WebSocket URLs, chain IDs, and convenience methods for creating clients.
Overview
Instead of manually passing RPC URLs and chain IDs when creating clients, you can use pre-defined chain configurations:
import os
from seismic_web3 import SEISMIC_TESTNET, SANVIL, PrivateKey
pk = PrivateKey.from_hex_str(os.environ["PRIVATE_KEY"])
# Connect to testnet
w3 = SEISMIC_TESTNET.wallet_client(pk)
# Connect to local Sanvil
w3 = SANVIL.wallet_client(pk)Components
Chain Configurations
Immutable dataclass for network configuration
Public testnet configuration (testnet-1)
Local development network configuration
Factory for alternate testnet instances
Protocol Constants
Transaction type byte for Seismic transactions
Quick Start
Using Pre-Defined Chains
Accessing Chain Properties
Alternate Testnet Instances
Custom Chains
Client Creation Methods
All chain configurations provide convenience methods for creating clients:
Wallet Clients (Require Private Key)
Public Clients (No Private Key)
Chain IDs
The SDK defines constants for chain IDs used in transaction signing:
These are automatically included in the chain configurations and used by the signing infrastructure.
Notes
Chain configurations are immutable (frozen dataclasses)
WebSocket support is automatic when
ws=Trueandws_urlis configuredHTTP endpoints are used as fallback if WebSocket URL is unavailable
All methods return standard
web3.pyinstances with thew3.seismicnamespace attached
See Also
Client Creation - Detailed client setup documentation
Wallet Client - Full wallet client capabilities
Public Client - Read-only client features
PrivateKey - Private key type documentation
Last updated

