network-wiredNetwork

Network abstractions for Seismic chain interaction

The seismic-alloy SDK defines network types that configure how providers encode transactions, parse responses, and interact with Seismic nodes. Every provider is generic over a network type that implements the SeismicNetwork trait.

Overview

Alloy's architecture uses a Network trait to associate transaction types, receipt types, and other chain-specific types into a single coherent set. Seismic extends this pattern with the SeismicNetwork trait, which adds methods for handling shielded transaction elements, calldata encryption, and Seismic-specific signing.

The SDK provides two concrete network implementations:

Network
Use Case
Description

Production / Testnet

Full Seismic node (reth-based). Use for devnet, testnet, and mainnet.

Local Development

Sanvil (Seismic Anvil). Use for local testing with sanvil.

Both implement SeismicNetwork and can be used as the generic parameter N in SeismicSignedProvider<N> and SeismicUnsignedProvider<N>.

Core Abstraction

The SeismicNetwork trait is the foundation of the network layer. It extends Alloy's Network and RecommendedFillers traits and defines how to:

  • Attach and retrieve seismic encryption elements on transaction requests

  • Read and write encrypted calldata (input) on requests and envelopes

  • Sign transactions using a SeismicWallet

  • Identify Seismic transaction types

  • Extract Seismic metadata from signed envelopes

use seismic_prelude::foundry::*;

// SeismicReth for production
let provider = SeismicSignedProvider::<SeismicReth>::new(wallet, url).await?;

// SeismicFoundry for local dev with Sanvil
let provider = SeismicSignedProvider::<SeismicFoundry>::new(wallet, url).await?;

Choosing a Network Type

circle-info

In most cases, you will use the convenience constructors (sreth_signed_provider, sfoundry_signed_provider) rather than specifying the network type directly. These functions select the correct network type for you.

Quick Start

Production / Testnet

Local Development (Sanvil)

Associated Types

Both network types define the same set of associated types required by Alloy's Network trait, but with different concrete implementations:

Associated Type
SeismicReth
SeismicFoundry

TxType

SeismicTxType

SeismicFoundryTxType

TxEnvelope

SeismicTxEnvelope

SeismicFoundryTxEnvelope

UnsignedTx

SeismicTypedTransaction

SeismicFoundryTypedTransaction

TransactionRequest

SeismicTransactionRequest

SeismicFoundryTransactionRequest

ReceiptEnvelope

SeismicReceiptEnvelope

SeismicFoundryReceiptEnvelope

TransactionResponse

Transaction<SeismicTxEnvelope>

Transaction<SeismicFoundryTxEnvelope>

Pages

Page
Description

Core trait defining Seismic network behavior

Production network type for devnet/testnet/mainnet

Development network type for Sanvil

See Also

Last updated