Skip to main content

Raiden webui

Project description

Raiden WebUI

CircleCI Codecove

  • To install the dependencies please run.

npm install.

This will install all the dependencies needed by Angular to run the project.

  • We make Cross domain requests to many servers including the Geth Server and Raiden API server we need to proxy our requests hence run the server in this way.

ng serve --proxy-config proxy.config.json --base-href /ui/ --deploy-url /ui/ --delete-output-path false

You can read more about this here

  • If the @angular/cli's ng command isn't available globally, you can find locally installed one at:

./node_modules/.bin/ng

  • You can also run serve command with

npm start

  • You can build production-ready UI files with

npm run build:prod

It'll lay in the raiden_webui/ui subfolder.

  • Inside the folder src/assets/config we have a config.development.json. This file contains configuration details about host port etc for the raiden as well as geth because we query both the api servers simultaneously. We need to change this file so that it can pick up details according our local configuration.
{
  "raiden":
  {
    "host": "localhost",
    "port": 5001,
    "version": 1
  },
  "web3":
  {
    "host": "localhost",
    "port": 8545
  }
}
  • If we run geth and raiden locally these are additional configurations that we need to do on our local machine.

    1. Generate a genesis JSON file containing all the contracts, configurations.

    python tools/config_builder.py full_genesis > mycustomgenesis.json

    1. Initialise the Geth with the genesis file along with the data directory

    geth --datadir /home/user/privategeth init mycustomgenesis.json

    1. Start geth with this command

    geth --rpccorsdomain "*" --datadir /home/krishna/privategeth --networkid 123 --nodiscover --maxpeers 0 --rpc --mine 1

    1. Start Raiden with the registry-contract-address and the discovery-contract-address generated in the last lines in the mycustomgenesis.json file.
     raiden --eth-rpc-endpoint 127.0.0.1:8545 --registry-contract-address 7d73424a8256c0b2ba245e5d5a3de8820e45f390 --discovery-contract-address 08425d9df219f93d5763c3e85204cb5b4ce33aaa --keystore-path ~/privategeth/keystore --console
    

Attach an ipc connection with geth

geth attach ipc:/home/krishna/privategeth/geth.ipc

From the IPC console quickly check the ether and transfer Ether for a user.

web3.fromWei(eth.getBalance(eth.accounts[0]), 'ether')

eth.sendTransaction({from:eth.coinbase, to:eth.accounts[1], value: web3.toWei(10, "ether")})

WebUI python package

The WebUI can be build as a python package that can then be consumed by raiden. The package provides a static that points to the location of the WebUI static content root directory.

The WebUI resources path can be imported in the following way:

from raiden_webui import RAIDEN_WEBUI_PATH

You can build the python package by calling:

python setup.py build sdist bdist_wheel

This will call npm build:prod to build the static production version of the WebUI so that it can get included in the python package.

If you need to install the package locally to your development virtual environment you can do so by running:

python setup.py build install

In case you need to use the debug version of the WebUI with in your virtual environment you can also run:

python setup.py compile_webui -D install

This will build the debug version of the WebUI to include in your package.

Raiden WebUI

This project was generated with Angular CLI version 1.6.5.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the raiden_webui/ui directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raiden-webui-0.7.0.tar.gz (793.7 kB view details)

Uploaded Source

Built Distribution

raiden_webui-0.7.0-py3-none-any.whl (795.5 kB view details)

Uploaded Python 3

File details

Details for the file raiden-webui-0.7.0.tar.gz.

File metadata

  • Download URL: raiden-webui-0.7.0.tar.gz
  • Upload date:
  • Size: 793.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for raiden-webui-0.7.0.tar.gz
Algorithm Hash digest
SHA256 120abdd6c575301dba29f3a7b53768d2ae59e1be5ed30304c9b1968cf8f93395
MD5 075e981f1e92f24c304ffc326cb3fbd8
BLAKE2b-256 ce65fb3d43ceff686cc0c46c0c0ecc73fcc302676b9154ca91f5ffbe641d8c4c

See more details on using hashes here.

File details

Details for the file raiden_webui-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: raiden_webui-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 795.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for raiden_webui-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35d49f4c5aa4bd6e8dd30c9bc7b01a78a4999035288ff3bfe9cd6f8718269f57
MD5 43d7599809aff248e7c5b903b8038f7b
BLAKE2b-256 eb341a54064567e8b78ef67be15b7950409acee5e46963888e3714212c2c4a57

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page