#bitcoin #mining #stratum #bitcoin-protocols #protocols

const_sv2

This crate holds all of the shared constants used across the different Stratum V2 protocols and roles crates

8 releases (4 major breaking)

4.0.0 Mar 28, 2025
3.0.0 Dec 27, 2024
2.1.0 Oct 17, 2024
2.0.0 Aug 9, 2024
0.1.0 Jun 14, 2021

#7 in #bitcoin-protocols

Download history 169/week @ 2024-12-25 116/week @ 2025-01-01 84/week @ 2025-01-08 105/week @ 2025-01-15 65/week @ 2025-01-22 948/week @ 2025-01-29 1330/week @ 2025-02-05 1211/week @ 2025-02-12 1539/week @ 2025-02-19 1464/week @ 2025-02-26 1967/week @ 2025-03-05 897/week @ 2025-03-12 394/week @ 2025-03-19 277/week @ 2025-03-26 35/week @ 2025-04-02 36/week @ 2025-04-09

911 downloads per month
Used in 18 crates (16 directly)

MIT/Apache

17KB
114 lines

const_sv2

crates.io docs.rs rustc+ license

const_sv2 is a Rust no_std crate that provides essential constants for the Sv2 (Stratum V2) protocol. These constants are crucial for message framing, encryption, and protocol-specific identifiers across various Sv2 components, including Mining, Job Declaration, and Template Distribution protocols.

Key Capabilities

  • Protocol Constants: Define key protocol discriminants, message types, and sizes for the Sv2 binary protocol.
  • Encryption Support: Includes constants for encryption using ChaChaPoly and ElligatorSwift encoding.
  • Channel Bits: Defines whether specific messages are associated with a channel, simplifying protocol handling.
  • Modular: Supports a no_std environment, enabling use in embedded systems or environments without a standard library.

Usage

To include this crate in your project, run:

cargo add const_sv2

No runtime deps