1.0.3 • Published 1 year ago

tomoscan-healthcheck v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

TomoScan HealthCheck

  • Install
npm i --save tomoscan-healthcheck
  • Usage
const { 
    getHealthCheckData, 
    OK,
    ERROR
 } = require('tomoscan-healthcheck')
 
 const main = async () => {
  // call getHealthCheckData with parameter: tomoscanEndpoint, 
  // example: https://tomoscan.io
  // default https://tomoscan.io

    let data = await getHealthCheckData(process.env.TOMOSCAN_ENDPOINT)
}

Sample responses

[
  { module: 'api', status: 0 },
  { module: 'block', status: 0 },
  { module: 'transaction', status: 0 },
  { module: 'internalTx', status: 0 },
  { module: 'epoch', status: 0 },
  { module: 'tokenTransfer', status: 0 }
]
[
  { module: 'api', status: 0 },
  {
    module: 'block',
    status: -1,
    error: 'No new block since 11:15:54 AM'
  },
  { module: 'transaction', status: 0 },
  { module: 'internalTx', status: 0 },
  { module: 'epoch', status: 0 },
  { module: 'tokenTransfer', status: 0 }
]
1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

4 years ago

1.0.0-beta

4 years ago

1.0.0

4 years ago