lightning_signer/persist/
model.rs

1use crate::channel::ChannelId;
2use crate::channel::ChannelSetup;
3use crate::node::NodeState;
4use crate::policy::validator::EnforcementState;
5use crate::prelude::*;
6
7/// A persistence layer entry for a Node
8#[allow(missing_docs)]
9pub struct NodeEntry {
10    pub key_derivation_style: u8,
11    pub network: String,
12    pub state: NodeState,
13}
14
15/// A persistence layer entry for a channel
16#[allow(missing_docs)]
17#[derive(Debug)]
18pub struct ChannelEntry {
19    pub channel_value_satoshis: u64,
20    pub channel_setup: Option<ChannelSetup>,
21    // Permanent channel ID if different from the initial channel ID
22    pub id: Option<ChannelId>,
23    pub enforcement_state: EnforcementState,
24    pub blockheight: Option<u32>,
25}