Skip to main content

Crate bitcoin_core_sv2

Crate bitcoin_core_sv2 

Source
Expand description

§Bitcoin Core Sv2 Library

bitcoin_core_sv2 bridges Bitcoin Core IPC with Stratum V2 protocols:

§Overview

bitcoin_core_sv2 can be used to:

  • Build Sv2 applications acting as TDP clients (for example Pool or JDC) connected directly to a Bitcoin Core node.
  • Build Sv2 template-provider applications acting as TDP servers backed by Bitcoin Core.
  • Build Sv2 applications acting as JDP servers (for example Pool or JDS) connected directly to a Bitcoin Core node.

§Module layout

  • common exposes version-agnostic runtime handles and protocol-specific new(version, ...) factories with enum dispatch across backend versions.
  • unix_capnp::v30x contains the Bitcoin Core v30.x IPC implementation.
  • unix_capnp::v31x contains the Bitcoin Core v31.x IPC implementation.

§Flavor direction

unix_capnp is the currently implemented backend flavor. The crate keeps this flavor name explicit to leave room for additional backend families in the future (for example, a tcp_capnp flavor or an http_json_rpc flavor).

Downstream applications should integrate through common and choose a common::BitcoinCoreVersion at runtime.

Backend-specific IPC/runtime constraints are documented under unix_capnp.

Modules§

common
Version-agnostic API for Bitcoin Core IPC integrations.
unix_capnp
Bitcoin Core IPC-backed protocol runtimes.

Constants§

MIN_BLOCK_RESERVED_WEIGHT
The minimum block reserved weight established by Bitcoin Core.