Sei Global Wallet
Sei Global Wallet is a cross-application embedded crypto wallet powered by Dynamic Global Wallets . It gives users a persistent wallet experience across any integrated app within the Sei ecosystem, allowing them to authenticate and interact using familiar login methods like Google, Twitter, or Telegram—no browser extension or prior crypto knowledge required.
[Additional auth methods such as existing wallet apps (Metamask, ..) are possible through Dynamic, but are not currently enabled]
EIP-6963
EIP-6963 standardizes wallet discovery, authentication, and transaction signing for embedded wallets. It allows for seamless interaction with all wallet applications that meet the standard without any input from the app developer themselves..
Integration is as lightweight as possible. Using EIP-6963-compatible libraries such as RainbowKit, WalletConnectKit, or Dynamic, setup requires only a few lines of code. Simply import the wallet package and wrap your provider stack appropriately.
Integrating
Benefits for Developers
- Simplified Integration: Works with any EIP-6963 compatible wallet library
- No additional configuration: Environment ID and other settings are pre-configured
- Flexible implementation: Compatible with RainbowKit, ConnectKit, Dynamic, and web3-react
- Standardized interface: Uses the same provider patterns developers are familiar with
Benefits for Users
- Persistent wallet: Same key+address across all Sei ecosystem applications
- No browser extension: Built-in wallet requires no installation
- Self-custodial: Users maintain full control of their keys
- Familiar authentication: Login with existing social accounts (Google, X, Telegram)
- Secure interactions: Popup-based signing for all transactions
Installation
- Install Sei Global Wallet Package
yarn add @sei-js/sei-global-wallet
or
npm install @sei-js/sei-global-wallet
- Importing Sei Global Wallet Import the package to register the wallet:
import "@sei-js/sei-global-wallet/eip6963";
Important: Simply importing the package registers the wallet for discovery, but you’ll need to ensure your application’s provider stack is properly configured to interact with it. Most wallet connection libraries that support EIP-6963 will automatically detect the wallet after import.
Integration Examples
Below are integration examples for different frameworks and wallet provider libraries. Each example demonstrates how to properly integrate the pre-configured Sei Global Wallet package.
Dynamic (Next.js)
Note: In this example with Next.js app router, the wallet implementation is imported at the layout level while the provider wrapping happens inside a client component.
"use client";
import "./globals.css";
import { Inter } from "next/font/google";
import Providers from "@/lib/providers";
const inter = Inter({ subsets: ["latin"] });
// Import the global wallet implementation
import '@sei-js/sei-global-wallet/eip6963';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>
{/* The Providers component contains the Dynamic context provider setup */}
<Providers>{children}</Providers>
</body>
</html>
);
}
For reference, a simplified version of what your Providers
component might look like:
"use client";
import { DynamicContextProvider } from "@dynamic-labs/sdk-react-core";
import { ReactNode } from "react";
export default function Providers({ children }: { children: ReactNode }) {
return (
<DynamicContextProvider
settings={{
// All Dynamic settings are pre-configured in the Sei Global Wallet
// You don't need to specify environmentId or other Dynamic-specific settings
}}
>
{children}
</DynamicContextProvider>
);
}
Wagmi with Dynamic
// Import required dependencies
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { http, WagmiProvider, createConfig } from 'wagmi';
import { sei, seiTestnet } from 'viem/chains';
// Import Dynamic-specific components
import { DynamicContextProvider } from '@dynamic-labs/sdk-react-core';
import { DynamicWagmiConnector } from '@dynamic-labs/wagmi-connector';
// Import the Sei Global Wallet implementation
import '@sei-js/sei-global-wallet/eip6963';
// Create query client for React Query
const queryClient = new QueryClient();
function Web3Provider({ children }) {
// Create Wagmi configuration
const config = createConfig({
chains: [sei, seiTestnet],
transports: {
[sei.id]: http(),
[seiTestnet.id]: http(),
},
});
return (
// Step 1: Wrap with DynamicContextProvider
<DynamicContextProvider
settings={{
// No need to specify environmentId - this is pre-configured in the Sei Global Wallet
}}
>
{/* Step 2: Add Wagmi provider */}
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
{/* Step 3: Connect Dynamic to Wagmi */}
<DynamicWagmiConnector>
{children}
</DynamicWagmiConnector>
</QueryClientProvider>
</WagmiProvider>
</DynamicContextProvider>
);
}
export default Web3Provider;
Explanation:
- Simply importing
@sei-js/sei-global-wallet/eip6963
registers the wallet for discovery - The correct provider nesting is crucial: Dynamic → Wagmi → QueryClient → DynamicWagmiConnector
- This pattern works for both new projects and existing Wagmi applications
ConnectKit
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import { WagmiProvider, createConfig, http } from "wagmi";
import { sei, seiTestnet } from "wagmi/chains";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import {
ConnectKitButton,
ConnectKitProvider,
getDefaultConfig,
} from "connectkit";
// Import the Sei Global Wallet for EIP-6963 discovery
import "@sei-js/sei-global-wallet/eip6963";
// Configure Wagmi with ConnectKit
const config = createConfig(
getDefaultConfig({
chains: [sei, seiTestnet],
transports: {
[sei.id]: http(),
[seiTestnet.id]: http(),
},
walletConnectProjectId: "YOUR_PROJECT_ID", // Required for WalletConnect
appName: "Your App Name",
})
);
const queryClient = new QueryClient();
export const Web3Provider = ({ children }) => {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<ConnectKitProvider>
{children}
</ConnectKitProvider>
</QueryClientProvider>
</WagmiProvider>
);
};
createRoot(document.getElementById("root")).render(
<StrictMode>
<Web3Provider>
<ConnectKitButton />
</Web3Provider>
</StrictMode>
);
Key points:
- Just importing
@sei-js/sei-global-wallet/eip6963
makes the wallet discoverable - No additional configuration needed for the wallet itself
- The Sei Global Wallet will appear in the ConnectKit modal alongside other wallets
RainbowKit
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import "@rainbow-me/rainbowkit/styles.css";
import {
ConnectButton,
getDefaultConfig,
RainbowKitProvider,
} from "@rainbow-me/rainbowkit";
import { WagmiProvider } from "wagmi";
import { sei, seiTestnet } from "wagmi/chains";
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
// Import the Sei Global Wallet for EIP-6963 discovery
import "@sei-js/sei-global-wallet/eip6963";
const queryClient = new QueryClient();
// Configure RainbowKit with Wagmi
const config = getDefaultConfig({
appName: "My RainbowKit App",
projectId: "YOUR_PROJECT_ID", // Required for WalletConnect
chains: [sei, seiTestnet],
ssr: true, // Set to false if not using server-side rendering
});
createRoot(document.getElementById("root")).render(
<StrictMode>
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<RainbowKitProvider>
<ConnectButton />
</RainbowKitProvider>
</QueryClientProvider>
</WagmiProvider>
</StrictMode>
);
Key points:
- Importing the Sei Global Wallet package registers it with the browser via EIP-6963
- RainbowKit will automatically detect and display the wallet in its interface
- No custom wallet configuration is needed
web3‑react (hook‑based)
// Register the Sei Global Wallet under EIP‑6963 discovery
import '@sei-js/sei-global-wallet/eip6963'
import React, { useEffect } from 'react'
import { Web3ReactProvider, useWeb3React } from '@web3-react/core'
import { EIP1193Connector } from '@web3-react/eip1193'
import { Web3Provider as EthersProvider } from '@ethersproject/providers'
// Create a connector that auto‑discovers EIP‑6963 providers
const eip6963 = new EIP1193Connector()
// Wrap your app in Web3ReactProvider, supplying an ethers.js getLibrary fn
function getLibrary(provider: any): EthersProvider {
return new EthersProvider(provider)
}
function InnerApp() {
const { activate, active, account, library, error } = useWeb3React()
// Auto‑connect on mount
useEffect(() => {
activate(eip6963).catch((err) => {
console.error('Failed to connect Sei Global Wallet', err)
})
}, [activate])
if (error) {
return <div style={{ color: 'red' }}>Error: {error.message}</div>
}
if (!active) {
return <div>Connecting to Sei Global Wallet…</div>
}
return (
<div>
<h2>✅ Connected!</h2>
<p>Account: <code>{account}</code></p>
<p>Chain ID: <code>{library?.network?.chainId}</code></p>
</div>
)
}
export default function App() {
return (
<Web3ReactProvider getLibrary={getLibrary}>
<InnerApp />
</Web3ReactProvider>
)
}
Explanation:
- Global‑wallet shim: Importing
@sei-js/sei-global-wallet/eip6963
registers the wallet under the standard EIP‑6963 discovery events. - EIP‑1193 connector:
@web3-react/eip1193
listens for those events and exposes any injected providers viaactivate(connector)
. - Hook‑based flow: Wrapping in
Web3ReactProvider
and callingactivate(eip6963)
on mount gives you a familiar hook API (useWeb3React
) and anethers.js
provider.
Sei Global Wallet as an Exclusive option
const seiConnector = new EIP1193Connector({
getProvider: () => {
const all = (window as any).eip6963Providers as Array<{
info: { name: string }
provider: any
}>
const found = all.find((d) => d.info.name === 'Sei Global Wallet')
if (!found) throw new Error('Sei Global Wallet not found')
return found.provider
},
})
// then: activate(seiConnector)