Skip to main content

Documentation Index

Fetch the complete documentation index at: https://seilabs-docs-evm-reference-and-sei-js-examples.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

@sei-js is the complete TypeScript SDK for building applications on Sei Network. Whether you’re creating DeFi protocols, NFT marketplaces, or blockchain games, @sei-js provides everything you need to ship faster. Works with your favorite tools: Sei is fully EVM-compatible, so you can use Viem, Ethers.js, Foundry, Hardhat, and all your existing Ethereum development tools without any changes. @sei-js extends these tools with Sei-specific features like precompiled contracts and optimized wallet connections.
@sei-js is open source. Contribute at github.com/sei-protocol/sei-js.

Why @sei-js?

  • Complete TypeScript support — Full type safety for every function, contract interaction, and API response. Catch errors at compile time.
  • Production ready — Battle-tested components used by major applications in the Sei ecosystem.
  • Optimized for Sei — Take advantage of Sei’s fast finality, low gas fees, and native features.

Package Ecosystem

@sei-js/precompiles

Access Sei’s precompiled contracts directly from your EVM applications. Interact with native blockchain functions for staking, governance, and more.
npm install @sei-js/precompiles

@sei-js/create-sei

Bootstrap new Sei projects with pre-configured templates and tooling. Scaffold production-ready dApps in seconds.
npx @sei-js/create-sei app

@sei-js/sei-global-wallet

Connect to any Sei-compatible wallet using the EIP-6963 standard. Provides a cross-application embedded wallet experience with social login.
npm install @sei-js/sei-global-wallet

@sei-js/ledger

Secure transaction signing with Ledger hardware wallets. Provides TypeScript helper functions for address derivation and offline Amino signing via the SEI Ledger app.
npm install @sei-js/ledger

@sei-js/registry

Chain constants, RPC endpoints, token metadata, gas parameters, and wallet info — a typed reference for Sei network configuration.
npm install @sei-js/registry

@sei-js/mcp-server

Teach Claude, Cursor, Windsurf, or any LLM to interact with the Sei blockchain through the Model Context Protocol.
npx @sei-js/mcp-server

Quick Start

Generate a new Sei application using the CLI tool:
npx @sei-js/create-sei app
cd app
npm install
npm run dev
This creates a production-ready project with TypeScript, wallet connections, and Sei network integration out of the box. See the Scaffold Sei page for details on available templates and options.

Examples

End-to-end code examples using viem and ethers with Sei:

viem Quickstart

Read chain data, send transactions, and interact with contracts in a Node.js script or backend.

ethers v6 Quickstart

The same patterns using ethers v6, including browser provider and event listening.

Wagmi + React

Connect wallets, read balances, and write contracts in a React app using Wagmi hooks.

ERC-20 Interaction

Read metadata, check balances, transfer tokens, approve spenders, and query transfer history.

ERC-721 Interaction

Check ownership, transfer NFTs, manage approvals, and watch transfer events.

ERC-1155 Interaction

Batch balance queries, single and batch transfers, operator approvals, and event watching.

Multicall

Batch multiple contract reads into a single RPC call with Multicall3 and viem/ethers/wagmi.

Pointer Contracts

Look up CW20/CW721/native pointer addresses and interact with CosmWasm tokens via ERC interfaces.

Sei Precompiles

Native balances, staking, rewards, and governance voting from JavaScript.

Deploy and Verify

Deploy contracts with viem, ethers, Foundry, or Hardhat and verify on Seiscan via Sourcify.

Transaction Lifecycle

Send transactions, wait for receipts, and decode event logs.

Error Handling

Decode reverts, handle wallet rejections, and retry transient RPC failures.

Community & Support