cosmos/voyager

Name: voyager

Owner: COSMOS

Description: Cosmos Voyager ? the user interface for the Cosmos Network. ?

Created: 2017-08-08 05:34:48.0

Updated: 2018-05-24 07:06:17.0

Pushed: 2018-05-24 15:44:08.0

Homepage: https://cosmos.network/voyager

Size: 44576

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

the cosmos network

Cosmos Voyager

CircleCI codecov

? Welcome to Voyager, the official user interface for the Cosmos Network.

? Voyager is a desktop application built with Electron. Voyager runs on macOS 10.9+, Windows 7+, and Debian-based Linux distros.

?? This is still alpha-level software. DO NOT enter your Cosmos fundraiser seed into Voyager.

? Binary releases are available here.


Prerequisites
Install dependencies On Mac

Install Yarn for JavaScript dependencies. This will also install Node.js if necessary.

 install yarn
On Windows

Install Yarn

Install Gaia Binaries (Cosmos SDK)

Install the Gaia-CLI (gaiacli) and the Gaia full node binary (gaiad) which are part of the Cosmos SDK by following the instructions.

Prepare Voyager
eckout voyager
 # or wherever you like to keep your project files
clone https://github.com/cosmos/voyager.git
oyager

stall js dependencies


Develop

To run Voyager on the default testnet (gaia-2):

rn testnet

To run Voyager on a specific testnet from the testnets repo:

rn testnet <networkName>

To run Voyager on a local node:

First start a local node following the Gaia readme.

Then start Voyager pointing at your local node.

SMOS_NODE=localhost yarn testnet

Production

Building requires that Docker is installed on your system.

Here's an example build command:

 run build --commit=HEAD --network=app/networks/gaia-5001 --sdk-commit=35d0e34b2674ad9edf0f074167dd967219dbbe1b

You can specify --help to see all options with explanations.

Run the app.

 builds/Cosmos-{platform}-x64/Cosmos.app

When you are testing the build system you can skip the repackaging of the JS files.

rn run build --skip-pack

To test if your build worked run:

rn test:exe {path to the build executable}

To make an official release, follow the instructions in docs/release.md.


Testing

Voyager is using Jest to run unit tests.

rn test

To check test coverage locally run following. It will spin up a webserver and provide you with a link to the coverage report web page.

rn test:coverage

Debug

To debug the electron application, build it and run the node inspector for the built files:

ectron --inspect-brk builds/{{your build}}/resources/app/dist/main.js

Then attach to the debugger via the posted url in Chrome.

To debug the electron view, set the environment variable COSMOS_DEVTOOLS to something truthy like "true". The Chrome DevTools will appear when you start Voyager.

To see the console output of the view in your terminal, set the environment variable ELECTRON_ENABLE_LOGGING to something truthy like 1.

Flags

A list of all environment variables and their purpose:

| Variable | Values | default | Purpose | | ———————– | ————————————– | ——————————– | ————————————————————————————— | | NODE_ENV | 'production', 'development' | | | | LOGGING | 'true', 'false' | 'true' | Disable logging | | COSMOS_NETWORK | {path to network configuration folder} | '../networks/gaia-1' | Network to connect to | | COSMOS_HOME | {path to config persistence folder} | '$HOME/.cosmos-voyager[-dev]' | | | COSMOS_NODE | {ip of a certain node} | | Node to connect to | | COSMOS_DEVTOOLS | 'true', 'false' | 'false' | Open the debug panel in the electron view | | ELECTRON_ENABLE_LOGGING | 'true', 'false' | 'false' | Redirect the browser view console output to the console | | PREVIEW | 'true', 'false' | 'true' if NODE_ENV 'development' | Show/Hide features that are in development | | COSMOS_E2E_KEEP_OPEN | 'true', 'false' | 'false' | Keep the Window open in local E2E test to see the state in which the application broke. | | COSMOS_MOCKED | 'true', 'false' | app/config.toml > mocked | Start with a mocked connector. Overwrites the setting in app/config.toml. |

FAQ
 app
rn
 ..
m run rebuild
m run rebuild
 -rf app/yarn.lock
 -rf app/package-lock.json
 -rf yarn.lock
 -rf package-lock.json

??

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.