open-index/open-npm huggingface dataset:
npm package: @owstack/bch-channel
Description: Payment Channels support to bch.
Latest version: 0.0.5

Bch Channel
=======

[![NPM Package](https://img.shields.io/npm/v/bch-channel.svg?style=flat-square)](https://www.npmjs.org/package/bch-channel)
[![Build Status](https://img.shields.io/travis/owstack/bch-channel.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-channel)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-channel.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-channel)

A module for [bch][bch] that implements [Payment Channels][channel]. Payment channels (sometimes referred as micropayment channels) are a type of smart contracts that allow rapidly adjusting bitcoin transactions. This can be used to do trustless simultaneous payments with a service provider without the need of an intermediary, and some other applications.

See [the main bch repo][bch] or the [bch guide on Payment Channels](http://bch.io/guide/module/channel/index.html) for more information.

## Attribution

This repository was created by copy forking [bitcore-channels commit eef80d0](https://github.com/bitpay/bitcore-channel/commit/eef80d08bebce1daa7e3bc40cc4c625db6db0ec8).

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/bch/blob/master/CONTRIBUTING.md) on the main bch repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/bch/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.

[bch]: https://github.com/owstack/bch
[channel]: https://bitcoin.org/en/developer-guide#micropayment-channel
npm package: @owstack/bch-ecies
Description: ECIES support for Bch Node.
Latest version: 0.0.5

Bch ECIES
======

[![NPM Package](https://img.shields.io/npm/v/bch-ecies.svg?style=flat-square)](https://www.npmjs.org/package/bch-ecies)
[![Build Status](https://img.shields.io/travis/owstack/bch-ecies.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-ecies)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-ecies.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-ecies)

A module for [bch][bch] that implements the [Elliptic Curve Integrated Encryption Scheme (ECIES)](http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme). Uses ECIES symmetric key negotiation from public keys to encrypt arbitrarily long data streams.

See [the main bch repo](https://github.com/owstack/bch) or the [bch guide on ECIES](http://bch.io/guide/module/ecies/index.html) for more information.

Credit to [@ryanxcharles][ryan] for the original implementation.

## Getting started

ECIES will allow to securely encrypt and decrypt messages using ECDSA key pairs (bitcoin cryptography).

```javascript
var alice = ECIES()
  .privateKey(aliceKey)
  .publicKey(bobKey.publicKey);

var message = 'some secret message';
var encrypted = alice.encrypt(message);

// encrypted will contain an encrypted buffer only Bob can decrypt

var bob = ECIES()
  .privateKey(bobKey)
  .publicKey(aliceKey.publicKey);
var decrypted = bob
  .decrypt(encrypted)
  .toString();
// decrypted will be 'some secret message'
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/bch/blob/master/CONTRIBUTING.md) on the main bch repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/bch/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/bch-explorers
Description: Module to query blockchain apis for Bch Node.
Latest version: 0.0.5

Bch Blockchain APIs
======

[![NPM Package](https://img.shields.io/npm/v/bch-explorers.svg?style=flat-square)](https://www.npmjs.org/package/bch-explorers)
[![Build Status](https://img.shields.io/travis/owstack/bch-explorers.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-explorers)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-explorers.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-explorers)

A module for [bch](https://github.com/owstack/bch) that implements HTTP requests to different Web APIs to query the state of the blockchain.

## Getting started

Be careful! When using this module, the information retrieved from remote servers may be compromised and not reflect the actual state of the blockchain.

```sh
npm install bch-explorers
bower install bch-explorers
```

At the moment, only Explorer is supported, and only getting the UTXOs for an address and broadcasting a transaction.

```javascript
var explorers = require('@owstack/bch-explorers');
var explorer = new explorers.Explorer();

explorer.getUtxos('1Bitcoin...', function(err, utxos) {
  if (err) {
    // Handle errors...
  } else {
    // Maybe use the UTXOs to create a transaction
  }
});
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/bch/blob/master/CONTRIBUTING.md) on the main bch repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/bch/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/bch-message
Description: Bitcoin Cash message verification and signing for Bch Node.
Latest version: 0.0.5

Bch Message
=======

[![NPM Package](https://img.shields.io/npm/v/bch-message.svg?style=flat-square)](https://www.npmjs.org/package/bch-message)
[![Build Status](https://img.shields.io/travis/owstack/bch-message.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-message)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-message.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-message?branch=master)

Adds support for verifying and signing bitcoin messages in [Node.js](http://nodejs.org/) and web browsers.

See [the main bch repo](https://github.com/owstack/bch) for more information.

## Getting Started

```sh
npm install bch-message
```

```sh
bower install bch-message
```

To sign a message:

```javascript
var bchLib = require('@owstack/bch-lib');
var Message = require('@owstack/bch-message');

var privateKey = bchLib.PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4');
var signature = Message('hello, world').sign(privateKey);
```

To verify a message:

```javascript
var address = 'n1ZCYg9YXtB5XCZazLxSmPDa8iwJRZHhGx';
var signature = 'H/DIn8uA1scAuKLlCx+/9LnAcJtwQQ0PmcPrJUq90aboLv3fH5fFvY+vmbfOSFEtGarznYli6ShPr9RXwY9UrIY=';
var verified = Message('hello, world').verify(address, signature);
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/bch/blob/master/CONTRIBUTING.md) on the main bch repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/bch/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/bch-mnemonic
Description: BIP39 mnemonics support for Bch Node.
Latest version: 0.0.6

Bch BIP39 Mnemonics
=======

[![NPM Package](https://img.shields.io/npm/v/bch-mnemonic.svg?style=flat-square)](https://www.npmjs.org/package/bch-mnemonic)
[![Build Status](https://img.shields.io/travis/owstack/bch-mnemonic.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-mnemonic)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-mnemonic.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-mnemonic)

A module for [bch](https://github.com/owstack/bch) that implements [Mnemonic code for generating deterministic keys](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).

## Getting Started

This library is distributed in both the npm and bower packaging systems.

```sh
npm install bch-mnemonic
bower install bch-mnemonic
```

There are many examples of how to use it on the developer guide [section for mnemonic](http://bch.io/guide/module/mnemonic/index.html). For example, the following code would generate a new random mnemonic code and convert it to a `HDPrivateKey`.

```javascript
var Mnemonic = require('@owstack/bch-mnemonic');
var code = new Mnemonic(Mnemonic.Words.SPANISH);
code.toString(); // natal hada sutil año sólido papel jamón combate aula flota ver esfera...
var xpriv = code.toHDPrivateKey();
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/bch/blob/master/CONTRIBUTING.md) on the main bch repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/bch/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/bch-node
Description: Bitcoin Cash full node with extended capabilities.
Latest version: 0.1.0

Bch Node
============

[![NPM Package](https://img.shields.io/npm/v/@owstack/bch-node.svg?style=flat-square)](https://www.npmjs.org/package/@owstack/bch-node)
[![Build Status](https://img.shields.io/travis/owstack/bch-node.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-node)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-node.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-node)

A Bitcoin Cash full node for building applications and services with Node.js. A node is extensible and can be configured to run additional services.  Additional services can be enabled to make a node more useful such as exposing new APIs, running a block explorer and wallet service.

## Install

```bash
npm install -g @owstack/bch-node
bchnode start
```

## Prerequisites

- GNU/Linux x86_32/x86_64, or OSX 64bit *(for bitcoind distributed binaries)*
- Node.js v0.10, v0.12 or v4
- ZeroMQ *(libzmq3-dev for Ubuntu/Debian or zeromq on OSX)*
- ~200GB of disk storage
- ~8GB of RAM

## Configuration

Bch-node includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Bch Node.

```bash
bchnode create -d <bitcoin-data-dir> mynode
cd mynode
bchnode install <service>
bchnode install https://github.com/yourname/helloworld
```

This will create a directory with configuration files for your node and install the necessary dependencies. For more information about (and developing) services, please see the [Service Documentation](docs/services.md).

## Add-on Services

There are several add-on services available to extend the functionality of Bch-node:

- [Explorer API](https://github.com/owstack/bch-explorer-api)
- [OWS Explorer](https://github.com/owstack/ows-explorer)
- [Bch Wallet Service](https://github.com/owstack/bch-wallet-service)

## Documentation

- [Upgrade Notes](docs/upgrade.md)
- [Services](docs/services.md)
  - [Bitcoind](docs/services/bitcoind.md) - Interface to Bitcoin Core
  - [Web](docs/services/web.md) - Creates an express application over which services can expose their web/API content
- [Development Environment](docs/development.md) - Guide for setting up a development environment
- [Node](docs/node.md) - Details on the node constructor
- [Bus](docs/bus.md) - Overview of the event bus constructor
- [Release Process](docs/release.md) - Information about verifying a release and the release process.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/owstack/bch/blob/master/CONTRIBUTING.md) file.

## License

Code released under [the MIT license](https://github.com/owstack/bch-node/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack

- bitcoin: Copyright (c) 2009-2015 Bitcoin Core Developers (MIT License)
npm package: @owstack/bch-p2p
Description: Interface to the bitcoin cash P2P network for Bch Node.
Latest version: 0.0.6

Bch P2P
=======

[![NPM Package](https://img.shields.io/npm/v/bch-p2p.svg?style=flat-square)](https://www.npmjs.org/package/bch-p2p)
[![Build Status](https://img.shields.io/travis/owstack/bch-p2p.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-p2p)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-p2p.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-p2p?branch=master)

Adds [Bitcoin protocol](https://en.bitcoin.it/wiki/Protocol_documentation) support for Bch Node.

See [the main bch repo](https://github.com/owstack/bch) for more information.

## Getting Started

```sh
npm install bch-p2p
```
In order to connect to the Bitcoin network, you'll need to know the IP address of at least one node of the network, or use [Pool](/docs/pool.md) to discover peers using a DNS seed.

```javascript
var Peer = require('@owstack/bch-p2p').Peer;

var peer = new Peer({host: '127.0.0.1'});

peer.on('ready', function() {
  // peer info
  console.log(peer.version, peer.subversion, peer.bestHeight);
});
peer.on('disconnect', function() {
  console.log('connection closed');
});
peer.connect();
```

Then, you can get information from other peers by using:

```javascript
// handle events
peer.on('inv', function(message) {
  // message.inventory[]
});
peer.on('tx', function(message) {
  // message.transaction
});
```

Take a look at the [bch guide](http://bch.io/guide/peer.html) on the usage of the `Peer` class.

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/bch/blob/master/CONTRIBUTING.md) on the main bch repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/bch/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/bch-payment-protocol
Description: Payment Protocol (BIP70 and related) support for bch.
Latest version: 0.0.7

Bch Payment Protocol
=======

[![NPM Package](https://img.shields.io/npm/v/bch-payment-protocol.svg?style=flat-square)](https://www.npmjs.org/package/bch-payment-protocol)
[![Build Status](https://img.shields.io/travis/owstack/bch-payment-protocol.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bch-payment-protocol)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bch-payment-protocol.svg?style=flat-square)](https://coveralls.io/r/owstack/bch-payment-protocol)

A module for [bch](https://github.com/owstack/bch) that implements [Payment Protocol](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki) and other related BIPs.

## Getting Started

This library is distributed in both the npm and bower packaging systems.

```sh
npm install bch-lib
npm install bch-payment-protocol
```

```sh
bower install bch-lib
bower install bch-payment-protocol
```

There are many examples of how to use it on the developer guide [section for payment protocol](https://bch.io/api/paypro). For example, the following code would verify a payment request:

```javascript
var PaymentProtocol = require('@owstack/bch-payment-protocol');

var body = PaymentProtocol.PaymentRequest.decode(rawbody);
var request = new PaymentProtocol().makePaymentRequest(body);

var version = pr.get('payment_details_version');
var pki_type = pr.get('pki_type');
var pki_data = pr.get('pki_data');
var serializedDetails = pr.get('serialized_payment_details');
var signature = pr.get('signature');

// Verify the signature
var verified = request.verify();
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/bch-lib/blob/master/CONTRIBUTING.md) on the main bch-lib repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/bch-lib/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/bitcoind-rpc
Description: Bitcoin Client Library to connect to Bitcoin Core via RPC.
Latest version: 1.0.0

bitcoind-rpc
======

[![NPM Package](https://img.shields.io/npm/v/bitcoind-rpc.svg?style=flat-square)](https://www.npmjs.org/package/bitcoind-rpc)
[![Build Status](https://img.shields.io/travis/owstack/bitcoind-rpc.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/bitcoind-rpc)
[![Coverage Status](https://img.shields.io/coveralls/owstack/bitcoind-rpc.svg?style=flat-square)](https://coveralls.io/r/owstack/bitcoind-rpc?branch=master)

A client library to connect to Bitcoin Core RPC in JavaScript.

## Attribution

This repository was created by copy forking [bitcoind-rpc commit da5d5ec](https://github.com/bitpay/bitcoind-rpc/commit/da5d5ec2723bf86583218f5f63158286a38ac2a2).

## Get Started

bitcoind-rpc.js runs on [node](http://nodejs.org/), and can be installed via [npm](https://npmjs.org/):

```bash
npm install bitcoind-rpc
```

## Examples

```javascript
var run = function() {
  var btccore = require('btccore');
  var RpcClient = require('bitcoind-rpc');

  var config = {
    protocol: 'http',
    user: 'user',
    pass: 'pass',
    host: '127.0.0.1',
    port: '18332',
  };

  var rpc = new RpcClient(config);

  var txids = [];

  function showNewTransactions() {
    rpc.getRawMemPool(function (err, ret) {
      if (err) {
        console.error(err);
        return setTimeout(showNewTransactions, 10000);
      }

      function batchCall() {
        ret.result.forEach(function (txid) {
          if (txids.indexOf(txid) === -1) {
            rpc.getRawTransaction(txid);
          }
        });
      }

      rpc.batch(batchCall, function(err, rawtxs) {
        if (err) {
          console.error(err);
          return setTimeout(showNewTransactions, 10000);
        }

        rawtxs.map(function (rawtx) {
          var tx = new btccore.Transaction(rawtx.result);
          console.log('\n\n\n' + tx.id + ':', tx.toObject());
        });

        txids = ret.result;
        setTimeout(showNewTransactions, 2500);
      });
    });
  }

  showNewTransactions();
};
```

## License

**Code released under [the MIT license](https://github.com/owstack/bitcoind-rpc/blob/master/LICENSE).**

Copyright 2017 Open Wallet Stack
npm package: @owstack/btc-channel
Description: Payment Channel support to btc.
Latest version: 0.0.4

Btc Payment Channels
======

[![NPM Package](https://img.shields.io/npm/v/btc-channel.svg?style=flat-square)](https://www.npmjs.org/package/btc-channel)
[![Build Status](https://img.shields.io/travis/owstack/btc-channel.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-channel)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-channel.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-channel)

A module for [btc][btc] that implements [Payment Channels][channel]. Payment channels (sometimes referred as micropayment channels) are a type of smart contracts that allow rapidly adjusting bitcoin transactions. This can be used to do trustless simultaneous payments with a service provider without the need of an intermediary, and some other applications.

See [the main btc repo][btc] or the [btc guide on Payment Channels](http://btc.io/guide/module/channel/index.html) for more information.

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/btc/blob/master/CONTRIBUTING.md) on the main btc repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/btc/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.

[btc]: https://github.com/owstack/btc
[channel]: https://bitcoin.org/en/developer-guide#micropayment-channel
npm package: @owstack/btc-ecies
Description: ECIES support for Btc.
Latest version: 0.0.4

Btc ECIES
======

[![NPM Package](https://img.shields.io/npm/v/btc-ecies.svg?style=flat-square)](https://www.npmjs.org/package/btc-ecies)
[![Build Status](https://img.shields.io/travis/owstack/btc-ecies.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-ecies)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-ecies.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-ecies)

A module for [btc][btc] that implements the [Elliptic Curve Integrated Encryption Scheme (ECIES)][ECIES]. Uses ECIES symmetric key negotiation from public keys to encrypt arbitrarily long data streams.

See [the main btc repo](https://github.com/owstack/btc) or the [btc guide on ECIES](http://btc.io/guide/module/ecies/index.html) for more information.

Credit to [@ryanxcharles][ryan] for the original implementation.

## Getting started

ECIES will allow to securely encrypt and decrypt messages using ECDSA key pairs (bitcoin cryptography).

```javascript
var alice = ECIES()
  .privateKey(aliceKey)
  .publicKey(bobKey.publicKey);

var message = 'some secret message';
var encrypted = alice.encrypt(message);

// encrypted will contain an encrypted buffer only Bob can decrypt

var bob = ECIES()
  .privateKey(bobKey)
  .publicKey(aliceKey.publicKey);
var decrypted = bob
  .decrypt(encrypted)
  .toString();
// decrypted will be 'some secret message'
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/btc/blob/master/CONTRIBUTING.md) on the main btc repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/btc/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.

[btc]: http://github.com/owstack/btc
[ECIES]: http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme
[ryan]: http://github.com/ryanxcharles
npm package: @owstack/btc-explorers
Description: Module to query blockchain apis for Btc.
Latest version: 0.0.4

Btc Blockchain APIs
======

[![NPM Package](https://img.shields.io/npm/v/btc-explorers.svg?style=flat-square)](https://www.npmjs.org/package/btc-explorers)
[![Build Status](https://img.shields.io/travis/owstack/btc-explorers.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-explorers)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-explorers.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-explorers)

A module for [btc](https://github.com/owstack/btc) that implements HTTP requests to different Web APIs to query the state of the blockchain.

## Attribution

This repository was created by copy forking [bitcore-explorers commit 1f1334f](https://github.com/bitpay/bitcore-explorers/commit/1f1334f7ea7f75ed80f62d379613a961a66403f2).

## Getting started

Be careful! When using this module, the information retrieved from remote servers may be compromised and not reflect the actual state of the blockchain.

```sh
npm install btc-explorers
bower install btc-explorers
```

At the moment, only Explorer is supported, and only getting the UTXOs for an address and broadcasting a transaction.

```javascript
var explorers = require('@owstack/btc-explorers');
var explorer = new explorers.Explorer();

explorer.getUtxos('1Bitcoin...', function(err, utxos) {
  if (err) {
    // Handle errors...
  } else {
    // Maybe use the UTXOs to create a transaction
  }
});
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/btc/blob/master/CONTRIBUTING.md) on the main btc repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/btc/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.

[btc]: http://github.com/owstack/btc-explorers
npm package: @owstack/btc-lib
Description: A Javascript library to build bitcoin and blockchain-based applications.
Latest version: 0.1.27

Btc Lib
=======

[![NPM Package](https://img.shields.io/npm/v/@owstack/btc-lib.svg?style=flat-square)](https://www.npmjs.org/package/@owstack/btc-lib)[![Build Status](https://img.shields.io/travis/owstack/btc-lib.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-lib)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-lib.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-lib)

A pure and powerful JavaScript Bitcoin library.

## Principles

Bitcoin is a powerful new peer-to-peer platform for the next generation of financial technology. The decentralized nature of the Bitcoin network allows for highly resilient bitcoin infrastructure, and the developer community needs reliable, open-source tools to implement bitcoin apps and services.

## Get Started

```
npm install @owstack/btc-lib
```

## Examples

* [Generate a random address](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#generate-a-random-address)
* [Generate a address from a SHA256 hash](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#generate-a-address-from-a-sha256-hash)
* [Import an address via WIF](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#import-an-address-via-wif)
* [Create a Transaction](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#create-a-transaction)
* [Sign a Bitcoin message](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#sign-a-bitcoin-message)
* [Verify a Bitcoin message](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#verify-a-bitcoin-message)
* [Create an OP RETURN transaction](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#create-an-op-return-transaction)
* [Create a 2-of-3 multisig P2SH address](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#create-a-2-of-3-multisig-p2sh-address)
* [Spend from a 2-of-2 multisig P2SH address](https://github.com/owstack/btc-lib/blob/master/docs/examples.md#spend-from-a-2-of-2-multisig-p2sh-address)


## Security

If you find a security issue, please email security@openwalletstack.com.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/owstack/btc-lib/blob/master/CONTRIBUTING.md) file.

## Building the Browser Bundle

To build a btc-lib full bundle for the browser:

```sh
gulp browser
```

This will generate files named `btc-lib.js` and `btc-lib.min.js`.

## Development & Tests

```sh
git clone https://github.com/owstack/btc-lib
cd btc-lib
npm install
```

Run all the tests:

```sh
gulp test
```

You can also run just the Node.js tests with `gulp test:node`, just the browser tests with `gulp test:browser`
or create a test coverage report (you can open `coverage/lcov-report/index.html` to visualize it) with `gulp coverage`.

## License

Code released under [the MIT license](https://github.com/owstack/btc-lib/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/btc-message
Description: Bitcoin message verification and signing.
Latest version: 0.0.4

Btc Message
=======

[![NPM Package](https://img.shields.io/npm/v/btc-message.svg?style=flat-square)](https://www.npmjs.org/package/btc-message)
[![Build Status](https://img.shields.io/travis/owstack/btc-message.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-message)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-message.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-message?branch=master)

Adds support for verifying and signing bitcoin messages in [Node.js](http://nodejs.org/) and web browsers.

## Getting Started

```sh
npm install btc-message
```

```sh
bower install btc-message
```

To sign a message:

```javascript
var btcLib = require('@owstack/btc-lib');
var Message = require('@owstack/btc-message');

var privateKey = btc.PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4');
var signature = Message('hello, world').sign(privateKey);
```

To verify a message:

```javascript
var address = 'n1ZCYg9YXtB5XCZazLxSmPDa8iwJRZHhGx';
var signature = 'H/DIn8uA1scAuKLlCx+/9LnAcJtwQQ0PmcPrJUq90aboLv3fH5fFvY+vmbfOSFEtGarznYli6ShPr9RXwY9UrIY=';
var verified = Message('hello, world').verify(address, signature);
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/btc/blob/master/CONTRIBUTING.md) on the main btc repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/btc/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/btc-mnemonic
Description: BIP39 Mnemonics support.
Latest version: 0.0.4

Btc BIP39 Mnemonics
=======

[![NPM Package](https://img.shields.io/npm/v/btc-mnemonic.svg?style=flat-square)](https://www.npmjs.org/package/btc-mnemonic)
[![Build Status](https://img.shields.io/travis/owstack/btc-mnemonic.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-mnemonic)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-mnemonic.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-mnemonic)

A module for [btc](https://github.com/owstack/btc) that implements [Mnemonic code for generating deterministic keys](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).

## Getting Started

This library is distributed in both the npm and bower packaging systems.

```sh
npm install btc-mnemonic
bower install btc-mnemonic
```

There are many examples of how to use it on the developer guide [section for mnemonic](http://btc.io/guide/module/mnemonic/index.html). For example, the following code would generate a new random mnemonic code and convert it to a `HDPrivateKey`.

```javascript
var Mnemonic = require('@owstack/btc-mnemonic');
var code = new Mnemonic(Mnemonic.Words.SPANISH);
code.toString(); // natal hada sutil año sólido papel jamón combate aula flota ver esfera...
var xpriv = code.toHDPrivateKey();
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/btc/blob/master/CONTRIBUTING.md) on the main btc repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/btc/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/btc-node
Description: Bitcoin Core full node with extended capabilities.
Latest version: 0.1.1

Btc Node
============

[![NPM Package](https://img.shields.io/npm/v/@owstack/btc-node.svg?style=flat-square)](https://www.npmjs.org/package/@owstack/btc-node)
[![Build Status](https://img.shields.io/travis/owstack/btc-node.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-node)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-node.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-node)

A Bitcoin full node for building applications and services with Node.js. A node is extensible and can be configured to run additional services.  Additional services can be enabled to make a node more useful such as exposing new APIs, running a block explorer and wallet service.

## Install

```bash
npm install -g @owstack/btc-node
btcnode start
```

## Prerequisites

- GNU/Linux x86_32/x86_64, or OSX 64bit *(for bitcoind distributed binaries)*
- Node.js v0.10, v0.12 or v4
- ZeroMQ *(libzmq3-dev for Ubuntu/Debian or zeromq on OSX)*
- ~200GB of disk storage
- ~8GB of RAM

## Configuration

Btc-node includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Btc Node.

```bash
btcnode create -d <bitcoin-data-dir> mynode
cd mynode
btcnode install <service>
btcnode install https://github.com/yourname/helloworld
```

This will create a directory with configuration files for your node and install the necessary dependencies. For more information about (and developing) services, please see the [Service Documentation](docs/services.md).

## Add-on Services

There are several add-on services available to extend the functionality of Btc-node:

- [Explorer API](https://github.com/owstack/btc-explorer-api)
- [OWS Explorer](https://github.com/owstack/ows-explorer)
- [Btc Wallet Service](https://github.com/owstack/btc-wallet-service)

## Documentation

- [Upgrade Notes](docs/upgrade.md)
- [Services](docs/services.md)
  - [Bitcoind](docs/services/bitcoind.md) - Interface to Bitcoin Core
  - [Web](docs/services/web.md) - Creates an express application over which services can expose their web/API content
- [Development Environment](docs/development.md) - Guide for setting up a development environment
- [Node](docs/node.md) - Details on the node constructor
- [Bus](docs/bus.md) - Overview of the event bus constructor
- [Release Process](docs/release.md) - Information about verifying a release and the release process.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/owstack/btc/blob/master/CONTRIBUTING.md) file.

## License

Code released under [the MIT license](https://github.com/owstack/btc-node/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack

- bitcoin: Copyright (c) 2009-2015 Bitcoin Core Developers (MIT License)
npm package: @owstack/btc-p2p
Description: Interface to the bitcoin P2P network for btc.
Latest version: 0.0.5

Btc P2P
=======

[![NPM Package](https://img.shields.io/npm/v/btc-p2p.svg?style=flat-square)](https://www.npmjs.org/package/btc-p2p)
[![Build Status](https://img.shields.io/travis/owstack/btc-p2p.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-p2p)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-p2p.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-p2p?branch=master)

Adds [Bitcoin protocol](https://en.bitcoin.it/wiki/Protocol_documentation) support for Btc-node.

See [the main btc repo](https://github.com/owstack/btc) for more information.

## Getting Started

```sh
npm install btc-p2p
```
In order to connect to the Bitcoin network, you'll need to know the IP address of at least one node of the network, or use [Pool](/docs/pool.md) to discover peers using a DNS seed.

```javascript
var Peer = require('@owstack/btc-p2p').Peer;

var peer = new Peer({host: '127.0.0.1'});

peer.on('ready', function() {
  // peer info
  console.log(peer.version, peer.subversion, peer.bestHeight);
});
peer.on('disconnect', function() {
  console.log('connection closed');
});
peer.connect();
```

Then, you can get information from other peers by using:

```javascript
// handle events
peer.on('inv', function(message) {
  // message.inventory[]
});
peer.on('tx', function(message) {
  // message.transaction
});
```

Take a look at the [btc guide](http://btc.io/guide/peer.html) on the usage of the `Peer` class.

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/btc/blob/master/CONTRIBUTING.md) on the main btc repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/btc/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/btc-payment-protocol
Description: Payment Protocol (BIP70 and related) support for btc.
Latest version: 0.0.5

Btc Payment Protocol
=======

[![NPM Package](https://img.shields.io/npm/v/btc-payment-protocol.svg?style=flat-square)](https://www.npmjs.org/package/btc-payment-protocol)
[![Build Status](https://img.shields.io/travis/owstack/btc-payment-protocol.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btc-payment-protocol)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btc-payment-protocol.svg?style=flat-square)](https://coveralls.io/r/owstack/btc-payment-protocol)

A module for [btc](https://github.com/owstack/btc) that implements [Payment Protocol](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki) and other related BIPs.

## Attribution

This repository was created by copy forking [bitcore-payment-protocol commit b086fc6](https://github.com/bitpay/bitcore-payment-protocol/commit/b086fc64ff8e19230ff4352ef0af9af2837bcc46).

## Getting Started

This library is distributed in both the npm and bower packaging systems.

```sh
npm install btc-lib
npm install btc-payment-protocol
```

```sh
bower install btc-lib
bower install btc-payment-protocol
```

There are many examples of how to use it on the developer guide [section for payment protocol](https://btc.io/api/paypro). For example, the following code would verify a payment request:

```javascript
var PaymentProtocol = require('@owstack/btc-payment-protocol');

var body = PaymentProtocol.PaymentRequest.decode(rawbody);
var request = new PaymentProtocol().makePaymentRequest(body);

var version = pr.get('payment_details_version');
var pki_type = pr.get('pki_type');
var pki_data = pr.get('pki_data');
var serializedDetails = pr.get('serialized_payment_details');
var signature = pr.get('signature');

// Verify the signature
var verified = request.verify();
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/btc-lib/blob/master/CONTRIBUTING.md) on the main btc-lib repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/btc-lib/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack.
npm package: @owstack/btg-node
Description: Bitcoin Gold full node with extended capabilities.
Latest version: 0.0.1

Btg Node
============

[![NPM Package](https://img.shields.io/npm/v/@owstack/btg-node.svg?style=flat-square)](https://www.npmjs.org/package/@owstack/btg-node)
[![Build Status](https://img.shields.io/travis/owstack/btg-node.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/btg-node)
[![Coverage Status](https://img.shields.io/coveralls/owstack/btg-node.svg?style=flat-square)](https://coveralls.io/r/owstack/btg-node)

A Bitcoin Gold full node for building applications and services with Node.js. A node is extensible and can be configured to run additional services.  Additional services can be enabled to make a node more useful such as exposing new APIs, running a block explorer and wallet service.

## Install

```bash
npm install -g @owstack/btg-node
btgnode start
```

## Prerequisites

- GNU/Linux x86_32/x86_64, or OSX 64bit *(for bitcoind distributed binaries)*
- Node.js v0.10, v0.12 or v4
- ZeroMQ *(libzmq3-dev for Ubuntu/Debian or zeromq on OSX)*
- ~200GB of disk storage
- ~8GB of RAM

## Configuration

Btg-node includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Btg Node.

```bash
btgnode create -d <bitcoin-data-dir> mynode
cd mynode
btgnode install <service>
btgnode install https://github.com/yourname/helloworld
```

This will create a directory with configuration files for your node and install the necessary dependencies. For more information about (and developing) services, please see the [Service Documentation](docs/services.md).

## Add-on Services

There are several add-on services available to extend the functionality of Btg-node:

- [Explorer API](https://github.com/owstack/btg-explorer-api)
- [OWS Explorer](https://github.com/owstack/ows-explorer)
- [Btg Wallet Service](https://github.com/owstack/btg-wallet-service)

## Documentation

- [Upgrade Notes](docs/upgrade.md)
- [Services](docs/services.md)
  - [Bitcoind](docs/services/bitcoind.md) - Interface to Bitcoin Core
  - [Web](docs/services/web.md) - Creates an express application over which services can expose their web/API content
- [Development Environment](docs/development.md) - Guide for setting up a development environment
- [Node](docs/node.md) - Details on the node constructor
- [Bus](docs/bus.md) - Overview of the event bus constructor
- [Release Process](docs/release.md) - Information about verifying a release and the release process.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/owstack/btg/blob/master/CONTRIBUTING.md) file.

## License

Code released under [the MIT license](https://github.com/owstack/btg-node/blob/master/LICENSE).

Copyright 2017 Open Wallet Stack

- bitcoin: Copyright (c) 2009-2015 Bitcoin Core Developers (MIT License)
npm package: @owstack/credentials-lib
Description: A JavaScript cryptocurrency credentials library.
Latest version: 0.0.37

CredentialsLib
=======

[![NPM Package](https://img.shields.io/npm/v/credentials-lib.svg?style=flat-square)](https://www.npmjs.org/package/credentials-lib)
[![Build Status](https://img.shields.io/travis/owstack/credentials-lib.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/credentials-lib)
[![Coverage Status](https://img.shields.io/coveralls/owstack/credentials-lib.svg?style=flat-square)](https://coveralls.io/r/owstack/credentials-lib)

A JavaScript cryptocurrency credentials library.

## Get Started

```
npm install credentials-lib
```

```
bower install credentials-lib
```

## Documentation

The complete docs are hosted here: [CredentialsLib documentation](docs/index.md).

## Examples

* [Seed from Random](docs/credentials.md#seed-from-random)
* [Seed from Random with specified mnemonic](docs/credentials.md#seed-from-random-with-mnemonic)
* [Seed from Extended Private Key](docs/credentials.md#seed-from-extended-private-key)
* [Seed from Mnemonic](docs/credentials.md#seed-from-mnemonic)
* [Seed from External Wallet Public Key](docs/credentials.md#seed-from-extended-public-key)

## Security

If you find a security issue, please email security@openwalletstack.com.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/owstack/key-lib/blob/master/CONTRIBUTING.md) file.

## Building the Browser Bundle

To build a key-lib full bundle for the browser:

```sh
gulp browser
```

This will generate files named `credenitials-lib.js` and `credentials-lib.min.js`.

## Development & Tests

```sh
git clone https://github.com/owstack/credenitials-lib
cd credenitials-lib
npm install
```

Run all the tests:

```sh
gulp test
```

You can also run just the Node.js tests with `gulp test:node`, just the browser tests with `gulp test:browser`
or create a test coverage report (you can open `coverage/lcov-report/index.html` to visualize it) with `gulp coverage`.

## License

Code released under [the MIT license](https://github.com/owstack/credentials-lib/blob/master/LICENSE).

Copyright 2018 Open Wallet Stack.
npm package: @owstack/ecies
Description: ECIES support for OWS.
Latest version: 1.0.2

Btc ECIES
======

[![NPM Package](https://img.shields.io/npm/v/@owstack/ecies.svg?style=flat-square)](https://www.npmjs.org/package/@owstack/ecies)
[![Build Status](https://img.shields.io/travis/owstack/ecies.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/ecies)
[![Coverage Status](https://img.shields.io/coveralls/owstack/ecies.svg?style=flat-square)](https://coveralls.io/r/owstack/ecies)

A module for [btc][btc] that implements the [Elliptic Curve Integrated Encryption Scheme (ECIES)][ECIES]. Uses ECIES symmetric key negotiation from public keys to encrypt arbitrarily long data streams.

See [the main btc repo](https://github.com/owstack/btc) or the [btc guide on ECIES](http://btc.io/guide/module/ecies/index.html) for more information.

Credit to [@ryanxcharles][ryan] for the original implementation.

## Getting started

ECIES will allow to securely encrypt and decrypt messages using ECDSA key pairs (bitcoin cryptography).

```javascript
var alice = ECIES()
  .privateKey(aliceKey)
  .publicKey(bobKey.publicKey);

var message = 'some secret message';
var encrypted = alice.encrypt(message);

// encrypted will contain an encrypted buffer only Bob can decrypt

var bob = ECIES()
  .privateKey(bobKey)
  .publicKey(aliceKey.publicKey);
var decrypted = bob
  .decrypt(encrypted)
  .toString();
// decrypted will be 'some secret message'
```

## Contributing

See [CONTRIBUTING.md](https://github.com/owstack/ecies/blob/master/CONTRIBUTING.md) on the repo for information about how to contribute.

## License

Code released under [the MIT license](https://github.com/owstack/ecies/blob/master/LICENSE).

Copyright 2017-2019 Open Wallet Stack.

[key-lib]: http://github.com/owstack/key-lib
[ECIES]: http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme
[ryan]: http://github.com/ryanxcharles
npm package: @owstack/explorer-client
Description: A JavaScript blockchain explorer client.
Latest version: 0.0.13

Explorer Client
=======

[![NPM Package](https://img.shields.io/npm/v/@owstack/explorer-client.svg?style=flat-square)](https://www.npmjs.org/package/@owstack/explorer-client)
[![Build Status](https://img.shields.io/travis/owstack/explorer-client.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/explorer-client)
[![Coverage Status](https://img.shields.io/coveralls/owstack/explorer-client.svg?style=flat-square)](https://coveralls.io/r/owstack/explorer-client)

A JavaScript blockchain explorer client.

## Get Started

```
npm install @owstack/explorer-client
```

## Documentation

The complete docs are hosted here: [explorer-api documentation](https://github.com/owstack/explorer-api/blob/master/README.md).

## Security

If you find a security issue, please email security@openwalletstack.com.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/owstack/key-lib/blob/master/CONTRIBUTING.md) file.

## Building the Browser Bundle

To build a explorer-client full bundle for the browser:

```sh
gulp browser
```

This will generate files named `explorer-client.js` and `explorer-client.min.js`.

## Development & Tests

```sh
git clone https://github.com/owstack/explorer-client
cd explorer-client
npm install
```

Run all the tests:

```sh
gulp test
```

You can also run just the Node.js tests with `gulp test:node`, just the browser tests with `gulp test:browser`
or create a test coverage report (you can open `coverage/lcov-report/index.html` to visualize it) with `gulp coverage`.

## License

Code released under [the MIT license](https://github.com/owstack/explorer-client/blob/master/LICENSE).

Copyright 2019 Open Wallet Stack.
npm package: @owstack/explorer-lib
Description: A JavaScript blockchain explorer library.
Latest version: 0.0.9

ExplorerLib
=======

[![NPM Package](https://img.shields.io/npm/v/@owstack/explorer-lib.svg?style=flat-square)](https://www.npmjs.org/package/@owstack/explorer-lib)
[![Build Status](https://img.shields.io/travis/owstack/explorer-lib.svg?branch=master&style=flat-square)](https://travis-ci.org/owstack/explorer-lib)
[![Coverage Status](https://img.shields.io/coveralls/owstack/explorer-lib.svg?style=flat-square)](https://coveralls.io/r/owstack/explorer-lib)

A JavaScript blockchain explorer library.

## Get Started

```
npm install @owstack/explorer-lib
```

## Documentation

The complete docs are hosted here: [explorer-api documentation](https://github.com/owstack/explorer-api/blob/master/README.md).

## Security

If you find a security issue, please email security@openwalletstack.com.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/owstack/key-lib/blob/master/CONTRIBUTING.md) file.

## Building the Browser Bundle

To build a explorer-lib full bundle for the browser:

```sh
gulp browser
```

This will generate files named `explorer-lib.js` and `explorer-lib.min.js`.

## Development & Tests

```sh
git clone https://github.com/owstack/explorer-lib
cd explorer-lib
npm install
```

Run all the tests:

```sh
gulp test
```

You can also run just the Node.js tests with `gulp test:node`, just the browser tests with `gulp test:browser`
or create a test coverage report (you can open `coverage/lcov-report/index.html` to visualize it) with `gulp coverage`.

## License

Code released under [the MIT license](https://github.com/owstack/explorer-lib/blob/master/LICENSE).

Copyright 2019 Open Wallet Stack.