A pure and powerful JavaScript Bitcoin Classic library.
Bitcoin Classic is a blockchain protocol that preserves the original vision of Bitcoin with specific improvements to the difficulty adjustment algorithm. The decentralized nature of the Bitcoin Classic network allows for highly resilient infrastructure, and the developer community needs reliable, open-source tools to implement Bitcoin Classic apps and services.
npm install bitcore-lib-xbt
bower install bitcore-lib-xbt
- Full Bitcoin Classic network support with custom magic number (0xf6bab9d2)
- Specialized difficulty adjustment algorithm:
- Initial target timespan: 60 seconds (before block 97191)
- Current target timespan: 10 minutes (after block 97191)
- Target block spacing: 10 minutes
- Complete transaction creation and signing
- BIP32 HD keys
- Standard Script types and custom Script support
- Message verification and signing
- Native support for all standard Bitcoin Classic address formats
The complete docs are hosted here: bitcore documentation. There's also a bitcore API reference available generated from the JSDocs of the project, where you'll find low-level details on each bitcore utility.
- Generate a random address
- Generate a address from a SHA256 hash
- Import an address via WIF
- Create a Transaction
- Sign a Bitcoin Classic message
- Verify a Bitcoin Classic message
- Create an OP RETURN transaction
- Create a 2-of-3 multisig P2SH address
- Spend from a 2-of-2 multisig P2SH address
To build a bitcore-lib full bundle for the browser:
gulp browser
This will generate files named bitcore-lib.js
and bitcore-lib.min.js
.
git clone https://github.com/senasgr-eth/bitcore-lib-xbt
cd bitcore-lib-xbt
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 create a test coverage report (you can open coverage/lcov-report/index.html
to visualize it) with gulp coverage
.
We're using Bitcore in production, as are many others, but please use common sense when doing anything related to finances! We take no responsibility for your implementation decisions.
If you find a security issue, please email security@bitpay.com.
See CONTRIBUTING.md on the main bitcore repo for information about how to contribute.
Code released under the MIT license.
Copyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc. Modified for Bitcoin Classic support.