A focused learning project that implements a minimal wallet for testnets/devnets to explore the cryptographic and blockchain principles behind how wallets, addresses and transactions work. Educational only β not for real funds.
Wallets are the user-facing layer of blockchains: they hold the keys, create transactions, and talk to the network. Building a wallet from scratch (for testnets) forces you to turn textbook ideas into real dataflows β seed phrases, keys, signatures, RPCs and transaction formats β so the abstractions stop being words and start being working pieces.
A seed phrase (12 or 24 words under the BIP39 standard) is a human-friendly representation of a large random number. Why words? Humans can copy and back up a short list more reliably than a long hex string. Behind the words is a deterministic binary seed β one seed that can deterministically produce every private key for a wallet. This is powerful because:
Public-private key cryptography is asymmetric: a private key can create signatures, and the corresponding public key verifies them. The security comes from mathematical functions that are easy to compute in one direction (derive the public key or sign a message) but infeasible to invert (recover the private key from the public key). For modern blockchains, these functions use elliptic curves (for example Ed25519 or secp256k1) which are chosen because:
In practical terms: as long as a private key stays secret, nobody can create valid signatures that look like they came from you. Thatβs the heart of custody: whoever controls the private keys controls the assets.
A signature proves two things: the signer had the private key, and the signed data (transaction) wasn't tampered with. Wallets sign the transaction hash locally with the private key; then any node can verify the signature with the public key. This guarantees authenticity (it came from a key-holder) and integrity (the contents are unchanged).
HD (Hierarchical Deterministic) wallets use the seed to derive a tree of key pairs (BIP32/BIP44 are common standards). Instead of tracking many unrelated keys, a wallet can generate child keys for different accounts, coins, or purposes. The advantages:
Blockchains use different models for state and transactions:
Different models make different engineering trade-offs: account models are simpler for contracts; UTXO models are more flexible for privacy and concurrency.
Wallets use RPC endpoints to ask nodes for balances, broadcast signed transactions, and fetch history. RPCs are plain HTTP/JSON (or WebSocket) interfaces that expose node capabilities. The wallet stays light by delegating chain sync and heavy lifting to full nodes β but this requires trusting node responses (so many wallets validate critical data locally when possible).
Different chains make different choices about cryptography, transaction throughput, fee models and account semantics β those choices shape how wallets are built. For example, design decisions around signature schemes, smallest units (like lamports or wei), and confirmation strategies all affect UX, performance and safety.
The strongest lessons were practical: seed phrases are powerful β one phrase recovers everything β so backup and secrecy are critical. Never reuse testnet keys for real funds; always assume code you build for learning needs security reviews before production.
This project is for learning only β all networks used were testnets/devnets. Never use these builds for real funds and always follow production-level security best practices.
View the repository