1.0.17 • Published 5 years ago

@owstack/hapi-blockchain v1.0.17

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

hapi-blockchain

NPM Package Build Status Coverage Status

This is a Hapi.js plugin for connecting to a cluster of Bitcoin, Bitcoin Cash, or Litecoin services via RPC and ZeroMQ.

This plugin binds to the hapi server and emits events on incoming blocks, transactions, or address txids.

This plugin also provides an API of helper functions for working with blockchain data.

configuration

This plugin expects a configuration object with the following properties. Supported currency options: 'BTC', 'BCH', or 'LTC'

zmqpubrawtx and zmqpubhashblock are required to be the same value.

{
    "currency": "BTC",
    "nodes": [
        {
            "protocol": "http",
            "host": "127.0.0.1",
            "port": 12345,
            "user": "someUsername",
            "pass": "somePassword",
            "zmqpubrawtx": "tcp://127.0.0.1:28332",
            "zmqpubhashblock": "tcp://127.0.0.1:28332"
        }
    ]
}

If multiple nodes are provided, then round-robin load-balancing is used;

credits

This code and tests were adapted from code in the bitcore-node package by BitPay.

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago