no-std const_sv2

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

6 releases (3 stable)

new 2.1.0 Oct 17, 2024
2.0.0 Aug 9, 2024
1.0.0 Mar 21, 2024
0.1.3 Feb 15, 2024
0.1.0 Jun 14, 2021

#625 in Magic Beans

Download history 46/week @ 2024-07-03 190/week @ 2024-07-10 256/week @ 2024-07-17 181/week @ 2024-07-24 110/week @ 2024-07-31 314/week @ 2024-08-07 153/week @ 2024-08-14 448/week @ 2024-08-21 278/week @ 2024-08-28 155/week @ 2024-09-04 123/week @ 2024-09-11 237/week @ 2024-09-18 192/week @ 2024-09-25 115/week @ 2024-10-02 84/week @ 2024-10-09 377/week @ 2024-10-16

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

MIT/Apache

17KB
113 lines

const_sv2

crates.io docs.rs rustc+ license

const_sv2 is a Rust 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

Dependencies

~7.5MB
~93K SLoC