1.0.8 • Published 5 years ago

nc-utils v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

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.

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago