Announcing the Bcoin v1.0.0 Beta Release

The most advanced bitcoin fullnode implementation to date (http://bcoin.io)

We’re happy to finally announce the official v1.0.0 beta release of bcoin. The development for bcoin started almost 2 years ago. And, after many headaches and long sleepless nights — it’s ready for mainstream use.

Bcoin’s development history is pretty interesting, Andreas Antonopoulos said it best in a recent episode of Let’s Talk Bitcoin featuring bcoin main developer, Christopher “JJ” Jeffrey:

[Bcoin] sounds like a case of monumental scope creep, with a happy ending.

After endless increases in project scope, and narrowing down exactly what was needed for a scaleable bitcoin fullnode implementation that met our needs for ecommerce at Purse — we’re really proud of what has been created.

What originally started as a simple SPV wallet proof-of-concept by node.js wizard, Fedor Indutny - has now grown into a full-fledged alternative to the current reference implementation currently maintained by Bitcoin Core. Built in node.js, bcoin can be implemented almost anywhere, and is great for hacking together ideas and experimenting with new concepts.

What’s in the Box?

The bcoin fullnode implementation can do anything a normal bitcoin library can do, and so much more. The codebase is very modular and loosely coupled, allowing for a plethora of various configurations depending upon your bitcoin development needs.

Bcoin natively supports all the latest BIPs and proposed improvements to the bitcoin protocol, like SegWit. It includes a full REST API, as well as the legacy JSON RPC API that exists in bitcoind.

Recent Improvements for v1.0.0(beta):

  • Thoroughly tested mining backend (getblocktemplate), bcoin is ready for mining. (Check out the bcoin stratum, here).
  • Tor and SOCKS proxy support

Previous Feature List:

  • Browserifiable and SPV mode
  • Full blockchain validation
  • Blockchain database
  • Mempool/Miner
  • Wallet system & wallet database (HD keys w/ BIP44 derivation)
  • Tor support for outbound connections and DNS resolution
  • Bitcoind-compatible JSON RPC API
  • Fully-featured REST API for node & wallet
  • Support for: Versionbits, CSV, Segwit, BIP70, BIP151, BIP152, BIP150, and MAST.

For more information, see our last post on bcoin, here.

Help Build Bcoin

Interested in giving back to bcoin development? Assisting is as easy as downloading the bcoin npm package, and running `bcoin` to become a node on the network.

Download bcoin & run a node:

To download the bcoin npm, open your Terminal and enter:
npm install -g bcoin@1.0.0-beta
After the install has completed, run `bcoin` to begin syncing the bitcoin blockchain.

You can also easily test out bcoin by syncing your bcoin node, too, via SPV, and generating an API key. Below is an example:

Start by running: 
bcoin --api-key="foobar" --http-host=0.0.0.0 --spv
Once your SPV node has fully synced, you're ready to test the API.
Once your SPV wallet has synced you can generate an API key
Run:
bcoin-cli info --api-key="foobar"
To return the info about your node.
Information for your bcoin node

Then, you can use this API key to create a new wallet.

Run:
bcoin-cli wallet account get default --api-key="foobar"

Notice once you create your new wallet, the terminal to the right shows this action being completed on your bcoin node.

Now, if we want to test using the HTTP API, first we’ll create a new wallet, and copy the unique token associated with that wallet.

This unique token is used to access that particular wallet. You will need to copy it once it has generated to work with that particular wallet. This special wallet token only displays once on creation.

Run:
bcoin-cli wallet create examplewallet --api-key='foobar'
Make sure you copy your unique wallet token, you’ll need it to query the wallet.

Now we can make a simple curl request and query the wallet with our newly generated token to return information about examplewallet.

Run:
curl http://x:foobar@localhost:8332/wallet/examplewallet?token=PasteYourWalletTokenHere
Once you make your curl request, the API will return the wallet information from your query.

And there you have it, you’ve downloaded bcoin, synced your node via SPV (we recommend a fullnode sync after reading to support the bitcoin network), generated an API key, created a bitcoin wallet, and successfully queried it.

Contribute Code & Examples

Getting your hands on the codebase more your style? Fork bcoin, and start making pull-requests to the public repo. Bcoin is an excellent tool to start learning the ins and outs of bitcoin protocol development, as many developers are familiar with javascript/node.js.

After you’ve played around with the code, feel free to help build examples and tutorials for others to learn as well.

Want to learn more or have questions? You can also get assistance by joining #bcoin on freenode IRC, and speak with JJ and other bitcoin developers. Come join and start building something great!

Register for the bcoin hackathon in San Francisco

Want to build some more? If you’re in the San Francisco Bay Area or plan to be the weekend of March 24th, 2017 — bcoin is having a hackathon at HackReactor HQ. Event is sponsored by HackReactor, Purse.io, and GenLife.

Top prize includes 1 bitcoin, a signed copy of The Internet of Money by Andreas Antonopoulos and a Ledger Nano S! To get more information and register, check out http://bcoinhackathon.com.

Come hang out with JJ, Olaoluwa (Roasbeef) and Mason Borda, win great prizes.
Heart this post if you enjoyed it!