UPDATED 15:47 EDT / DECEMBER 29 2015

finger on a keyboard NEWS

21, Inc. releases comprehensive 21 Bitcoin Library for developers

Today 21, Inc. producer of the 21 Bitcoin Computer, a tiny programmable Linux machine with a Bitcoin miner attached, announced the release of a comprehensive library for use with the machine. This is expected to be the first step on a roadmap towards a portable open-source release.

This continues 21’s strong show for its developer community, which appears to be aiming for a distributed autonomous network layer where developers (and devices) can expose jobs to the network and pay for work in bitcoins. This has obvious implications for an Internet of Things marketplace and has been proof-of-concept tested by Jeff Garzik, Bitcoin core developer.

The 21 Bitcoin Library is written in Python 3 and the core module is available under the namespace “two1.lib.bitcoin” with documentation available from the 21 Bitcoin Library website.

The core key features include:

  • Classes for major Bitcoin data structures, like blocks, block headers, transactions, scripts, public and private keys, and digital signatures;
  • Code to consistently serialize and deserialize these data structures to and from raw byte representations;
  • Creation of standard scripts (Pay-to-Public-Key-Hash [P2PKH] and Pay-to-Script-Hash [P2SH]) as well as multi-sig support;
  • Transaction creation, signing, verification, and broadcasting, including for multisig transactions;
  • Standard public/private key generation as well as generation of keys for HD wallets;
  • Utilities for working with Bitcoin’s various idiosyncrasies, from parsing variable length integers to converting difficulties to bits and back.

The second module is the 21 Blockchain Library, which is accessible from the “two1.lib.blockchain” namespace. This library provides an API for requesting transaction and block data from a blockchain provider (in this case the Bitcoin blockchain). The API also allows the submission of transactions to the provider for inclusion in new blocks.

The third module is the 21 Machine Wallet Library, which is accessible from the “two1.lib.wallet” namespace. This provides a wallet that is optimized for machine-to-machine transactions that connects directly to the 21 Mining Chip, combined with every 21 Bitcoin Computer. The announcement added that the wallet conforms to both BIP-32 and BIP-44 standards.

The final module is the 21 Crypto Library, which is accessible from the “two1.lib.crypto” namespace. With this module, developers can access low-level cryptographic functions used for Bitcoin transactions for creating public key signatures using Elliptic Curve Digital Signature Algorithm (ECDSA) on the secp256k1 curve. This module provides two sub-modules, one which uses OpenSSL if the OpenSSL library is available on the system and the second sub-module is a pure Python module designed to be more portable, but comes with less performance optimizations and is not as fully audited.

Developers interested in the new library can see the whole documentation on the 21 Bitcoin Computer reference website and those new to the system can find tutorials at 21.co/learn.

Featured image credit: Photo via Pixabay

A message from John Furrier, co-founder of SiliconANGLE:

Your vote of support is important to us and it helps us keep the content FREE.

One click below supports our mission to provide free, deep, and relevant content.  

Join our community on YouTube

Join the community that includes more than 15,000 #CubeAlumni experts, including Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger, and many more luminaries and experts.

“TheCUBE is an important partner to the industry. You guys really are a part of our events and we really appreciate you coming and I know people appreciate the content you create as well” – Andy Jassy

THANK YOU