Getting Started

Welcome to the @sei-js contributor community! This guide will help you set up your local development environment and contribute to the project.

Prerequisites

Before you begin, ensure you have:

  • nvm (Node Version Manager)
  • Yarn (4.7.0)

Local Development Setup

1

Fork and Clone

  1. Fork the @sei-js repository on GitHub
  2. Clone your fork locally:
git clone git@github.com:sei-protocol/sei-js.git
cd sei-js

This creates your own copy of the repository that you can modify freely.

2

Use Correct Node.js Version

Switch to the project’s required Node.js version:

nvm use

This will use Node.js v20 as specified in the project’s .nvmrc file.

You should see a message confirming you’re now using the correct Node.js version.

3

Install Dependencies

Install all dependencies and link packages:

yarn install

This installs dependencies for all packages in the monorepo and sets up workspace linking.

4

Build All Packages

Build all packages in the correct order:

yarn build:all

This ensures all packages are built and ready for development.

5

Run Tests

Verify everything is working:

# Run all tests
yarn test:all

# Run tests with coverage report
yarn test:coverage

All tests should pass and you should see coverage reports for each package.

Coverage reports help ensure your changes don’t reduce test coverage. Look for coverage percentages in the output.

6

Run and Verify Docs

Start the documentation server to verify everything is set up correctly:

yarn docs

This will start the documentation server at http://localhost:3000

The documentation should open in your browser and display without errors.

Project Structure

Understanding the monorepo structure will help you navigate and contribute effectively:

sei-js/
├── packages/
│   ├── create-sei/          # CLI scaffolding tool
│   ├── precompiles/         # EVM precompile contracts and integrations
│   ├── ledger/              # Ledger hardware wallet support
│   ├── registry/            # Chain and asset registry
│   ├── sei-global-wallet/   # Global wallet provider
│   └── mcp-server/          # MCP server for AI integration
├── docs/                    # Documentation site
└── ...

Development Workflow

Code Quality and Standards

We use Biome for code formatting and linting. Configure your IDE to use Biome for the best development experience:

# Check your code
yarn biome check

# Auto-fix formatting and linting issues  
yarn biome check --apply

Configure your IDE to use the project’s Biome configuration for automatic formatting and linting as you code.

Running Tests

Run tests to ensure your changes work correctly:

# Run all tests
yarn test:all

# Run tests with coverage report
yarn test:coverage

Always aim for 100% code coverage in your contributions. Add comprehensive tests for any new functionality or bug fixes.

Making Changes

That’s it! You’re ready to start contributing to @sei-js. Make your changes, test them thoroughly with the commands above, and submit your pull request when ready.