Skip to content

Installation

npm
npm i viem seismic-viem seismic-react @privy-io/wagmi @privy-io/react-auth @tanstack/react-query

Usage

Component.tsx
import React from 'react'
import { useShieldedWallet } from 'seismic-react'
 
export const Component: React.FC = () => {
  const { loaded, publicClient, walletClient } = useShieldedWallet()
 
  const sendMoney = async () => {
    if (!loaded || !publicClient || !walletClient) return
    const hash = await walletClient.sendTransaction({
      to: '0x1234567890123456789012345678901234567890',
      value: parseEther('1'),
    })
    const receipt = await publicClient.waitForTransactionReceipt({ hash })
    console.log(receipt)
  }
 
  return <button onClick={sendMoney}>Send Money</button>
}