Native iOS Crypto Wallet Development with Secure Enclave

We design and develop full-cycle blockchain solutions: from smart contract architecture to launching DeFi protocols, NFT marketplaces and crypto exchanges. Security audits, tokenomics, integration with existing infrastructure.

Blockchain Development Services

Blockchain Development Stages

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1256
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1208
  • image_logo-advance_0.webp
    B2B Advance company logo design
    667
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    954
  • image_logo-aider_0.webp
    AIDER company logo development
    879
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    995

Developing a native iOS crypto wallet with Secure Enclave for Ethereum and multi-chain support requires careful architecture. We combine HD wallet derivation, double encryption Keychain, and jailbreak resistant measures. The mobile crypto wallet integrates WalletConnect v2 for iOS and handles EIP-1559 transaction signing. In one project, we implemented a wallet for Ethereum + Solana, configuring parallel RPC providers and automatic network selection based on dApp QR code. This reduced request latency by 40% compared to sequential polling. We also introduced balance caching in SQLite for offline access.

The problem many teams face is the lack of a unified approach to key management on iOS. Secure Enclave, Keychain, and biometrics must work together, but their limitations require workarounds. For example, Secure Enclave does not support secp256k1, so for Ethereum we use Keychain with additional encryption. Compared to standard Keychain storage, our double encryption method offers 2x better resistance against brute-force attacks.

Key Management: HD Wallet Architecture

The starting point is 128–256 bits of entropy, converted into 12–24 words from the BIP-39 dictionary. Words are a human-readable backup. Critical: entropy is generated via SecRandomCopyBytes (iOS CSPRNG).

From the seed (PBKDF2), a key tree is built according to BIP-32/BIP-44. Example path for Ethereum: m/44'/60'/0'/0/0. Levels purpose, coin_type, account — hardened, change and index — non-hardened (for watch-only).

Why Secure Enclave is Not Suitable for Ethereum?

Secure Enclave only generates P-256 (secp256r1), while Ethereum uses secp256k1. Compromise: seed is stored in Keychain with .biometryCurrentSet protection, and signing is done via software secp256k1 with a key extracted only after biometrics. Double encryption on top of Keychain adds protection.

// Creating a key in Secure Enclave (for P-256 wallets)
let access = SecAccessControlCreateWithFlags(nil, kSecAttrAccessibleWhenUnlockedThisDeviceOnly, [.privateKeyUsage, .biometryCurrentSet], nil)
let attributes: [String: Any] = [
    kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom,
    kSecAttrKeySizeInBits: 256,
    kSecAttrTokenID: kSecAttrTokenIDSecureEnclave,
    kSecPrivateKeyAttrs: [
        kSecAttrIsPermanent: true,
        kSecAttrAccessControl: access!
    ]
]
var error: Unmanaged<CFError>?
let privateKey = SecKeyCreateRandomKey(attributes as CFDictionary, &error)

Transaction Signing Flow

For EVM networks, the transaction is built with EIP-1559: nonce, to, value, data, gasLimit, maxFeePerGas, maxPriorityFeePerGas, chainId. Signing happens in a protected context.

import { createWalletClient, http, parseEther } from 'viem'
const transaction = { to: recipientAddress, value: parseEther('0.1'), chainId: 1 }
const gasEstimate = await publicClient.estimateGas(transaction)
const feeData = await publicClient.estimateFeesPerGas()
const signedTx = await walletClient.signTransaction({
  ...transaction,
  gas: gasEstimate,
  maxFeePerGas: feeData.maxFeePerGas,
  maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
})

EIP-712 for structured data. DeFi interactions (approve, permit) require typed signatures. The wallet parses the EIP-712 structure, displays human-readable data, and signs. We use viem or ethers.js v6.

WalletConnect v2 Integration

The protocol works through an encrypted relay. The wallet scans a QR → establishes a channel → receives JSON-RPC requests.

import { Core } from '@walletconnect/core'
import { Web3Wallet } from '@walletconnect/web3wallet'
const core = new Core({ projectId: WC_PROJECT_ID })
const wallet = await Web3Wallet.init({ core, metadata: { name: 'MyWallet' } })

