Skip to content

This project was created by a team of USC students for their CSCI401 "Capstone:Design and Construction of Large Software Systems" class.

Notifications You must be signed in to change notification settings

notmandatory/BDWallet

 
 

Repository files navigation

Install bdk-jni

1a. Clone bdk-jni project

2a. Follow README instruction to publish .aar files to local maven repository

OR

1b. Copy bdk-jni-debug-0.2.0.aar to app/libs folder in BDWallet project

Build

  1. Build with gradle

    ./gradlew build
    

Test

With local REGTEST electrs server

  1. Install docker desktop

  2. Create aliases to start, stop, view logs and send cli commands to container

    alias rtstart='docker run -d --rm -p 127.0.0.1:18443-18444:18443-18444/tcp -p 127.0.0.1:60401:60401/tcp --name electrs bitcoindevkit/electrs'
    alias rtstop='docker kill electrs'
    alias rtlogs='docker container logs electrs'
    alias rtcli='docker exec -it electrs /root/bitcoin-cli -regtest -rpcuser=admin -rpcpassword=passw $@'
  3. Use aliases to start container, view logs, run cli command, stop container

    rtstart  
    rtlogs  
    rtcli help    
    rtcli getwalletinfo    
    rtcli getnewaddress  
    rtstop
  4. Use "AVD Manager" to lauch a virtual device (eg. "Pixel 3a API 30" or similar)

  5. From localhost command line setup adb with port forwarding, use same adb version as Android Studio

    ~/Android/Sdk/platform-tools/adb devices -l
    ~/Android/Sdk/platform-tools/adb -L tcp:localhost:5037 reverse tcp:60401 tcp:60401
    ~/Android/Sdk/platform-tools/adb -L tcp:localhost:5037 reverse --list
  6. Open Android Studio "Build Variants" window (lower left)

  7. Select Active Build Variant "localDebug"

  8. Run or Debug "app"

  9. Create a new wallet and create a deposit address

  10. Send regtest coins to emulated wallet, and generate a block

    rtcli sendtoaddress <deposit address> 2.345
    rtcli getnewaddress
    rtcli generatetoaddress 1 <newaddress>

About

This project was created by a team of USC students for their CSCI401 "Capstone:Design and Construction of Large Software Systems" class.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 97.7%
  • HTML 2.1%
  • Shell 0.2%