Viem is an Ethereum client library which can be used with MetaMask or TAILWIND.
Download TAILWIND extension
Download TAILWIND wallet adapter
yarn add @tailwindzone/connect
Copy Viem chain information for sei
import { defineChain } from "viem" const seimainnet = defineChain({ id: 1329, name: 'Sei Mainnet', nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 }, rpcUrls: { default: { http: ['https://evm-rpc.sei-apis.com'], }, }, })
Use TAILWIND as an Ethereum Provider
import { connect } from "@tailwindzone/connect"; import { createWalletClient, custom, parseEther } from "viem"; const onSignClick = async () => { // fetches provider from `window.tailwind` const tailwind = await connect(); // Use tailwind as provider, just like window.ethereum for MetaMask const client = createWalletClient({ chain: seimainnet, transport: custom(tailwind) }) // Address of Tailwind wallet you created const [address] = await client.requestAddresses(); const hash = await client.sendTransaction({ account: address, to: RECEIVING_SEI_EVM_ADDRESS, value: parseEther('0.001') }) // display hash in UI or console }
Done!