forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listnodes.schema.json
200 lines (200 loc) · 6.48 KB
/
listnodes.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"nodes"
],
"properties": {
"nodes": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"nodeid"
],
"properties": {
"nodeid": {
"type": "pubkey",
"description": "the public key of the node"
},
"last_timestamp": {
"type": "u32",
"description": "A node_announcement has been received for this node (UNIX timestamp)"
}
},
"allOf": [
{
"if": {
"required": [
"last_timestamp"
]
},
"then": {
"additionalProperties": false,
"required": [
"nodeid",
"last_timestamp",
"alias",
"color",
"features",
"addresses"
],
"properties": {
"nodeid": {},
"last_timestamp": {},
"option_will_fund": {},
"alias": {
"type": "string",
"description": "The fun alias this node advertized",
"maxLength": 32
},
"color": {
"type": "hex",
"description": "The favorite RGB color this node advertized",
"minLength": 6,
"maxLength": 6
},
"features": {
"type": "hex",
"description": "BOLT #9 features bitmap this node advertized"
},
"addresses": {
"type": "array",
"description": "The addresses this node advertized",
"items": {
"type": "object",
"required": [
"type",
"port"
],
"additionalProperties": true,
"properties": {
"type": {
"type": "string",
"enum": [
"dns",
"ipv4",
"ipv6",
"torv2",
"torv3",
"websocket"
],
"description": "Type of connection"
},
"port": {
"type": "u16",
"description": "port number"
}
},
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"dns",
"ipv4",
"ipv6",
"torv2",
"torv3"
]
}
}
},
"then": {
"required": [
"type",
"address",
"port"
],
"additionalProperties": false,
"properties": {
"type": {},
"port": {},
"address": {
"type": "string",
"description": "address in expected format for **type**"
}
}
},
"else": {
"required": [
"type",
"port"
],
"additionalProperties": false,
"properties": {
"type": {},
"port": {}
}
}
}
}
}
},
"else": {
"additionalProperties": false,
"properties": {
"nodeid": {}
}
}
},
{
"if": {
"required": [
"option_will_fund"
]
},
"then": {
"additionalProperties": true,
"required": [
"option_will_fund"
],
"properties": {
"option_will_fund": {
"type": "object",
"additionalProperties": false,
"required": [
"lease_fee_base_msat",
"lease_fee_basis",
"funding_weight",
"channel_fee_max_base_msat",
"channel_fee_max_proportional_thousandths",
"compact_lease"
],
"properties": {
"lease_fee_base_msat": {
"type": "msat",
"description": "the fixed fee for a lease (whole number of satoshis)"
},
"lease_fee_basis": {
"type": "u32",
"description": "the proportional fee in basis points (parts per 10,000) for a lease"
},
"funding_weight": {
"type": "u32",
"description": "the onchain weight you'll have to pay for a lease"
},
"channel_fee_max_base_msat": {
"type": "msat",
"description": "the maximum base routing fee this node will charge during the lease"
},
"channel_fee_max_proportional_thousandths": {
"type": "u32",
"description": "the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)"
},
"compact_lease": {
"type": "hex",
"description": "the lease as represented in the node_announcement"
}
}
}
}
}
}
]
}
}
}
}