Skip to main content

Overview

Crossmint SDK is distributed as a collection of npm packages, allowing you to install only what you need for your specific use case. All packages are written in TypeScript and provide full type safety.
Prerequisites: Node.js 16+ and npm, yarn, or pnpm installed on your system.

Quick Install

For most applications, you’ll want to start with one of these core packages:
If you’re building a React app with authentication and wallets:
npm install @crossmint/client-sdk-react-ui
This package includes providers, hooks, and UI components for authentication and wallet management.

All Packages

Here’s a complete list of available Crossmint SDK packages:

Wallets

@crossmint/wallets-sdk

Core wallet functionality for creating and managing multi-chain wallets programmatically.
npm install @crossmint/wallets-sdk
Features:
  • Create wallets on Solana and 20+ EVM chains
  • Check balances and send tokens
  • Custom transaction support
  • Delegated signers
  • Wallet activity tracking
Use when: Building wallet functionality in any JavaScript environment

Authentication

@crossmint/client-sdk-auth

Client-side authentication with multiple storage options.
npm install @crossmint/client-sdk-auth
Features:
  • Browser cookie storage
  • React Native secure storage
  • Custom storage providers
  • Token refresh handling
Use when: Adding authentication to client-side applications

@crossmint/server-sdk

Server-side authentication for SSR frameworks.
npm install @crossmint/server-sdk
Features:
  • HttpOnly cookie support
  • Next.js integration
  • Custom refresh routes
  • Session management
Use when: Building server-rendered applications with authentication

React UI Components

@crossmint/client-sdk-react-ui

Complete React SDK with providers, hooks, and UI components.
npm install @crossmint/client-sdk-react-ui
Features:
  • Authentication providers and hooks
  • Wallet providers and hooks
  • Pre-built UI components
  • NFT collection views
Use when: Building React web applicationsPeer Dependencies:
{
  "react": ">=17.0.2",
  "react-dom": ">=17.0.2",
  "@solana/web3.js": "^1.98.1"
}

@crossmint/client-sdk-react-native-ui

React Native SDK with native UI components.
npm install @crossmint/client-sdk-react-native-ui
Features:
  • Native mobile components
  • Expo SecureStore support
  • React Native Encrypted Storage
  • Same API as React UI
Use when: Building React Native mobile applications

Verifiable Credentials

@crossmint/client-sdk-verifiable-credentials

Verifiable credentials for decentralized identity and attestations.
npm install @crossmint/client-sdk-verifiable-credentials
Features:
  • Issue verifiable credentials
  • Verify credentials
  • Decentralized identity
  • Privacy-preserving attestations
Use when: Building identity or credential verification systems

Package Dependencies

Some packages require peer dependencies to be installed. Make sure to install them based on your package manager’s warnings.

Common Peer Dependencies

The React UI packages require:
{
  "react": ">=17.0.2",
  "react-dom": ">=17.0.2"
}
npm install react react-dom
For Solana wallet functionality:
{
  "@solana/web3.js": "^1.98.1"
}
npm install @solana/web3.js
For React Native with Expo:
npx expo install expo-secure-store
For vanilla React Native:
npm install react-native-encrypted-storage

Version Compatibility

All Crossmint packages follow semantic versioning. We recommend keeping all packages on the same major version to ensure compatibility.
PackageCurrent VersionNode.jsTypeScript
@crossmint/wallets-sdk0.19.0≥16≥4.5
@crossmint/server-sdk1.2.59≥16≥4.5
@crossmint/client-sdk-auth1.2.47≥16≥4.5
@crossmint/client-sdk-react-ui2.6.18≥16≥4.5
@crossmint/client-sdk-verifiable-credentials3.4.76≥16≥4.5

Environment Setup

After installation, you’ll need to configure your environment variables:
1

Get Your API Keys

Sign up for a Crossmint account and navigate to the API Keys page.You’ll need:
  • Client API Key - For client-side applications
  • Server API Key - For server-side applications (keep this secret!)
2

Create Environment File

Create a .env or .env.local file in your project root:
.env
# Client-side key (safe to expose in browser)
NEXT_PUBLIC_CROSSMINT_API_KEY=your_client_api_key

# Server-side key (keep secret!)
SERVER_CROSSMINT_API_KEY=your_server_api_key
Never commit your .env file to version control. Add it to .gitignore.
3

Configure API Scopes

In the Crossmint console, ensure your API key has the necessary scopes:
  • Wallet API - For wallet operations
  • Users - For user authentication
Configure Scopes →

TypeScript Configuration

For optimal TypeScript support, ensure your tsconfig.json includes:
tsconfig.json
{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "lib": ["ES2020", "DOM", "DOM.Iterable"],
    "skipLibCheck": true,
    "esModuleInterop": true
  }
}

Verification

Verify your installation by importing a package:
import { CrossmintProvider } from "@crossmint/client-sdk-react-ui";

console.log("Crossmint SDK loaded successfully!");

Next Steps

Quickstart Guide

Build your first wallet-enabled app in 5 minutes

Wallets SDK Guide

Deep dive into wallet creation and management

Authentication Guide

Set up authentication for your application

React Components

Explore pre-built UI components

Troubleshooting

If you see module resolution errors:
  1. Ensure peer dependencies are installed
  2. Clear your package manager cache:
    npm cache clean --force
    # or
    yarn cache clean
    # or
    pnpm store prune
    
  3. Delete node_modules and reinstall:
    rm -rf node_modules package-lock.json
    npm install
    
If you encounter TypeScript errors:
  1. Ensure TypeScript version is ≥4.5
  2. Set skipLibCheck: true in tsconfig.json
  3. Update moduleResolution to "bundler" or "node16"
For Next.js projects:
  1. Ensure you’re using “use client” directive for client components
  2. Configure transpilePackages in next.config.js:
    module.exports = {
      transpilePackages: ['@crossmint/client-sdk-react-ui'],
    };
    

Build docs developers (and LLMs) love