lightspark/objects/
node_to_addresses_connection.rs

1// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2use crate::objects::node_address::NodeAddress;
3use serde::{Deserialize, Serialize};
4use std::vec::Vec;
5
6/// A connection between a node and the addresses it has announced for itself on Lightning Network.
7#[derive(Debug, Clone, Deserialize, Serialize)]
8pub struct NodeToAddressesConnection {
9    /// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
10    #[serde(rename = "node_to_addresses_connection_count")]
11    pub count: i64,
12
13    /// The addresses for the current page of this connection.
14    #[serde(rename = "node_to_addresses_connection_entities")]
15    pub entities: Vec<NodeAddress>,
16}
17
18pub const FRAGMENT: &str = "
19fragment NodeToAddressesConnectionFragment on NodeToAddressesConnection {
20    __typename
21    node_to_addresses_connection_count: count
22    node_to_addresses_connection_entities: entities {
23        __typename
24        node_address_address: address
25        node_address_type: type
26    }
27}
28";