ldk_node/io/
mod.rs

1// This file is Copyright its original authors, visible in version control history.
2//
3// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5// http://opensource.org/licenses/MIT>, at your option. You may not use this file except in
6// accordance with one or both of these licenses.
7
8//! Objects and traits for data persistence.
9
10pub mod sqlite_store;
11#[cfg(test)]
12pub(crate) mod test_utils;
13pub(crate) mod utils;
14pub(crate) mod vss_store;
15
16/// The event queue will be persisted under this key.
17pub(crate) const EVENT_QUEUE_PERSISTENCE_PRIMARY_NAMESPACE: &str = "";
18pub(crate) const EVENT_QUEUE_PERSISTENCE_SECONDARY_NAMESPACE: &str = "";
19pub(crate) const EVENT_QUEUE_PERSISTENCE_KEY: &str = "events";
20
21/// The peer information will be persisted under this key.
22pub(crate) const PEER_INFO_PERSISTENCE_PRIMARY_NAMESPACE: &str = "";
23pub(crate) const PEER_INFO_PERSISTENCE_SECONDARY_NAMESPACE: &str = "";
24pub(crate) const PEER_INFO_PERSISTENCE_KEY: &str = "peers";
25
26/// The payment information will be persisted under this prefix.
27pub(crate) const PAYMENT_INFO_PERSISTENCE_PRIMARY_NAMESPACE: &str = "payments";
28pub(crate) const PAYMENT_INFO_PERSISTENCE_SECONDARY_NAMESPACE: &str = "";
29
30/// The spendable output information used to persisted under this prefix until LDK Node v0.3.0.
31pub(crate) const DEPRECATED_SPENDABLE_OUTPUT_INFO_PERSISTENCE_PRIMARY_NAMESPACE: &str =
32	"spendable_outputs";
33pub(crate) const DEPRECATED_SPENDABLE_OUTPUT_INFO_PERSISTENCE_SECONDARY_NAMESPACE: &str = "";
34
35/// The node metrics will be persisted under this key.
36pub(crate) const NODE_METRICS_PRIMARY_NAMESPACE: &str = "";
37pub(crate) const NODE_METRICS_SECONDARY_NAMESPACE: &str = "";
38pub(crate) const NODE_METRICS_KEY: &str = "node_metrics";
39
40/// The BDK wallet's [`ChangeSet::descriptor`] will be persisted under this key.
41///
42/// [`ChangeSet::descriptor`]: bdk_wallet::ChangeSet::descriptor
43pub(crate) const BDK_WALLET_DESCRIPTOR_PRIMARY_NAMESPACE: &str = "bdk_wallet";
44pub(crate) const BDK_WALLET_DESCRIPTOR_SECONDARY_NAMESPACE: &str = "";
45pub(crate) const BDK_WALLET_DESCRIPTOR_KEY: &str = "descriptor";
46
47/// The BDK wallet's [`ChangeSet::change_descriptor`] will be persisted under this key.
48///
49/// [`ChangeSet::change_descriptor`]: bdk_wallet::ChangeSet::change_descriptor
50pub(crate) const BDK_WALLET_CHANGE_DESCRIPTOR_PRIMARY_NAMESPACE: &str = "bdk_wallet";
51pub(crate) const BDK_WALLET_CHANGE_DESCRIPTOR_SECONDARY_NAMESPACE: &str = "";
52pub(crate) const BDK_WALLET_CHANGE_DESCRIPTOR_KEY: &str = "change_descriptor";
53
54/// The BDK wallet's [`ChangeSet::network`] will be persisted under this key.
55///
56/// [`ChangeSet::network`]: bdk_wallet::ChangeSet::network
57pub(crate) const BDK_WALLET_NETWORK_PRIMARY_NAMESPACE: &str = "bdk_wallet";
58pub(crate) const BDK_WALLET_NETWORK_SECONDARY_NAMESPACE: &str = "";
59pub(crate) const BDK_WALLET_NETWORK_KEY: &str = "network";
60
61/// The BDK wallet's [`ChangeSet::local_chain`] will be persisted under this key.
62///
63/// [`ChangeSet::local_chain`]: bdk_wallet::ChangeSet::local_chain
64pub(crate) const BDK_WALLET_LOCAL_CHAIN_PRIMARY_NAMESPACE: &str = "bdk_wallet";
65pub(crate) const BDK_WALLET_LOCAL_CHAIN_SECONDARY_NAMESPACE: &str = "";
66pub(crate) const BDK_WALLET_LOCAL_CHAIN_KEY: &str = "local_chain";
67
68/// The BDK wallet's [`ChangeSet::tx_graph`] will be persisted under this key.
69///
70/// [`ChangeSet::tx_graph`]: bdk_wallet::ChangeSet::tx_graph
71pub(crate) const BDK_WALLET_TX_GRAPH_PRIMARY_NAMESPACE: &str = "bdk_wallet";
72pub(crate) const BDK_WALLET_TX_GRAPH_SECONDARY_NAMESPACE: &str = "";
73pub(crate) const BDK_WALLET_TX_GRAPH_KEY: &str = "tx_graph";
74
75/// The BDK wallet's [`ChangeSet::indexer`] will be persisted under this key.
76///
77/// [`ChangeSet::indexer`]: bdk_wallet::ChangeSet::indexer
78pub(crate) const BDK_WALLET_INDEXER_PRIMARY_NAMESPACE: &str = "bdk_wallet";
79pub(crate) const BDK_WALLET_INDEXER_SECONDARY_NAMESPACE: &str = "";
80pub(crate) const BDK_WALLET_INDEXER_KEY: &str = "indexer";