New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nc-utils

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nc-utils

Functions to do calls to the neurochain BOT REST server.

latest
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

Neurochain Utils

Functions to do calls to the neurochain BOT REST server.

The source code is written in typescript.

Use the commands below to build the library and to run it's test harness.

Commands

Build project

yarn build

Build project in watch mode

yarn start

Run tests

yarn test

Run tests in watch mode

yarn test:watch

How to use

Install libray in your project

yarn add nc-utils

Import a function

import {getLastBlocks} from 'nc-utils'

Minimal Docs

Below are the functions available in this library.

getLastBlocks

Gets the last blocks n blocks of Neurochain. Default value is 10. Returns a promise.

getTotalTrans

Gets the total amount of transactions issued in Neurochain. Returns a promise.

getTotalBlocks

Gets the total amount of blocks in Neurochain. Returns a promise.

getBlock

Gets block by height. Returns a promise.

getTransaction

Gets transaction by it's hash. Returns a promise.

setRoot

Synchronous.

Sets the root of the url path for the library's api calls.

Default is just "/" which would assume you are runing the library on the same server as the BOT REST server.

FAQs

Package last updated on 23 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts