mempool/backend/src/api/lightning/lightning-api.interface.ts

92 lines
2.1 KiB
TypeScript
Raw Normal View History

2022-04-18 18:22:00 +04:00
export namespace ILightningApi {
export interface NetworkInfo {
2022-07-29 20:53:19 +02:00
graph_diameter: number;
avg_out_degree: number;
max_out_degree: number;
num_nodes: number;
num_channels: number;
total_network_capacity: string;
avg_channel_size: number;
min_channel_size: string;
max_channel_size: string;
median_channel_size_sat: string;
num_zombie_chans: string;
2022-04-18 18:22:00 +04:00
}
export interface NetworkGraph {
nodes: Node[];
2022-07-29 20:53:19 +02:00
edges: Channel[];
2022-04-18 18:22:00 +04:00
}
export interface Channel {
2022-07-29 20:53:19 +02:00
channel_id: string;
chan_point: string;
2023-02-13 14:23:32 +09:00
last_update: number | null;
2022-07-29 20:53:19 +02:00
node1_pub: string;
node2_pub: string;
capacity: string;
node1_policy: RoutingPolicy | null;
node2_policy: RoutingPolicy | null;
2022-04-18 18:22:00 +04:00
}
2022-07-29 20:53:19 +02:00
export interface RoutingPolicy {
time_lock_delta: number;
min_htlc: string;
fee_base_msat: string;
fee_rate_milli_msat: string;
disabled: boolean;
max_htlc_msat: string;
2023-02-13 14:23:32 +09:00
last_update: number | null;
2022-04-18 18:22:00 +04:00
}
export interface Node {
2023-02-13 14:23:32 +09:00
last_update: number | null;
2022-07-29 20:53:19 +02:00
pub_key: string;
2022-04-18 18:22:00 +04:00
alias: string;
2022-07-29 20:53:19 +02:00
addresses: {
network: string;
addr: string;
}[];
2022-04-18 18:22:00 +04:00
color: string;
2022-07-29 20:53:19 +02:00
features: { [key: number]: Feature };
custom_records?: { [type: number]: string };
2022-04-18 18:22:00 +04:00
}
export interface Info {
2022-07-29 20:53:19 +02:00
identity_pubkey: string;
alias: string;
2022-07-29 20:53:19 +02:00
num_pending_channels: number;
num_active_channels: number;
num_peers: number;
block_height: number;
block_hash: string;
synced_to_chain: boolean;
testnet: boolean;
uris: string[];
best_header_timestamp: string;
version: string;
2022-07-29 20:53:19 +02:00
num_inactive_channels: number;
chains: {
chain: string;
network: string;
}[];
color: string;
synced_to_graph: boolean;
features: { [key: number]: Feature };
commit_hash: string;
/** Available on LND since v0.15.0-beta */
require_htlc_interceptor?: boolean;
}
2022-07-29 20:53:19 +02:00
export interface Feature {
2022-07-29 20:53:19 +02:00
name: string;
2022-04-18 18:22:00 +04:00
is_required: boolean;
2022-07-29 20:53:19 +02:00
is_known: boolean;
2022-04-18 18:22:00 +04:00
}
export interface ForensicOutput {
node?: 1 | 2;
type: number;
value: number;
}
2022-08-13 10:24:11 +02:00
}