1.2.2 • Published 8 years ago

@tradle/cb-proxy v1.2.2

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

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