Skip to content

Restioson/10101-PoC

 
 

Repository files navigation

10101 (a.k.a TenTenOne) - PoC

⚠️ The code within this repository was created during the Legends of Lightning Tournament. It is now archived and replaced by https://github.com/get10101/10101

Dependencies

This project requires Flutter and Rust. Rust toolchain can be installed via Rustup. In order to setup Flutter (as well as mobile simulators etc), please see the excellent Flutter guide here

A lot of complexity for building the app has been encapsulated in a Makefile. To see the available commands, simply run make help or make.

To install necessary project dependencies for all targets, run the following:

make deps

Documentation

This project uses flutter-rust-bridge. It is strongly encouraged to read its documentation before jumping into the project in order to understand the project's structure, conventions and ways of integrating between Rust and Flutter.

Building

The instructions below allow building the Rust backend for 10101 application.

Bindings to Flutter

Bindings for Flutter can be generated with the following command:

make gen

Native (desktop)

make native

iOS

make ios

Android

Native

For building for target devices, run:

make android

Simulator

make android-sim

Formatting

We strive to keep the code consistent, therefore before submitting PRs one should run: make format to ensure code is properly formatted.

Linting

Static analysers (clippy and flutter analyze) can be run by calling make lint.

Running

After compiling the relevant Rust backend in the previous section, invoke Flutter:

flutter run

note: Flutter might ask you which target you'd like to run.

Running 10101 for web target is currently unsupported.

regtest

To run on regtest you have to change the default network (testnet) to regtest by setting the NETWORK environment variable.

Example command for maker:

make maker

(make runs prepend NETWORK=regtest automatically)

Example command for taker:

NETWORK=regtest flutter run

Note that the iOS simulator will not pick up the environment variable, so make sure you run on a native target when testing with regtest!

Running a regtest setup

For regtest you need to run a local electrs server on localhost:50000. We make use of nigiri for this.

Run

nigiri start

To get some money run

nigiri faucet <address>

To generate a block, simply call the faucet again.

Run maker in docker

DATA_DIR=$(pwd)
docker run -v$DATA_DIR:/data -p8000 -p9045 ghcr.io/bonomat/10101:main

About

The world needs more Lightning!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 48.0%
  • Rust 38.3%
  • C++ 5.5%
  • CMake 4.7%
  • Makefile 0.8%
  • Ruby 0.8%
  • Other 1.9%