Expand description
HOPR library creating a unified Hopr object that can be used on its own,
as well as integrated into other systems and libraries.
The Hopr object is standalone, meaning that once it is constructed and run,
it will perform its functionality autonomously. The API it offers serves as a
high-level integration point for other applications and utilities, but offers
a complete and fully featured HOPR node stripped from top level functionality
such as the REST API, key management…
The intended way to use hopr_lib is for a specific tool to be built on top of it;
should the default hoprd implementation not be acceptable.
For most of the practical use cases, the hoprd application should be a preferable
choice.
Re-exports§
pub use crate::constants::MIN_NATIVE_BALANCE;pub use crate::constants::SUGGESTED_NATIVE_BALANCE;pub use hopr_api as api;
Modules§
- builder
- Builder module for the
Hoprobject. Type-state builder for constructing aHoprnode. - config
- Configuration-related public types
- constants
- Various public constants.
- errors
- Lists all errors thrown from this library.
- helpers 🔒
- Helper functions.
- utils
- Utility module with helper types and functionality over hopr-lib behavior.
Structs§
- Abortable
List - List of
Abortabletasks with each task identified by a unique key of typeT. - Flow
Control Config - Client-tunable flow-control parameters. Defaults are deliberately conservative (anti-grief-preserving): the window starts at the floor and only grows on proven delivery, and the opt-in robustness knobs are off. This is the clean profile.
- HopRouting
- Public routing configuration for session opening in
hopr-lib. - Hopr
- HOPR main object providing the entire HOPR node functionality
- Hopr
Keys - Hopr
Session - Represents the Session protocol socket over HOPR.
- Hopr
Session Client Config - Session client configuration for
hopr-lib. - Hopr
Session Configurator - Allows configuration of one specific
HoprSession. - Node
Component Statuses - Per-component status report for the HOPR node.
- PixParams
- Everything about PIX two nodes must agree on for a Session, and the only encoding of it: three dimensions and the curve suite they are dimensions of.
- Surb
Balancer Config - Configuration for the
SurbBalancer.
Enums§
- Hopr
LibProcess 🔒 - Long-running tasks that are spawned by the HOPR node.
- Identity
Retrieval Modes - Invalid
PixParams - Why a
PixParamsquadruple was rejected. - Session
Capability - Individual capabilities of a Session.
- Session
Target - Defines what should happen with the data at the recipient where the
data from the established session are supposed to be forwarded to some
target.
Constants§
- LOCAL_
PIX_ SUITE - The elliptic curve suite this build instantiates PIX over, as announced to peers.
- NODE_
READY_ 🔒TIMEOUT - Time to wait until the node’s keybinding appears on-chain
- SESSION_
MTU - Maximum user-data payload per HOPR session frame (bytes).
Traits§
- Abortable
- Abstraction over tasks that can be aborted (such as join or abort handles).
Functions§
- network_
health_ 🔒to_ status - Maps [
Health] into a [ComponentStatus] for a named component. - peer_
id_ to_ offchain_ key - Converts a PeerId to an OffchainPublicKey.
- prepare_
tokio_ runtime - Prepare an optimized version of the tokio runtime setup for hopr-lib specifically.
Type Aliases§
- Hopr
TransportIO - Type alias used to send and receive transport data via a running HOPR node.
- PixEvents 🔒
- Session
Capabilities - Set of Session capabilities.
- Ticket
Events 🔒