hopr_ticket_manager/lib.rs
1//! Implements complete logic of ticket management in the HOPR protocol.
2//!
3//! There are two major parts in the architecture of the ticket management:
4//! - [`HoprTicketManager`] is responsible for managing the incoming ticket queues and ticket redemption.
5//! - [`HoprTicketFactory`] is responsible for managing outgoing ticket indices and creating outgoing tickets.
6//!
7//! Usually, they are created together via [`HoprTicketManager::new_with_factory`].
8//!
9//! See the [`HoprTicketManager`] and [`HoprTicketFactory`] documentation for complete details.
10
11mod backend;
12mod errors;
13mod factory;
14mod manager;
15mod traits;
16mod utils;
17
18#[cfg(feature = "redb")]
19pub use crate::backend::{RedbStore, RedbTicketQueue};
20pub use crate::{
21 backend::{MemoryStore, MemoryTicketQueue},
22 errors::TicketManagerError,
23 factory::HoprTicketFactory,
24 manager::HoprTicketManager,
25 traits::{OutgoingIndexStore, TicketQueue, TicketQueueStore},
26};