1{
2    "$schema": "http://json-schema.org/draft-07/schema#",
3    "type": "object",
4    "additionalProperties": false,
5    "required": [ "id", "alias", "color", "num_peers", "num_pending_channels", "num_active_channels", "num_inactive_channels", "version", "blockheight", "network", "fees_collected_msat", "lightning-dir" ],
6    "properties": {
7	"id": {
8	    "type": "pubkey",
9	    "description": "The public key unique to this node"
10	},
11	"alias": {
12	    "type": "string",
13	    "description": "The fun alias this node will advertize",
14	    "maxLength": 32
15	},
16	"color": {
17	    "type": "hex",
18	    "description": "The favorite RGB color this node will advertize",
19	    "minLength": 6,
20	    "maxLength": 6
21	},
22	"num_peers": {
23	    "type": "u32",
24	    "description": "The total count of peers, connected or with channels"
25	},
26	"num_pending_channels": {
27	    "type": "u32",
28	    "description": "The total count of channels being opened"
29	},
30	"num_active_channels": {
31	    "type": "u32",
32	    "description": "The total count of channels in normal state"
33	},
34	"num_inactive_channels": {
35	    "type": "u32",
36	    "description": "The total count of channels waiting for opening or closing transactions to be mined"
37	},
38	"version": {
39	    "type": "string",
40	    "description": "Identifies what bugs you are running into"
41	},
42	"lightning-dir": {
43	    "type": "string",
44	    "description": "Identifies where you can find the configuration and other related files"
45	},
46	"blockheight": {
47	    "type": "u32",
48	    "description": "The highest block height we've learned"
49	},
50	"network": {
51	    "type": "string",
52	    "description": "represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`)"
53	},
54	"msatoshi_fees_collected": {
55	    "type": "u64",
56	    "deprecated": true
57	},
58	"fees_collected_msat": {
59	    "type": "msat",
60	    "description": "Total routing fees collected by this node"
61	},
62	"address": {
63	    "type": "array",
64	    "description": "The addresses we announce to the world",
65	    "items": {
66		"type": "object",
67		"required": [ "type", "port" ],
68		"additionalProperties": true,
69		"properties": {
70		    "type": {
71			"type": "string",
72			"enum": [ "ipv4", "ipv6", "torv2", "torv3", "websocket" ],
73			"description": "Type of connection"
74		    },
75		    "port": {
76			"type": "u16",
77			"description": "port number"
78		    }
79		},
80		"if": {
81		    "properties": {
82			"type": {
83			    "type": "string",
84			    "enum": [ "ipv4", "ipv6", "torv2", "torv3" ]
85			}
86		    }
87		},
88		"then": {
89		    "required": [ "type", "address", "port" ],
90		    "additionalProperties": false,
91		    "properties": {
92			"type": { },
93			"port": { },
94			"address": {
95			    "type": "string",
96			    "description": "address in expected format for **type**"
97			}
98		    }
99		},
100		"else": {
101		    "required": [ "type", "port" ],
102		    "additionalProperties": false,
103		    "properties": {
104			"type": { },
105			"port": { }
106		    }
107		}
108	    }
109	},
110	"binding": {
111	    "type": "array",
112	    "description": "The addresses we are listening on",
113	    "items": {
114		"type": "object",
115		"required": [ "type" ],
116		"additionalProperties": false,
117		"properties": {
118		    "type": {
119			"type": "string",
120			"*FIXME*": "The variant in connect.schema.json is more complete",
121			"enum": [ "local socket", "ipv4", "ipv6", "torv2", "torv3" ],
122			"description": "Type of connection"
123		    },
124		    "address": {
125			"type": "string",
126			"description": "address in expected format for **type**"
127		    },
128		    "port": {
129			"type": "u16",
130			"description": "port number"
131		    },
132		    "socket": {
133			"type": "string",
134			"description": "socket filename (only if **type** is \"local socket\")"
135		    }
136		}
137	    }
138	},
139	"warning_bitcoind_sync": {
140	    "type": "string",
141	    "description": "Bitcoind is not up-to-date with network."
142	},
143	"warning_lightningd_sync": {
144	    "type": "string",
145	    "description": "Lightningd is still loading latest blocks from bitcoind."
146	}
147    }
148}
149