Skip to main content

React SDK Features

The MoonKey React SDK provides comprehensive authentication and wallet management capabilities for both Ethereum and Solana blockchains. This page outlines all supported features.

Authentication Methods

The React SDK supports multiple authentication methods to accommodate different user preferences and use cases.

Email Authentication

Email OTP (One-Time Password)
  • Passwordless authentication via 6-digit codes
  • 10-minute code expiration
  • Automatic email verification
  • Resend code functionality

Social Authentication (OAuth)

Google OAuth
  • Sign in with Google accounts
  • Requires custom OAuth credentials
  • Automatic email verification
Apple OAuth
  • Sign in with Apple ID
  • Requires custom OAuth credentials
  • Privacy-focused authentication
Additional OAuth providers (Microsoft, Discord, GitHub, etc) are coming soon. Currently, only Google and Apple are supported.

Web3 Wallet Authentication

Sign In With Ethereum (SIWE)
  • EIP-4361 standard authentication
  • Compatible with all EVM wallets (MetaMask, Coinbase Wallet, WalletConnect, etc.)
  • Cryptographic signature verification
Sign In With Solana (SIWS)
  • Solana wallet signature authentication
  • Compatible with Phantom, Solflare, and other Solana wallets
  • Secure message signing

Embedded Wallet Features

MoonKey’s embedded wallets provide self-custodial wallet functionality directly within your application.

Wallet Creation

FeatureEthereumSolana
Automatic wallet creation
Manual wallet creation
Create on login
HD wallet support
Automatic wallet creation options:
  • 'always' — Create wallet for every user on login
  • 'none' — Disable automatic creation

Transaction Signing

FeatureEthereumSolana
Sign messages
Sign transactions
Send transactions
Sign typed data (EIP-712)
Batch transactions

Wallet Operations

FeatureEthereumSolana
Get wallet balance
Get wallet address
Export private key
Multiple wallets per user

Blockchain Support

Ethereum & EVM Chains

The React SDK (@moon-key/react-auth/ethereum) supports:
  • Ethereum Mainnet — Production Ethereum network
  • All EVM-compatible chains — Polygon, Arbitrum, Optimism, Base, BSC, Avalanche, etc.
  • Custom EVM networks — Configure any EVM-compatible chain
  • Testnets — Sepolia, Goerli, Mumbai, and more

Solana

The React SDK (@moon-key/react-auth/solana) supports:
  • Solana Mainnet — Production Solana network
  • Solana Devnet — Development and testing
  • Solana Testnet — Testing environment
  • Custom RPC endpoints — Configure your own Solana nodes

Library Integrations

MoonKey integrates seamlessly with popular blockchain libraries.

Ethereum Libraries

LibrarySupportUsage
ViemRecommended for Ethereum interactions
Ethers.js v6Full support for contract interactions
Ethers.js v5Legacy support
Web3.jsCompatible via standard providers
WagmiWorks with MoonKey wallets

Solana Libraries

LibrarySupportUsage
@solana/web3.jsPrimary Solana SDK

Framework Compatibility

The MoonKey React SDK works across modern React frameworks and build tools.

Supported Frameworks

FrameworkVersionSupport
Create React App5.x✅ Full support
Next.js App Router13.x, 14.x✅ Full support
Next.js Pages Router12.x, 13.x✅ Full support

Build Tools

  • Webpack — Full support with polyfill configurations
  • Turbopack — Native support in Next.js
  • Vite — Optimized builds
  • esbuild — Compatible

Session Management

Persistent sessions — Sessions persist across browser refreshes Session tokens — JWT-based authentication tokens Token refresh — Automatic token renewal Session verification — Server-side session validation Multi-device support — Users can be logged in on multiple devices Session revocation — Logout and session cleanup

User Management

User profiles — Access user data (email, ID, wallet addresses) Linked accounts — Multiple authentication methods per user Account linking — Connect additional auth methods to existing accounts User metadata — Store custom user data

Security Features

Self-custodial wallets — Users maintain full control of their keys Distributed key sharding — Keys never stored in a single location Secure execution environment — Keys only reconstructed during signing HTTPS-only — All communications encrypted JWT verification — Cryptographic token validation CSRF protection — Built-in security measures

UI Components

Pre-built authentication modal — Ready-to-use login UI Customizable appearance — Theme, colors, and branding Responsive design — Mobile and desktop optimized Dark mode support — Light and dark themes Custom logo — Add your brand identity Localization ready — Support for multiple languages (coming soon)

Developer Experience

TypeScript support — Full type definitions included React hooks — Idiomatic React integration Async/await patterns — Modern JavaScript syntax Error handling — Comprehensive error types Loading states — Built-in state management for async operations Developer console — Debug authentication flows

Feature Comparison

Ethereum vs Solana Features

FeatureEthereumSolanaNotes
Email authenticationSame experience
OAuth authenticationSame providers
Wallet authenticationDifferent signature standards
Embedded walletsBoth self-custodial
Send transactionsChain-specific implementations
Sign messagesDifferent message formats
Sign typed dataEIP-712 is Ethereum-only
External walletsDifferent wallet providers

SDK Packages

MoonKey provides blockchain-specific packages for optimal tree-shaking and bundle size:
# For Ethereum/EVM chains
@moon-key/react-auth/ethereum

# For Solana
@moon-key/react-auth/solana
Each package includes only the dependencies needed for that specific blockchain, resulting in smaller bundle sizes.

Browser Compatibility

The MoonKey React SDK is compatible with all modern browsers:
  • Chrome/Edge — Version 90+
  • Firefox — Version 88+
  • Safari — Version 14+
  • Opera — Version 76+
Internet Explorer is not supported. Users on IE will need to use a modern browser.

Questions about features?

Can’t find a feature you’re looking for? Have questions about implementation?
  • Check the Examples for code samples
  • Review the API Reference for detailed endpoint documentation
  • Contact support for feature requests or technical guidance

Migration Notes

If you’re migrating from another auth provider, note that MoonKey focuses on:
  • Blockchain-native authentication — Built specifically for Web3 applications
  • Self-custodial wallets — Users always control their keys
  • Multi-chain from the start — Ethereum and Solana support out of the box
  • Developer-friendly — Simple APIs with powerful customization options
Need help with migration? We’re here to help you transition smoothly.