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:- React Applications
- Vanilla TypeScript/JavaScript
- Server-Side (SSR)
If you’re building a React app with authentication and wallets:
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.Features:
- Create wallets on Solana and 20+ EVM chains
- Check balances and send tokens
- Custom transaction support
- Delegated signers
- Wallet activity tracking
Authentication
@crossmint/client-sdk-auth
Client-side authentication with multiple storage options.Features:
- Browser cookie storage
- React Native secure storage
- Custom storage providers
- Token refresh handling
@crossmint/server-sdk
Server-side authentication for SSR frameworks.Features:
- HttpOnly cookie support
- Next.js integration
- Custom refresh routes
- Session management
React UI Components
@crossmint/client-sdk-react-ui
Complete React SDK with providers, hooks, and UI components.Features:
- Authentication providers and hooks
- Wallet providers and hooks
- Pre-built UI components
- NFT collection views
@crossmint/client-sdk-react-native-ui
React Native SDK with native UI components.Features:
- Native mobile components
- Expo SecureStore support
- React Native Encrypted Storage
- Same API as React UI
Verifiable Credentials
@crossmint/client-sdk-verifiable-credentials
Verifiable credentials for decentralized identity and attestations.Features:
- Issue verifiable credentials
- Verify credentials
- Decentralized identity
- Privacy-preserving attestations
Package Dependencies
Common Peer Dependencies
React Packages
React Packages
The React UI packages require:
Solana Support
Solana Support
For Solana wallet functionality:
React Native Secure Storage
React Native Secure Storage
For React Native with Expo:For vanilla React Native:
Version Compatibility
All Crossmint packages follow semantic versioning. We recommend keeping all packages on the same major version to ensure compatibility.
| Package | Current Version | Node.js | TypeScript |
|---|---|---|---|
| @crossmint/wallets-sdk | 0.19.0 | ≥16 | ≥4.5 |
| @crossmint/server-sdk | 1.2.59 | ≥16 | ≥4.5 |
| @crossmint/client-sdk-auth | 1.2.47 | ≥16 | ≥4.5 |
| @crossmint/client-sdk-react-ui | 2.6.18 | ≥16 | ≥4.5 |
| @crossmint/client-sdk-verifiable-credentials | 3.4.76 | ≥16 | ≥4.5 |
Environment Setup
After installation, you’ll need to configure your environment variables: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!)
Configure API Scopes
In the Crossmint console, ensure your API key has the necessary scopes:
- Wallet API - For wallet operations
- Users - For user authentication
TypeScript Configuration
For optimal TypeScript support, ensure yourtsconfig.json includes:
tsconfig.json
Verification
Verify your installation by importing a package: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
Module not found errors
Module not found errors
If you see module resolution errors:
- Ensure peer dependencies are installed
- Clear your package manager cache:
- Delete
node_modulesand reinstall:
TypeScript errors
TypeScript errors
If you encounter TypeScript errors:
- Ensure TypeScript version is ≥4.5
- Set
skipLibCheck: trueintsconfig.json - Update
moduleResolutionto"bundler"or"node16"
Build errors in Next.js
Build errors in Next.js
For Next.js projects:
- Ensure you’re using “use client” directive for client components
- Configure
transpilePackagesinnext.config.js: