Skip to main content

Module node

Module node 

Expand description

High-level HOPR node API traits. High-level HOPR node API trait definitions.

This module defines the external public API interface for interacting with a running HOPR node.

§Architecture

The API is structured around accessor traits (Has*) that provide typed references to individual components, and composed traits that are blanket-implemented over combinations of accessors:

  • HasChainApi — chain interaction
  • HasNetworkView — network connectivity (read-only NetworkView)
  • HasGraphView — network graph (read-only) with component health status
  • HasTransportApi — transport operations (ping, observed multiaddresses)
  • HasTicketManagement — ticket processing

Composed traits:

  • IncentiveChannelOperations — channels, balances, withdrawals, chain info
  • IncentiveRedeemOperations — ticket redemption and statistics (relay nodes only)

Modules§

session
Session APIs for outgoing/incoming HOPR sessions. Session traits for HOPR node interactions.

Structs§

AnnouncedPeer
A peer that has been announced and discovered by the node.
AtomicHoprState
A wrapper around HoprState which can be safely shared between threads.
ChainInfo
Contains information about the HOPR on-chain network deployment.
ChainOutput
Represents an output of a write operation to the chain performed by the node.
HoprStateIter
An iterator over the variants of HoprState
NodeOnchainIdentity
Identity of a node on-chain.

Enums§

AnnouncementOrigin
Origin of a peer announcement — how the node learned about this peer.
ComponentStatus
Health status of an individual component within the HOPR node.
EitherErr
Allows combining two errors L and R into a single error type that acts transparently.
HoprState
An enum representing the current state of the HOPR node.
TicketEvent
Ticket events emitted from the packet processing pipeline.

Traits§

ComponentStatusReporter
Trait for components that can report their own health status.
EitherErrExt
Extension trait for converting an error into an EitherErr.
HasChainApi
Provides access to the chain component of a HOPR node.
HasGraphView
Provides read-only access to the network graph and its health status.
HasNetworkView
Provides read-only access to the network layer (peer connectivity, addresses).
HasTicketManagement
Provides access to the ticket management component.
HasTransportApi
Provides access to transport-level operations (ping, peer observations).
HoprNodeOperations
General operations performed by a HOPR node.
HoprSessionClientOperations
Trait for establishing HOPR sessions to remote destinations.
HoprSessionServer
Trait for processing incoming HOPR sessions on exit nodes.
IncentiveChannelOperations
Channel management, balance queries, withdrawals, and chain info.
IncentiveRedeemOperations
Ticket redemption and statistics.
TransportOperations
Minimal transport operations that require the full transport stack.

Type Aliases§

ChainEventResolver
Future that resolves when a ChainEvent is resolved, times out, or is aborted via the associated abort handle.
ChannelId
Alias for the Hash representing a channel ID.
CompoundResult
Simple alias Result<T, EitherErr<E1, E2>>.
EventWaitResult
Alias for the result of HasChainApi::wait_for_on_chain_event.