-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathschema.json
376 lines (376 loc) · 16.9 KB
/
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "Casper Account Info Standard",
"description": "Information about an Account on the Casper Network",
"type": "object",
"$defs": {
"location": {
"type": "object",
"required": [
"name",
"country"
],
"properties": {
"name": {
"description": "Free-form location in human-readable format [for example: City, State]",
"type": "string",
"minLength": 3
},
"country": {
"description": "ISO 3166-1 alpha 2 country code [XX]",
"type": "string",
"maxLength": 2,
"minLength": 2,
"pattern": "^[A-Z]+$"
},
"latitude": {
"description": "Latitude in decimal degrees",
"type": "number"
},
"longitude": {
"description": "Longitude in decimal degrees",
"type": "number"
}
}
},
"required_url": {
"type": "string",
"format": "uri",
"pattern": "^https?://.+[^\/]$"
},
"optional_url": {
"type": "string",
"if": {
"pattern": ".+"
},
"then": {
"format": "uri",
"pattern": "^https?://.+[^\/]$"
}
},
"username": {
"type": "string",
"pattern": "^[\\w.-]*$"
},
"username_with_prefix": {
"type": "string",
"pattern": "^(@[\\w.-]*)?$"
},
"facebook_username": {
"type": "string",
"pattern": "^[\\w.-/]*$"
},
"youtube_username": {
"type": "string",
"pattern": "^[\\w.-/]*$"
},
"reddit_username": {
"type": "string",
"pattern": "^[\\w.-/]*$"
},
"casper_public_key" : {
"type": "string",
"maxLength": 68,
"minLength": 66,
"pattern": "^[a-fA-F0-9]{66,68}$"
},
"casper_account": {
"type": "object",
"additionalProperties": false,
"properties" : {
"public_key": {
"$ref": "#/$defs/casper_public_key"
}
}
},
"url_based_resource": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"url"
],
"properties" : {
"name": {
"type": "string",
"maxLength": 60
},
"url": {
"$ref": "#/$defs/required_url"
}
}
}
},
"required": [
"owner"
],
"additionalProperties": false,
"properties": {
"owner": {
"$id": "#/properties/owner",
"type": "object",
"description": "More detailed information about the Owner of the Account",
"required": [
"identity",
"name",
"type"
],
"properties": {
"name": {
"$id": "#/properties/owner/name",
"type": "string",
"description": "The name of the entity or person that owns the Account",
"maxLength": 32,
"minLength": 3
},
"description": {
"$id": "#/properties/owner/description",
"type": "string",
"description": "An optional description of the Owner of the Account",
"maxLength": 200
},
"type": {
"$id": "#/properties/owner/type",
"type": "array",
"description": "Indicates the type of entity of the owner. One Owner can have multiple types.",
"uniqueItems": true,
"minItems": 1,
"items": {
"$id": "#/properties/owner/type/items",
"type": "string",
"enum": [
"validator",
"exchange",
"dapp",
"individual",
"corporation",
"dao"
]
}
},
"identity": {
"$id": "#/properties/owner/properties/identity",
"type": "object",
"description": "Information about the ownership of the Account.",
"required": [],
"properties": {
"ownership_disclosure_url": {
"$id": "#/properties/owner/properties/identity/properties/ownership_disclosure_url",
"$ref": "#/$defs/optional_url",
"description": "Link to a page outlining entity ownership and/or governance"
},
"casper_association_kyc_url": {
"$id": "#/properties/owner/properties/identity/properties/casper_association_kyc_url",
"$ref": "#/$defs/optional_url",
"description": "Reserved for a link to a Casper Association provided verified identity document, as applicable to Validator members of the Association"
},
"casper_association_kyc_onchain": {
"$id": "#/properties/owner/properties/identity/properties/casper_association_kyc_onchain",
"type": "string",
"description": "Reserved for Casper Associated on-chain resource that provides for a verified identity"
}
},
"additionalProperties": false
},
"resources": {
"$id": "#/properties/owner/properties/resources",
"type": "object",
"description": "Additional online resources provided by the Account owner",
"required": [],
"properties": {
"code_of_conduct_url": {
"$id": "#/properties/owner/properties/resources/properties/code_of_conduct_url",
"$ref": "#/$defs/optional_url",
"description": "A link to a Code of Conduct document"
},
"terms_of_service_url": {
"$id": "#/properties/owner/properties/resources/properties/terms_of_service_url",
"$ref": "#/$defs/optional_url",
"description": "A link to the Terms of Service applicable to the use of Owner's services, such as network validation and staking"
},
"privacy_policy_url": {
"$id": "#/properties/owner/properties/resources/properties/privacy_policy_url",
"$ref": "#/$defs/optional_url",
"description": "A link to a Privacy Policy, as may be applicable to personal information provided to the Account Owner"
},
"other": {
"$id": "#/properties/owner/properties/resources/properties/other",
"type": "array",
"uniqueItems": true,
"description": "Links to other relevant resources",
"items": {
"$id": "#/properties/owner/properties/resources/properties/other/items",
"$ref": "#/$defs/url_based_resource"
}
}
},
"additionalProperties": false
},
"affiliated_accounts": {
"$id": "#/properties/owner/properties/affiliated_accounts",
"type": "array",
"description": "A list of additional accounts owned by the same owner. Declaring additional accounts provides transparency with respect to Exchange-owned wallets, or self-staked funds belonging to Validators. In order for an associated account o be considered valid, it needs to register the same base URL with the Casper Account Info Standard contract as the Owner",
"items": {
"$id": "#/properties/owner/properties/affiliated_accounts/items",
"$ref": "#/$defs/casper_account"
}
},
"website": {
"$id": "#/properties/owner/properties/website",
"$ref": "#/$defs/required_url",
"description": "A link to the Owner's website"
},
"email": {
"$id": "#/properties/owner/properties/email",
"format": "email",
"type": "string",
"description": "E-mail address for the Owner"
},
"branding": {
"$id": "#/properties/owner/properties/branding",
"type": "object",
"description": "Owner Branding",
"required": [
"logo"
],
"properties": {
"logo": {
"$id": "#/properties/owner/properties/branding/properties/logo",
"type": "object",
"description": "Graphical assets to visually identify the Owner",
"additionalProperties": false,
"required": [
"png_256"
],
"properties": {
"png_256": {
"$id": "#/properties/owner/properties/branding/properties/logo/png_256",
"$ref": "#/$defs/required_url",
"description": "Link to Owner logo [PNG format, 256x256]"
},
"png_1024": {
"$id": "#/properties/owner/properties/branding/properties/logo/png_1024",
"$ref": "#/$defs/optional_url",
"description": "Link to Owner logo [PNG format, 1024x1024]"
},
"svg": {
"$id": "#/properties/owner/properties/branding/properties/logo/svg",
"$ref": "#/$defs/optional_url",
"description": "Link to Owner logo [SVG format]"
}
}
}
},
"additionalProperties": false
},
"location": {
"$id": "#/properties/owner/properties/location",
"$ref": "#/$defs/location",
"description": "The location of the Owner of the Account"
},
"social": {
"$id": "#/properties/owner/properties/social",
"type": "object",
"description": "Links to the Owner's social media profiles",
"required": [],
"properties": {
"keybase": {
"$id": "#/properties/owner/properties/social/properties/keybase",
"$ref": "#/$defs/username",
"description": "username only, e.g. 'john'"
},
"telegram": {
"$id": "#/properties/owner/properties/social/properties/telegram",
"$ref": "#/$defs/username_with_prefix",
"description": "username only, e.g. '@john'"
},
"twitter": {
"$id": "#/properties/owner/properties/social/properties/twitter",
"$ref": "#/$defs/username_with_prefix",
"description": "username only, e.g. '@john'"
},
"github": {
"$id": "#/properties/owner/properties/social/properties/github",
"$ref": "#/$defs/username",
"description": "username only, e.g. 'john'"
},
"youtube": {
"$id": "#/properties/owner/properties/social/properties/youtube",
"$ref": "#/$defs/youtube_username",
"description": "channel address only, e.g. 'c/John' or 'channel/XXXXXXXXXXXXXXX'"
},
"facebook": {
"$id": "#/properties/owner/properties/social/properties/facebook",
"$ref": "#/$defs/facebook_username",
"description": "Facebook Page or Facebook Group address only, not the full URL, e.g. 'John' or 'groups/XXXXXXXXXXXXXX'"
},
"medium": {
"$id": "#/properties/owner/properties/social/properties/medium",
"$ref": "#/$defs/username_with_prefix",
"description": "username only, e.g. '@john'"
},
"reddit": {
"$id": "#/properties/owner/properties/social/properties/reddit",
"$ref": "#/$defs/reddit_username",
"description": "username only, e.g. 'r/john' or 'u/john'"
},
"wechat": {
"$id": "#/properties/owner/properties/social/properties/wechat",
"$ref": "#/$defs/username",
"description": "WeChat ID only, e.g. 'john'"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"nodes": {
"$id": "#/properties/nodes",
"type": "array",
"description": "List of nodes operated by the Account Owner",
"items": {
"$id": "#/properties/nodes/items",
"type": "object",
"required": [
"public_key"
],
"additionalProperties": false,
"properties": {
"public_key": {
"$id": "#/properties/nodes/items/properties/public_key",
"$ref": "#/$defs/casper_public_key"
},
"description": {
"$id": "#/properties/nodes/items/properties/node_description",
"type": "string",
"description": "A description of the use and functionality of this node"
},
"location": {
"$id": "#/properties/nodes/items/properties/location",
"$ref": "#/$defs/location",
"description": "The location of this node."
},
"functionality": {
"$id": "#/properties/nodes/items/properties/functionality",
"type": "array",
"description": "Reserved to describe the functionality provided by this node",
"uniqueItems": true,
"minItems": 1,
"items": {
"$id": "#/properties/nodes/items/properties/functionality/items",
"type": "string",
"enum": [
"validator",
"rpc-proxy",
"sse-proxy",
"read-only",
"other"
]
}
}
}
}
}
}
}