Libbitcoin Common: Difference between revisions

From Bitcoin Wiki
Jump to navigation Jump to search
Evoskuil (talk | contribs)
Evoskuil (talk | contribs)
m move bullet to different secion
Line 38: Line 38:
* [http://utf8everywhere.org UTF8 Everywhere] tools and integration for Windows
* [http://utf8everywhere.org UTF8 Everywhere] tools and integration for Windows
* Command line, configuration file and help processing utilities
* Command line, configuration file and help processing utilities
* Uses C++11 advancements and restricts use of pointers and exceptions


==Build and Quality Control==
==Build and Quality Control==
Line 47: Line 46:
* Visual Studio 2013 project and solution files
* Visual Studio 2013 project and solution files
* Support for 32/64 bit processors and [http://en.wikipedia.org/wiki/Endianness endianness] differences
* Support for 32/64 bit processors and [http://en.wikipedia.org/wiki/Endianness endianness] differences
* Uses C++11 advancements and restricts use of pointers and exceptions


==Dependencies==
==Dependencies==

Revision as of 01:47, 14 May 2015

The common libbitcoin library is a dependency of all others with the exception of libbitcoin-consensus. It was the first library created and originally contained the core functionality of all of the others.

Example

   #include <iostream>
   #include <string>
   #include <bitcoin/bitcoin.hpp>
   
   int main()
   {
       const auto block = bc::genesis_block();
       const auto& tx = block.transactions[0];
       const auto& input = tx.inputs[0];
       const auto script = bc::save_script(input.script);
       std::string message(script.begin(), script.end());
       std::cout << message << std::endl;
       return 0;
   }
   ♦   ↔☺♦EThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks

Bitcoin Related Features

  • Key formats (raw, BIP32, WIF, compressed/uncompressed, minikey)
  • Encoding functions (base 2/10/16/58/64/85)
  • Hash functions (ripemd160, sha1, sha256, sha512, hmac_sha256, hmac_sha512, pkcs5_pbkdf2_hmac_sha512)
  • URL parsing (BIP21 and BIP72)
  • Mnemonic functions (BIP39)
  • All published mnemonic dictionaries
  • Curve math, deterministic ECDSA, verification and encryption functions
  • Address functions (P2PKH and P2SH/BIP16),
  • Stealth addresses functions[1] for wallets and blockchain search
  • Wire and text serializable type library (P2P protocol)
  • Bitcoin script engine (see libbitcoin-consensus for more information)
  • Asynchronous P2P networking stack built on ASIO

General Purpose Features

  • Logging utilities
  • Patricia Trie template optimized for binary search
  • UTF8 Everywhere tools and integration for Windows
  • Command line, configuration file and help processing utilities

Build and Quality Control

  • Autotools builds for GCC/Clang
  • All build artifacts generated by libbitcoin-build
  • Extensive unit text matrix (based on Boost Test)
  • Continuous integration builds via Travis-CI
  • Visual Studio 2013 project and solution files
  • Support for 32/64 bit processors and endianness differences
  • Uses C++11 advancements and restricts use of pointers and exceptions

Dependencies

See Also

References