For the complete documentation index, see llms.txt. This page is also available as Markdown.
Signed Read Pattern
Authenticated read pattern with encrypted request and response
This example demonstrates the authenticated read pattern: create a signed provider, deploy a contract, write shielded data, read it back with a signed read, and compare with a transparent read to show the difference.
Cargo.toml — see Installation for the full template including the required [patch.crates-io] block:
[package]name="signed-read-pattern"version="0.1.0"edition="2021"rust-version="1.82"[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"alloy-signer-local="1.1"alloy-primitives="1.1"alloy-sol-types="1.1"alloy-network="1.1"tokio={version="1",features=["full"]}reqwest="0.12"# [patch.crates-io] block required — see Installation.
Complete Example
When Results Differ
The example above uses isOdd(), which does not depend on msg.sender. Both reads return the same value. To see a real difference, consider a contract where the view function uses msg.sender: