Skip to content

hopae-official/hDCX-sample-wallet

Repository files navigation

hDCX Sample Wallet

A React Native digital credential wallet app built with Expo and @hDCX/wallet-core.

Prerequisites

  • Node.js 18 or later
  • pnpm 8 or later
  • Expo CLI (pnpm install -g expo-cli)
  • Expo Development Build mode Docs
  • Physical iOS/Android device for testing BLE and NFC features

Installation

  1. Clone the repository
git clone https://github.com/hopae-official/hDCX-sample-wallet.git
cd hDCX-sample-wallet
  1. Setup environment as Expo Development build mode Docs

  2. Install pnpm (if not installed)

npm install -g pnpm
  1. Install dependencies
pnpm install

Development

  1. Start the development server
pnpm start
  1. Run on devices
  • iOS Simulator/Device
pnpm ios:device
  • iOS Simulator
pnpm ios
  • Android Device
pnpm android:device
  • Android Emulator
pnpm android

Building with EAS

  1. Configure EAS
# Login to your Expo account
eas login

# Configure the project
eas build:configure
  1. Build for development
# iOS development client
eas build --profile development --platform ios

# Android development client
eas build --profile development --platform android
  1. Build for production
# iOS
eas build --platform ios

# Android
eas build --platform android
  1. Submit to stores
# iOS App Store
eas submit --platform ios

# Google Play Store
eas submit --platform android

Key Features

  • Credential issuance and verification
  • Secure credential storage and management
  • VC Verification via Proximity(NFC/BLE) connection

Troubleshooting

  1. Reset Metro bundler cache
pnpm reset-project
  1. Development client issues
# Rebuild development client
eas build --profile development --platform ios
eas build --profile development --platform android
  1. Clean build files
# iOS
cd ios
pod deintegrate
pod install
cd ..

# Android
cd android
./gradlew clean
cd ..

Technical Stack

  • Expo SDK 53
  • React Native 0.79.2
  • BLE Communication (react-native-ble-plx)
  • NFC Communication (react-native-nfc-manager)
  • Secure Storage (expo-secure-store)
  • Credential Management (@hDCX/wallet-core)

Project Structure

├── app/                 # Expo Router app directory
├── components/          # Reusable components
├── contexts/           # React contexts
├── hooks/              # Custom React hooks
├── sdk/                # Wallet SDK implementation
├── types/              # TypeScript type definitions
└── utils/              # Utility functions

Environment Setup

The app requires specific environment variables for different environments. Create the following files:

  • .env.development - Development environment variables
  • .env.staging - Staging environment variables
  • .env.production - Production environment variables

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A sample wallet demonstrating how to integrate with hDCX-js wallet SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •