Welcome to PYBTC

Python library for Bitcoin.

Current version is 2.0.

Key Features

  • Supports addresses types PUBKEY, P2PKH, P2SH, P2SH-PWPKH, P2WPKH, P2WSH.
  • Supports BIP32(Hierarchical Deterministic Wallets), BIP39(Mnemonic code generation)
  • Supports BIP141(Segregated Witness)
  • Transaction constructor
  • Mining pool basic primitives

Quick library Installation

$ pip install pybtc

Getting Started

Usage example:

import pybtc
a = pybtc.Address()
print(a.address)
print(a.private_key.wif)

What’s new in pybtc 2.0 ?

  • Mnemonic code generation (BIP39)
  • Hierarchical Deterministic Wallets (BIP32)
  • Wallet class implemented acording BIP44
  • Imporved transaction deserialization perfomance
  • Multisig transacton signing regardless of sequence

Source code

The project is hosted on GitHub

Please feel free to file an issue on the bug tracker if you have found a bug or have some suggestion in order to improve the library.

Dependencies

  • Python 3.3.3+
  • secp256k1

Authors and License

The pybtc package was initially written by Aleksey Karpov and development continues with contributors.

Recent contributors:

It’s GPL-3.0 licensed and freely available.

Feel free to improve this package and send a pull request to GitHub.