For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

Cargo setup, dependencies, and prerequisites for seismic-alloy

Prerequisites

Requirement
Version
Notes

Rust

1.82+

Install via rustup

OpenSSL

System

Required by seismic-enclave for cryptographic operations

Tokio runtime

1.x

Async runtime (most Alloy operations are async)

Add to Cargo.toml

seismic-alloy is a workspace of several crates, not a single crate. Depend on the specific members you need via git (the crates are not yet published to crates.io). For most applications, the short list is:

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

alloy-provider    = "1.1"  # Provider trait (get_block_number, get_balance, ...)
alloy-signer-local = "1.1"  # PrivateKeySigner
alloy-primitives  = "1.1"  # Address, U256, aliases::SUInt, ...

tokio    = { version = "1", features = ["full"] }
reqwest  = "0.12"          # for reqwest::Url in the http connect calls

Required [patch.crates-io] block

seismic-alloy depends on forked crates that are not on crates.io (seismic-enclave, seismic-revm, Seismic's forks of alloy-primitives / alloy-sol-types / alloy-trie). A git dependency does not inherit the parent workspace's patches, so your own Cargo.toml needs this block at the end:

Revs here track the tip of the seismic branch of seismic-alloy. For the authoritative set, copy the [patch.crates-io] block from seismic-alloy's root Cargo.toml.

Pin to a specific revision

For reproducible builds, pin each git dependency to a specific commit:

Workspace Crates

The seismic-alloy workspace contains these crates:

Crate
Description

seismic-alloy-provider

SeismicProviderBuilder, filler pipeline, precompile helpers

seismic-alloy-network

SeismicNetwork trait, SeismicReth, SeismicFoundry network types

seismic-alloy-consensus

Seismic transaction types and consensus logic

seismic-alloy-rpc-types

Seismic-specific RPC request and response types

seismic-alloy-genesis

Genesis configuration types

seismic-prelude

Convenience re-exports (seismic_prelude::client::*) used by most app code

Pull in only the ones you need. Most applications use seismic-prelude, seismic-alloy-network, and seismic-alloy-provider. Add seismic-alloy-consensus if you pattern-match on SeismicReceiptEnvelope or build TxSeismic/TxSeismicElements directly. Add seismic-alloy-rpc-types for SeismicTransactionRequest.

The recommended approach is to use the client prelude, which re-exports the most commonly used types and traits:

This single import provides: SeismicCallExt, ShieldedCallExt, SeismicProviderBuilder, SeismicProviderExt, SignedProviderExt, SeismicSignedProvider, SeismicUnsignedProvider, SeismicWallet, sol, Address, Bytes, FixedBytes, U256, ReceiptResponse, and PrivateKeySigner.

For types not in the prelude (e.g., SeismicReth, SeismicFoundry, Anvil, Filter), add explicit imports alongside the prelude:

The prelude also has seismic_prelude::foundry::* and seismic_prelude::reth::* modules designed for Seismic's internal forks of Foundry and Reth. These re-export Seismic types under upstream naming conventions to minimize merge conflicts. Do not use them in application code — they pull in revm internals and aliases that are confusing outside of the fork context. Use seismic_prelude::client::* instead.

Key Dependencies

seismic-alloy builds on these foundational crates:

Dependency
Version
Purpose

alloy

1.1.0

Core Ethereum toolkit (providers, signers, transports)

alloy-primitives

With "seismic" feature flag enabled

seismic-enclave

0.1.0

TEE key exchange and AES-GCM encryption

tokio

1.x

Async runtime

reqwest

HTTP transport for RPC calls

Minimal Working Example

Create a new project:

Set up Cargo.toml (adding the [patch.crates-io] block shown above):

Write src/main.rs:

Build and run:

Troubleshooting

OpenSSL Not Found

If you see linker errors related to OpenSSL:

Rust Version Too Old

seismic-alloy requires Rust 1.82 or newer:

Git Authentication

If the git dependency fails to fetch, ensure you have SSH or HTTPS access to the repository:

Notes

  • The workspace version is 0.0.1 — the API may change before a stable release

  • The Rust edition is 2021

  • alloy-primitives is used with the "seismic" feature flag, which adds Seismic-specific primitive types

  • All provider operations are async and require a Tokio runtime

See Also

Last updated