Implementing a Crypto Address Book in a Mobile Wallet
An address book in a crypto wallet is far more than a simple list. It's a storage mechanism where correctness directly affects real money. Sending ETH to a typo-containing address is an irreversible operation. Therefore, an address book must solve two critical tasks: store addresses reliably and prevent errors during entry.
Address Validation—The Foundation
Each blockchain has its own address format. Regex validation alone is insufficient.
Ethereum / EVM-compatible networks. An address is 42 characters (0x + 40 hex digits). But that's not enough—EIP-55 checksum validation is required. The address 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe with correct capitalization is a checksum address. Without capitalization verification, bit-flip errors can slip through. On mobile, use Web3j (Android) or web3swift (iOS).
Bitcoin. Base58Check for legacy (1...), Bech32 for SegWit (bc1...), Bech32m for Taproot (bc1p...). Use BitcoinKit for iOS or bitcoinj for Android.
Solana. Base58, 32 bytes. Via @solana/web3.js in React Native or Solana.swift.
// Example EIP-55 validation using web3swift
import web3swift
let address = EthereumAddress(userInput)
guard address != nil else {
showError("Invalid address")
return
}
Storage
Addresses must be stored locally—Room (Android) or Core Data (iOS). The data model is minimal:
@Entity(tableName = "address_book")
data class AddressEntry(
@PrimaryKey(autoGenerate = true) val id: Long = 0,
val label: String,
val address: String,
val network: String, // "ETH", "BTC", "SOL"
val memo: String? = null, // for XRP, ATOM, TON
val createdAt: Long = System.currentTimeMillis()
)
The memo field (tag/memo) is critical for Ripple, Cosmos, and TON networks—without it, transfers go to the wrong account on an exchange. This field is often overlooked during initial design.
Storage encryption: An address book is less sensitive than private keys, but SQLCipher for Room or NSFileProtection.complete for Core Data won't hurt.
UX: Address Entry and Insertion
Three ways to add an address:
- Manual entry—with inline validation after losing focus
- Clipboard paste—automatically detect if clipboard contains a valid address for the required network and show a suggestion
- QR scanner—via
MLKit Barcode Scanning(Android) orAVFoundation+Vision(iOS)
Clipboard monitoring on iOS requires explicit user permission starting with iOS 14 (UIPasteboard.general.detectPatterns). iOS 16+ introduced UIPasteButton—a native method without permission requests.
Scope of Work
- Data model supporting multiple networks and memo fields
- Address validation (EVM checksum, Bech32, Base58Check)
- QR scanner for address addition
- Clipboard detection with suggestions
- Encrypted local storage
- Search and sorting by label/network
Timeline Estimates
Basic address book for a single network: 1 day. Multi-network with QR, clipboard detection, and validation for all formats: 2–3 days.







