Skip to main content

Crate hopr_ticket_manager

Crate hopr_ticket_manager 

Source
Expand description

Implements complete logic of ticket management in the HOPR protocol.

See the HoprTicketManager documentation for complete details.

Modulesยง

backend ๐Ÿ”’
errors ๐Ÿ”’
traits ๐Ÿ”’
utils ๐Ÿ”’

Structsยง

HoprTicketManager
Keeps track of indices for outgoing tickets and (optionally) of incoming redeemable tickets.
MemoryStore
Simple non-persistent ticket queue store backed by a HashMap and MemoryTicketQueue.
MemoryTicketQueue
Simple in-memory ticket queue implementation using a binary heap.
RedbStore
Implementation of OutgoingIndexStore and TicketQueueStore using redb database and postcard serializer.
RedbTicketQueue
Implementation of TicketQueue using redb database and postcard serializer, associated with the RedbStore.
RedeemState ๐Ÿ”’

Enumsยง

TicketManagerError
Errors that can occur in the HoprTicketManager.

Traitsยง

OutgoingIndexStore
Allows loading and saving outgoing ticket indices.
TicketQueue
Backend for the incoming ticket storage (double-ended) queue.
TicketQueueStore
Allows loading ticket queues from a storage.