Skip to main content

Tools for experimenting with Bitcoin Core

Project description

verystable

(Because it's not very stable.)

This project contains a number of useful Python bindings for interaction with bitcoin.

Eventually it will contain a gallery of examples for doing useful things like interacting with the P2P network and building interesting scripts.

[!WARNING] This project is not maintained with use of real (mainnet) funds in mind. The bulk of the code comes from a test framework that is intended for use with regtest only. You might lose money using this!

Notably, this project copies the Bitcoin Core functional test framework in its entirety for use, which contains a number of helpful utilities.

This gives us good utilities for interacting with the P2P layer (p2p.P2PInterface) as well as handling process-level bitcoind invocation (test_node.TestNode).

This module could help with a variety of tasks:

  • building a local relay which adapts the user's choice of protocol to bitcoin P2P messages,
  • monitoring via the P2P network,
  • programmatic management of bitcoind instances,
  • general utilities related to bitcoin,
  • and more.

Installation

$ git clone https://github.com/jamesob/verystable.git
$ cd verystable
$ pip install -e .

# The bitcoincore module is then importable.
$ python
>>> import verystable
>>> verystable.core.p2p.MAGIC_BYTES
{'mainnet': b'\xf9\xbe\xb4\xd9',
 'testnet3': b'\x0b\x11\t\x07',
 'regtest': b'\xfa\xbf\xb5\xda',
 'signet': b'\n\x03\xcf@'}

Examples

Examples are contained in examples/.

Pulling from upstream

To update the imported Bitcoin Core functional test framework code,

  • run ./pull-from-upstream.sh <bitcoin-core-repo-path>
  • examine/commit the diff
  • bump the pyproject.toml version number if needed

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

verystable-25.99.0.dev0.tar.gz (112.0 kB view details)

Uploaded Source

Built Distribution

verystable-25.99.0.dev0-py3-none-any.whl (124.6 kB view details)

Uploaded Python 3

File details

Details for the file verystable-25.99.0.dev0.tar.gz.

File metadata

  • Download URL: verystable-25.99.0.dev0.tar.gz
  • Upload date:
  • Size: 112.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for verystable-25.99.0.dev0.tar.gz
Algorithm Hash digest
SHA256 f2d52179dee5a1f683c30cff4c21c34e6c79992f3181220a1605fa92b1d3f8c8
MD5 57039c8bd91275b75b38a0b5e5309701
BLAKE2b-256 9123afdba1c6fabc68ca1cf884b65dd5592834d2f7fd4d84788db76963c3e116

See more details on using hashes here.

File details

Details for the file verystable-25.99.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for verystable-25.99.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef19f5d2f77b4e1cd49d60ecf8c0371669c0e5695715b1b2f04a5f3868fbc494
MD5 b42b30dfdecf05cbd83e6c8d705138d4
BLAKE2b-256 a25d3b3bba5a772e36e69858da53e9f608d59994bc7f94ff2a0079b89a504485

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