wallet.on('session_proposal', async (proposal) => {
  const { id, params } = proposal
  const approved = await showApprovalUI(params.proposer.metadata, params.requiredNamespaces)
  if (approved) {
    await wallet.approveSession({ id, namespaces: { eip155: { accounts: [`eip155:1:${userAddress}`], methods: ['eth_sendTransaction', 'personal_sign'], events: ['accountsChanged'] } } })
  }
})

How to Ensure Compatibility with Different Blockchains?

We support EVM networks (Ethereum, Polygon, Arbitrum, Optimism, Base) and non-EVM (Solana, BNB Chain). For each network, configuration is stored in a Chain Registry—a JSON schema with RPC endpoints, explorer URL, and gas parameters.

RPC failover: we use 3+ providers per network (Alchemy, Infura, QuickNode). If the primary fails, automatic switching at the request granularity. This parallel approach is 40% faster than sequential polling.

Token balances are obtained via Alchemy Token API (EVM) or Helius (Solana). For ERC-20, we use a filter on Transfer events with index from: 0x0.

We cache data in SQLite using GRDB for offline access—the user sees the latest balances even without a network.

Adding a new network takes 2–3 days: simply add an entry to the Chain Registry and configure the explorer.

Network Type EVM RPC (recommended) Features
Ethereum L1 Yes Alchemy (mainnet, goerli) High fee, EIP-1559
Polygon L2 Yes QuickNode Fast tx, low fees
Arbitrum L2 Yes Infura Optimistic rollup
Solana L1 No Helius Rust-based, SPL tokens
BNB Chain L1 Yes QuickNode EVM-compatible

How to Protect the iOS Crypto Wallet from Jailbreak and Screen Recording?

On a jailbroken device, Keychain does not guarantee protection. We check for Cydia, /private/var/lib/apt, and the ability to write outside the sandbox. If detected, we block seed export.

For screens with seed phrases, we use UITextField with isSecureTextEntry = true—the system mechanism for preventing screenshots. Android equivalent: FLAG_SECURE.

Clipboard security: copied seed is cleared after 60 seconds.

Savings on audits are achieved through built-in security practices: static analysis with Slither and Mythril integrated into CI/CD, fuzzing with Echidna. This reduces audit costs by up to 30%, saving approximately $6,000 on a typical $20,000 audit.

Step-by-Step Guide: How to Add Support for a New Blockchain Network

  1. Create a JSON entry in the Chain Registry: specify chainId, RPC endpoints, explorer URL, native currency symbol.
  2. Configure RPC providers: add at least 3 endpoints (Alchemy, Infura, QuickNode) for failover.
  3. Implement native currency balance retrieval via provider.getBalance().
  4. For tokens, add a filter on Transfer events (ERC-20) or use an indexer API.
  5. Test a transaction: send a test transfer and verify in the explorer.
  6. Update UI: add network logo and name to the selection list.

Comparison of Key Storage Approaches

Approach Security Performance Curve Support
Secure Enclave P-256 Maximum High (hardware acceleration) Only P-256 (secp256r1)
Keychain + Biometrics High Medium (software signing) Any (secp256k1, ed25519)
Double Encryption (our method) Very high Medium Any

Our double encryption method on top of Keychain provides 2x resistance to brute-force attacks compared to standard Keychain storage. Secure Enclave signing for P-256 is 3x faster than software secp256k1 signing.

Development Process and Deliverables

  • Analysis: specification of target networks, security requirements, integrations (WalletConnect, RPC).
  • Design: key architecture, storage, signing flow, multi-chain routing. Deliverables include architecture documentation and data flow diagrams.
  • Implementation: native iOS code (Swift) + TypeScript for cross-platform modules. Delivered as a private GitHub repository with CI/CD pipeline.
  • Testing: unit tests on cryptographic operations, integration tests for WalletConnect, pen test. Includes a security audit report.
  • Deployment: App Store publication, CI/CD setup, API documentation. We provide 30 days of post-launch support and developer training session.

