2022-08-28 13:53:21 +00:00
[![codecov ](https://codecov.io/gh/cypherstack/stack_wallet/branch/main/graph/badge.svg?token=PM1N56UTEW )](https://codecov.io/gh/cypherstack/stack_wallet)
2022-08-26 08:11:35 +00:00
# Stack Wallet
2022-09-08 01:11:53 +00:00
Stack Wallet is a fully open source cryptocurrency wallet. With an easy to use user interface and quick and speedy transactions, this wallet is ideal for anyone no matter how much they know about the cryptocurrency space. The app is actively maintained to provide new user friendly features.
2022-08-26 08:11:35 +00:00
[![Playstore ](https://bluewallet.io/img/play-store-badge.svg )](https://play.google.com/store/apps/details?id=com.cypherstack.stackwallet)
## Feature List
2022-09-08 01:11:53 +00:00
Highlights include:
2023-04-09 18:42:37 +00:00
- 11 Different cryptocurrencies
2022-09-08 01:11:53 +00:00
- All private keys and seeds stay on device and are never shared.
- Easy backup and restore feature to save all the information that's important to you.
- Trading cryptocurrencies through our partners.
- Custom address book
- Favorite wallets with fast syncing
- Custom Nodes.
- Open source software.
2022-08-26 08:11:35 +00:00
2022-10-06 21:41:24 +00:00
## Building
2022-08-26 08:11:35 +00:00
### Prerequisites
2022-09-08 01:11:53 +00:00
- The only OS supported for building is Ubuntu 20.04
- A machine with at least 100 GB of Storage
2022-10-06 21:41:24 +00:00
2023-03-09 15:53:59 +00:00
The following prerequisites can be installed with the setup script `scripts/setup.sh` or manually as described below:
2022-10-06 21:41:24 +00:00
2023-04-09 18:42:37 +00:00
- Flutter 3.7.10 [(install manually or with git, do not install with snap) ](https://docs.flutter.dev/get-started/install )
2023-03-09 15:53:59 +00:00
- Dart SDK Requirement (>=2.19.0, up until < 3.0.0 ) ( normally included with a flutter install )
2022-09-08 01:11:53 +00:00
- Android setup ([Android Studio](https://developer.android.com/studio) and subsequent dependencies)
2022-08-26 08:11:35 +00:00
2022-10-06 21:41:24 +00:00
### Scripted setup
2022-10-06 21:52:57 +00:00
[`scripts/setup.sh` ](https://github.com/cypherstack/stack_wallet/blob/main/scripts/setup.sh ) is provided as a tool to set up a stock Ubuntu 20.04 installation for building: download the script and run it anywhere. This script should skip the entire [Manual setup ](#manual-setup ) section below and prepare you for [running ](#running ). It will set up the stack_wallet repository in `~/projects/stack_wallet` and build it there.
2022-10-06 21:41:24 +00:00
### Manual setup
2023-04-09 18:42:37 +00:00
Install basic dependencies
2022-08-26 08:11:35 +00:00
```
2023-04-09 18:42:37 +00:00
sudo apt-get install libssl-dev curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm python3-distutils
2022-08-26 08:11:35 +00:00
```
2023-04-09 19:19:03 +00:00
The following *may* be needed for Android studio:
2022-10-04 02:43:55 +00:00
```
2023-04-09 18:42:37 +00:00
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
2022-10-04 02:43:55 +00:00
```
2022-09-08 01:11:53 +00:00
Install [Rust ](https://www.rust-lang.org/tools/install )
2022-08-26 08:11:35 +00:00
```
2022-09-08 01:11:53 +00:00
cargo install cargo-ndk
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
2022-12-22 03:04:03 +00:00
```
2023-04-10 22:17:11 +00:00
Linux desktop specific dependencies:
2022-12-22 03:04:03 +00:00
```
2023-04-10 22:17:11 +00:00
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev meson python3-pip libgirepository1.0-dev valac xsltproc docbook-xsl
2022-12-22 03:04:03 +00:00
pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3.1.2 pygments==2.13.0 toml==0.10.2 typogrify==2.0.7 tomli==2.0.1
2023-04-10 22:17:11 +00:00
```
2022-08-26 08:11:35 +00:00
2023-04-09 18:42:37 +00:00
After installing the prerequisites listed above, download the code and init the submodules
```
git clone https://github.com/cypherstack/stack_wallet.git
cd stack_wallet
git submodule update --init --recursive
2023-04-10 22:17:11 +00:00
2022-09-08 01:11:53 +00:00
```
2022-08-26 08:11:35 +00:00
2022-10-04 02:33:52 +00:00
Run prebuild script
```
cd scripts
./prebuild.sh
// when finished go back to the root directory
cd ..
```
2022-10-04 05:37:33 +00:00
Remove pre-installed system libraries for the following packages built by cryptography plugins in the crypto_plugins folder: `boost iconv libjson-dev libsecret openssl sodium unbound zmq` . You can use
```
sudo apt list --installed | grep boost
```
for example to find which pre-installed packages you may need to remove with `sudo apt remove` . Be careful, as some packages (especially boost) are linked to GNOME (GUI) packages: when in doubt, remove `-dev` packages first like with
```
sudo apt-get remove '^libboost.*-dev.*'
```
2023-04-09 18:42:37 +00:00
<!-- TODO: configure compiler to prefer built over system libraries. Should already use them? -->
2022-10-04 05:37:33 +00:00
2022-09-08 01:11:53 +00:00
Building plugins for Android
2022-08-26 08:11:35 +00:00
```
2022-09-08 01:11:53 +00:00
cd scripts/android/
2022-08-26 08:11:35 +00:00
./build_all.sh
// when finished go back to the root directory
2022-09-07 17:42:08 +00:00
cd ../..
2022-08-26 08:11:35 +00:00
```
2022-10-06 21:41:24 +00:00
Building plugins for Linux
2022-08-26 08:11:35 +00:00
```
2022-09-07 17:42:08 +00:00
cd scripts/linux/
2022-08-26 08:11:35 +00:00
./build_all.sh
// when finished go back to the root directory
2022-09-07 17:42:08 +00:00
cd ../..
2022-08-26 08:11:35 +00:00
```
2022-10-06 21:41:24 +00:00
## Running
### Android
Plug in your android device or use the emulator available via Android Studio and then run the following commands:
2022-08-26 08:11:35 +00:00
```
flutter pub get
2022-10-06 21:41:24 +00:00
flutter run android
2022-08-26 08:11:35 +00:00
```
2022-09-08 01:11:53 +00:00
Note on Emulators: Only x86_64 emulators are supported, x86 emulators will not work
2022-10-06 21:41:24 +00:00
### Linux
Plug in your android device or use the emulator available via Android Studio and then run the following commands:
```
flutter pub get Linux
flutter run linux
```
## Android Studio
2023-04-09 18:42:37 +00:00
Android Studio is the recommended IDE for development, not just for launching on Android devices and emulators but also for Linux desktop development.
Follow instructions here [https://developer.android.com/studio/install#linux ](https://developer.android.com/studio/install#linux ) or install via snap:
2022-10-06 21:41:24 +00:00
```
# setup android studio
sudo apt install -y openjdk-11-jdk
sudo snap install android-studio --classic
```
2022-10-06 22:25:29 +00:00
Use Tools > SDK Manager to install the SDK Tools > Android SDK (API 30), SDK Tools > NDK, SDK Tools > Android SDK command line tools, and SDK Tools > CMake
2022-10-06 21:41:24 +00:00
2022-10-07 00:48:25 +00:00
Then install the Flutter plugin and restart the IDE. In Android Studio's options for the Flutter language, enable auto format on save to match the project's code style. If you have problems with the Dart SDK, make sure to run `flutter` in a terminal to download it (use `source ~/.bashrc` to update your environment variables if you're still using the same terminal from which you ran `setup.sh` )
2022-10-06 21:41:24 +00:00
Make a Pixel 4 (API 30) x86_64 emulator with 2GB of storage space for emulation