diff --git a/docs/gitbook/claude-code/templates/seismic-react.md b/docs/gitbook/claude-code/templates/seismic-react.md
index 0a0b0f6b..1f9c3b8e 100644
--- a/docs/gitbook/claude-code/templates/seismic-react.md
+++ b/docs/gitbook/claude-code/templates/seismic-react.md
@@ -1,217 +1,296 @@
----
-description: CLAUDE.md template for React frontend development with seismic-react
-icon: react
----
+# Template: Seismic React Client
-# Seismic React
+Generate a complete React application with Seismic's shielded contract hooks for private blockchain interactions.
-Use this template when your project uses `seismic-react` to build React frontends that interact with Seismic contracts. This SDK wraps `seismic-viem` with React hooks and providers, and integrates with wallet connectors like RainbowKit, Privy, and AppKit.
+## Overview
-## The template
+This template creates a React app that:
+1. Connects to Seismic Testnet via ShieldedWalletProvider
+2. Reads public and shielded contract state
+3. Writes public and shielded transactions
+4. Handles wallet connection and transaction status
-Copy the entire block below and save it as `CLAUDE.md` in your project root.
+## Prerequisites
-````markdown
-# [Your Project Name]
+- Node.js 18+
+- MetaMask or compatible wallet
+- Seismic Testnet configured in wallet
-## Seismic Overview
+## Template Prompt
-Seismic is an EVM-compatible L1 with on-chain privacy. Nodes run inside TEEs (Intel TDX). The Solidity compiler adds shielded types (`suint256`, `saddress`, `sbool`) that are invisible outside the TEE. Client libraries handle transaction encryption and signed reads automatically.
-
-## Key Concepts
-
-- **Shielded types**: `suint256`, `saddress`, `sbool` — on-chain private state, only readable via signed reads
-- **TxSeismic (type 0x4A)**: Encrypts calldata before broadcast. The SDK handles this automatically.
-- **Signed reads**: `eth_call` zeroes `msg.sender` on Seismic. Hooks like `useShieldedRead` handle this.
-- **Encryption pubkeys**: 33-byte compressed secp256k1 keys. The provider fetches and manages these.
-- **Legacy gas**: Seismic transactions use `gas_price` + `gas_limit`, NOT EIP-1559.
-
-## SDK: seismic-react
-
-### Install
-
-```bash
-npm install seismic-react
-# or
-bun add seismic-react
+```
+Create a React application for interacting with Seismic shielded contracts.
+
+Requirements:
+1. Use Vite + React + TypeScript
+2. Install and configure @seismic-systems/seismic-react and wagmi
+3. Wrap the app with ShieldedWalletProvider (chain: seismicDevnet)
+4. Show connection status and wallet address
+5. Include examples for:
+ - Public reads via wagmi's useReadContract
+ - Shielded reads via useShieldedContract().read
+ - Public writes via wagmi's useWriteContract
+ - Shielded writes via useShieldedWriteContract
+6. Display transaction hashes and status
+7. Handle loading and error states
+8. Clean, modern UI with Tailwind CSS
+
+Contract ABI (example Counter):
+[
+ {
+ "type": "function",
+ "name": "getNumber",
+ "inputs": [],
+ "outputs": [{"name": "", "type": "uint256"}],
+ "stateMutability": "view"
+ },
+ {
+ "type": "function",
+ "name": "getShieldedNumber",
+ "inputs": [],
+ "outputs": [{"name": "", "type": "suint256"}],
+ "stateMutability": "view"
+ },
+ {
+ "type": "function",
+ "name": "setNumber",
+ "inputs": [{"name": "newNumber", "type": "uint256"}],
+ "outputs": [],
+ "stateMutability": "nonpayable"
+ },
+ {
+ "type": "function",
+ "name": "setShieldedNumber",
+ "inputs": [{"name": "newNumber", "type": "suint256"}],
+ "outputs": [],
+ "stateMutability": "nonpayable"
+ }
+]
+
+Contract address: [USER_PROVIDES_ADDRESS]
```
-### Key exports
+## Expected Output Structure
-```typescript
-import {
- ShieldedWalletProvider,
- useShieldedWallet,
- useShieldedContract,
- useShieldedRead,
- useShieldedWrite,
-} from "seismic-react";
+```
+seismic-react-app/
+├── package.json
+├── vite.config.ts
+├── tsconfig.json
+├── index.html
+├── src/
+│ ├── main.tsx
+│ ├── App.tsx
+│ ├── vite-env.d.ts
+│ ├── config/
+│ │ └── wagmi.ts
+│ ├── contracts/
+│ │ └── abi.ts
+│ └── components/
+│ ├── ConnectWallet.tsx
+│ ├── PublicCounter.tsx
+│ └── ShieldedCounter.tsx
+└── README.md
```
-## Core Patterns
+## Key Code Patterns
-### Wrap your app with ShieldedWalletProvider
+### Wagmi + Seismic Provider Setup
-```tsx
-import { ShieldedWalletProvider } from "seismic-react";
-
-function App() {
- return (
-
Connect your wallet
; - returnConnected: {address}
; -} +```typescript +// src/contracts/abi.ts +export const COUNTER_ADDRESS = '0x...' as const // user-provided + +export const counterAbi = [ + { + type: 'function', + name: 'getNumber', + inputs: [], + outputs: [{ name: '', type: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getShieldedNumber', + inputs: [], + outputs: [{ name: '', type: 'suint256' }], + stateMutability: 'view', + }, + { + type: 'function', + name: 'setNumber', + inputs: [{ name: 'newNumber', type: 'uint256' }], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setShieldedNumber', + inputs: [{ name: 'newNumber', type: 'suint256' }], + outputs: [], + stateMutability: 'nonpayable', + }, +] as const ``` -### Create a shielded contract instance +### Public Reads and Writes (wagmi) ```tsx -import { useShieldedContract } from "seismic-react"; - -function MyComponent() { - const contract = useShieldedContract({ - abi: myContractAbi, - address: "0xCONTRACT_ADDRESS", - }); - - // contract.read.* for signed reads - // contract.write.* for shielded writes +import { useReadContract, useWriteContract, useWaitForTransactionReceipt } from 'wagmi' +import { COUNTER_ADDRESS, counterAbi } from '../contracts/abi' + +export function PublicCounter() { + const { data: number, isLoading, error, refetch } = useReadContract({ + address: COUNTER_ADDRESS, + abi: counterAbi, + functionName: 'getNumber', + }) + + const { writeContract, data: hash, isPending, error: writeError } = useWriteContract() + const { isLoading: isConfirming, isSuccess } = useWaitForTransactionReceipt({ hash }) + + const setNumber = (value: bigint) => { + writeContract({ + address: COUNTER_ADDRESS, + abi: counterAbi, + functionName: 'setNumber', + args: [value], + }) + } + + // ...render UI with number, loading/error, setNumber controls, hash/status } ``` -### Read shielded data (signed read) +### Shielded Reads (`useShieldedContract`) + +`useShieldedContract` returns a contract instance. Call shielded view methods through `read`, and check wallet/session status with `isShielded` / `isError`: ```tsx -import { useShieldedRead } from "seismic-react"; - -function BalanceDisplay({ userAddress }: { userAddress: `0x${string}` }) { - const { data: balance, isLoading } = useShieldedRead({ - abi: myContractAbi, - address: "0xCONTRACT_ADDRESS", - functionName: "getBalance", - args: [userAddress], - }); - - if (isLoading) returnLoading...
; - returnBalance: {balance?.toString()}
; -} -``` +import { useShieldedContract } from '@seismic-systems/seismic-react' +import { COUNTER_ADDRESS, counterAbi } from '../contracts/abi' -### Write shielded data (encrypted transaction) +export function ShieldedCounter() { + const { read, isShielded, isError } = useShieldedContract({ + abi: counterAbi, + address: COUNTER_ADDRESS, + }) -```tsx -import { useShieldedWrite } from "seismic-react"; - -function TransferButton() { - const { write, isLoading } = useShieldedWrite({ - abi: myContractAbi, - address: "0xCONTRACT_ADDRESS", - functionName: "transfer", - }); - - return ( - - ); + // Example: read.getShieldedNumber() + // Gate UI on isShielded; surface isError when the shielded session is unavailable } ``` -### Wallet integration: RainbowKit +### Shielded Writes (`useShieldedWriteContract`) + +Pass contract config when creating the hook. The returned `writeContractAsync` only takes the call (`functionName` + `args`): ```tsx -import { RainbowKitProvider } from "@rainbow-me/rainbowkit"; -import { ShieldedWalletProvider } from "seismic-react"; -import { WagmiProvider } from "wagmi"; - -function App() { - return ( -