@tradle/cb-proxy

1.2.2 • Public • Published

cb-proxy

This module is used by Tradle

Proxy for common-blockchain APIs, that throttles and stores results of cacheable calls

Helps be a better user of blockchain APIs, and avoid getting throttled

Motivation

Fetching a raw block from blockr requires upwards of (1 + block.transactions.length) calls, which had me hitting the rate limit almost immediately. This module does basic throttling and stores cacheable results in a local database, to avoid hitting blockr.io more than necessary.

Support

cb-blockr

Usage

# specify port
node app 54545
var Blockchain = require('cb-blockr')
var blockchain = new Blockchain('testnet', 'http://localhost:54545/?url=')

Cached paths

blocks/info
blocks/raw
tx/info
tx/raw

Package Sidebar

Install

npm i @tradle/cb-proxy

Weekly Downloads

1

Version

1.2.2

License

ISC

Last publish

Collaborators

  • leichtgewicht
  • tenaciousmv
  • pgmemk
  • spwilko
  • genevayngrib