10101 combines the power of a self-custodial on-chain and off-chain wallet with the vast world of trading. 10101 - a numeral palindrome and the binary representation of 21 - as in 21 million possible bitcoin. The vision of 10101 embodies what Bitcoin stands for: Decentralized and censorship resistant money.
To begin, ensure that you have a working installation of the following items:
- Docker and docker-compose
- Flutter Version Manager (FVM)
- Rust language
- Appropriate Rust targets for cross-compiling to your device
- For Android targets:
- Install cargo-ndk
- Install Android NDK 22, then put its path in one of the
gradle.properties
, e.g.:
echo "ANDROID_NDK=.." >> ~/.gradle/gradle.properties
- For iOS targets:
- XCode
- Cocoapods
We use FVM to be able to easily switch between different Flutter versions.
Make sure to install it locally.
Once installed, you can use your favorite flutter commands as before, just add fvm
before, e.g.
fvm flutter run
You can see whether you have all the sufficient dependencies for your platform by running flutter doctor
.
We encourage community contributions whether it be a bug fix or an improvement to the documentation. Please have a look at the contributing guidelines.
A lot of complexity for building the app has been encapsulated in a just-file.
You can install just
with cargo install just
.
To see the available commands with explanations, simply run just --list
.
To install necessary project dependencies for all targets, run the following:
just deps
Some crates, e.g. the coordinator use diesel
for the database connection.
This may require installing dependencies, such as e.g. libpql
for the postgres database for the coordinator.
On macOS, one can install libpq
with the following command:
brew install libpq
Bear in mind that libpq
is keg-only (not installed globally). This means that you have to add the library path the linker manually.
The are a number ways to do that (e.g. by setting rustflags), however the easiest one is to add the following lines to your .zshrc
/.bashrc
export LDFLAGS="-L/usr/local/opt/libpq/lib"
export CPPFLAGS="-I/usr/local/opt/libpq/include"
This will ensure that libpq
is available during building the project
The following command will build and start all the necessary services, including the native desktop 10101 app.
just all
Note: Ensure that the iOS simulator is running on your machine so it can be selected as target.
The following command will build and start all the necessary services, including the native desktop 10101 app.
just all-ios
Note: Ensure that the Android simulator is running on your machine so it can be selected as target.
Also ensure that you have run just deps-android
to install the right targets for build.
The following command will build and start all the necessary services, including the android app.
just all-android
You can test the app on regtest
, which means that the wallet needs to be fauceted with the provided steps before you can start trading.
-
If you have run the app before, we recommend to clear the dev environment by running
just wipe
-
Start the complete project stack with
just all
.
-
Navigate to the receive screen.
-
Double-click on the generated QR code and click the "Pay with 10101 faucet" button. Note, if you do not specify an amount by default 1 BTC will sent to your regtest wallet.
- Follow coordinator's logs -
tail -f data/coordinator/regtest.log
- Block explorer - http://localhost:8080/
- Bitcoin faucet - http://localhost:8080/faucet/
- Create a
./mobile/android/key.properties
with the content from the key generation step from here https://docs.flutter.dev/deployment/android#signing-the-app just clean
never hurts but might not be necessary ;)just gen
just android-release
NETWORK=regtest just build-android-app-bundle
NETWORK=regtest just upload-app-bundle
TL;DR; a shortcut for this is available but it is recommended to execute each step separately:
just release-app-bundle-regtest