Rsk blockchain explorer
Imports blockchain data from rsk node to db.
(Optional) Allows to update fields on the fly and send async response to clients.
- mongodb > 4
- node >= 10.16.0
- Install dependecies
npm install
(optional)
cp config-example.json config.json
see configuration
node dist/services/blocks
node dist/api
Run api in development mode
npm run dev
Run blocks service in development mode
npm run blocks
Production build to ./dist folder
npm run build
config.json See defaults on: lib/defaultConfig (config.json overrides this values)
Use:
node dist/tools/showConfig.js
to check current configuration
Configurarion Example:
"source": {
"node": "localhost",
"port": 4444
},
"api": {
"address": "localhost",
"port": 3003
},
"db": {
"server": "localhost",
"port": 27017,
"database": "blockDB"
}
The contractVerifier module requires a connection to a rsk-contract-verifier instance. The url must be provided on api section:
"api":{
"contractVerifier": {
"url": "ws://localhost:3008"
}
}
node: "localhost", port: 4444
server": "localhost" port": 27017 database: "explorerDB"
Optionals:
user: < user > password: < password >
validateCollections :[Boolean] Validate collectios at blocks service start blocksQueueSize:[Number] bcTipSize:[Number] BC tip size
address [string] api server bind address port [number] api server port
allowUserEvents [boolean]: enable/disable userEventsApi exposeDoc [boolean]: serve rsk-openapi-ui on /doc to render swagger.json