UPDATED 15:47 EST / 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:

Support our mission to keep content open and free by engaging with theCUBE community. Join theCUBE’s Alumni Trust Network, where technology leaders connect, share intelligence and create opportunities.

  • 15M+ viewers of theCUBE videos, powering conversations across AI, cloud, cybersecurity and more
  • 11.4k+ theCUBE alumni — Connect with more than 11,400 tech and business leaders shaping the future through a unique trusted-based network.
About SiliconANGLE Media
SiliconANGLE Media is a recognized leader in digital media innovation, uniting breakthrough technology, strategic insights and real-time audience engagement. As the parent company of SiliconANGLE, theCUBE Network, theCUBE Research, CUBE365, theCUBE AI and theCUBE SuperStudios — with flagship locations in Silicon Valley and the New York Stock Exchange — SiliconANGLE Media operates at the intersection of media, technology and AI.

Founded by tech visionaries John Furrier and Dave Vellante, SiliconANGLE Media has built a dynamic ecosystem of industry-leading digital media brands that reach 15+ million elite tech professionals. Our new proprietary theCUBE AI Video Cloud is breaking ground in audience interaction, leveraging theCUBEai.com neural network to help technology companies make data-driven decisions and stay at the forefront of industry conversations.