MoonKey embedded wallets use distributed key sharding to ensure only the rightful owner can control their wallet or access its keys. Neither MoonKey nor your application ever sees the user’s complete private key.
Embedded wallets
MoonKey’s embedded wallet system lets you build self-custodial wallets directly into your app. Users get a seamless blockchain experience without the technical complexity of traditional wallet management.How it works
When a user authenticates with your app, MoonKey can automatically create an embedded wallet for them based on your configuration. The wallet’s private key is securely sharded across multiple locations using distributed key management, ensuring that:- Users maintain full custody - Only the user can access their complete private key
- No seed phrase management - Users don’t need to write down or remember recovery phrases
- Seamless experience - Wallets work instantly without any setup
- Maximum portability - Users can export their private key at any time
Key features
Multi-chain Support
Create and manage wallets on Ethereum, Solana, and all EVM/SVM-compatible chains including Base, Polygon, Arbitrum, and more.
Self-custodial
Users have complete control over their wallets. Private keys are securely sharded and only reconstituted for signing operations.
Automatic Creation
Configure wallets to be created automatically when users log in, or create them manually when needed.
Easy Transactions
Simple APIs for sending transactions, signing messages, and interacting with smart contracts.
Export Keys
Users can export their private keys to use their wallet in other applications like MetaMask or Phantom.
UI Components
Pre-built UI components for signing, transactions, and key export with full customization options.
User wallets
MoonKey specializes in creating self-custodial embedded wallets for your users. This means users have a blockchain wallet experience that feels native to your application.Benefits for users
No technical complexity- No seed phrases to write down or store
- No browser extensions to install
- No separate apps to download
- Seamless authentication and wallet access
- Complete control over their assets
- Ability to export private keys
- Freedom to move to other wallets
- Self-custodial by default
- Wallets created in seconds
- No blockchain knowledge required
- Start transacting immediately
- Familiar login methods (email, OAuth)
Benefits for developers
Simple integration- Easy-to-use React SDK
- Pre-built UI components
- Comprehensive REST API
- TypeScript support
- Automatic or manual wallet creation
- Customizable UI components
- Multiple authentication methods
- Support for multiple chains
- Secure key management
- High uptime and reliability
- Transaction broadcasting
- Error handling
Wallet creation
MoonKey offers two approaches to wallet creation:Automatic wallet creation
Configure MoonKey to automatically create wallets when users authenticate:- Your app requires all users to have a wallet
- You want the simplest onboarding experience
- Users will interact with blockchain features immediately
Manual wallet creation
Create wallets programmatically when needed:- Not all users need a wallet
- Users opt-in to blockchain features
- You want to delay wallet creation for UX reasons
Multi-chain support
MoonKey wallets work across multiple blockchain ecosystems:Ethereum and EVM chains
Create wallets compatible with:- Ethereum - Mainnet and testnets
- Layer 2s - Base, Arbitrum, Optimism, Polygon
- Sidechains - Polygon, Gnosis Chain, and more
- Custom EVMs - Any EVM-compatible network
Solana and SVM chains
Create wallets compatible with:- Solana - Mainnet, Devnet, Testnet
- Custom SVM - SVM-compatible networks
Wallet operations
MoonKey provides simple APIs for common wallet operations:Sign messages
Sign arbitrary messages for authentication or verification:Sign transactions
Sign transactions without broadcasting them:Send transactions
Sign and broadcast transactions in one step:Export private key
Allow users to export their private key:UI components
MoonKey provides pre-built UI components for all wallet operations:Sign Message
Message signing interface
Sign Transaction
Transaction signing UI
Send Transaction
Transaction sending interface
Export Key
Private key export UI
Headless wallet operations
For complete control over your UI, use MoonKey’s headless wallet operations. Build custom interfaces while MoonKey handles the security and blockchain complexity. Learn more about whitelabel wallet operations.Security and custody
MoonKey wallets are designed with security as the top priority:Distributed key sharding
Private keys are split into multiple shards that are distributed across different secure locations. The complete key is only reconstituted in a secure environment when needed for signing operations. Benefits:- No single point of failure
- Neither MoonKey nor your app sees complete keys
- Users maintain full custody
- Resistant to common attack vectors
User control
Users have complete control over their wallets:- Self-custodial - Users own their keys, not MoonKey or your app
- Exportable - Users can export private keys at any time
- Portable - Use exported keys in any compatible wallet
- No lock-in - Users can leave your platform with their assets
Secure operations
All wallet operations follow security best practices:- Transaction signing - Performed in secure environments
- Key storage - Encrypted and sharded across locations
- API authentication - Secure session tokens and API keys
- User confirmation - Clear UI for approving operations
Common use cases
Gaming
Create wallets for gamers to own in-game assets:- Automatically create wallets on signup
- Seamless NFT minting and trading
- In-game token transactions
- Cross-game asset portability
DeFi applications
Enable users to interact with DeFi protocols:- Swap tokens
- Provide liquidity
- Stake assets
- Yield farming
NFT marketplaces
Let users buy, sell, and trade NFTs:- Mint NFTs directly in your app
- List items for sale
- Make offers and bids
- Transfer NFTs between wallets
Social applications
Add blockchain features to social apps:- Token-gated communities
- Reward systems
- Tipping and micropayments
- Proof of ownership
E-commerce
Accept crypto payments seamlessly:- Checkout with crypto
- Issue refunds
- Loyalty tokens
- Gift cards and vouchers
REST API
For server-side wallet management, MoonKey provides a comprehensive REST API:Comparison with external wallets
| Feature | MoonKey Embedded Wallets | External Wallets (MetaMask, Phantom) |
|---|---|---|
| Setup | Automatic, no installation | Requires browser extension or app |
| User experience | Seamless, built into your app | Separate popup/app |
| Custody | Self-custodial by user | Self-custodial by user |
| Seed phrases | Optional (can export key) | Required for user to manage |
| Onboarding | Instant, with email/OAuth | Must have wallet already |
| UX control | Full control over UI | Limited customization |
| Cross-device | Works anywhere user logs in | Requires extension on each device |
Best practices
Choose the right creation strategy
Choose the right creation strategy
- Use automatic creation for apps where all users need wallets
- Use manual creation for apps with optional blockchain features
- Consider user onboarding flow and experience
Communicate wallet ownership
Communicate wallet ownership
- Clearly explain that users own their wallets
- Show how to export private keys
- Explain what self-custodial means
- Provide wallet security education
Handle errors gracefully
Handle errors gracefully
- Show clear error messages for failed transactions
- Explain insufficient balance errors
- Guide users on how to fund wallets
- Provide transaction status updates
Test on testnets first
Test on testnets first
- Use Sepolia (Ethereum) or Devnet (Solana) for development
- Test all transaction flows thoroughly
- Verify gas estimation and fees
- Check error handling scenarios
Optimize for mobile
Optimize for mobile
- Test wallet operations on mobile devices
- Ensure UI is responsive
- Consider mobile network speeds
- Provide mobile-friendly interfaces
Get started
Installation
Install the MoonKey React SDK
Setup
Configure MoonKey in your app
Quickstart
Build your first wallet integration
Automatic Wallet Creation
Configure automatic wallet creation
UI Components
Use pre-built wallet UI components
REST API
Manage wallets from your backend