Skip to content

NginProject/ngWallet

Repository files navigation

ngWallet - Ngin GUI Wallet

Development instructions

The supported node version is v6. If you run into building errors, please make sure that you are using NodeV6 by running node --version.

package.json: This is where scripts that get run when you use npm run blah get defined. It’ll be helpful to have an idea of what’s available and where the magic npm run commands are coming from. You can run any of those commands without the npm run meta-command.

Dependencies

NPM packages

This will install dependencies saved in package.json and flow-typed repository.

$ npm run setup

ngind and ngWallet-cli

ngind

If ngind isn’t available in your project directory, upon launching the app, it will automatically be downloaded and placed in your project base dir.

ngWallet-cli

If you haven’t got ngWallet-cli already installed on your system, you can download the binary, or git clone from https://github.com/NginProject/ngWallet-js and then run cargo build --release in directory.

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 run npm 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 Ngin logs persisted in:

  • OSX: ~/Library/Logs/ngWallet/log.log

  • Linux: ~/.config/ngWallet/log.log

ngind logs

During development, you’ll find ngind logs in ./logs right within the project base directory.

On production, logs will be nestled in

  • OSX: ~/Library/Application Support/ngWallet/

  • Windows: %USERPROFILE%\AppData\Roaming\ngWallet\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/ngWallet

    • Linux: ~/.config/ngWallet

    • Windows: %APPDATA%\ngWallet

Run tests

npm run test:watch

or for single run:

npm test

Contact

The team can provide you instant attention on our discord channel.

License

Apache 2.0