MintMe Coin - Wallet
## Development instructions
The recommended way to assert that you are using the correct version of node is to use nodenv, which will shim the node
and npm
commands and assert that the local
version is set to what is specified in .node-version.
Once nodenv is installed:
$ nodenv install
The required version of node
>= v8
.
Alternatively, you can use nvm:
nvm install 8.12.0
nvm use 8.12.0
# Dependencies
## Libs
You need libudev
, libusb-1.0-0
, libusb-1.0-0-dev
installed on Linux
Ubuntu:
sudo apt-get install libudev-dev libusb-1.0-0 libusb-1.0-0-dev
## NPM packages
This will install dependencies saved in package.json
and flow-typed
repository.
$ npm run setup
## Compiling on Windows
You need Microsoft Visual Studio Build tools 2015 at minimum, 2017 recommended.
npm install --global --production windows-build-tools
# Webchaind and webchain-cli ## Webchaind If webchaind isn’t available in your project directory, upon launching the app, it will automatically be downloaded and placed in your project base dir.
# webchain-cli
If you haven’t got webchain-cli
already installed on your system, you can execute ./dependencies.sh
to automatically rustup
and use cargo
to install webchain-cli
and move it to the
project’s base dir. Note: this command is idempotent for rust and cargo (it won’t
try to install cargo if you’ve already got it), but it will
use cargo’s -f
flag to force install webchain-cli
and copy that version to the
project directory.
NOTE: In order to successfully compile webchain-cli, it is recommended that you use Rust version 1.40.0, and have LLVM 9.0.0(if on Windows) or higher installed.
# Run for development
Firstly: a couple things aren’t working right.
-
Issue 1:
webpack-dev-server
isn’t working right with the current babel-webpack-electron-izing setup. So you’ve got to do your development in Electron for now. Which means you can’t runnpm run start:web
. Bummer.
With these caveats in mind, you can run:
Terminal 1
# This will begin a live-watching compiler for ./src/ and ./electron/ folders
$ npm run build:all
Terminal 2
# This will begin the simulated electron app pulling from those compiled sources.
$ npm run start:electron
# Logs
## Wallet logs Electron and Webchain logs persisted in:
-
OSX:
~/Library/Logs/WebchainWallet/log.log
-
Linux:
~/.config/WebchainWallet/log.log
## Webchaind logs
During development, you’ll find webchaind logs in ./logs
right within the project base directory.
On production, logs will be nestled in
-
OSX:
~/Library/Application Support/WebchainWallet/
-
Windows:
%USERPROFILE%\AppData\Roaming\WebchainWallet\logs
# Building alternatively
You can also use a variety of alternative building options, eg.
$ npm run build:all:nowatch
$ npm run build:web
# Building distributions in development
You can run a distribution build in your development environment. Assuming
you’ve already compiled ./src/
and ./electron/
, you’ll be able to run:
$ npm run dist
This command will build for your current system. Note that there are configurations for
several systems (OSX, Linux, Windows) specified on the "build"
field of package.json
, but the dist
command will (by default) only build for the system it’s on.
Note: If you’re developing on OSX and have a developer signing identity on your machine, you can
optionally disable that with CSC_IDENTITY_AUTO_DISCOVERY=false
.
OSX is also able to build for Linux. Add -ml
to that raw command to build for
both OSX and Linux at the same time.
# Troubleshooting Some preliminary things to try in case you run into issues:
-
Clear out any persisted settings or userdata from previous trials
-
OSX:
~/Library/Application Support/WebchainWallet
-
Linux:
~/.config/WebchainWallet
-
Windows:
%APPDATA%\WebchainWallet
-
-
APP_GIT_ENV Error when running npm run dist:
curl -sL https://raw.githubusercontent.com/ethereumproject/janus/master/get.sh | bash
export PATH=$PATH:$PWD/janusbin
export APP_VERSION_GIT_TAG="$(janus version -format 'TAG_OR_NIGHTLY')"
## Run tests
npm run test:watch
or for single run:
npm test
## Contact The team can provide you instant attention on our discord channel or on gitter chat
## License
Apache 2.0