rustRust — seismic-alloy

Rust SDK for Seismic, built on Alloy

Rust SDK for Seismicarrow-up-right, built on Alloyarrow-up-right (v1.1.0). Requires Rust 1.82+.

[dependencies]
seismic-alloy = { git = "https://github.com/SeismicSystems/seismic-alloy" }

Quick Example

use seismic_prelude::foundry::*;
use alloy_signer_local::PrivateKeySigner;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let signer: PrivateKeySigner = "0xYOUR_PRIVATE_KEY".parse()?;
    let wallet = SeismicWallet::from(signer);
    let url = "https://node.seismicdev.net/rpc".parse()?;

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

    // All standard Alloy provider methods work
    let block_number = provider.get_block_number().await?;
    println!("Block number: {block_number}");

    Ok(())
}

Documentation Navigation

Getting Started

Section
Description

Cargo setup, git dependencies, and feature flags

Signed and unsigned provider types

Provider Reference

Section
Description

Full-featured provider with wallet, encryption, and response decryption

Read-only provider for public operations

TEE key exchange, ECDH, AES-GCM calldata encryption

By Task

By Component

Features

  • Shielded Transactions -- Encrypt calldata with TEE public key via AES-GCM

  • Signed Reads -- Prove identity in eth_call with seismic_call()

  • Two Provider Types -- SeismicSignedProvider (full capabilities) and SeismicUnsignedProvider (read-only)

  • Automatic Encryption Pipeline -- Filler chain handles encryption transparently

  • Type 0x4A Transactions -- Native support for Seismic transaction type

  • Full Alloy Compatibility -- All standard Alloy Provider methods work unchanged

Architecture

The SDK extends Alloy's provider model with a filler pipeline that automatically handles Seismic-specific transaction fields and encryption:

Network Types

The SDK defines two network configurations:

Network
Type
Description

SeismicReth

Production

Seismic devnet/testnet/mainnet

SeismicFoundry

Development

Local Seismic Foundry (sfoundry) instances

Both implement the SeismicNetwork trait and can be used as the generic parameter N in provider types.

Guides & Examples

Section
Description

Step-by-step tutorials for shielded writes and reads

Encrypted transaction lifecycle and security parameters

Encrypted eth_call with identity proof

Complete, runnable code examples

Provider creation and connection verification

Full lifecycle: deploy, write, read, inspect receipt

Comparing encrypted and transparent reads

Deploy, verify, interact, and subscribe to events

Next Steps

  1. Install seismic-alloy -- Add the crate to your project

  2. Create a signed provider -- Connect with full capabilities

  3. Understand encryption -- Learn how calldata encryption works

  4. Explore unsigned providers -- Read-only access

  5. Follow a guide -- Step-by-step shielded write or signed read tutorial

  6. Run an example -- Complete, runnable code examples

Last updated