Kage is a modern, multi-chain wallet generator web app built with Next.js. It allows users to generate, view, and manage wallets for multiple blockchains (currently Solana and Ethereum) with a focus on security, usability, and a beautiful, responsive UI.
- Multi-chain support: Generate wallets for Solana and Ethereum.
- Mnemonic-based wallet generation: Securely generate and restore wallets using BIP39 mnemonics.
- Local-first: All wallet data is stored in your browser's local storage for privacy and security.
- Modern UI: Built with shadcn/ui, framer-motion, and custom theming.
- Dark mode: Seamless light/dark theme switching.
- User-friendly: Copy keys, view/hide private keys, and manage multiple wallets easily.
The core wallet logic is implemented in lib/wallet.ts:
- Mnemonic Generation: Uses
bip39to generate and validate BIP39 mnemonics. - Seed Derivation: Converts the mnemonic to a seed using
mnemonicToSeedSync. - HD Wallet Paths: Supports BIP44 derivation paths for Solana (
m/44'/501'/0'/<account>') and Ethereum (m/44'/60'/0'/<account>'). - Key Derivation:
- Solana: Uses
ed25519-hd-keyandtweetnaclto derive the keypair, then encodes the private key withbs58. - Ethereum: Uses
ethers.jsto create a wallet from the derived private key.
- Solana: Uses
- Wallet Object: Each wallet contains a public key/address, private key, mnemonic, and derivation path.
Example:
const wallet = generateWalletFromMnemonic('501', mnemonic, 0); // Solana
const wallet = generateWalletFromMnemonic('60', mnemonic, 0); // Ethereum- Main Page:
app/page.tsxrenders theNavbarandWalletGeneratorcomponents. - WalletGenerator:
components/wallet-generator.tsxmanages wallet state, mnemonic input, and user actions (generate, add, delete, clear wallets). Uses React state and localStorage for persistence. - Chain Selection:
components/chain-selector.tsxlets users pick Solana or Ethereum before generating wallets. - Mnemonic Display:
components/mnemonic-display.tsxshows the recovery phrase in a secure, user-friendly way. - Wallet Cards:
components/wallet-card.tsxdisplay each wallet's public/private keys, with options to copy, show/hide, or delete. - UI Library: Uses shadcn/ui for consistent, accessible components (buttons, dialogs, inputs, etc.).
- Animations & Feedback: Uses framer-motion for smooth transitions and
sonnerfor toast notifications.
- Tailwind CSS: Utility-first styling with custom theme variables in
app/globals.css. - Dark Mode: Theme toggling via
components/theme-provider.tsxandnext-themes. - Responsive Design: Layout adapts to all screen sizes.
kage/
├── app/
│ ├── globals.css # Tailwind & global styles
│ ├── layout.tsx # App layout & theme provider
│ └── page.tsx # Main page (Navbar + WalletGenerator)
├── components/
│ ├── chain-selector.tsx # Blockchain selection UI
│ ├── wallet-generator.tsx# Main wallet logic & UI
│ ├── wallet-card.tsx # Individual wallet display
│ ├── mnemonic-display.tsx# Recovery phrase display
│ ├── ... # Other UI components
├── lib/
│ ├── wallet.ts # Wallet generation logic
│ └── utils.ts # Utility functions
├── public/ # Static assets (SVGs, etc.)
├── package.json # Dependencies & scripts
└── README.md # This file
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
This project was inspired by the clean, modern design and UX of Kosh Wallet.
MIT