Skip to content

Commit

Permalink
Merge pull request #162 from kandrio/kandrio-prune-old-modules
Browse files Browse the repository at this point in the history
Prune nine old modules
  • Loading branch information
InvictusRMC authored Aug 28, 2023
2 parents 2d1a807 + 1e2f6f3 commit fdca3a6
Show file tree
Hide file tree
Showing 464 changed files with 14 additions and 389,742 deletions.
84 changes: 0 additions & 84 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@ This repository contains a collection of Android apps built on top of [IPv8](htt

## Apps

### TrustChain Explorer

**TrustChain Explorer** allows to browse the TrustChain blocks stored locally on the device and crawl chains of other connected peers. It also demonstrates how to interact with `TrustChainCommunity`. It defines its own `DemoCommunity` to ensure that all users using the app are able to discover each other easily. The content of the app is split into several tabs:

- **Peers:** A list of discovered peers in `DemoCommunity`. For each peer, there is a time since the last sent and received message, and an average ping latency. After clicking on the peer item, a list of mutual blocks in TrustChain is shown. It is possible to create and send a new proposal block by clicking on the plus icon. A crawl request send be sent by clicking on the refresh button.
- **Chains:** A list of discovered chains in `TrustChainCommunity`, ordered by their length. After clicking on the item, the list of stored blocks is shown.
- **All Blocks:** A stream of all received blocks, updated in real-time as new blocks are received from the network.
- **My Chain:** A list of blocks in which the current user is participating either as a sender or a receiver. It is possible to create a new self-signed block by clicking on the plus icon. It is posible to sign received blocks if they are not defined to be signed automatically.

<img src="https://raw.githubusercontent.com/Tribler/kotlin-ipv8/master/doc/demo-android.png" width="180"> <img src="https://raw.githubusercontent.com/Tribler/kotlin-ipv8/master/doc/demo-android-trustchain.png" width="180">

### PeerChat

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 authenticity of all messages which are signed by their author. It prevents man-in-the-middle and impersonation attacks.
Expand All @@ -25,9 +14,6 @@ An online indicator and the last message is shown for each contact. Users can ex

<img src="https://user-images.githubusercontent.com/1122874/82873643-1a353880-9f35-11ea-8da3-24ce189c939d.png" width="180"> <img src="https://user-images.githubusercontent.com/1122874/82873661-1f928300-9f35-11ea-9955-6a7488936b02.png" width="180">

### DeToks
**Decentralised TikTok** skeleton app for the CS4160 Blockchain Engineering (2022/23) course.

### Digital Euro

The Superapp is connected to the European IBAN Euro system.
Expand Down Expand Up @@ -67,36 +53,6 @@ Zooming into the actual mechanism of QR-Codes (Creative Commons CC0 license - sh

<img src="https://raw.githubusercontent.com/Tribler/kotlin-ipv8/master/doc/demo-android-debug.png" width="180">

### AI trading bot
The AI trading bot is a zero-server AI, which ultimately can understand markets, limit orderbooks, bid/ask pairs and global stock patterns using only smartphones for computing power and connection.
Built on top of Trustchain, the app provides a small decentralized market for trading, providing safe and verifiable transaction for any arbitrary change of goods.

**AI trading bot** consist of two parts.
1. An AI trading bot using a Naive Bayes Classifier which buys or sells Bitcoins in a decentralized market.
2. Sending and receiving money to and from other peers.

**Trading**
The AI trading bot app is visible upon opening the superapp. It receives bids and asks from other peers that want to buy or sell Bitcoins for Dymbe Dollars.
Upon receiving a bid or ask, it decides to either execute the offer or not.
The bot can be toggled on and off using the toggle on the home screen.

**Send/Receive**
In the sending/receiving money tab one can send money to, or receive money from a different peer.
There are two ways to find a public key:
1. The receiving peer presses the send/receive toggle. His public key will be shown as a QR-code. Now pressing the "scan" button on the sender's device allows you can scan the QR code of the receiver.
2. As a sender, go to the "Peers" fragment in the app, and press the public key of the receiver.

<img src="trustchain-trader/TraderImages/live_trading.gif" width="180"><br />
[More about AI trading bot](trustchain-trader/readme.md)

### Market Bot

The market bot app can generate bids and asks which are received by the peers in the market community.
The bid and asks can either be generated automatically or manually. Those bids and asks will be sent as IPv8 messages.

<img src="trustchain-payloadgenerator/GeneratorImages/PayloadFragment.png" width="180"><br />
[More about Market Bot](trustchain-payloadgenerator/readme.md)

### Luxury Socialism
{_recent events have turned this into_ **really bad naming**} We build a DAO for a better world. Luxury socialism is an Android application built on top of [IPv8](https://github.com/Tribler/kotlin-ipv8) and [Trustchain](https://github.com/Tribler/kotlin-ipv8/blob/master/doc/TrustChainCommunity.md), and is integrated into the [Trustchain Superapp](https://github.com/Tribler/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 in several tabs:
* **First Time Launch**: The first time the app is launched, the user must setup his bitcoin wallet. Afterwhich the chain will sync and he is routed to the main screens.
Expand All @@ -123,14 +79,6 @@ https://user-images.githubusercontent.com/23526224/116259903-85efd900-a776-11eb-

[More about Luxury Socialism](currencyii/README.md)

### TrustChain Voter
The TrustChain Voter can be used to create a proposal on which the community can vote. The functionality has been split up in two parts: a Voting API, which provides the core voting functionality, and a TrustChain Voter submodule, which serves to demonstrate the capabilities of the voting API. Below, the process of creating a proposal (left) and casting a vote (right) can be seen.

- [More about the Voting API](common/README.md#votinghelper)
- [More about the TrustChain Voter submodule](trustchain-voter/README.md)

<img src="doc/trustchain-voter/create-proposal.gif" width="280"> <img src="doc/trustchain-voter/cast-vote-process.gif" width="280">

### Freedom-of-Computing App

Freedom-of-Computing provides users with the ability to freely distribute and execute code in the form of APK applications on the trustchain superapp. In order to facilitate the sharing of applications, Freedom-of-Computing contains a gossiping mechanism which periodically shares local applications to other users and downloads unseen applications from other users. This sharing is conducted through a torrent peer-to-peer (P2P) network and uses the EVA Protocol as a fallback. Once the application has been downloaded by the users, they can dynamically load and execute it. The application, apart from being an .APK file, needs to have a specific format for the execution to work, the requirements/constraints are listed inside [the documentation](freedomOfComputing/README.md).
Expand All @@ -141,13 +89,6 @@ The left demo shows the upload procedure, while the right demo shows the downloa

[More about Freedom-of-Computing App](freedomOfComputing/README.md)

### Distributed AI app
The distributed AI app is a proof-of-concept of distributed, server less, machine learning.

- [More about the Distributed AI app](distributedai/docs/README.md)

<img src="distributedai/docs/data_picture.png" width="280">

### MusicDAO
In short, the MusicDAO is an IPv8 app where users can share and discover tracks on the trustchain. Track streaming, downloading, and seeking interactions are done using JLibtorrent.

Expand All @@ -172,31 +113,6 @@ Every time a user opens MusicDAO, they are asked to reload the page in order to
The feature-based models are gossiped along random walks through the network. At each peer they are merged and re-trained on peer's local data. The matrix factorization model seeks to learn a factorization of the user-song matrix. This means that one of the two factors contains only information on how users generally rate each song. This matrix can then be gossiped around the network while a user's personal vector as well as their listening history are kept private.
- [More about federated machine learning using gossiping for music recommendations](gossipML/README.md)

### Atomic Swap

AtomicSwap app allows two users to exchange different cryptocurrencies without the involvement of a third party and without having to trust each other. This is achieved by implementing the Atomic Swap protocol.

User can create trade offers by sending Ipv8 messages indicating that they wish to trade to the Swap community. Others can then accept the offer by sending another Ipv8 message. The swap procedure starts when the initiator receives an accept message for their trade offer.

Below is a video demo that shows the steps to do an atomic swap.

<a href="https://user-images.githubusercontent.com/21971137/164297537-e8b4ff5f-a999-4e6d-b1e8-17135399848e.mp4" title="Swap Demo"><img src="https://user-images.githubusercontent.com/21971137/164298818-a152b7ca-6ebe-4038-a449-e6a246c7f1ab.png" alt="Alternate Text" /></a>

[More about The Atomic Swap app](atomic-swap/README.md)

### Literature Dao

LiteratureDao app aims to be a decentralized scientific literature repository, proving:
Sharing, storing, and searching of scientific publications through the p2p ipv8 network.

![local_upload](https://user-images.githubusercontent.com/33283063/167591620-a9547f63-e778-4ea9-a594-a7d1d9a4f169.gif)
![peers](https://user-images.githubusercontent.com/33283063/167591634-6e0b8aaf-11c8-4ee7-b36d-616255fa5347.PNG)
![search_in_keywords](https://user-images.githubusercontent.com/33283063/167591635-a68c0d2c-16de-4a44-ba73-fc52688252eb.gif)
![url_upload](https://user-images.githubusercontent.com/33283063/167591643-75a305ae-2098-4138-9f60-14818f63000e.gif)


[More about literature dao app](literaturedao/README.md)

### Do you want to add your own app?

- [Adding your own app to the TrustChain Super App](doc/AppTutorial.md)
Expand Down
9 changes: 0 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,12 @@ allprojects {
}

dependencies {
implementation project(':trustchain-voter')
implementation project(':trustchain-explorer')
implementation project(':trustchain-trader')
implementation project(':trustchain-payloadgenerator')
implementation project(':debug')
implementation project(':distributedai')
implementation project(':freedomOfComputing')
implementation project(':peerchat')
implementation project(':eurotoken')
implementation project(':ig-ssi')
implementation project(':liquidity-pool')
implementation project(':valuetransfer')
implementation project(':atomic-swap')
implementation project(':literaturedao')
implementation project(':detoks')
api(project(':common')) {
exclude group: 'net.java.dev.jna'
}
Expand Down
52 changes: 0 additions & 52 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@
android:name=".ui.dashboard.DashboardSelectorActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.explorer.ui.TrustChainExplorerActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.ssi.SSIMainActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity"
Expand All @@ -84,18 +80,6 @@
android:parentActivityName=".ui.dashboard.DashboardActivity"
android:theme="@style/Theme.PeerChat" />

<activity
android:name="nl.tudelft.trustchain.distributedAI.DistributedActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.trader.ui.TrustChainTraderActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.payloadgenerator.ui.TrustChainPayloadGeneratorActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.currencyii.CurrencyIIMainActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />
Expand All @@ -110,23 +94,6 @@
android:parentActivityName=".ui.dashboard.DashboardActivity"
tools:ignore="InnerclassSeparator" />

<activity
android:name="nl.tudelft.trustchain.voting.VotingActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.liquidity.LiquidityPoolMainActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.atomicswap.AtomicSwapActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity" />

<activity
android:name="nl.tudelft.trustchain.detoks.DeToksActivity"
android:parentActivityName=".ui.dashboard.DashboardActivity"
android:theme="@style/Fullscreen" />

<activity
android:name="nl.tudelft.trustchain.valuetransfer.ValueTransferMainActivity"
android:exported="true"
Expand Down Expand Up @@ -163,20 +130,6 @@
android:screenOrientation="portrait"
android:theme="@style/Theme.MusicDaoTheme"></activity>

<activity
android:name="nl.tudelft.trustchain.literaturedao.LiteratureDaoActivity"
android:exported="true"
android:label="Literature sharing app"
android:parentActivityName=".ui.dashboard.DashboardActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>

<service
android:name="nl.tudelft.trustchain.app.service.TrustChainService"
android:exported="false" />
Expand All @@ -186,11 +139,6 @@
android:enabled="true"
android:exported="false" />

<service
android:name="nl.tudelft.trustchain.detoks.gossiper.GossiperService"
android:enabled="true"
android:exported="false" />

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBAGd8-KwX1epS_0CPl5RF0hD8VeTmM-7Y" />
Expand Down
64 changes: 0 additions & 64 deletions app/src/main/java/nl/tudelft/trustchain/app/AppDefinition.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,13 @@ import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import nl.tudelft.trustchain.musicdao.MusicActivity
import nl.tudelft.trustchain.FOC.MainActivityFOC
import nl.tudelft.trustchain.atomicswap.AtomicSwapActivity
import nl.tudelft.trustchain.common.R
import nl.tudelft.trustchain.explorer.ui.TrustChainExplorerActivity
import nl.tudelft.trustchain.currencyii.CurrencyIIMainActivity
import nl.tudelft.trustchain.debug.DebugActivity
import nl.tudelft.trustchain.distributedAI.DistributedActivity
import nl.tudelft.trustchain.eurotoken.EuroTokenMainActivity
import nl.tudelft.trustchain.ssi.SSIMainActivity
import nl.tudelft.trustchain.liquidity.LiquidityPoolMainActivity
import nl.tudelft.trustchain.literaturedao.LiteratureDaoActivity
import nl.tudelft.trustchain.payloadgenerator.ui.TrustChainPayloadGeneratorActivity
import nl.tudelft.trustchain.peerchat.PeerChatActivity
import nl.tudelft.trustchain.trader.ui.TrustChainTraderActivity
import nl.tudelft.trustchain.valuetransfer.ValueTransferMainActivity
import nl.tudelft.trustchain.voting.VotingActivity
import nl.tudelft.trustchain.detoks.DeToksActivity

enum class AppDefinition(
@DrawableRes val icon: Int,
Expand All @@ -29,13 +20,6 @@ enum class AppDefinition(
val activity: Class<out Activity>,
val disableImageTint: Boolean = false,
) {
DETOKS(
R.drawable.ic_detox_logo,
"DeToks",
R.color.black,
DeToksActivity::class.java,
true,
),
EIGHTEEN_PLUS(
R.drawable.ic_18_plus,
"18+",
Expand All @@ -49,12 +33,6 @@ enum class AppDefinition(
R.color.purple,
PeerChatActivity::class.java
),
TRUSTCHAIN_EXPLORER(
R.drawable.ic_device_hub_black_24dp,
"TrustChain Explorer",
R.color.red,
TrustChainExplorerActivity::class.java
),
DEBUG(
R.drawable.ic_bug_report_black_24dp,
"Debug",
Expand All @@ -67,36 +45,12 @@ enum class AppDefinition(
R.color.metallic_gold,
CurrencyIIMainActivity::class.java
),
TRUSTCHAIN_TRADER(
R.drawable.ic_device_hub_black_24dp,
"AI trading bot",
R.color.blue,
TrustChainTraderActivity::class.java
),
TRUSTCHAIN_PAYLOADGENERATOR(
R.drawable.ic_add_black_24dp,
"Market Bot",
R.color.black,
TrustChainPayloadGeneratorActivity::class.java
),
FREEDOM_OF_COMPUTING(
R.drawable.ic_naruto,
"Freedom of Computing",
R.color.blue,
MainActivityFOC::class.java
),
DNA(
R.drawable.ic_bug_report_black_24dp,
"Distributed AI",
R.color.red,
DistributedActivity::class.java
),
VOTING(
R.drawable.abc_ic_voice_search_api_material,
"Voter",
R.color.android_green,
VotingActivity::class.java
),
MUSIC_DAO(
android.R.drawable.ic_media_play,
"MusicDAO",
Expand All @@ -109,29 +63,11 @@ enum class AppDefinition(
R.color.metallic_gold,
EuroTokenMainActivity::class.java
),
LIQUIDITY(
R.drawable.ic_pool,
"Liquidity Pool",
R.color.blue,
LiquidityPoolMainActivity::class.java
),
VALUETRANSFER(
R.drawable.ic_idelft_logo,
"IDelft",
R.color.colorPrimaryValueTransfer,
ValueTransferMainActivity::class.java,
true,
),
ATOMIC_SWAP(
R.drawable.ic_atomic_swap_24dp,
"Atomic Swap",
R.color.blue,
AtomicSwapActivity::class.java
),
LITERATUREDAO(
R.drawable.ic_book_hover_over_hand,
"LiteratureDao",
R.color.green,
LiteratureDaoActivity::class.java
),
}
1 change: 0 additions & 1 deletion app/src/main/java/nl/tudelft/trustchain/app/AppLoader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class AppLoader(
companion object {
val PREFERRED_APPS = stringSetPreferencesKey("preferred_apps")
val DEFAULT_APPS = setOf(
AppDefinition.DETOKS.appName,
AppDefinition.VALUETRANSFER.appName,
AppDefinition.MUSIC_DAO.appName,
AppDefinition.EIGHTEEN_PLUS.appName
Expand Down
Loading

0 comments on commit fdca3a6

Please sign in to comment.