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 with gradle
./gradlew build
-
Install docker desktop
-
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 $@'
-
Use aliases to start container, view logs, run cli command, stop container
rtstart rtlogs rtcli help rtcli getwalletinfo rtcli getnewaddress rtstop
-
Use "AVD Manager" to lauch a virtual device (eg. "Pixel 3a API 30" or similar)
-
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
-
Open Android Studio "Build Variants" window (lower left)
-
Select Active Build Variant "localDebug"
-
Run or Debug "app"
-
Create a new wallet and create a deposit address
-
Send regtest coins to emulated wallet, and generate a block
rtcli sendtoaddress <deposit address> 2.345 rtcli getnewaddress rtcli generatetoaddress 1 <newaddress>