Skip to main content

Installation

Install the Mina SDK using your preferred package manager.

Package Managers

Peer Dependencies

The SDK requires viem as a peer dependency for Ethereum interactions:

React Integration

If you plan to use the React hooks, you also need React 18 or higher:

TypeScript Support

The SDK is written in TypeScript and includes type definitions. No additional @types packages are required. Ensure your tsconfig.json includes:
tsconfig.json

Import Paths

The SDK provides two entry points:

Bundle Formats

The SDK ships with both ESM and CommonJS bundles:

Verifying Installation

Create a simple test file to verify the SDK is installed correctly:
test.ts
Run with:
You should see output like:

Framework-Specific Setup

The SDK works with Next.js App Router and Pages Router. For server components, use the SDK in client components only:

Troubleshooting

Ensure you have installed the peer dependency viem:
Update your tsconfig.json to use moduleResolution: "bundler" or "node16".
Import from the /react subpath:

Next Steps

Now that the SDK is installed, proceed to the Quick Start guide to execute your first bridge transaction.