The Nimiq Hub provides a unified interface for all Nimiq accounts, addresses, and contracts. It is the primary UI for Nimiq users to manage their accounts and provides websites and apps with a concise API to interact with their users’ Nimiq addresses.
The documentation for the Hub API is at https://nimiq.github.io/hub.
TODO
If you want to run your own instance of Hub, you also need to run an instance of the Keyguard.
To get started with working on the source code, pull the code and install the dependencies:
git clone https://github.com/nimiq/hub.git
cd hub
yarnCompile and serve with hot-reload in the background for development:
yarn run serveCompile and lint continuously in the background for development:
yarn run build --watchLint and fix files:
yarn run lintRun unit tests:
yarn run testCompile and minify for production:
yarn run buildThe following values can be changed via configuration files:
- keyguardEndpoint: The location of your keyguard instance.
- network: The network you want to use. Possible values are 'main', 'test' and 'dev'. You can use the constants (see default configs).
- networkEndpoint: The location of the network iframe instance you want to use.
- privilegedOrigins: An array of origins with special access rights, nameley
permission to use iframe methods like
list().
The default config file is config.local.ts. To use a different file
(especially useful for deployment), set an environment variable
build. E.g. export build='testnet' to use config.testnet.ts. To set
environment variables permanently, please refer to your server's documentation,
e.g. for Apache.