Expand description
Contains all HOPR-specific or related Rust types.
§HOPR Types
A collection of Rust types used within the HOPR network and related projects.
The exposed types are used in both internal and external HOPR APIs. External APIs may choose to re-export them and externalize them.
External users of the hopr-lib may not use this crate directly,
but rather rely on the exported types thereby.
§Features
This is a single unified crate with feature-gated modules. Enable the features you need:
| Feature | Module | Purpose |
|---|---|---|
primitive | primitive | Common primitive types used throughout the entire codebase. |
random | crypto_random | Commonly used randomness utilities using a cryptographically secure random generator. |
crypto | crypto | Implementation of basic cryptographic primitives and related types. |
internal | internal | HOPR-specific types required internally by the HOPR node. |
chain | chain | Core Ethereum-specific types and interactions with the backend database. |
Use all-types to enable all of the above. Features form a dependency chain: chain → internal → crypto → primitive + random.
§License
This project is licensed under the GPL-3.0-only.
Modules§
- chain
- Blockchain-related types. This module contains various on-chain related modules and types.
- crypto
- Cryptography-related types. This Rust crate contains implementation of common cryptographic types.
- crypto_
random - Cryptographically secure random number generation. This Rust crate contains implementation of common random number generation functions. All functions and types from this crate supply cryptographically secure random numbers.
- internal
- Types internally used by the HOPR protocol.
This module contains all types that are specific to the HOPR protocol.
As opposed to the
primitivemodule, which contains more generic types (not necessarily specific only to HOPR). - keypair
- Key pair management and Ethereum keystore support.
- primitive
- Basic public types used in the HOPR protocol. This crate contains basic types used throughout the entire HOPR codebase. Types from this crate are not necessarily specific only to HOPR.
- telemetry
- OpenTelemetry-backed metrics collection.
Macros§
- histogram_
start_ measure - Macro to start a timer measurement on a histogram.