Skip to main content

Bitcoin utility functions

Project description

This is a bitcoin library that provides tools/utilities to interact with the Bitcoin network. One of the primary goals of the library is to explain the low-level details of Bitcoin. The code is easy to read and properly documented explaining in detail all the thorny aspects of the implementation. It is a low-level library which assumes some high-level understanding of how Bitcoin works. In the future this might change.

This is a very early version of the library (v0.0.5) and currently, it only supports private/public keys, addresses and creation of P2PKH transactions (with all SIGHASH types). More functionality will be added continuously and the documentation will be improved as the work progresses.

The API documentation can be build with Sphinx but is also available as a PDF for convenience. One can currently use the library for experimenting and learning the inner workings of Bitcoin. It is not meant for production yet and parts of the API might be updated with new versions.

Installation

$ pip install bitcoin-utils

Examples

Keys and Addresses

https://github.com/karask/python-bitcoin-utils/blob/master/examples/keys_addresses.py - creates a private key which we use to derive a public key and in turn an address. We also use the private key to sign a message and then verify it using the public key.

Create P2PKH Transaction

https://github.com/karask/python-bitcoin-utils/blob/master/examples/p2pkh_transaction.py - creates a simple transaction with one input and two outputs.

Please explore the code base or the API documentation (BitcoinUtilities.pdf) for supported functionality and other options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitcoin-utils-0.0.5.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

bitcoin_utils-0.0.5-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file bitcoin-utils-0.0.5.tar.gz.

File metadata

  • Download URL: bitcoin-utils-0.0.5.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for bitcoin-utils-0.0.5.tar.gz
Algorithm Hash digest
SHA256 445d4be8be771f7088e5857d96cd100cc109fb9479e98931a242d58e6d00cfe4
MD5 4ac9681ab1a1bab62b40c957ca98bb8a
BLAKE2b-256 ebe87909ff5759224b0e0255f748809a245275625c24e1127b8741d3e64387bd

See more details on using hashes here.

File details

Details for the file bitcoin_utils-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: bitcoin_utils-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for bitcoin_utils-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 939d92994d698f9ece036f4c39081059cb39c1387bd2a0fe9b7a23dfc591f0ee
MD5 148c6e02f6ef417f888466b215697dc9
BLAKE2b-256 784554594b9805189d00d67b96172a9097fdf1960cf72c92cea3c5e1b1d72b23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page