serverProvider

Signed and unsigned provider types for interacting with Seismic nodes

The seismic-alloy provider crate provides two provider types for interacting with Seismic nodes:

Both providers are generic over N: SeismicNetwork, which determines the network-specific transaction and receipt types.

Provider Comparison

Capability
SeismicSignedProvider
SeismicUnsignedProvider

Wallet integration

Yes (signs transactions)

No

Shielded writes

Yes

No

Signed reads (seismic_call)

Yes (encrypts + decrypts)

No response decryption

Public reads

Yes

Yes

Block/transaction queries

Yes

Yes

TEE pubkey caching

Yes (fetched at creation)

No

Response decryption

Yes (ephemeral key + TEE key)

No

Calldata encryption

Automatic via filler pipeline

Not applicable

WebSocket support

No (HTTP only)

Yes (new_ws())

Constructor

async fn new(wallet, url)

fn new_http(url) / async fn new_ws(url)

Quick Start

Signed Provider

Unsigned Provider

Filler Pipeline

Both providers use Alloy's filler pipeline to automatically populate transaction fields before sending. The filler chain differs between signed and unsigned providers:

Signed Provider Filler Chain

Unsigned Provider Filler Chain

circle-info

The signed provider places WalletFiller first because the wallet must sign the fully-populated transaction. The unsigned provider does not have a wallet filler since it cannot sign transactions.

Convenience Constructors

Both provider types have convenience functions that pre-fill the network generic parameter:

Signed Providers

Function
Network
Description

sreth_signed_provider(wallet, url)

SeismicReth

For Seismic devnet/testnet/mainnet

sfoundry_signed_provider(wallet, url)

SeismicFoundry

For local sfoundry instances

Unsigned Providers

Function
Network
Description

sreth_unsigned_provider(url)

SeismicReth

For Seismic devnet/testnet/mainnet

sfoundry_unsigned_provider(url)

SeismicFoundry

For local sfoundry instances

SeismicProviderExt Trait

The SeismicProviderExt trait extends Alloy's Provider<N> with Seismic-specific methods:

Method
Description

seismic_call()

Fill, encrypt, send, and decrypt an eth_call-style request

should_encrypt_input()

Check if a transaction's calldata should be encrypted

get_tee_pubkey()

Fetch the TEE public key from the node via seismic_getTeePublicKey

call_conditionally_signed()

Send a call that is signed if the provider has a wallet, unsigned otherwise

Network Types

Type
Description
Use With

SeismicReth

Production Seismic network

Devnet, testnet, mainnet

SeismicFoundry

Local development network

sfoundry local nodes

Both types implement SeismicNetwork, which extends Alloy's Network trait with Seismic transaction and receipt types.

Provider Pages

Page
Description

Full-featured provider with wallet, encryption, and decryption

Lightweight read-only provider

TEE key exchange, ECDH, AES-GCM encryption details

See Also

Last updated