Skip to content

commercionetwork/borsellino

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

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

Borsellino

Borsellino is the first multi-chain, easy-to-use and multiplatform Cosmos Hub wallet. Entirely made with Flutter, it fetches the data about the supported chains from a remote source. This means that adding a new supported chain is no harder than submitting a PR to the proper GitHub repository 😉.

This project was born as Commercio.network's entry at the Seoul HackAtom 2019.

Supported chains

Currently supported chains are:

Project Chains versions Repository
Bitsong.io bitsong-testnet-1 https://github.com/bitsongofficial/go-bitsong
Commercio.network commercio-testnet1001 https://github.com/commercionetwork/commercionetwork
Cosmos Mainnet cosmos-hub2 https://github.com/cosmos/cosmos-sdk
Kava kava-testnet-1.1 https://github.com/Kava-Labs/kava
Regen.network regent-test-1001 https://github.com/regen-network/regen-ledger

Running

In order to run the this project you must satisfy the given pre-requisites:

  • Having Flutter installed.
    In order to install it, you can follow the official documentation.

  • Having an Android or iOS emulator setup (alternatively, an Android or iOS physical device connected to your pc).

Note. For Android-based systems, the application will only work on devices running Android 4.3 (API 18) or later.

Setup

1. Switch to the master branch of Flutter by running:

flutter channel master 
flutter upgrade

2.. Download all the project dependencies by running:

flutter pub get

3. Complete the setup by running

flutter pub run build_runner build

4. Run the project:

flutter run 

Security concerns

Working with Flutter means that we had to rely on third-party code in order to manage some security-related parts of the application. In particular, we used the flutter_secure_storage library to manage the private keys saving and reading. If you want to know more on how we interact with those high-risk cryptographic parts, you can take a look at our source code, especially at the file keys_source.dart where all the keys are saved and read when creating a new account or signing a transaction.

Project architecture

BLoC

The whole project is based on the BLoC Library.
Using it we can ensure separation of concerns between the logic and the presentation part. BLoC are all found inside the lib/bloc folder and all act as a middle layer between the logic part and the view part, representing the presentation layer themselves.

We tried to follow the architecture idea that is described on the BLoC library page. This means we have the following code dependencies:

Page -> BLoC -> Repository -> Source

And the following data flow:

Page -> BLoC -> Repository -> Source 
                                |
                 Data is fetched from internet,
                 saved on the device or manipulated
                                |
                                V
Page <- BLoC <- Repository <- Source

Dependency injection

In order to prevent having a lot of dependencies into the main function, we used the dependency injection pattern.
In order to do so, we used the dependencies_flutter Dart library following the Medium article made by its creator.

We've put all the modules that provide the different components into the lib/dependency_injection folder.
The main class that acts as a singleton to get the dependencies is located into the injector.dart file.

That class is used inside the BLoC implementations in order to get a reference to the repositories that each one uses to fetch or save the data.

About

Repository containing the official entry for the Seoul HackAtom 2019

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published