grid-2AppKit

Set up AppKit (WalletConnect) with Seismic

AppKit (formerly Web3Modal) by WalletConnect provides a wallet connection modal with support for 300+ wallets. This guide shows how to integrate AppKit with Seismic React.

Prerequisites

npm install @reown/appkit @reown/appkit-adapter-wagmi wagmi viem @tanstack/react-query seismic-react seismic-viem
circle-exclamation

Step 1: Configure wagmi with AppKit

Create a wagmi adapter and initialize AppKit with Seismic chains:

import { createAppKit } from "@reown/appkit/react";
import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
import { seismicTestnet } from "seismic-react/rainbowkit";

const projectId = "YOUR_WALLETCONNECT_PROJECT_ID";

const wagmiAdapter = new WagmiAdapter({
  projectId,
  chains: [seismicTestnet],
  networks: [seismicTestnet],
});

createAppKit({
  adapters: [wagmiAdapter],
  projectId,
  networks: [seismicTestnet],
  metadata: {
    name: "My Seismic App",
    description: "A Seismic-powered dApp",
    url: "https://myapp.com",
    icons: ["https://myapp.com/icon.png"],
  },
});

Step 2: Set Up Providers

Nest the providers with ShieldedWalletProvider inside:

circle-info

AppKit does not require a wrapper provider component like RainbowKit or Privy. The createAppKit call initializes it globally, so ShieldedWalletProvider goes directly inside QueryClientProvider.

Step 3: Add the Connect Button

AppKit provides a web component for the connect button:

circle-info

If you are using TypeScript, you may need to declare the web component type. Add this to a .d.ts file in your project:

Step 4: Use Shielded Hooks

Once connected, use seismic-react hooks to interact with shielded contracts:

Complete Example

See Also

Last updated