2022-04-18 18:22:00 +04:00
|
|
|
export namespace ILightningApi {
|
|
|
|
export interface NetworkInfo {
|
|
|
|
average_channel_size: number;
|
|
|
|
channel_count: number;
|
|
|
|
max_channel_size: number;
|
|
|
|
median_channel_size: number;
|
|
|
|
min_channel_size: number;
|
|
|
|
node_count: number;
|
|
|
|
not_recently_updated_policy_count: number;
|
|
|
|
total_capacity: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NetworkGraph {
|
|
|
|
channels: Channel[];
|
|
|
|
nodes: Node[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Channel {
|
|
|
|
id: string;
|
|
|
|
capacity: number;
|
|
|
|
policies: Policy[];
|
|
|
|
transaction_id: string;
|
|
|
|
transaction_vout: number;
|
2022-07-06 21:43:47 +02:00
|
|
|
updated_at?: string;
|
2022-04-18 18:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
interface Policy {
|
|
|
|
public_key: string;
|
2022-07-06 21:43:47 +02:00
|
|
|
base_fee_mtokens?: string;
|
2022-04-24 01:33:38 +04:00
|
|
|
cltv_delta?: number;
|
|
|
|
fee_rate?: number;
|
|
|
|
is_disabled?: boolean;
|
2022-07-06 21:43:47 +02:00
|
|
|
max_htlc_mtokens?: string;
|
|
|
|
min_htlc_mtokens?: string;
|
2022-04-24 01:33:38 +04:00
|
|
|
updated_at?: string;
|
2022-04-18 18:22:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface Node {
|
|
|
|
alias: string;
|
|
|
|
color: string;
|
|
|
|
features: Feature[];
|
|
|
|
public_key: string;
|
|
|
|
sockets: string[];
|
2022-07-06 21:43:47 +02:00
|
|
|
updated_at?: string;
|
2022-04-18 18:22:00 +04:00
|
|
|
}
|
|
|
|
|
2022-07-06 21:43:47 +02:00
|
|
|
export interface Info {
|
|
|
|
chains: string[];
|
|
|
|
color: string;
|
|
|
|
active_channels_count: number;
|
|
|
|
alias: string;
|
|
|
|
current_block_hash: string;
|
|
|
|
current_block_height: number;
|
|
|
|
features: Feature[];
|
|
|
|
is_synced_to_chain: boolean;
|
|
|
|
is_synced_to_graph: boolean;
|
|
|
|
latest_block_at: string;
|
|
|
|
peers_count: number;
|
|
|
|
pending_channels_count: number;
|
|
|
|
public_key: string;
|
|
|
|
uris: any[];
|
|
|
|
version: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Feature {
|
2022-04-18 18:22:00 +04:00
|
|
|
bit: number;
|
|
|
|
is_known: boolean;
|
|
|
|
is_required: boolean;
|
2022-07-06 21:43:47 +02:00
|
|
|
type?: string;
|
2022-04-18 18:22:00 +04:00
|
|
|
}
|
|
|
|
}
|