Skip to content

M-Picco/rsk-explorer-api

This branch is 1063 commits behind rsksmart/rsk-explorer-api:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ad29dd2 · Apr 8, 2020
Apr 8, 2020
Oct 23, 2019
Mar 5, 2020
Apr 8, 2020
Apr 8, 2020
Feb 28, 2020
Jul 6, 2019
Dec 17, 2018
Jul 3, 2019
Oct 2, 2018
Aug 30, 2019
Apr 8, 2020
Mar 5, 2020
Sep 18, 2019
Aug 30, 2019
Dec 13, 2018
Aug 30, 2019
Mar 5, 2020
Jul 31, 2019
Apr 8, 2020
Apr 8, 2020

Repository files navigation

Rsk explorer api

Description

Rsk blockchain explorer

Components

Api server

Blocks service

Imports blockchain data from rsk node to db.

User events service

(Optional) Allows to update fields on the fly and send async response to clients.

Requisites

  • mongodb > 4
  • node >= 10.16.0

Install

  • Install dependecies
    npm install

Configuration file

(optional)

    cp config-example.json config.json

see configuration

Start

services

  node dist/services/blocks

api

  node dist/api

Commands

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

Configuration

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"
    }
}

Source

node: "localhost", port: 4444

db

server": "localhost" port": 27017 database: "explorerDB"

Optionals:

user: < user > password: < password >

blocks

validateCollections :[Boolean] Validate collectios at blocks service start blocksQueueSize:[Number] bcTipSize:[Number] BC tip size

api

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

Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.4%
  • Shell 3.7%
  • Dockerfile 1.9%