meritlabs / lightwallet-stack

Other
3 stars 1 forks source link
blockchain lightwallet merit

Merit Development Bootstrap

code style: prettier lerna

Getting started

The lightwallet development environment consists of:

Prerequisites

Make sure the following conditions are met

MacOS Users

Read https://github.com/meritlabs/merit/blob/master/doc/build-osx.md

brew install make
# ~/.bash_profile

alias make='/usr/local/Cellar/make/4.2.1_1/bin/gmake'

Deploying

When deploying to staging, add a LW_STAGING=true environment variable before running deploy

To deploy either lightwallet (web), run ./deploy.sh

To deploy in unattended mode, run ./deploy.sh -e <environment> -t <target>

Ubuntu Users

# install ZeroMQ
sudo apt install -y libzmq3-dev

# install make
sudo apt install -y make

# install g++
sudo apt install -y build-essential g++

Install Lerna

You need Lerna to manage cross dependencies while still allowing us to publish packages.

make prepare-prereqs

Install MongoDB

Merit Wallet Service uses MongoDB

$ brew install mongodb
$ sudo mkdir -p /data/db
$ sudo chmod 0755 /data/db && sudo chown $USER /data/db
$ sudo chmod 0755 /data/ && sudo chown $USER /data/

Starting and Stopping MongoDB

cd merit-labs/lightwallet-stack/
make start-mongo
make stop-mongo

Setup LightWallet-Stack

Run these in the order listed.

make prepare-stack
cp packages/lightwallet/mobile/src/environments/environment.example.ts packages/lightwallet/mobile/src/environments/environment.dev.ts
cp packages/lightwallet/mobile/src/environments/environment.example.ts packages/lightwallet/mobile/src/environments/environment.ts
# here you may want to edit your environment.dev.ts file to modify URLs
make start-lightwallet-stack

Run Mobile LightWallet

make prepare-stack
cp packages/lightwallet/mobile/src/environments/environment.example.ts packages/lightwallet/mobile/src/environments/environment.dev.ts
cp packages/lightwallet/mobile/src/environments/environment.example.ts packages/lightwallet/mobile/src/environments/environment.ts
# here you may want to edit your environment.dev.ts file to modify URLs
make start-lightwallet

Run Desktop LightWallet

make prepare-stack
make start-desktop-lightwallet

Start Meritcore Individually

make start-merit-node

Send an RPC call to the Lightwallet merit-node

cd merit-labs/lightwallet-stack/
./merit-node/merit-node/bin/merit-node call {merit-node/lib/services/meritd.js rpc_command_here}

GIT Flow

For beautifying and improving semantic value of the branches, we decided to use the following list of the branch prefixes:

All new prefixes should be discussed with the community before being added to the ecosystem.

Contributing

Please, check out our Contribution guide and Code of Conduct.

License

Code released under the MIT license.

Copyright (C) 2013 - 2017 BitPay, Inc. Copyright (c) 2017 - 2021 The Merit Foundation.