Skip to content

Node.js client library for using the Infura API.

Notifications You must be signed in to change notification settings

KevGary/node-infura

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Node.js client library for using the Infura API.

Install

npm install infura

Usage

Instantiate new instance of API client with a specified, Ethereum network.

Options are mainnet (default), kovan, rinkeby, and ropsten.

const Infura = require('infura');
const infura = new Infura('rinkeby');

API

getClientMethods

Get available GET and POST methods.

infura.getClientMethods()
  .then(({ get, post }) => /* handle */)
  .catch(error => /* handle */);

getClientMethod

Get available GET method.

infura.getClientMethod('eth_blockNumber')
  .then(({ result }) => /* handle */)
  .catch(error => /* handle */);

postClientMethod

Post available POST method.

getTickerSymbols

Get ticker symbols.

infura.getTickerSymbols()
  .then(({ symbols }) => /* handle */)
  .catch(error => /* handle */);

getTickerSymbol

Get information about a ticker symbol.

infura.getTickerSymbol('ethusd')
  .then(({
    ask,
    bid,
    exchange,
    num_exchanges,
    quote,
    timestamp
    total_volume,
    volume
  }) => /* handle */)
  .catch(error => /* handle */);

getTickerSymbolFull

Get full information about a ticker symbol.

infura.getFullTickerSymbol('ethusd')
  .then(({
    base,
    quote,
    tickers
  }) => /* handle */)
  .catch(error => /* handle */);

getBlacklist

Get blackist information.

infura.getFullTickerSymbol('ethusd')
  .then(({
    blacklist
    fuzzlist,
    tolerance,
    version,
    whitelist
  }) => /* handle */)
  .catch(error => /* handle */);

Test

npm run test

JSDoc

npm run jsdoc

About

Node.js client library for using the Infura API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published