Giter Site home page Giter Site logo

iris-wallet-android's Introduction

Iris Wallet

Iris Wallet manages RGB assets from issuance to spending and receiving, wrapping all functionality in a familiar-looking wallet application and abstracting away as many technical details as possible.

The RGB functionality is provided by rgb-lib via rgb-lib-kotlin, while the Bitcoin functionality is provided by bdk-kotlin.

Variants

The project has Signet and Testnet variants.

Together with the Debug and Release targets, this produces 6 possible versions of the app:

  • bitcoinSignetDebug
  • bitcoinSignetRelease
  • bitcoinTestnetDebug
  • bitcoinTestnetRelease
  • bitcoinMainnetDebug
  • bitcoinMainnetRelease

Supported architectures

The project produces an application supporting the following architectures:

  • x86_64
  • arm64-v8a
  • armeabi-v7a

Code formatting

The project uses spotless.

To format the code run:

./gradlew spotlessApply

and then commit the changes.

Build

Secrets

The app requires an API key for the faucet service. To provide the API key you need to add a file app/src/main/cpp/secrets.cpp with the following content:

#include <jni.h>
#include <string>
extern "C"
JNIEXPORT jstring JNICALL
Java_Keys_btcFaucetApiKey(JNIEnv *env, jobject thiz) {
    std::string api_key = "<put_here_your_secret_api_key>";
    return env->NewStringUTF(api_key.c_str());
}
extern "C"
JNIEXPORT jstring JNICALL
Java_Keys_rgbFaucetApiKey(JNIEnv *env, jobject thiz) {
    std::string api_key = "<put_here_your_secret_api_key>";
    return env->NewStringUTF(api_key.c_str());
}

Building in release mode also requires the passwords for the keystore to be set. This needs to be done in the keystore.properties file, in the project's root directory, where the password are set like:

storePassword=<pass>
keyPassword=<pass>

APKs

Open the project in Android Studio to manually build APKs or use the build_apk.sh script for automated builds.

With no parameters, the script builds the Debug versions of the APKs. To do so run:

./build_apk.sh

The Release versions can instead be built by passing "release" (case-insensitive) as the first parameter and the path to the keystore for signing as the second parameter. As an example:

./build_apk.sh release ~/android-keystores/iriswallet.jks

Upon invocation, code will be linted and checked with spotless to make sure there are no outstanding issues and it's well formatted. The build process gets aborted if anything is out of order.

Bundles

As a first step, lint and format the code:

./gradlew lint
./gradlew spotlessCheck

and proceed to fix anything that needs attention.

Once the code is ok, to build the release bundles for upload to the Play Store run:

./gradlew bundleRelease

This will produce unsigned bundles in the app/build/outputs/bundle/ directory, one per variant.

To sign the bundles, run:

jarsigner -keystore <key_store> app/build/outputs/bundle/<variant>/<bundle_name>.aab <key_alias>

As an example, to sign the testnet variant using the key store located in ~/android-keystores/iriswallet.jks and key alias upload, run:

jarsigner -keystore ~/android-keystores/iriswallet.jks app/build/outputs/bundle/bitcoinTestnetRelease/app-bitcoinTestnet-release.aab upload

iris-wallet-android's People

Contributors

zoedberg avatar nicbus avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.