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:

Support our open free content by sharing and engaging with our content and community.

Join theCUBE Alumni Trust Network

Where Technology Leaders Connect, Share Intelligence & Create Opportunities

11.4k+  
CUBE Alumni Network
C-level and Technical
Domain Experts
15M+ 
theCUBE
Viewers
Connect with 11,413+ industry leaders from our network of tech and business leaders forming a unique trusted network effect.

SiliconANGLE Media is a recognized leader in digital media innovation serving innovative audiences and brands, bringing together cutting-edge technology, influential content, strategic insights and real-time audience engagement. As the parent company of SiliconANGLE, theCUBE Network, theCUBE Research, CUBE365, theCUBE AI and theCUBE SuperStudios — such as those established in Silicon Valley and the New York Stock Exchange (NYSE) — 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 powerful ecosystem of industry-leading digital media brands, with a reach of 15+ million elite tech professionals. The company’s 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.