fedimint_mint_client/
event.rs1use std::time::Duration;
2
3use fedimint_core::Amount;
4use fedimint_core::core::ModuleKind;
5use fedimint_eventlog::{Event, EventKind};
6use fedimint_mint_common::{KIND, Nonce};
7use serde::{Deserialize, Serialize};
8
9#[derive(Clone, Copy, Serialize, Deserialize)]
11pub struct NoteCreated {
12 pub nonce: Nonce,
14}
15
16impl Event for NoteCreated {
17 const MODULE: Option<ModuleKind> = Some(KIND);
18
19 const KIND: EventKind = EventKind::from_static("note-created");
20}
21
22#[derive(Clone, Copy, Serialize, Deserialize)]
24pub struct NoteSpent {
25 pub nonce: Nonce,
27}
28
29impl Event for NoteSpent {
30 const MODULE: Option<ModuleKind> = Some(KIND);
31
32 const KIND: EventKind = EventKind::from_static("note-spent");
33}
34
35#[derive(Serialize, Deserialize)]
37pub struct OOBNotesSpent {
38 pub requested_amount: Amount,
40
41 pub spent_amount: Amount,
43
44 pub timeout: Duration,
46
47 pub include_invite: bool,
50}
51
52impl Event for OOBNotesSpent {
53 const MODULE: Option<ModuleKind> = Some(KIND);
54
55 const KIND: EventKind = EventKind::from_static("oob-notes-spent");
56}
57
58#[derive(Serialize, Deserialize)]
60pub struct OOBNotesReissued {
61 pub amount: Amount,
63}
64
65impl Event for OOBNotesReissued {
66 const MODULE: Option<ModuleKind> = Some(KIND);
67
68 const KIND: EventKind = EventKind::from_static("oob-notes-reissued");
69}