From 36dd69b37d9c3686a42615e65b015f5a9c34daf8 Mon Sep 17 00:00:00 2001 From: Jordan Day Date: Sat, 4 Jun 2016 19:12:30 -0500 Subject: [PATCH] Fix README formatting --- README => README.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) rename README => README.md (92%) diff --git a/README b/README.md similarity index 92% rename from README rename to README.md index 354e7937..417e9677 100644 --- a/README +++ b/README.md @@ -1,5 +1,4 @@ -python-bitcoinlib ------------------ +# python-bitcoinlib This Python2/3 library provides an easy interface to the bitcoin data structures and protocol. The approach is low-level and "ground up", with a @@ -8,8 +7,7 @@ focus on providing tools to manipulate the internals of how Bitcoin works. "The Swiss Army Knife of the Bitcoin protocol." - Wladimir J. van der Laan -Requirements ------------- +## Requirements sudo apt-get install libssl-dev @@ -17,8 +15,7 @@ The RPC interface, bitcoin.rpc, is designed to work with Bitcoin Core v0.11.0 Older versions mostly work but there do exist some incompatibilities. -Structure ---------- +## Structure Everything consensus critical is found in the modules under bitcoin.core. This rule is followed pretty strictly, for instance chain parameters are split into @@ -49,16 +46,14 @@ corresponding Satoshi C++ code uses the same naming conventions: CTransaction, CBlockHeader, nValue etc. Otherwise Python naming conventions are followed. -Mutable vs. Immutable objects ------------------------------ +# Mutable vs. Immutable objects Like the Bitcoin Core codebase CTransaction is immutable and CMutableTransaction is mutable; unlike the Bitcoin Core codebase this distinction also applies to COutPoint, CTxIn, CTxOut, and CBlock. -Endianness Gotchas ------------------- +# Endianness Gotchas Rather confusingly Bitcoin Core shows transaction and block hashes as little-endian hex rather than the big-endian the rest of the world uses for @@ -68,16 +63,14 @@ accomodate this. In addition see b2x() and b2lx() for conversion from bytes to big/little-endian hex. -Module import style -------------------- +# Module import style While not always good style, it's often convenient for quick scripts if import * can be used. To support that all the modules have __all__ defined appropriately. -Example Code ------------- +# Example Code See examples/ directory. For instance this example creates a transaction spending a pay-to-script-hash transaction output: @@ -89,8 +82,7 @@ Also see dust-b-gone for a simple example of Bitcoin Core wallet interaction through the RPC interface: https://github.com/petertodd/dust-b-gone -Selecting the chain to use --------------------------- +# Selecting the chain to use Do the following: @@ -102,8 +94,7 @@ selected is a global variable that changes behavior everywhere, just like in the Satoshi codebase. -Unit tests ----------- +# Unit tests Under bitcoin/tests using test data from Bitcoin Core. To run them: @@ -128,8 +119,7 @@ skipped): HTML coverage reports can then be found in the htmlcov/ subdirectory. -Documentation -------------- +# Documentation Sphinx documentation is in the "doc" subdirectory. Run "make help" from there to see how to build. You will need the Python "sphinx" package installed.