skillfed

chiabip158

Chia BIP158 (wraps C++)

chiabip158 v1.5.4 427.3K downloads/30d#6,752 on PyPI2
Permissive license Apache License Active released

What it is and what it does

chiabip158 is a Python wrapper around a C++ implementation of BIP 158, the Bitcoin Improvement Proposal standard for compact block filters. It provides the core algorithm for constructing and working with block filters—a space-efficient way to represent which transactions are in a block without transmitting the full block data. This is foundational infrastructure for lightweight blockchain clients and indexing systems.

The package is maintained by the Chia Network and serves as a reference implementation and building block for BIP 157 support (which adds a network protocol for distributing these filters). It has no Python runtime dependencies, relying entirely on its compiled C++ core. Installation is straightforward on modern Python versions via prebuilt wheels, though older Python versions may require a C++ compiler and build tools.

Use it for:

  • Building lightweight blockchain clients that need to filter blocks without downloading full block data
  • Implementing block indexing systems that construct and store BIP 158 filters for historical blockchain data
  • Developing BIP 157 network protocol support to serve block filters to other clients
  • Cryptocurrency wallet applications that need efficient block scanning without full node overhead
  • Blockchain analysis and research requiring compact filter generation and querying

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements the BIP 158 compact block filter construction algorithm, providing a C++ backend wrapped for Python to generate and work with block filters for blockchain applications.

Yes, if you are building or contributing to Chia blockchain infrastructure or implementing BIP 158/157 support. The package is actively maintained, has no external dependencies, and offers prebuilt wheels for modern Python versions. Install friction is moderate but manageable. Not relevant for general-purpose Python development outside blockchain contexts.

Install

chiabip158 on PyPI

pip

pip install chiabip158

uv

uv add chiabip158

poetry

poetry add chiabip158

Installing chiabip158

Before you install

Medium install friction due to compiled C++ bindings; prebuilt wheels available for multiple Python versions on macOS, Linux (x64 and aarch64), and Windows. No runtime dependencies. Last release 281 days ago; repository is active with recent commits.

License in practice

Licensed under Apache License (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

pip install chiabip158

import chiabip158
# Use the module's filter construction functions as documented in the repository

Requires Python 3.7 or later; prebuilt wheels available for modern Python versions. Older Python versions may require compilation from source.

Verify before relying

  • What specific functions or classes are exposed by the module for filter construction and querying
  • Whether the package is actively used in production Chia blockchain deployments or remains primarily a reference implementation
  • Performance characteristics and filter size/speed trade-offs compared to alternative implementations

Package facts

License Apache License (permissive)
Python support supports the current Python release (>=3.7)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 281 days since the last release
Last repo commit
First released
Downloads 427,269/month — #6,752 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: chiabip158-1.5.4-cp310-cp310-macosx_13_0_arm64.whl; chiabip158-1.5.4-cp310-cp310-macosx_13_0_x86_64.whl; chiabip158-1.5.4-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; chiabip158-1.5.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; chiabip158-1.5.4-cp310-cp310-win_amd64.whl; chiabip158-1.5.4-cp311-cp311-macosx_13_0_arm64.whl; chiabip158-1.5.4-cp311-cp311-macosx_13_0_x86_64.whl; chiabip158-1.5.4-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; chiabip158-1.5.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; chiabip158-1.5.4-cp311-cp311-win_amd64.whl; chiabip158-1.5.4-cp312-cp312-macosx_13_0_arm64.whl; chiabip158-1.5.4-cp312-cp312-macosx_13_0_x86_64.whl; chiabip158-1.5.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; chiabip158-1.5.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; chiabip158-1.5.4-cp312-cp312-win_amd64.whl; chiabip158-1.5.4-cp313-cp313-macosx_13_0_arm64.whl; chiabip158-1.5.4-cp313-cp313-macosx_13_0_x86_64.whl; chiabip158-1.5.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; chiabip158-1.5.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; chiabip158-1.5.4-cp313-cp313-win_amd64.whl

Tags

BIP 158 block filterscompact block filter constructionblockchain filter implementationBIP 157 support libraryblock filter generationcryptocurrency block indexingChia network filters
blockchaincryptographybip-158

More Cryptography packages