Skip to Content
Mastering Bitcoin, 2nd Edition
book

Mastering Bitcoin, 2nd Edition

by Andreas M. Antonopoulos
June 2017
Beginner to intermediate
411 pages
11h 3m
English
O'Reilly Media, Inc.
Content preview from Mastering Bitcoin, 2nd Edition

Appendix D. Bitcore

Bitcore is a suite of tools provided by BitPay. Its goal is to provide easy-to-use tools for Bitcoin developers. Almost all of Bitcore’s code is written in JavaScript. There are some modules written specifically for NodeJS. Finally, the “node” module of Bitcore includes Bitcoin Core’s C++ code. Please see https://bitcore.io for more information.

Bitcore’s Feature List

  • Bitcoin full node (bitcore-node)

  • Block explorer (insight)

  • Block, transaction, and wallet utilities (bitcore-lib)

  • Communicating directly with Bitcoin’s P2P network (bitcore-p2p)

  • Seed entropy mnemonic generation (bitcore-mnemonic)

  • Payment protocol (bitcore-payment-protocol)

  • Message verification and signing (bitcore-message)

  • Elliptic curve Integrated Encryption Scheme (bitcore-ecies)

  • Wallet service (bitcore-wallet-service)

  • Wallet client (bitcore-wallet-client)

  • Playground (bitcore-playground)

  • Integrating services directly with Bitcoin Core (bitcore-node)

Bitcore Library Examples

Prerequisities

If using NodeJS and the node REPL:

$ npm install -g bitcore-lib bitcore-p2p
$ NODE_PATH=$(npm list -g | head -1)/node_modules node

Wallet Examples using bitcore-lib

Creating a new bitcoin address with associated private key:

> bitcore = require('bitcore-lib')
> privateKey = new bitcore.PrivateKey()
> address = privateKey.toAddress().toString()

Creating a hierarchical deterministic private key and address:

> hdPrivateKey = bitcore.HDPrivateKey() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Bitcoin, 3rd Edition

Mastering Bitcoin, 3rd Edition

Andreas M. Antonopoulos, David A. Harding
Mastering Bitcoin

Mastering Bitcoin

Andreas M. Antonopoulos
The Bitcoin Standard

The Bitcoin Standard

Saifedean Ammous
Grokking Bitcoin

Grokking Bitcoin

Kalle Rosenbaum

Publisher Resources

ISBN: 9781491954379Errata Page