fedimint_mintv2_client/migrations/
legacy.rs1use std::collections::{BTreeMap, BTreeSet};
5
6use bitcoin_hashes::hash160;
7use fedimint_core::encoding::{Decodable, Encodable};
8use fedimint_core::impl_db_record;
9
10use crate::client_db::DbKeyPrefix;
11use crate::issuance::NoteIssuanceRequest;
12
13#[derive(Debug, Clone, Encodable, Decodable)]
14pub struct RecoveryStateKey;
15
16#[derive(Debug, Clone, Encodable, Decodable)]
17pub struct RecoveryState {
18 pub next_index: u64,
19 pub total_items: u64,
20 pub requests: BTreeMap<hash160::Hash, NoteIssuanceRequest>,
21 pub nonces: BTreeSet<hash160::Hash>,
22}
23
24impl_db_record!(
25 key = RecoveryStateKey,
26 value = RecoveryState,
27 db_prefix = DbKeyPrefix::RecoveryState,
28);