Skip to main content

Seismic Python SDK — web3.py extensions for the Seismic network

Project description

seismic-web3

Python SDK for Seismic, built on web3.py. Requires Python 3.10+.

pip install seismic-web3

Client types

The SDK provides two client types:

  • Wallet client — you provide a private key. Gives you full capabilities: shielded reads/writes, signed calls, deposits.
  • Public client — no private key needed. Read-only access via transparent eth_call.

Quick start

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 (TxSeismic type 0x4a)
tx_hash = contract.write.setNumber(42)
receipt = w3.eth.wait_for_transaction_receipt(tx_hash)

# Shielded read — signed, encrypted eth_call
result = contract.read.getNumber()
# Public client — read-only (no private key needed)
public = SEISMIC_TESTNET.public_client()

contract = public.seismic.contract(address="0x...", abi=ABI)
result = contract.tread.getNumber()

ShieldedContract (from the wallet client) exposes five namespaces:

Namespace What it does On-chain visibility
.write Encrypted transaction (TxSeismic type 0x4a) Calldata hidden
.read Encrypted signed eth_call Calldata + result hidden
.twrite Standard eth_sendTransaction Calldata visible
.tread Standard eth_call Calldata visible
.dwrite Debug write — returns plaintext + encrypted views Calldata hidden

Both sync and async clients are supported. See the full documentation for details.

Documentation

Full docs are hosted on GitBook: docs.seismic.systems/clients/python

Contributing

See DEVELOPMENT.md for local setup, running tests, and publishing.


This SDK was entirely vibecoded.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seismic_web3-0.2.1.tar.gz (256.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seismic_web3-0.2.1-py3-none-any.whl (59.5 kB view details)

Uploaded Python 3

File details

Details for the file seismic_web3-0.2.1.tar.gz.

File metadata

  • Download URL: seismic_web3-0.2.1.tar.gz
  • Upload date:
  • Size: 256.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for seismic_web3-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7ea9fad7d0fe8db0247991202ab47e70ed82fa2d1c1d7288ecd7098ed9c7ba94
MD5 9ac5a9b697907e7cceda0198f68f3f80
BLAKE2b-256 51b68b7d7537124f32ce55535cb6095fc664911d451940f48b579a0698d01ce5

See more details on using hashes here.

File details

Details for the file seismic_web3-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for seismic_web3-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6a071a794e16a8b75c438f11e5bcf26fe9e743e44e8310a181cba0d14e74c46
MD5 cd7b7506673f94b66270a263dd4fc485
BLAKE2b-256 ff54ede0709ee7bf4ac1ce4edea1bcbac90d17e630930b3a18a365c498156db2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page