Skip to main content

Crate hopr_lib

Crate hopr_lib 

Source
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 Hopr object. Type-state builder for constructing a Hopr node.
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§

AbortableList
List of Abortable tasks with each task identified by a unique key of type T.
FlowControlConfig
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
HoprKeys
HoprSession
Represents the Session protocol socket over HOPR.
HoprSessionClientConfig
Session client configuration for hopr-lib.
HoprSessionConfigurator
Allows configuration of one specific HoprSession.
NodeComponentStatuses
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.
SurbBalancerConfig
Configuration for the SurbBalancer.

Enums§

HoprLibProcess 🔒
Long-running tasks that are spawned by the HOPR node.
IdentityRetrievalModes
InvalidPixParams
Why a PixParams quadruple was rejected.
SessionCapability
Individual capabilities of a Session.
SessionTarget
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§

HoprTransportIO
Type alias used to send and receive transport data via a running HOPR node.
PixEvents 🔒
SessionCapabilities
Set of Session capabilities.
TicketEvents 🔒