#bitcoin #protocols #mining #stratum

const_sv2

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

7 releases (4 stable)

3.0.0 Dec 27, 2024
2.1.0 Oct 17, 2024
2.0.0 Aug 9, 2024
1.0.0 Mar 21, 2024
0.1.0 Jun 14, 2021

#10 in #stratum

Download history 227/week @ 2024-09-24 131/week @ 2024-10-01 83/week @ 2024-10-08 359/week @ 2024-10-15 130/week @ 2024-10-22 146/week @ 2024-10-29 110/week @ 2024-11-05 37/week @ 2024-11-12 71/week @ 2024-11-19 121/week @ 2024-11-26 98/week @ 2024-12-03 180/week @ 2024-12-10 82/week @ 2024-12-17 177/week @ 2024-12-24 81/week @ 2024-12-31 116/week @ 2025-01-07

476 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