This repository contains a collection of Android apps built on top of IPv8 (our P2P networking stack) and TrustChain (a scalable, distributed, pair-wise ledger). All applications are built into a single APK, following the concept of super apps – an emerging trend that provides an ecosystem for multiple services within a single all-in-one app experience.
Clone the repository including the submodule with the following command:
git clone --recurse-submodules <URL>
If you have already cloned the repository and forgot to include the --recurse-submodules
flag, you can initialize the submodule with the following command:
git submodule update --init --recursive
You can also update the submodule with this command.
If you want to build an APK, run the following command:
./gradlew :app:assembleDebug
The resulting APK will be stored in app/build/outputs/apk/debug/app-debug.apk
.
You can also build and automatically install the app on all connected Android devices with a single command:
./gradlew :app:installDebug
Note: It is required to have an Android device connected with USB debugging enabled before running this command.
Run the Gradle check task to verify that the project is correctly set up and that tests pass:
./gradlew check
Note: this task is also run on the CI, so ensure that it passes before making a PR.
Run unit tests:
./gradlew test
Run instrumented tests:
./gradlew connectedAndroidTest
Ktlint is used to enforce a consistent code style across the whole project. It is recommended to install the ktlint plugin for your IDE to get real-time feedback.
Check code style:
./gradlew ktlintCheck
Apply linter:
./gradlew ktlintFormat
If you want to add your own app to the TrustChain Super App, you can follow the tutorial in the AppTutorial.md document.
We build a DAO for a better world. On-Chain Democracy is an Android application built on top of IPv8 and Trustchain and is integrated into the Trustchain Superapp. It is a proof-of-concept implementation of a DAO system using Trustchain and Bitcoin. Trustchain is used for communication and bookkeeping while the Bitcoin blockchain is used to have collective multi-signature wallets for each DAO. The content of the app is split up into several tabs:
Currently, the On-Chain Democracy app only allows Regtest, since it uses a future update of Bitcoin called Taproot. Once Taproot is officially released, the app can support TestNet or Production again. Taproot allows the DAO to scale to thousands or even millions of users. The beauty of Taproot is that it uses Schnorr signatures for each transaction. This enables transaction sizes that are equal independent of the number of users in a DAO since each user combines their signature collaboratively into one for the whole DAO. This also ensures privacy, since it is no longer possible to tell whether a transaction originates from a single person or from millions.
PeerChat implements a fully functional prototype of a distributed messaging app. First, the users have to exchange the public keys by scanning each other's QR code, or by copy-pasting the hexadecimal public keys. This guarantees the authenticity of all messages which are signed by their author. It prevents man-in-the-middle and impersonation attacks.
An online indicator and the last message are shown for each contact. Users can exchange text messages and get acknowledgments when a message is delivered.
The Superapp is connected to the European IBAN Euro system. You can send and receive digital Euros using QR codes or built-in chat. Experimental. Sending Euros is as easy as sending an emoji. We did a test with a native implementation of Trustchain and a digital Euro last week. Field test date: 4 March 2021 at 10:30 am. The native Android implementation in Kotlin is slowly getting mature. Location: the bar Doerak (with a liquor license! This is a special place, therefore selected as the site for our trial. Shops that sell coffee or closed canisters of alcohol are "essential shops" and therefore open in Corona times.) Loading real money on your phone requires an operational an open source gateway of Euros to digital Euros. Discussed in this master thesis issue: https://github.com/Tribler/tribler/issues/4629
Double spending in EuroToken occurs when a malicious user sends a transaction to a wallet, and then sends the same transaction to another wallet whilst the second receiver is not aware of the first transaction. This has been mitigated by introducing a web-of-trust, read more about this in the EuroToken README.MD
Creative Commons CC0 license - share freely: