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.8.0.tar.gz (866.5 kB view details)

Uploaded Source

Built Distribution

raiden_webui-0.8.0-py3-none-any.whl (868.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: raiden-webui-0.8.0.tar.gz
  • Upload date:
  • Size: 866.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2

File hashes

Hashes for raiden-webui-0.8.0.tar.gz
Algorithm Hash digest
SHA256 5c8b926c7d355a92b1ce12cb1fc51582dc50a8188071dacaa08ca07b8c53848a
MD5 e53b2b88e200510090efc6c2c5953159
BLAKE2b-256 3e2d4bf77354fe12b38fd284b9eeb753572c1696126fd2252c5fb7871aeecf62

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for raiden_webui-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c02cc06f3842effb4dd532d13059741a3af377c0788ee68ba0641f8af7f1149
MD5 f24e96a3e37369ac1c283bbe605a8c79
BLAKE2b-256 2f23eb4c242d563867c33a5543a053a4e9c48c8edc401965f610083cb78f5c19

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