fedimint_mint_client/
event.rsuse std::time::Duration;
use fedimint_core::core::ModuleKind;
use fedimint_core::Amount;
use fedimint_eventlog::{Event, EventKind};
use fedimint_mint_common::{Nonce, KIND};
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Serialize, Deserialize)]
pub struct NoteCreated {
pub nonce: Nonce,
}
impl Event for NoteCreated {
const MODULE: Option<ModuleKind> = Some(KIND);
const KIND: EventKind = EventKind::from_static("note-created");
}
#[derive(Clone, Copy, Serialize, Deserialize)]
pub struct NoteSpent {
pub nonce: Nonce,
}
impl Event for NoteSpent {
const MODULE: Option<ModuleKind> = Some(KIND);
const KIND: EventKind = EventKind::from_static("note-spent");
}
#[derive(Serialize, Deserialize)]
pub struct OOBNotesSpent {
pub requested_amount: Amount,
pub spent_amount: Amount,
pub timeout: Duration,
pub include_invite: bool,
}
impl Event for OOBNotesSpent {
const MODULE: Option<ModuleKind> = Some(KIND);
const KIND: EventKind = EventKind::from_static("oob-notes-spent");
}
#[derive(Serialize, Deserialize)]
pub struct OOBNotesReissued {
pub amount: Amount,
}
impl Event for OOBNotesReissued {
const MODULE: Option<ModuleKind> = Some(KIND);
const KIND: EventKind = EventKind::from_static("oob-notes-reissued");
}