Skip to content

vinnyhoward/rn-crypto-wallet

Repository files navigation

LinkedIn


Logo

BMO Wallet

A crypto wallet built with React Native
Demo coming soon Β· Report Bug Β· Request Feature

Introduction

BMO Wallet is a multi-chain cryptocurrency wallet built with React Native. This robust mobile application offers a comprehensive suite of features for managing digital assets across multiple blockchains, with a current focus on Ethereum and Solana networks.

Key Features:

  • Multi-Chain Support: Seamlessly manage Ethereum and Solana assets within a single, user-friendly interface.
  • Wallet Management: Create new wallets, import existing ones, and manage multiple accounts with ease.
  • Transaction Handling: Send, receive, and track transactions across supported blockchains.
  • Balance and Portfolio Tracking: View real-time balances and monitor your overall crypto portfolio.
  • Security: Implements encryption and secure storage techniques to protect your digital assets.
  • QR Code Integration: Simplify address sharing and transaction processes with built-in QR code functionality.

Leveraging the power of Expo framework and Alchemy API, BMO Wallet provides a smooth, responsive user experience while ensuring reliable blockchain interactions. Whether you're a crypto enthusiast or a developer looking to explore mobile wallet implementation, BMO Wallet offers a feature-rich platform for managing digital currencies.

Testnet-Only Application

Important: BMO Wallet is currently designed for use with the Ethereum Sepolia testnet and Solana Devnet only. It is not intended for use with real cryptocurrencies or on mainnet networks. This testnet focus allows for safe experimentation and development without risking actual digital assets.

Testnet Resources:

Development Focus

BMO Wallet serves as both a functional crypto wallet and a showcase of modern mobile development practices. It demonstrates the integration of blockchain technologies with React Native, emphasizing clean code architecture, robust state management with Redux, and a strong focus on security.

As I continue to evolve BMO Wallet, I'm committed to expanding its capabilities, enhancing security features, and potentially supporting additional blockchain networks in the future. This project represents my ongoing effort to create a robust, user-friendly cryptocurrency wallet that adapts to the ever-changing landscape of blockchain technology.

Table of Contents

Tech Stack

This project leverages a modern tech stack for building and managing a cross-platform cryptocurrency wallet application:

  • typescript - A strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.

  • react-native - A framework for building native apps using React, enabling native mobile development with JavaScript.

  • expo - An open-source platform for making universal native apps with React that run on Android, iOS, and the web.

  • redux - A predictable state container for JavaScript apps, used for managing state in the mobile app.

  • styled-components - A library that utilizes tagged template literals to style your components at a component level using CSS.

  • Ethers.js - A complete Ethereum wallet implementation and utilities in JavaScript (and TypeScript), used for blockchain interactions.

  • @solana/web3.js - Solana’s JavaScript API library, enabling interaction with the Solana Blockchain.

  • Alchemy SDK - A powerful toolkit that simplifies the process of making requests to the Blockchain, enhancing the app’s capability to interact with Ethereum and Solana.


Features

Wallet Management

  • Create Wallet: Generate new wallets seamlessly.
  • Import Wallets: Import existing wallets using mnemonic phrases.
  • Manage Multiple Wallets: Create and manage multiple wallets using the same mnemonic phrase.
  • Account Management: Rename and manage different wallet accounts.
  • Switch Wallets: Easily switch between different wallet accounts.
Creating a new wallet Importing a wallet Managing your wallet
Creating a new wallet Importing a wallet Managing your wallet

Wallet Balance and Transactions

  • Net Worth: View the total net worth across all wallets.
  • Balance Viewing: Check the balance of Ethereum and Solana wallets.
  • Transaction Management:
    • Send and receive Ethereum and Solana transactions.
    • View a list of past transactions for both Ethereum and Solana.
Viewing wallet transactions Viewing Ethereum balance Sending Ethereum
Creating a new wallet Importing a wallet Sending Crypto

Accessibility Features

  • QR Code Functionality: Easily share wallet addresses and send cryptocurrencies via QR codes.
Sharing Address Scanning QR code
Creating a new wallet Importing a wallet

Security

Encryption and Secure Storage

  • Advanced Encryption Standard (AES): Utilizes AES encryption, the gold standard in symmetric cryptography, to secure sensitive data.
  • Secure Local Storage: Leverages React Native's SecureStore module, which uses Keychain Services on iOS and KeyStore on Android, providing OS-level security for stored data.

Cryptographic Best Practices

  • Password-Based Key Derivation Function 2 (PBKDF2):
    • Implements PBKDF2 for key derivation, significantly increasing resistance to brute-force attacks.
  • Salted Hashes: Employs unique salts for each encryption operation, preventing rainbow table attacks and enhancing overall security.

Key Security

  • Unique Key Generation: Implements a secure system for generating and storing unique encryption keys for each user, significantly enhancing the protection of sensitive data.
  • Advanced Key Derivation: Utilizes key derivation functions to ensure that each user's encryption key is both strong and unique.

