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.4) 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.4.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

bitcoin_utils-0.0.4-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bitcoin-utils-0.0.4.tar.gz
  • Upload date:
  • Size: 13.5 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.4.tar.gz
Algorithm Hash digest
SHA256 90523622c88eafe5533005b1f4060051af9240887ff9558de3b8efd0cc9dd3c1
MD5 0616aec7031c0f931b1f2f2e8575075a
BLAKE2b-256 4780de09e353cf1cb9d7af30dd3ef00655c9632e78a80a8e5d5f06e0eab9dfa3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bitcoin_utils-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b9600e77c9525239b70906037e70cf737a7c977d58a23f2d3ed381f8f2b2e6a1
MD5 306c48b9fc2834b0dc945a3dd24ed7fb
BLAKE2b-256 28c721c1a57fb34612ab0c3533f27e64c99d09100fb7b1d980ab4465d973685f

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