Skip to content

layerztec/layerzwallet

Repository files navigation

Layerz Wallet

Experience the future of Bitcoin with Layer2-focused wallet. Bitcoin-only, non-custodial, opensource.

  • Mobile apps (iOS/Android)
  • Browser extension

Developer Preview Release This is an early access version for developers. Use with caution and report any issues you encounter.

L2s supported (current and upcoming)

  • Bitcoin base layer
  • Rootstock
  • Botanix
  • Citrea (testnet)
  • Alpen (testnet)
  • Liquid & Liquid assets
  • Ark (by ArkLabs) (testnet)
  • Spark
  • RGB
  • Lightning (breez-nodeless)
  • Taproot assets

Other features (current and upcoming)

  • Hardware wallet support (single-sig & multi-sig)
  • Code opensourced
  • Bridging from base layer to Layer 2
  • Swaps between Layers

Project structure

This is a monorepo with 2 subprojects, mobile/ & ext/. Mobile app is built with React Native (Expo), Extension is built with React. Shared code (anything that can be reused, cryptography, network fetchers, react hooks) are shared in shared/

Installing and Running (ext)

  • Run npm install to install the dependencies.
  • Run npm start
  • Load your extension on Chrome following:
    1. Access chrome://extensions/
    2. Check Developer mode
    3. Click on Load unpacked extension
    4. Select the build folder.

Installing and Running (mobile)

  • Run npm install to install the dependencies.
  • Run npm start
  • Use Dev build to scan QR code from terminal

Development build for android (produces apk that has to load bundle remotely): eas build --platform android --profile development-simulator --local

Tests

TBD

e2e (ext)

  • npx playwright install
  • npx playwright install-deps
  • ./utils/add-sepolia.sh
  • npm run e2e

e2e (mobile)

We are using Maestro since it's the only recommended option for Expo EAS. Test flows are located in mobile/.maestro/. We are also relying on Expo EAS for builds, so a generic workflow to run e2e tests on USB-connected Android device would be:

  • get a list of builds from EAS: eas build:list (optionally trigger the build manually first: eas build --platform android --profile preview --message="debug smth" --no-wait)
  • Note the Artifacts field, and download the one you need: wget https://expo.dev/artifacts/eas/example.apk
  • make sure Android device is connected and in dev mode, then install the apk: adb install example.apk
  • run the tests npm run e2e (from mobile/ dir)

Build

  • local android build: eas build --platform android --profile preview --local
  • ext build: npm run build

iOS Dev Client (TestFlight)

A separate iOS app record exists on App Store Connect for distributing an Expo Dev Client build via TestFlight (bundle id com.layerzwallet.mobile.devclient, ASC app id 6762009368). The binary is signed as a regular App Store build but embeds expo-dev-client, so once installed from TestFlight it can load any branch's JS bundle remotely from expo start --dev-client.

The bundle id is swapped at prebuild time via the APP_VARIANT=devclient env var (see mobile/app.config.js); the production app's identity is unaffected.

Build remotely on EAS and auto-submit to TestFlight in one shot:

cd mobile
eas build --platform ios --profile development-device-ios --auto-submit-with-profile=devclient

Or in two steps if you want to inspect the build first:

eas build --platform ios --profile development-device-ios
eas submit --platform ios --profile devclient --latest

Credentials (distribution cert + provisioning profile) are managed by EAS; first run will prompt for an Apple ID and create them automatically.