Skip to content
This repository has been archived by the owner. It is now read-only.

encointer/encointer-app

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

encointer-app

mobile phone app for encointer ceremonies and wallet

Build Instructions

  1. Install Android Studio (We will assume the SDK is installed to ~/Android/Sdk)
  2. Install NDK from Tools -> SDK Manager -> Tab: SDK Tools -> NDK (we will assume the NDK is installed to ~/Android/Sdk/ndk)
  3. install rust toolchain:
    curl https://sh.rustup.rs -sSf | sh
    rustup toolchain install nightly
    
  4. add toolchains
    rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android --toolchain nigthly
    
  5. add the following to ~/.cargo/config
    [target.aarch64-linux-android]
    ar = "/home/<user>/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar"
    linker = "/home/<user>/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang"
    
    [target.armv7-linux-androideabi]
    ar = "/home/<user>/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar"
    linker = "/home/<user>/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi16-clang"
    
    [target.i686-linux-android]
    ar = "/home/<user>/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android-ar"
    linker = "/home/<user>/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android16-clang"
    
  6. add path
    export PATH=~/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
    
  1. build native library
    ./build-native-libs.sh
    
  2. In studio, Choose "Open an existing Anroid Studio project"
  3. If needed, sync Gradle file
  4. Build
  5. Run on Android device (simulator does not work with Android Nearby)

Demo

run node

Somewhere in your local WiFi accessible network, run

encointer-node --dev --ws-external

(build the node as described here)

Then you should see blocks produced in the console and you should be able to observe the block number increasing in the app

Now you should send funds to your account. Copy paste your account by long-tapping on it in the app.

encointer-node/client> cargo build --release
encointer-node/client> ./target/release/encointer-client 127.0.0.1:9944 transfer //Alice 5GziKpBELV7fuYNy7quQfWGgVARn8onchS86azuPQkFj9nEZ 1000000

replace the account string with yours.

Now you should be able to register for the demo ceremony in the app.

Verify registration with

encointer-node/client> ./target/release/encointer-client 127.0.0.1:9944 list_participant_registry

You will have to register at least 3 accounts for the next steps to work. Then you can progress the ceremony phase as root

encointer-node/client> ./encointer-client 127.0.0.1:9944 next_phase

and check the meetup assignment registry

encointer-node/client> ./target/release/encointer-client 127.0.0.1:9944 list_meetup_registry

again, prograss the phase

encointer-node/client> ./target/release/encointer-client 127.0.0.1:9944 list_meetup_registry

now the button "start meetup" should be enabled in the app and you can perform a meetup where all phones/accounts sign each other. Once all the results have been finalized onchain (all done by the app), we can progress the phase once more

encointer-node/client> ./target/release/encointer-client 127.0.0.1:9944 list_meetup_registry

You should now see that your account balance has gone up by one ceremony reward.

Android Studio

Version: 3.4

About

mobile phone app for encointer ceremonies and wallet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published