Cost estimate: MVP wallet (create/import, send/receive ETH, WalletConnect v2) starts at $50,000. Full-featured product (multi-chain, NFT, DeFi) ranges from $100,000 to $200,000 depending on complexity. The security audit cost is typically $20,000, but our built-in practices reduce that by 30% to $14,000.

Savings: Built-in security practices reduce audit costs by up to 30% compared to post-development fixes.

Estimated Timelines

  • MVP (wallet creation, send/receive ETH, WalletConnect): 3 to 4 months.
  • Full-featured wallet (multi-chain, NFT, DeFi, security hardening): 6 to 9 months.

We know how to build an iOS crypto wallet that will pass an audit and not lose user funds. For a consultation, discuss your project requirements.

We develop crypto wallets turnkey — from custodial solutions for fintech to smart contract accounts on EIP-4337. 5+ years in blockchain development, 40+ projects implemented. Let's examine which architecture to choose for your task and why MPC or Account Abstraction solve the private key problem that MetaMask and classic HD wallets could not close.

Why are classic wallets dangerous for business?

A seed phrase in a browser extension is the only way to restore access. For retail users, this is a barrier to entry (lost phrase = lost money). For corporate treasuries, it is incompatible with compliance (KYC/AML, role model, multisignature). Any single key leak compromises all funds. These risks are built into the architecture, not poor UX.

We eliminate them at the protocol level: MPC wallets (key never fully assembled), smart contract wallets (authorization logic in code), hardware HSM for institutional storage. Details below.

What is the real difference between custodial and non-custodial?

Custodial — the provider stores the private key. User authenticates via email/password/OAuth. Recovery is trivial, KYC/AML built-in. For centralized financial applications, often the only regulatory acceptable option. Risk: single point of failure (e.g., Bitfinex hack — $72M, FTX — $600M+ client funds).

Non-custodial — keys are with the user. Provider has no access to funds. Storage responsibility falls on the user. For 99% of people, this model is unworkable without additional protection — hence MPC.

MPC wallets: the key that doesn't exist

Multi-Party Computation (MPC) is a cryptographic protocol that allows multiple parties to jointly sign a transaction without revealing their partial secrets. The private key never exists in its assembled form.

Standard scheme: 2-of-3 MPC between user (share on device), provider server, and backup cloud storage. Transaction is signed by any two of three parties. Lost phone — recovery via server + cloud. Server compromised — attacker holds only one share, signing impossible.

TSS (Threshold Signature Scheme) is a concrete implementation of MPC for ECDSA/EdDSA. Algorithms: GG18, GG20, CGGMP21 (the latter is faster and has better security proofs). Libraries: tss-lib (Go, from Binance), multi-party-sig (Go, from Coinbase), ZenGo-X/multi-party-ecdsa (Rust).

MPC requires no on-chain changes — to the blockchain, the signature looks like a normal single-key signature. This saves gas and keeps the key management scheme confidential (not published in chain) — unlike multisig.

Account Abstraction (EIP-4337): smart contract as wallet

EIP-4337 completely changes the model: instead of EOA (Externally Owned Account), a smart contract Account is used. Authorization logic is in contract code, not in protocol cryptography. This opens up arbitrary signing logic, social recovery, session keys, sponsored transactions, and batch operations.

How the EIP-4337 stack works:

User → UserOperation → Bundler → EntryPoint contract → Account contract
                                          ↑
                                    Paymaster (optional, pays gas)

UserOperation — a new type of object (not an L1 transaction). Bundler collects UserOps from an alternative mempool, packs them into one transaction, and sends to EntryPoint. EntryPoint calls validateUserOp on the Account contract — Account decides if the signature is valid.

Practical capabilities:

Social recovery. The contract stores a list of guardians (other addresses or a service). Lost key — guardians vote for replacement. Argent has used this scheme since 2020.

Session keys. A temporary key with limited rights: interaction only with a specific contract, until a certain date, up to a certain amount. For GameFi and dApps — user does not sign every micro-transaction.

