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.
HopRouting
Public routing configuration for session opening in hopr-lib.
Hopr
HOPR main object providing the entire HOPR node functionality
HoprKeys
HoprSessionClientConfig
Session client configuration for hopr-lib.
NodeComponentStatuses
Per-component status report for the HOPR node.

Enums§

HoprLibProcess 🔒
Long-running tasks that are spawned by the HOPR node.
IdentityRetrievalModes

Constants§

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.
TicketEvents 🔒