Skip to main content

Raiden webui

Project description

Raiden WebUI

  • 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.6.0.tar.gz (573.1 kB view details)

Uploaded Source

Built Distribution

raiden_webui-0.6.0-py3-none-any.whl (574.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: raiden-webui-0.6.0.tar.gz
  • Upload date:
  • Size: 573.1 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.1

File hashes

Hashes for raiden-webui-0.6.0.tar.gz
Algorithm Hash digest
SHA256 c9bb10ee967dfe2843535662fd79344763fd575d293ddb13d9dbf4c9418faf2e
MD5 0b70e3970fdf0b97a37f41494fa8f488
BLAKE2b-256 015f38e7868ff32e71a6fd7da9fd6508041a79c83220a54c7ff208f91a24a893

See more details on using hashes here.

File details

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

File metadata

  • Download URL: raiden_webui-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 574.4 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.1

File hashes

Hashes for raiden_webui-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 317ef4fafa2b136cba69515686f1527f18b6c6c54eb2561b6a4cb419673b0080
MD5 1d26c478d395751f1608c60b94cbf7ef
BLAKE2b-256 205076bcdfcf1286cbcb8512919c2b67bcfbc00f312722380657b75d9d3310bb

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