walletAsyncSeismicNamespace

AsyncSeismicNamespace class - Full wallet capabilities (async)

The AsyncSeismicNamespace class provides full Seismic functionality for asynchronous wallet clients. It extends AsyncSeismicPublicNamespace with write capabilities that require a private key.

Overview

This namespace is automatically attached as w3.seismic when you create an async wallet client with create_async_wallet_client(). It provides:

  • Shielded transactions with encrypted calldata (async)

  • Signed reads (eth_call with encryption, async)

  • Debug transaction introspection (async)

  • Validator deposits (async)

  • Contract wrappers with full read/write capabilities

  • All read-only methods from AsyncSeismicPublicNamespace

Access

from seismic_web3 import create_async_wallet_client, PrivateKey

w3 = await create_async_wallet_client(
    "https://gcp-1.seismictest.net/rpc",
    private_key=PrivateKey(...),
)

# Access the namespace (all methods are async)
await w3.seismic.send_shielded_transaction(...)
contract = w3.seismic.contract(address, abi)

Public vs Wallet Namespaces

Feature
Public Namespace
Wallet Namespace

Read-only queries

✅ Yes

✅ Yes (inherited)

Shielded writes

❌ No

✅ Yes

Signed reads

❌ No

✅ Yes

Validator deposits

❌ No

✅ Yes

Contract writes

❌ No

✅ Yes

Requires private key

❌ No

✅ Yes

The wallet namespace inherits all read-only capabilities from AsyncSeismicPublicNamespace and adds write operations that require cryptographic signing.

Class Definition

Methods

Transaction Methods

send_shielded_transaction()

Send a shielded transaction with encrypted calldata (async).

Parameters:

  • to (ChecksumAddress): Recipient contract address

  • data (HexBytes): Plaintext calldata (will be encrypted)

  • value (int, optional): Wei to transfer (default: 0)

  • gas (int | None, optional): Gas limit (auto-estimated if None)

  • gas_price (int | None, optional): Gas price in wei

  • security (SeismicSecurityParams | None, optional): Security parameter overrides

  • eip712 (bool, optional): Use EIP-712 typed data signing (default: False)

Returns: Transaction hash (HexBytes)

See detailed documentation →


signed_call()

Execute a signed read (eth_call with encrypted calldata, async).

Parameters:

  • to (ChecksumAddress): Contract address to call

  • data (HexBytes): Plaintext calldata (will be encrypted)

  • value (int, optional): Wei to include (default: 0)

  • gas (int, optional): Gas limit (default: 30,000,000)

  • security (SeismicSecurityParams | None, optional): Security parameter overrides

  • eip712 (bool, optional): Use EIP-712 typed data signing (default: False)

Returns: Decrypted response bytes, or None if empty

See detailed documentation →


debug_send_shielded_transaction()

Send a shielded transaction and return debug information (async).

Parameters: Same as send_shielded_transaction()

Returns: DebugWriteResult containing:

  • Transaction hash

  • Plaintext transaction view

  • Encrypted transaction view

See detailed documentation →


Contract Factory

contract()

Create an AsyncShieldedContract wrapper with full read/write capabilities.

Parameters:

  • address (ChecksumAddress): Contract address

  • abi (list[dict[str, Any]]): Contract ABI (list of function entries)

  • eip712 (bool, optional): Use EIP-712 typed data signing (default: False)

Returns: AsyncShieldedContract instance with namespaces:

  • .write - Shielded writes (encrypted, async)

  • .read - Signed reads (encrypted, async)

  • .twrite - Transparent writes (unencrypted, async)

  • .tread - Transparent reads (unencrypted, async)

  • .dwrite - Debug writes (returns debug info, async)

See contract documentation →


Query Methods

These methods are inherited from AsyncSeismicPublicNamespace:

get_tee_public_key()

Fetch the TEE's compressed secp256k1 public key (async).

Returns: 33-byte compressed public key

See detailed documentation →


get_deposit_root()

Read the current deposit Merkle root (async).

Parameters:

  • address (str, optional): Deposit contract address (defaults to genesis contract)

Returns: 32-byte deposit root hash

See detailed documentation →


get_deposit_count()

Read the current deposit count (async).

Parameters:

  • address (str, optional): Deposit contract address (defaults to genesis contract)

Returns: Number of deposits as a Python int

See detailed documentation →


Deposit Methods

deposit()

Submit a validator deposit to the deposit contract (async).

Parameters: (all keyword-only)

  • node_pubkey (bytes): 32-byte ED25519 public key

  • consensus_pubkey (bytes): 48-byte BLS12-381 public key

  • withdrawal_credentials (bytes): 32-byte withdrawal credentials

  • node_signature (bytes): 64-byte ED25519 signature

  • consensus_signature (bytes): 96-byte BLS12-381 signature

  • deposit_data_root (bytes): 32-byte deposit data root hash

  • value (int): Deposit amount in wei (e.g., 32 * 10**18)

  • address (str, optional): Deposit contract address (defaults to genesis contract)

Returns: Transaction hash

Raises: ValueError if any argument has the wrong byte length

See detailed documentation →


Usage Examples

Basic Shielded Transaction

Signed Read

Contract Interaction

Concurrent Operations

Debug Transaction

Context Manager Pattern

Async Best Practices

Use asyncio.gather() for Parallel Operations

Handle Connection Cleanup

Error Handling with Async

See Also

Last updated