Building a Solana Wallet from Scratch
I wanted to understand how crypto wallets actually work under the hood not just use one, but build one. So I set out to create an HD (Hierarchical Deterministic) wallet generator for Solana.
What is an HD Wallet?
HD wallets generate a tree of key pairs from a single seed phrase. One master seed, infinite addresses. This is the standard behind every modern wallet MetaMask, Phantom, you name it.
The Tech Stack
Next.js for the frontend
ed25519 key derivation for Solana
BIP39 for mnemonic seed phrase generation
Tailwind CSS for a clean, minimal interface
Key Challenges
The hardest part was implementing the key derivation path correctly. Solana uses ed25519 curves (not secp256k1 like Ethereum), which meant I couldn't just copy Ethereum wallet logic. I had to dig into the Solana derivation path specification and handle bytelevel operations.
Security Decisions
All key generation happens locally in the browser. No keys ever touch a server. I used the Web Crypto API where possible and made sure seed phrases are never persisted to localStorage or any storage.
What I Learned
Building a wallet gave me a much deeper understanding of cryptographic primitives, why seed phrases work, and the real engineering behind "decentralization." It's one thing to read about it another to implement it.