globeSeismicUnsignedProvider

Read-only Seismic provider for public operations without a wallet

Read-only provider for public operations. No wallet or signing capabilities.

Overview

SeismicUnsignedProvider<N: SeismicNetwork> is a lightweight provider for reading public data from Seismic nodes. It does not carry a wallet, cannot sign transactions, and cannot decrypt responses from seismic_call. Use it for:

  • Querying block data, balances, and transaction receipts

  • Fetching the TEE public key

  • Public (unencrypted) contract reads

  • WebSocket subscriptions

For full capabilities (shielded writes, signed reads, response decryption), use SeismicSignedProvider instead.

Type Signature

pub struct SeismicUnsignedProvider<N: SeismicNetwork> {
    // inner provider with filler chain (no wallet filler)
}

The generic parameter N determines the network type:

  • SeismicReth -- for Seismic devnet/testnet/mainnet

  • SeismicFoundry -- for local sfoundry instances

Constructors

new_http()

Create an unsigned provider using HTTP transport (synchronous).

Parameters

Parameter
Type
Required
Description

url

reqwest::Url

Yes

HTTP URL of the Seismic node RPC endpoint

Returns

Type
Description

Self

The constructed unsigned provider

Example

circle-info

new_http() is synchronous -- it does not make any RPC calls during construction. The TEE public key is not fetched or cached. This makes it suitable for quick, lightweight provider creation.

new_ws()

Create an unsigned provider using WebSocket transport.

Parameters

Parameter
Type
Required
Description

url

reqwest::Url

Yes

WebSocket URL of the Seismic node (e.g., wss://gcp-1.seismictest.net/ws)

Returns

Type
Description

TransportResult<Self>

The constructed provider, or a transport error if the WebSocket connection fails

Example

circle-info

new_ws() is async because it establishes the WebSocket connection during construction. Use WebSocket transport when you need persistent connections or event subscriptions.

Convenience Functions

These functions pre-fill the network generic parameter:

sreth_unsigned_provider()

For Seismic devnet, testnet, or mainnet.

sfoundry_unsigned_provider()

For local sfoundry development instances.

Methods

SeismicUnsignedProvider implements Deref to the inner Alloy provider, so all standard Provider<N> methods are available. It also implements SeismicProviderExt<N>, though some methods have limited functionality compared to the signed provider.

Via SeismicProviderExt

get_tee_pubkey()

Fetch the TEE public key from the node.

Returns
Description

TransportResult<PublicKey>

The node's TEE secp256k1 public key

circle-info

Unlike SeismicSignedProvider, the unsigned provider does not cache the TEE pubkey. Each call to get_tee_pubkey() makes a fresh RPC request to seismic_getTeePublicKey.

should_encrypt_input()

Check whether a transaction's calldata should be encrypted.

Parameter
Type
Required
Description

tx

&B (where B: TransactionBuilder<N>)

Yes

Transaction to check

Returns
Description

bool

true if the transaction has calldata that should be encrypted

seismic_call()

Send a call request. Since this is an unsigned provider, the response is not decrypted.

Parameter
Type
Required
Description

tx

SendableTx<N>

Yes

Transaction to send as a call

Returns
Description

TransportResult<Bytes>

Raw (not decrypted) response bytes

call_conditionally_signed()

Send a call without signing (since this is an unsigned provider).

Via Standard Alloy Provider

All standard Alloy provider methods are available through Deref:

Filler Chain

The unsigned provider uses a simplified filler chain without wallet signing:

Order
Filler
Purpose

1

SeismicElementsFiller

Populates Seismic-specific fields: encryption nonce, block hash, expiry

2

NonceFiller

Fetches and sets the transaction nonce

2

ChainIdFiller

Sets the chain ID from the connected node

3

SeismicGasFiller

Estimates and sets gas limit and gas price

circle-info

The unsigned filler chain places SeismicElementsFiller first (before nonce/chain ID), whereas the signed filler chain places it after WalletFiller and nonce/chain ID. This ordering difference is because the signed provider needs the nonce to be set before computing Seismic elements that depend on it.

Examples

Query Block Data

Check Account Balance

Fetch TEE Public Key

WebSocket Connection

Local sfoundry Development

Limitations

Limitation
Details

No transaction signing

Cannot send transactions -- use SeismicSignedProvider

No response decryption

seismic_call() returns raw bytes without decryption

No TEE pubkey caching

Each get_tee_pubkey() call makes a fresh RPC request

Notes

  • new_http() is synchronous and makes no RPC calls at construction

  • new_ws() is async because it establishes the WebSocket connection

  • The unsigned provider is ideal for monitoring, indexing, and read-only applications

  • All standard Alloy Provider methods work unchanged via Deref

  • The unsigned provider is lighter weight than the signed provider (no wallet, no TEE pubkey cache)

  • The SeismicElementsFiller generates an ephemeral keypair on construction and encrypts calldata, so the unsigned provider does support calldata encryption

See Also

Last updated