# @owstack/btc-lib

> A Javascript library to build bitcoin and blockchain-based applications.

Latest version **0.1.27** (published 2019-05-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @owstack/btc-lib
pnpm add @owstack/btc-lib
yarn add @owstack/btc-lib
bun add @owstack/btc-lib
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.27 |
| Published | 2019-05-16 |
| First published | 2017-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | ajp8164, niahmiah |
| Keywords | bitcoin, btc, transaction, address, p2p, ecies, cryptocurrency, blockchain, payment, bip21, bip32, bip37, bip69, bip70, multisig |

## Links

- npm: https://www.npmjs.com/package/@owstack/btc-lib
- Repository: https://github.com/owstack/btc-lib
- Homepage: https://github.com/owstack/btc-lib#readme
- Issues: https://github.com/owstack/btc-lib/issues
- npm.io page: https://npm.io/package/@owstack/btc-lib

## Dependencies (5)

- [inherits](https://npm.io/package/inherits.md) =2.0.1
- [buffer-compare](https://npm.io/package/buffer-compare.md) =1.0.0
- [@owstack/key-lib](https://npm.io/package/@owstack/key-lib.md) ^0.0.41
- [@owstack/ows-common](https://npm.io/package/@owstack/ows-common.md) ^0.0.17
- [@owstack/network-lib](https://npm.io/package/@owstack/network-lib.md) ^0.0.31

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.1.27 (latest) — 2019-05-16
- 0.1.26 — 2019-04-26
- 0.1.25 — 2019-04-01
- 0.1.24 — 2019-03-11
- 0.1.23 — 2019-03-10
- 0.1.22 — 2019-03-08
- 0.1.21 — 2019-02-28
- 0.1.20 — 2019-02-28
- 0.1.19 — 2019-02-27
- 0.1.18 — 2019-02-06
- 0.1.17 — 2019-02-06
- 0.1.16 — 2019-02-06
- 0.1.15 — 2019-02-06
- 0.1.14 — 2019-02-01
- 0.1.13 — 2019-01-08
- … 19 more at https://npm.io/package/@owstack/btc-lib/versions

## README

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.

---
_Source: https://npm.io/package/@owstack/btc-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
