Expand description
Implements complete logic of ticket management in the HOPR protocol.
There are two major parts in the architecture of the ticket management:
HoprTicketManageris responsible for managing the incoming ticket queues and ticket redemption.HoprTicketFactoryis responsible for managing outgoing ticket indices and creating outgoing tickets.
Usually, they are created together via HoprTicketManager::new_with_factory.
See the HoprTicketManager and HoprTicketFactory documentation for complete details.
Modulesยง
Structsยง
- Hopr
Ticket Factory - Keeps track of outgoing ticket indices and provides an interface for creating multihop tickets.
- Hopr
Ticket Manager - Keeps track of incoming redeemable tickets and provides ticket redemption and neglection operations.
- Memory
Store - Simple non-persistent ticket queue store backed by a
HashMapandMemoryTicketQueue. - Memory
Ticket Queue - Simple in-memory ticket queue implementation using a binary heap.
- Redb
Store - Implementation of
OutgoingIndexStoreandTicketQueueStoreusingredbdatabase andpostcardserializer. - Redb
Ticket Queue - Implementation of
TicketQueueusingredbdatabase andpostcardserializer, associated with theRedbStore.
Enumsยง
- Ticket
Manager Error - Errors that can occur in the
HoprTicketManager.
Traitsยง
- Outgoing
Index Store - Allows loading and saving outgoing ticket indices.
- Ticket
Queue - Backend for the incoming ticket storage (double-ended) queue.
- Ticket
Queue Store - Allows loading ticket queues from a storage.