atomseismic-react

React hooks and providers for Seismic, composing with wagmi to add shielded wallet management, encrypted transactions, and signed reads to React apps.

React SDK (v1.1.1) for Seismicarrow-up-right, built on wagmiarrow-up-right 2.0+ and viemarrow-up-right 2.x. Provides ShieldedWalletProvider context and hooks for encrypted transactions and signed reads in React applications.

npm install seismic-react

Quick Start

Minimal setup with RainbowKit:

import { WagmiProvider } from 'wagmi'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { RainbowKitProvider, getDefaultConfig } from '@rainbow-me/rainbowkit'
import { ShieldedWalletProvider } from 'seismic-react'
import { seismicTestnet } from 'seismic-react/rainbowkit'

const config = getDefaultConfig({
  appName: 'My Seismic App',
  projectId: 'YOUR_WALLETCONNECT_PROJECT_ID',
  chains: [seismicTestnet],
})

const queryClient = new QueryClient()

function App() {
  return (
    <WagmiProvider config={config}>
      <QueryClientProvider client={queryClient}>
        <RainbowKitProvider>
          <ShieldedWalletProvider config={config}>
            <YourApp />
          </ShieldedWalletProvider>
        </RainbowKitProvider>
      </QueryClientProvider>
    </WagmiProvider>
  )
}

Architecture

The SDK wraps wagmi's connector layer to inject Seismic's shielded wallet and public clients:

Documentation Navigation

Getting Started

Section
Description

Package setup, peer dependencies, and configuration

React context provider for shielded clients

Hooks Reference

Section
Description

Summary of all available hooks

Access shielded wallet and public clients

Create a contract instance with ABI binding

Send encrypted write transactions

Perform signed, encrypted read calls

Wallet Guides

Section
Description

Connecting different wallet providers

Setup with RainbowKit wallet UI

Embedded wallets with Privy

WalletConnect AppKit integration

By Task

By Component

Features

  • Shielded Transactions -- Encrypt calldata before sending via useShieldedWriteContract

  • Signed Reads -- Prove caller identity in eth_call with useSignedReadContract

  • Contract Abstraction -- ABI-bound contract instances via useShieldedContract

  • wagmi/RainbowKit Integration -- Drop-in provider that composes with the standard wagmi stack

  • TypeScript Support -- Full type inference from contract ABIs

Next Steps

  1. Install seismic-react -- Add the package and peer dependencies

  2. Set up ShieldedWalletProvider -- Wrap your app with the provider

  3. Connect a wallet -- Choose a wallet integration

  4. Use hooks -- Read and write shielded contract state

Last updated