iOS (SwiftUI) port of the CryptoWallet.si Android wallet.
Electrum-server based mobile wallet for LanaCoin ($LANA) and TajCoin ($TAJ).
| Layer | Android (Original) | iOS (This Port) |
|---|---|---|
| UI | Android XML + Fragments | SwiftUI |
| Key Management | bitcoinj (BIP39/BIP44) | CryptoKit + CommonCrypto |
| Network | Electrum JSON-RPC over TCP | NWConnection (Network.framework) |
| Storage | SQLite + SharedPreferences | Keychain + Encrypted Files |
| Signing | bitcoinj ECKey / secp256k1 | libsecp256k1 (needs binding) |
CryptowalletSi/
├── CryptowalletSiApp.swift # @main entry point
├── Info.plist # App configuration
├── Assets.xcassets/ # Icons & colors
├── Core/
│ ├── Crypto/
│ │ ├── KeyManager.swift # BIP39 mnemonic + BIP44 HD derivation
│ │ └── TransactionBuilder.swift # Raw transaction construction & signing
│ ├── Network/
│ │ └── ElectrumClient.swift # Stratum/Electrum JSON-RPC client
│ ├── Models/
│ │ ├── CoinType.swift # LANA & TAJ network parameters
│ │ └── WalletModels.swift # Account, Address, Transaction, UTXO
│ └── Storage/
│ └── WalletStorage.swift # Keychain seed + encrypted file storage
├── ViewModels/
│ └── AppState.swift # Main wallet state & business logic
└── Views/
├── RootView.swift # Navigation router
├── MainTabView.swift # Tab bar (Wallet/Send/Receive/Settings)
├── Onboarding/
│ ├── OnboardingView.swift # Create / Restore wallet flow
│ └── UnlockView.swift # Password + Face ID unlock
├── Wallet/
│ └── WalletView.swift # Balance, coin selector, tx history
├── Send/
│ └── SendView.swift # Send coins with address/amount/confirm
├── Receive/
│ └── ReceiveView.swift # QR code + address display
└── Settings/
└── SettingsView.swift # Backup seed, servers, about, delete
- Xcode 15+ (Swift 5.9)
- iOS 16.0+ deployment target
- macOS Ventura or later
- Open
CryptowalletSi.xcodeprojin Xcode - Resolve Swift Package Manager dependencies (File → Packages → Resolve)
- Select a simulator or device target
- Build & Run (⌘R)
Download the English wordlist and add it to the bundle:
curl -o CryptowalletSi/bip39_english.txt \
https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt-
secp256k1 binding — Replace the placeholder
Secp256k1helper with a real C library binding:- Use GigaBitcoin/secp256k1.swift SPM package
- Or wrap libsecp256k1 directly via a C bridging header
-
RIPEMD-160 — The
hash160()function needs a real RIPEMD-160 implementation:- Use nicklammer/CryptoSwift or a standalone RIPEMD160
-
Transaction signing — Complete the SIGHASH_ALL serialization in
TransactionBuilder:- For each input, serialize the tx with that input's scriptPubKey, double-SHA256 hash, ECDSA sign
- Build the scriptSig:
<signature> <pubkey>
-
Electrum
import CryptoKit— TheaddressToScriptHashfunction has an inline import that should be moved to the file top -
QR Code scanning — Add camera-based QR scanning using
AVFoundationor theCodeScannerSPM package -
App icon — Design and add a 1024×1024 app icon
-
Testnet support — Add testnet coin parameters for development testing
-
Unit tests — Add tests for key derivation, address generation, and transaction building
The wallet connects to the same backend Electrum servers as the Android app:
| Coin | Server | Port | Protocol |
|---|---|---|---|
| LANA | electrum1-lana.cryptowallet.si | 50001 | TCP |
| LANA | electrum2-lana.cryptowallet.si | 50001 | TCP |
| TAJ | electrum1-taj.cryptowallet.si | 50001 | TCP |
| TAJ | electrum2-taj.cryptowallet.si | 50001 | TCP |
GPL-3.0 — same as the original Android project.
- Android source: https://github.com/CryptowalletSi/Cryptowallet.si
- Website: https://cryptowallet.si
- Telegram: https://t.me/CryptoWalletSi
- LanaCoin: https://github.com/LanaCoin/lanacoin
- TajCoin: https://github.com/Taj-Coin/tajcoin