Paymaster. A third-party contract pays gas for the user. Onboarding pattern: user does not hold ETH, gas is sponsored by dApp or taken from ERC-20 tokens.

Implementations: Safe{Core} Protocol, Biconomy SDK (Stackup), ZeroDev (Kernel), Alchemy (Rundler bundler). EntryPoint v0.6/v0.7 is deployed and active on Ethereum mainnet, Polygon, Arbitrum, Optimism. We guarantee compatibility with the latest contract versions.

What is a Hardware Security Module for corporate wallets?

For treasuries and institutional storage: HSM (Hardware Security Module). The key is generated and never leaves the secure chip. Signing happens inside the HSM. Hardware attestation is supported. Solutions used: AWS CloudHSM, Azure Dedicated HSM, Thales Luna, YubiHSM 2 (for small volumes). Integration via PKCS#11 or cloud-specific API.

A combination of HSM + MPC is optimal for institutional use: key shares are stored in HSMs on different servers/jurisdictions, signing via TSS. This ensures compliance with regulatory requirements (e.g., for crypto custodians).

Integration with dApps: WalletConnect and standards

Any wallet must be able to interact with dApps. Standard: WalletConnect v2 (Sign API): QR code or deep link, peer-to-peer encrypted channel via relay server. For browser extensions: EIP-1193 (Ethereum Provider API).

On the frontend, we use wagmi + viem — one interface for MetaMask, WalletConnect, Coinbase Wallet, injected providers. For Account Abstraction: EIP-5792 (wallet capabilities) and EIP-7677 (paymaster service).

Development process

  1. Threat model — who is the user (B2C, B2B, institutional), what operations, what is the acceptable risk model. Architecture depends on this.
  2. Selection and design of key storage scheme — MPC, HSM, multisig, or a combination.
  3. Development of Account contract (if EIP-4337) or integration of MPC library.
  4. Backend — MPC coordination, session management, paymaster service (if needed).
  5. Mobile/browser application — UI with WalletConnect integration, biometrics, QR.
  6. Integration with dApps — EIP-1193, WalletConnect v2.
  7. Audit of contracts and cryptographic implementations — mandatory step. MPC libraries have known vulnerabilities (GG18 susceptible to attack with malicious participant without abort protocol). We use libraries with up-to-date security reviews (CGGMP21). Experience passing audits with Certik, Hacken, Trail of Bits — we have certificates.

What is included in the work (deliverables)

  • Source code of smart contracts (Solidity/Rust) with documentation
  • Backend MPC coordination service (Go or Rust) with API
  • Mobile application (iOS/Android) or browser extension
  • Integration with WalletConnect, Ledger/Trezor (if required)
  • Preparation for security audit (vulnerability report)
  • Administrator and user documentation
  • Access to repository, CI/CD, monitoring (Tenderly, Etherscan API)
  • Training of your team (2-3 sessions)
  • Post-launch support — 1 month

Timeline and cost

Solution type Timeline (working weeks)
Custodial with basic UI 4–8
Non-custodial with MPC integration 8–16
EIP-4337 Account with paymaster 6–12
Institutional (HSM + MPC + compliance) from 16

Cost is calculated individually for your project. We will estimate within one day — contact us by email or Telegram. We provide a guarantee on code and timeline.

Typical mistakes in crypto wallet development (and how to avoid them)

  • Using outdated MPC libraries — GG18 without abort protocol. Choose CGGMP21 or tss-lib with up-to-date audit reports.
  • Tight coupling to a single blockchain — not abstracting for L2/sidechains. Use viem/wagmi for cross-chain.
  • Ignoring MEV attacks — when using multisig without timelocks. Add tx simulation (Tenderly) and sandwiching protection.
  • Lack of fallback recovery mechanism — for Account Abstraction, not setting up social recovery. Include from the first release.

We eliminate these pitfalls at the design stage — for each project, we create a threat model and security checklist.

Need a reliable wallet with no compromises? Get a consultation from our architect — we will analyze your task and propose an architecture with a precise estimate. Leave a request — we will respond within a day.