Skip to content
 
 

Repository files navigation

Bitcore Library (Zero)

NPM Package

A pure and powerful JavaScript library for the Zero (ZER) chain. bitcore-lib-zero is the lowest layer of the Zero Insight stack: it provides addresses, transactions, scripts, and serialization primitives that bitcore-node-zero and insight-api-zero build on. It is a fork of BitPay's bitcore-lib, retargeted to Zero's parameters.

Source-of-record copy. This README is the corrected version staged under error/bitcore-lib-zero/ in the Insight docs repo: dead upstream links pruned and the generic-Bitcoin framing replaced with the actual Zero usage.

Lineage: this is the Zero rename-fork of the Zcash Insight stack (str4d/insight-api-zcash, str4d/insight-ui-zcash), itself derived from BitPay's bitcore-node and bitcore-lib.

Get Started

npm install zerocurrencycoin/bitcore-lib-zero
bower install zerocurrencycoin/bitcore-lib-zero

This library is normally pulled in transitively when you install bitcore-node-zero; install it directly only when developing against the primitives.

Documentation

The upstream BitPay bitcore documentation and API reference still describe the shared API surface. Zero-specific differences (network magic, address version bytes, the Sapling/ shielded transaction fields) live in this fork's source, not in the upstream docs.

Examples

The upstream example set applies to the transparent-address API:

Security

Use common sense when handling anything related to finances; this code carries no warranty. If you find a security issue in the Zero fork, report it to the zerocurrencycoin maintainers via the repository issue tracker.

Building the Browser Bundle

To build a full browser bundle:

gulp browser

This generates bitcore-lib.js and bitcore-lib.min.js.

Development & Tests

git clone https://github.com/zerocurrencycoin/bitcore-lib-zero
cd bitcore-lib-zero
npm install

Run all the tests:

gulp test

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

Built and tested under Node.js v8.17.0, matching the rest of the Zero Insight stack. The dependency tree is frozen circa 2021; newer Node is not supported.

License

Code released under the MIT license.

Copyright 2013-2015 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.

About

Modified for Zero

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages