** 🚨 Lumen is now currently in Beta version. Completed version is not ready yet. use it with your own caution. **
- Brings stocks, commodity, crypto or other external assets' price outside blockchain
- Submits price data to the blockchain that integrates Standard's oracle module
- Configures account to send tx to blockchains or address with configuration file
Grab the latest version of NPM:
npm install -g @digitalnativeinc/lumen
Configure lumen-config.json
{
"nomics": "<Nomics API Key>",
"finnhub": "<Finnhub API Key>",
"mnemonic": "<Mnemonic to generate an account>",
"socket": "<designated socket index>",
"rpc": "<RPC endpoint address or domain>"
}
Then run command with the file in the current working directory:
lumen run
Lumen is a monorepo project which consists of packages for independent functions.
Configuration parser should parse a js file with
- api keys to fetch
- polkadot account json file directory to submit data
- RPC endpoint address to connect to the blockchain
Entry point of the software orchestrating other packages
fetching toolkit for external assets
This package manages data table to fetch from external sources and returns price table.
This package manages a function which takes data table from fetch
packages as an argument submits the data with polkadot-js account parsed from config file
The algorithm goes like:
- checks whether the client is the current oracle provider for a given era
- submits price data with the asset id allocated in the data table, and checks whether the data is successfully submitted.
This packages is an event system which is included in the config
package. One can easily emit event from importing configuration file.
import LumenConfig from "@digitalnative/lumen-config";
const config = LumenConfig.default();
const { events } = config;
events.emit("client:start");
events can be added in the events/defaultSubscribers
directory.
specifying errors in lumen
Discord integration for the oracle client
A libp2p network client framework for layer2 computation