Sei Account
Sei Account is powered by Dynamic Global Wallets that enables smooth user onboarding by providing embedded wallet that does not require installation of any additional wallet add-ons.
Integration into existing dApp requires few lines of code and will work seamlessly across all dApps, provided dApp uses EIP-6963-compatible wallets or libraries like RainbowKit, WalletConnect, Dynamic itself and others.
EIP-6963
EIP-6963 is a standardized communication protocol for embedded wallets, enabling seamless cross-application interoperability in the web3 ecosystem. It defines a common API for:
- Wallet Discovery & Pairing: Allowing decentralized applications (dApps) to locate and securely connect with embedded wallets.
- Authentication & Session Management: Facilitating unified login experiences and secure authentication across multiple apps.
- Transaction Signing: Providing a consistent method for users to sign transactions through their embedded wallets.
Installation
1.Install Sei Account Package
yarn add @sei-js/sei-account
or
npm install @sei-js/sei-account
2.Importing the Sei Account To use this wallet with any wallet provider that supports the EIP-6963 standard, you need to import the wallet package in your project.
import "@sei-js/sei-account/eip6963";
For example, if you are using the Dynamic library, you can import the Sei Account package as follows:
import { DynamicContextProvider } from "@dynamic-labs/sdk-react-core";
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
import { DynamicWagmiConnector } from "@dynamic-labs/wagmi-connector";
import { createConfig, WagmiProvider } from "wagmi";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { http } from "viem";
import { sei, seiTestnet } from "viem/chains";
import Main from "./Main";
import '@sei-js/sei-account/eip6963';
const config = createConfig({
chains: [sei, seiTestnet],
multiInjectedProviderDiscovery: false,
transports: {
[sei.id]: http(),
[seiTestnet.id]: http(),
},
});
const queryClient = new QueryClient();
const App = () => (
<DynamicContextProvider
theme="auto"
settings={{
environmentId: "<Yor Dynamic Environment ID>",
walletConnectors: [EthereumWalletConnectors],
}}
>
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<DynamicWagmiConnector>
<Main />
</DynamicWagmiConnector>
</QueryClientProvider>
</WagmiProvider>
</DynamicContextProvider>
);
export default App;
3.Use Sei Account Your Sei Account is now ready to use within the project.