Wallet Security

  • Non-Custodial Design: Users maintain full control of their private keys, which are never transmitted or stored unencrypted.
  • Mnemonic Phrase Protection: Recovery phrases are encrypted before storage, ensuring they remain secure even if the device is compromised.

Code-Level Security Measures

  • Type Safety: Utilizes TypeScript to prevent common programming errors and enhance code reliability.
  • Separation of Concerns: Cryptographic operations are isolated in dedicated modules, facilitating code audits and reducing the risk of security vulnerabilities.
  • Error Handling: Implements comprehensive error handling to prevent information leakage through error messages.

Future Security Enhancements (In Development)

  • Biometric Authentication: Plans to integrate fingerprint and face recognition for an additional layer of security.
  • Secure Enclave Integration: Future updates aim to leverage hardware-based key storage on supported devices for enhanced private key protection.
  • Transaction Signing: Upcoming feature to allow offline transaction signing, further securing the transaction process.

Security Considerations for Users

  • Testnet Focus: Currently designed for testnet use only. Users are advised against using real cryptocurrency with this wallet until a full security audit is completed.
  • Regular Updates: The development team is committed to regular security updates and patch releases to address any discovered vulnerabilities promptly.

Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v14.x or later)
  • Yarn (v1.22.x or later)
  • Expo CLI (npm install -g expo-cli)

Getting Started

To get the project up and running on your local machine, follow these steps:

  1. Clone the repository:
git clone https://github.com/vinnyhoward/react-native-crypto-wallet.git
cd react-native-crypto-wallet
  1. Install dependencies:
yarn install
  1. Set up environment variables. Rename .env.example to .env and update the following keys with appropriate values:
EXPO_PUBLIC_ALCHEMY_ETH_KEY=YOUR_ALCHEMY_KEY
EXPO_PUBLIC_ALCHEMY_ETH_URL=https://eth-sepolia.g.alchemy.com/v2/
EXPO_PUBLIC_ALCHEMY_SOCKET_URL=wss://eth-sepolia.g.alchemy.com/v2/
EXPO_PUBLIC_ALCHEMY_SOL_URL=https://solana-devnet.g.alchemy.com/v2/
EXPO_PUBLIC_ALCHEMY_SOL_API_KEY=YOUR_ALCHEMY_KEY
EXPO_PUBLIC_ENVIRONMENT=development

  1. Start the development server:
expo start

Environment Variables

EXPO_PUBLIC_ALCHEMY_ETH_KEY: Your Alchemy API key for accessing Ethereum blockchain data.

EXPO_PUBLIC_ALCHEMY_ETH_URL: The base URL for Ethereum Alchemy API requests.

EXPO_PUBLIC_ALCHEMY_SOCKET_URL: The WebSocket URL for real-time updates from Alchemy.

EXPO_PUBLIC_ALCHEMY_SOL_URL: The base URL for Solana Alchemy API requests.

EXPO_PUBLIC_ALCHEMY_SOL_API_KEY: Your Alchemy API key for accessing Solana blockchain data.

EXPO_PUBLIC_ENVIRONMENT: Environment setting, e.g., development or production.


Roadmap

BMO Wallet is continuously evolving. Here's our exciting roadmap for future developments:

Near Term Goals

Bug Fixes

  • Account list causes too many re-renders

Enhanced Security

  • Implement confirmation screen for transactions
  • Integrate biometric authentication (fingerprint and face recognition)
  • Remove hardcoded environment variables and use dynamic key generation so each user has their own unique key.
  • Implement secure key generation and storage unique to each user
    • Utilizes advanced encryption methods for key derivation
    • Ensures each user has a unique, securely stored encryption key
  • Add option for 2-factor authentication (2FA)

User Experience Improvements

  • Animations and Transitions:
    • Enhance confirmation screen
    • Create engaging splash screen
    • Improve create wallet screen animations
    • Add subtle animations for balance updates and transactions
  • Refactor and optimize Redux structure for better performance
  • Implement light mode and customizable themes

Feature Enhancements

  • Multi-chain pagination support for transaction history
  • Add profit/loss tracking UI for purchased assets
  • Implement real-time price alerts and notifications

Long Term Goals

Blockchain Expansion

  • Integrate Polygon blockchain support
  • Add support for Bitcoin (BTC) transactions
  • Explore integration with layer-2 solutions (e.g., Optimism, Arbitrum)

Advanced Features

  • Implement NFT support:
    • List NFT transactions across all supported blockchains
    • Add NFT gallery view and management features

This roadmap is a living document and will evolve based on technological advancements, user feedback, and market trends.

Your feedback and suggestions are always welcome as I continue to improve and expand BMO Wallet!


License

Distributed under the MIT License. See LICENSE.txt for more information.


Contact

Vincent Howard - @NiftyDeveloper - vincenguyenhoward@gmail.com

Project Link: https://github.com/vinnyhoward/rn-crypto-wallet