@windingtree/org.id-resolver 3.0.0-beta.7 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1126 @@
1
+ {
2
+ "$id": "responseSchema.json",
3
+ "title": "ORGiD DID Resolution Response",
4
+ "allOf": [
5
+ {
6
+ "$ref": "#/definitions/DidResponse"
7
+ }
8
+ ],
9
+ "definitions": {
10
+ "DidResponse": {
11
+ "type": "object",
12
+ "properties": {
13
+ "@context": {
14
+ "$ref": "#/definitions/ContextReference"
15
+ },
16
+ "did": {
17
+ "$ref": "#/definitions/DIDReference"
18
+ },
19
+ "didDocument": {
20
+ "oneOf": [
21
+ {
22
+ "type": "null"
23
+ },
24
+ {
25
+ "$ref": "#/definitions/OrgJsonReference"
26
+ }
27
+ ]
28
+ },
29
+ "didResolutionMetadata": {
30
+ "$ref": "#/definitions/DIDResolutionMetadata"
31
+ },
32
+ "didDocumentMetadata": {
33
+ "oneOf": [
34
+ {
35
+ "type": "null"
36
+ },
37
+ {
38
+ "$ref": "#/definitions/DIDDocumentMetadata"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ "required": [
44
+ "@context",
45
+ "did",
46
+ "didDocument",
47
+ "didResolutionMetadata",
48
+ "didDocumentMetadata"
49
+ ]
50
+ },
51
+ "DIDResolutionMetadata": {
52
+ "type": "object",
53
+ "properties": {
54
+ "contentType": {
55
+ "type": "string",
56
+ "enum": [
57
+ "application/did+ld+json"
58
+ ]
59
+ },
60
+ "retrieved": {
61
+ "type": "string",
62
+ "format": "date-time"
63
+ },
64
+ "duration": {
65
+ "type": "number"
66
+ },
67
+ "resolverVersion": {
68
+ "type": "string"
69
+ },
70
+ "error": {
71
+ "type": "string"
72
+ }
73
+ },
74
+ "required": [
75
+ "contentType",
76
+ "retrieved",
77
+ "duration",
78
+ "resolverVersion"
79
+ ]
80
+ },
81
+ "DIDDocumentMetadata": {
82
+ "type": "object",
83
+ "properties": {
84
+ "created": {
85
+ "type": "string",
86
+ "format": "date-time"
87
+ },
88
+ "updated": {
89
+ "type": "string",
90
+ "format": "date-time"
91
+ },
92
+ "deactivated": {
93
+ "type": "string",
94
+ "format": "date-time"
95
+ },
96
+ "data": {
97
+ "$ref": "#/definitions/OrgIdData"
98
+ }
99
+ }
100
+ },
101
+ "OrgIdData": {
102
+ "type": "object",
103
+ "properties": {
104
+ "tokenId": {
105
+ "type": "string"
106
+ },
107
+ "orgId": {
108
+ "type": "string"
109
+ },
110
+ "owner": {
111
+ "type": "string"
112
+ },
113
+ "orgJsonUri": {
114
+ "type": "string"
115
+ },
116
+ "delegates": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "string"
120
+ }
121
+ },
122
+ "created": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ "required": [
127
+ "tokenId",
128
+ "orgId",
129
+ "owner",
130
+ "orgJsonUri",
131
+ "delegates",
132
+ "created"
133
+ ]
134
+ },
135
+ "OrgJsonReference": {
136
+ "description": "ORG.JSON represents an organization or one of its structural units (departments, stores, etc.). In W3C terminology it is called DID Document.",
137
+ "type": "object",
138
+ "required": [
139
+ "@context",
140
+ "id",
141
+ "created"
142
+ ],
143
+ "properties": {
144
+ "schemaVersion": {
145
+ "description": "Semantic version of the org.json schema. If not defined it means the latest version",
146
+ "type": "string",
147
+ "pattern": "^([0-9]+.)?([0-9]+.)?([0-9]+)$",
148
+ "example": "0.3.2"
149
+ },
150
+ "@context": {
151
+ "$ref": "#/definitions/ContextReference"
152
+ },
153
+ "id": {
154
+ "$ref": "#/definitions/DIDReference"
155
+ },
156
+ "created": {
157
+ "description": "Date-time when the data was created.",
158
+ "type": "string",
159
+ "format": "date-time"
160
+ },
161
+ "updated": {
162
+ "description": "Date-time when the data was last changed.",
163
+ "type": "string",
164
+ "format": "date-time"
165
+ },
166
+ "deactivated": {
167
+ "description": "Date-time when the ORGiD was deactivated",
168
+ "type": "string",
169
+ "format": "date-time"
170
+ },
171
+ "verificationMethod": {
172
+ "description": "Public keys are used for digital signatures, encryption and other cryptographic operations, which in turn are the basis for purposes such as authentication or establishing secure communication with service endpoints.",
173
+ "type": "array",
174
+ "items": {
175
+ "$ref": "#/definitions/VerificationMethodReference"
176
+ }
177
+ },
178
+ "service": {
179
+ "description": "One of the primary purposes of ORG.JSON is to enable discovery of service endpoints (aka API URIs).",
180
+ "type": "array",
181
+ "items": {
182
+ "$ref": "#/definitions/ServiceReference"
183
+ }
184
+ },
185
+ "payment": {
186
+ "description": "Public information about payment accounts of the organization.",
187
+ "type": "array",
188
+ "items": {
189
+ "$ref": "#/definitions/PaymentReference"
190
+ }
191
+ },
192
+ "trustAssertions": {
193
+ "$ref": "#/definitions/TrustAssertionsReference"
194
+ },
195
+ "credentials": {
196
+ "$ref": "#/definitions/CredentialsReference"
197
+ },
198
+ "capabilityDelegation": {
199
+ "$ref": "#/definitions/CapabilityDelegationReference"
200
+ },
201
+ "legalEntity": {
202
+ "$ref": "#/definitions/LegalEntityReference"
203
+ },
204
+ "organizationalUnit": {
205
+ "$ref": "#/definitions/OrganizationalUnitReference"
206
+ },
207
+ "person": {
208
+ "$ref": "#/definitions/ContactReference"
209
+ }
210
+ }
211
+ },
212
+ "LegalEntityReference": {
213
+ "description": "Legal entity information",
214
+ "type": "object",
215
+ "required": [
216
+ "legalName",
217
+ "registryCode",
218
+ "legalType",
219
+ "registeredAddress",
220
+ "media"
221
+ ],
222
+ "properties": {
223
+ "legalName": {
224
+ "description": "Legal name, e.g. 'Acme, Inc.' or 'Ajax Ltd.'",
225
+ "type": "string"
226
+ },
227
+ "alternativeName": {
228
+ "description": "A recognized name other than the legal name. Some jurisdictions recognize concepts such as a trading name or alternative forms of a legal entity's name. The Alternative Name property can be used to record such names but should not be used to record translations of the primary legal name. Where more than one legal name exists and where they have equal standing but are expressed in different languages, identify the language used in each of the multiple legal names. It is notable that some jurisdictions regard the use of any name other than the primary Legal Name as suspicious.",
229
+ "type": "string"
230
+ },
231
+ "registryCode": {
232
+ "description": "Identifier given to the legal entity by the authority with which it is registered.",
233
+ "type": "string"
234
+ },
235
+ "identifiers": {
236
+ "description": "A formally-issued identifier for the legal entity, other than the one that confers legal status upon it. Legal entities may have any number of identifiers (but only one legal identifier). For example, in many jurisdictions, a business will have one or more tax numbers associated with them which do not, by themselves, confer legal entity status. The Identifier property must not be used to link to the identifier issued by the authority that conferred legal entity status on a business.",
237
+ "type": "array",
238
+ "items": {
239
+ "allOf": [
240
+ {
241
+ "$ref": "#/definitions/IdentifierReference"
242
+ }
243
+ ]
244
+ }
245
+ },
246
+ "legalType": {
247
+ "description": "Legal entity type: limited company, corporation, NGO, etc.",
248
+ "type": "string"
249
+ },
250
+ "registeredAddress": {
251
+ "$ref": "#/definitions/AddressReference"
252
+ },
253
+ "locations": {
254
+ "type": "array",
255
+ "items": {
256
+ "allOf": [
257
+ {
258
+ "$ref": "#/definitions/LocationReference"
259
+ }
260
+ ]
261
+ }
262
+ },
263
+ "contacts": {
264
+ "type": "array",
265
+ "items": {
266
+ "allOf": [
267
+ {
268
+ "$ref": "#/definitions/ContactReference"
269
+ }
270
+ ]
271
+ }
272
+ },
273
+ "media": {
274
+ "$ref": "#/definitions/MediaListReference"
275
+ },
276
+ "organizationalUnits": {
277
+ "description": "A list of organizational units of the legal entity",
278
+ "type": "array",
279
+ "items": {
280
+ "allOf": [
281
+ {
282
+ "$ref": "#/definitions/DIDReference"
283
+ }
284
+ ]
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "OrganizationalUnitReference": {
290
+ "description": "Organizational unit",
291
+ "type": "object",
292
+ "required": [
293
+ "name",
294
+ "media"
295
+ ],
296
+ "properties": {
297
+ "name": {
298
+ "description": "Unit name e.g. \"Grand Budapest Hotel\", \"Accounting Department\" or \"Acme 13th Ave\"",
299
+ "type": "string"
300
+ },
301
+ "type": {
302
+ "description": "Unit type, e.g. [\"hotel\", \"boutique\"]",
303
+ "type": "array",
304
+ "items": {
305
+ "allOf": [
306
+ {
307
+ "type": "string"
308
+ }
309
+ ]
310
+ }
311
+ },
312
+ "description": {
313
+ "description": "Short description of the unit",
314
+ "type": "string"
315
+ },
316
+ "longDescription": {
317
+ "description": "Long description of the unit",
318
+ "type": "string"
319
+ },
320
+ "address": {
321
+ "$ref": "#/definitions/AddressReference"
322
+ },
323
+ "openingHours": {
324
+ "$ref": "#/definitions/OpeningHoursReference"
325
+ },
326
+ "contacts": {
327
+ "type": "array",
328
+ "items": {
329
+ "allOf": [
330
+ {
331
+ "$ref": "#/definitions/ContactReference"
332
+ }
333
+ ]
334
+ }
335
+ },
336
+ "media": {
337
+ "$ref": "#/definitions/MediaListReference"
338
+ },
339
+ "parentOrganization": {
340
+ "description": "A link to the legal entity",
341
+ "$ref": "#/definitions/DIDReference"
342
+ }
343
+ }
344
+ },
345
+ "ContextReference": {
346
+ "description": "When two software systems need to exchange data, they need to use terminology and a protocol that both systems understand. The @context property ensures that two systems operating on the same DID document are using mutually agreed terminology.",
347
+ "oneOf": [
348
+ {
349
+ "$ref": "#/definitions/LinkedContextReference"
350
+ },
351
+ {
352
+ "$ref": "#/definitions/LinkedMultipleContextReference"
353
+ },
354
+ {
355
+ "$ref": "#/definitions/LinkedContextDocumentReference"
356
+ }
357
+ ]
358
+ },
359
+ "LinkedContextReference": {
360
+ "description": "Linked context URI",
361
+ "type": "string",
362
+ "example": "https://www.w3.org/ns/did/v1"
363
+ },
364
+ "LinkedMultipleContextReference": {
365
+ "description": "A list of context references",
366
+ "type": "array",
367
+ "items": {
368
+ "allOf": [
369
+ {
370
+ "$ref": "#/definitions/LinkedContextReference"
371
+ }
372
+ ]
373
+ },
374
+ "example": "[\n \"https://www.w3.org/ns/did/v1\",\n \"https://windingtree.com/ns/orgid/v1\"\n]"
375
+ },
376
+ "LinkedContextDocumentReference": {
377
+ "description": "Context document https://www.w3.org/TR/json-ld/#the-context",
378
+ "type": "object",
379
+ "example": "{\n \"@context\": \"https://json-ld.org/contexts/person.jsonld\",\n \"name\": \"Example Site\",\n \"homepage\": \"http://example.site.org/\",\n \"image\": \"http://example.site.org/images/person.png\"\n}"
380
+ },
381
+ "DIDReference": {
382
+ "description": "The DID subject is denoted by the id property. The DID subject is the entity that the DID document (ORG.JSON) is about. That is, it is the entity identified by the DID and described in the DID document.",
383
+ "type": "string",
384
+ "pattern": "^did:orgid:([0-9])*(?::)?(0x[a-fA-F0-9]{64})+(?:[?])?([0-9a-zA-Z_=&%-]+)?(?:#)?([[0-9a-zA-Z-]+)?$",
385
+ "example": "did:orgid:4:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75"
386
+ },
387
+ "TrustAssertionsReference": {
388
+ "description": "List of trust assertions (claims with proofs)",
389
+ "type": "array",
390
+ "items": {
391
+ "allOf": [
392
+ {
393
+ "$ref": "#/definitions/CredentialReference"
394
+ }
395
+ ]
396
+ }
397
+ },
398
+ "CredentialsReference": {
399
+ "description": "List of credentials (provided and signed by third parties)",
400
+ "type": "array",
401
+ "items": {
402
+ "allOf": [
403
+ {
404
+ "$ref": "#/definitions/CredentialReference"
405
+ }
406
+ ]
407
+ }
408
+ },
409
+ "AssertionReference": {
410
+ "description": "Trust assertion",
411
+ "type": "object",
412
+ "required": [
413
+ "claim",
414
+ "type",
415
+ "proof"
416
+ ],
417
+ "properties": {
418
+ "claim": {
419
+ "description": "Claim subject. E.g. domain name or social account",
420
+ "type": "string"
421
+ },
422
+ "type": {
423
+ "description": "Proof type: (domain|dns|social)",
424
+ "type": "string",
425
+ "enum": [
426
+ "domain",
427
+ "dns",
428
+ "social"
429
+ ]
430
+ },
431
+ "proof": {
432
+ "description": "Proof of the claim: dns record, text file URI, or link to a post on facebook, linkedin, etc.",
433
+ "type": "string"
434
+ }
435
+ }
436
+ },
437
+ "VerificationMethodReference": {
438
+ "description": "Public keys are used for digital signatures, encryption and other cryptographic operations, which in turn are the basis for purposes such as authentication or establishing secure communication with service endpoints.",
439
+ "type": "object",
440
+ "required": [
441
+ "id",
442
+ "type",
443
+ "controller"
444
+ ],
445
+ "properties": {
446
+ "id": {
447
+ "description": "Identifies the owner of the corresponding private key",
448
+ "$ref": "#/definitions/DIDReference"
449
+ },
450
+ "type": {
451
+ "description": "The cryptographic suite that was used to generate a public key",
452
+ "$ref": "#/definitions/CryptographicSuiteReference"
453
+ },
454
+ "controller": {
455
+ "description": "Identifies the controller of the corresponding private key",
456
+ "$ref": "#/definitions/DIDReference"
457
+ },
458
+ "blockchainAccountId": {
459
+ "description": "Public key (account address) of the blockchain account",
460
+ "$ref": "#/definitions/BlockchainAccountId"
461
+ },
462
+ "publicKeyPem": {
463
+ "description": "A public key PEM property is used to specify the PEM-encoded version of the public key",
464
+ "type": "string",
465
+ "example": "-----BEGIN PUBLIC KEY-----\\nMII8YbF3s8q3c...j8Fk88FsRa3K\\n-----END PUBLIC KEY-----\\n"
466
+ },
467
+ "publicKeyJwk": {
468
+ "description": "Public key in JWT format (recommended key format)",
469
+ "$ref": "#/definitions/PublicKeyJwkReference"
470
+ },
471
+ "publicKeyBase58": {
472
+ "description": "Public key in value in Base58 Bitcoin format",
473
+ "type": "string"
474
+ },
475
+ "note": {
476
+ "description": "Note about the private key purpose",
477
+ "type": "string"
478
+ },
479
+ "verificationMethodRevocation": {
480
+ "description": "Verification method revocation status",
481
+ "$ref": "#/definitions/VerificationMethodRevocationReference"
482
+ }
483
+ },
484
+ "example": "{\n \"id\": \"did:orgid:1:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75#key1\",\n \"type\": \"EcdsaSecp256k1VerificationKey2019\",\n \"controller\": \"did:orgid:1:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75\",\n \"publicKeyPem\": \"MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE/7GpAW4+se9gZOFPtwk63ZhV1nX6M0UobMYO6FMAnON6vCbglyOaRzEltugkp6GrM8LZ6is0rMBMAXCvb9FH2g==\",\n \"note\": \"B2C Webserver Key\"\n}"
485
+ },
486
+ "VerificationMethodRevocationReference": {
487
+ "type": "object",
488
+ "properties": {
489
+ "reason": {
490
+ "description": "Revocation reason according to https://datatracker.ietf.org/doc/html/rfc5280#section-5.3.1",
491
+ "type": "string",
492
+ "enum": [
493
+ "unspecified",
494
+ "keyCompromise",
495
+ "affiliationChanged",
496
+ "superseded",
497
+ "cessationOfOperation",
498
+ "certificateHold",
499
+ "privilegeWithdrawn"
500
+ ]
501
+ },
502
+ "invalidityDate": {
503
+ "description": "Date of the public key invalidation",
504
+ "type": "string",
505
+ "format": "date-time"
506
+ }
507
+ }
508
+ },
509
+ "PublicKeyJwkReference": {
510
+ "type": "object",
511
+ "example": "{\n \"crv\": \"Ed25519\",\n \"x\": \"VCpo2LMLhn6iWku8MKvSLg2ZAoC-nlOyPVQaO3FxVeQ\",\n \"kty\": \"OKP\",\n \"kid\": \"_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A\"\n}"
512
+ },
513
+ "ServiceReference": {
514
+ "description": "One of the primary purposes of ORG.JSON is to enable discovery of service endpoints (aka API URIs).",
515
+ "type": "object",
516
+ "required": [
517
+ "id",
518
+ "type",
519
+ "serviceEndpoint"
520
+ ],
521
+ "properties": {
522
+ "id": {
523
+ "$ref": "#/definitions/DIDReference"
524
+ },
525
+ "type": {
526
+ "description": "Service endpoint type, e.g. \"Google Maps\" or \"NDC\"",
527
+ "type": "string"
528
+ },
529
+ "serviceEndpoint": {
530
+ "allOf": [
531
+ {
532
+ "description": "JSON-LD object or a valid URI conforming to [RFC3986] and normalized according to the rules in section 6 of [RFC3986] and to any normalization rules in its applicable URI scheme specification."
533
+ },
534
+ {
535
+ "oneOf": [
536
+ {
537
+ "$ref": "#/definitions/LinkedEndpointReference"
538
+ },
539
+ {
540
+ "$ref": "#/definitions/LinkedDocumentEndpointReference"
541
+ }
542
+ ]
543
+ }
544
+ ]
545
+ }
546
+ },
547
+ "example": "{\n \"id\": \"did:orgid:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75#apiv1\",\n \"serviceEndpoint\": \"https://staging.glider.travel/api/v1\",\n \"type\": \"glider\",\n \"description\": \"Search and Book API\",\n \"docs\": \"https://staging.glider.travel/api/docs/\"\n}"
548
+ },
549
+ "PaymentReference": {
550
+ "description": "Public information about payment accounts of the organization.",
551
+ "type": "object",
552
+ "required": [
553
+ "type",
554
+ "currency"
555
+ ],
556
+ "properties": {
557
+ "type": {
558
+ "description": "The type of the payment record",
559
+ "type": "string",
560
+ "enum": [
561
+ "crypto",
562
+ "bank",
563
+ "simard"
564
+ ]
565
+ },
566
+ "currency": {
567
+ "description": "Currency of the account",
568
+ "type": "array",
569
+ "items": {
570
+ "$ref": "#/definitions/Currency"
571
+ }
572
+ },
573
+ "address": {
574
+ "description": "Cryptocurrency account address",
575
+ "allOf": [
576
+ {
577
+ "$ref": "#/definitions/BlockchainAccountId"
578
+ }
579
+ ]
580
+ },
581
+ "swift": {
582
+ "description": "SWIFT/BIC bank code according to ISO 9326",
583
+ "$ref": "#/definitions/SwiftCode"
584
+ },
585
+ "iban": {
586
+ "description": "International Bank Account Number (IBAN) according to ISO 13616:1997",
587
+ "$ref": "#/definitions/IbanCode"
588
+ }
589
+ },
590
+ "example": "{\n \"type\": \"crypto\",\n \"currency\": [\n \"btc\"\n ],\n \"address\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\",\n \"description\": \"General donation channel\"\n}"
591
+ },
592
+ "LinkedEndpointReference": {
593
+ "description": "Service endpoint URI conforming to [RFC3986] and normalized according to the rules in section 6 of [RFC3986] and to any normalization rules in its applicable URI scheme specification.",
594
+ "type": "string",
595
+ "example": "https://staging.glider.travel/api/v1"
596
+ },
597
+ "LinkedDocumentEndpointReference": {
598
+ "description": "Service endpoint document conforming to JSON-LD object https://www.w3.org/TR/json-ld/",
599
+ "type": "object",
600
+ "required": [
601
+ "@context"
602
+ ],
603
+ "properties": {
604
+ "@context": {
605
+ "$ref": "#/definitions/ContextReference"
606
+ },
607
+ "type": {
608
+ "description": "Service endpoint type",
609
+ "type": "string"
610
+ }
611
+ },
612
+ "example": "{\n \"@context\": {\n \"api\": \"https://own.api.service/schema.yaml#\",\n \"orgid\": \"https://github.com/windingtree/org.json-schema/blob/master/src/orgid-json-schema.yaml#\",\n \"type\": \"api:type\",\n \"b2b\": \"orgid:/definitions/LinkedEndpointReference\",\n \"admin\": \"orgid:/definitions/LinkedEndpointReference\"\n },\n \"type\": \"Booking Service\",\n \"b2b\": \"https://your.api.service/api/v1\",\n \"admin\": \"https://your.api.service/api/admin/v1\"\n}"
613
+ },
614
+ "IdentifierReference": {
615
+ "description": "A set of identifiers other than legal identifier",
616
+ "type": "object",
617
+ "required": [
618
+ "type",
619
+ "value"
620
+ ],
621
+ "properties": {
622
+ "type": {
623
+ "description": "Identifier type (e.g. \"IATA\", \"Trade License\")",
624
+ "type": "string"
625
+ },
626
+ "value": {
627
+ "description": "Identifier value",
628
+ "type": "string"
629
+ }
630
+ },
631
+ "example": "IATA"
632
+ },
633
+ "AddressReference": {
634
+ "description": "Legal entity official address, physical location of a store, etc.",
635
+ "type": "object",
636
+ "required": [
637
+ "country",
638
+ "locality",
639
+ "postalCode",
640
+ "streetAddress"
641
+ ],
642
+ "properties": {
643
+ "country": {
644
+ "description": "ISO 3166-1 alpha-2 country code",
645
+ "type": "string"
646
+ },
647
+ "subdivision": {
648
+ "description": "ISO 3166-2 country subdivision code1",
649
+ "type": "string"
650
+ },
651
+ "locality": {
652
+ "description": "City or town",
653
+ "type": "string"
654
+ },
655
+ "postalCode": {
656
+ "description": "Postal code",
657
+ "type": "string"
658
+ },
659
+ "streetAddress": {
660
+ "description": "Street address",
661
+ "type": "string"
662
+ },
663
+ "premise": {
664
+ "description": "Office, suite, apartment, etc.",
665
+ "type": "string"
666
+ },
667
+ "gps": {
668
+ "description": "GPS coordinates",
669
+ "type": "string"
670
+ },
671
+ "geocodes": {
672
+ "description": "Address geocode: Open Location Code, what3words, etc.",
673
+ "type": "array",
674
+ "items": {
675
+ "allOf": [
676
+ {
677
+ "$ref": "#/definitions/GeoCodeReference"
678
+ }
679
+ ]
680
+ }
681
+ }
682
+ },
683
+ "example": "{\n \"country\": \"CZ\",\n \"subdivision\": \"71\",\n \"locality\": \"Jihlava\",\n \"postalCode\": \"71354\",\n \"streetAddress\": \"3150 Main St.\",\n \"premise\": \"STE 100\",\n \"gps\": \"50.087070,14.417210\",\n \"geocodes\": [\n {\n \"type\": \"olc\",\n \"value\": \"3CQ9+F2 Prague\"\n },\n {\n \"type\": \"what3words\",\n \"value\": \"printers.torn.images\"\n }\n ]\n}"
684
+ },
685
+ "GeoCodeReference": {
686
+ "description": "Open Location Code (Plus Code) or what3words",
687
+ "type": "object",
688
+ "required": [
689
+ "type",
690
+ "value"
691
+ ],
692
+ "properties": {
693
+ "type": {
694
+ "description": "(olc|what3words)",
695
+ "type": "string"
696
+ },
697
+ "value": {
698
+ "description": "E.g. \"G6FX+QP\" or \"///compressor.verb.patch\"",
699
+ "type": "string"
700
+ }
701
+ },
702
+ "example": "[\n {\n \"type\": \"olc\",\n \"value\": \"3CQ9+F2 Prague\"\n },\n {\n \"type\": \"what3words\",\n \"value\": \"printers.torn.images\"\n }\n]"
703
+ },
704
+ "LocationReference": {
705
+ "description": "Any location that business is related to the organization.",
706
+ "type": "object",
707
+ "required": [
708
+ "name",
709
+ "address",
710
+ "contacts"
711
+ ],
712
+ "properties": {
713
+ "name": {
714
+ "description": "Location name",
715
+ "type": "string"
716
+ },
717
+ "description": {
718
+ "description": "Location description",
719
+ "type": "string"
720
+ },
721
+ "address": {
722
+ "$ref": "#/definitions/AddressReference"
723
+ },
724
+ "openingHours": {
725
+ "$ref": "#/definitions/OpeningHoursReference"
726
+ },
727
+ "contacts": {
728
+ "type": "array",
729
+ "items": {
730
+ "allOf": [
731
+ {
732
+ "$ref": "#/definitions/ContactReference"
733
+ }
734
+ ]
735
+ }
736
+ }
737
+ }
738
+ },
739
+ "OpeningHoursReference": {
740
+ "description": "Opening hours",
741
+ "type": "array",
742
+ "items": {
743
+ "allOf": [
744
+ {
745
+ "$ref": "#/definitions/OpeningHoursRangeReference"
746
+ }
747
+ ]
748
+ }
749
+ },
750
+ "OpeningHoursRangeReference": {
751
+ "description": "Opening hours range",
752
+ "type": "object",
753
+ "required": [
754
+ "weekDay",
755
+ "hours"
756
+ ],
757
+ "properties": {
758
+ "weekDay": {
759
+ "description": "Three-letter week day, e.g. mon, tue, wed...",
760
+ "type": "string"
761
+ },
762
+ "hours": {
763
+ "description": "Time range, e.g. 9:00-17:30 or 12:30-20:05",
764
+ "type": "string",
765
+ "pattern": "^[0-9]{1,2}:[0-9]{1,2}-[0-9]{1,2}:[0-9]{1,2}$"
766
+ }
767
+ },
768
+ "example": "{\n \"weekDay\": \"fri\",\n \"hours\": \"10:00-16:00\"\n}"
769
+ },
770
+ "ContactReference": {
771
+ "description": "Contact reference",
772
+ "type": "object",
773
+ "properties": {
774
+ "function": {
775
+ "description": "Contact function: sales, support, accounting, etc.",
776
+ "type": "string"
777
+ },
778
+ "name": {
779
+ "description": "Contact person or department name",
780
+ "type": "string"
781
+ },
782
+ "phone": {
783
+ "description": "Phone number",
784
+ "type": "string"
785
+ },
786
+ "email": {
787
+ "description": "Email",
788
+ "type": "string",
789
+ "format": "email"
790
+ },
791
+ "messengers": {
792
+ "description": "Messenger accounts",
793
+ "type": "array",
794
+ "items": {
795
+ "allOf": [
796
+ {
797
+ "$ref": "#/definitions/MessengerReference"
798
+ }
799
+ ]
800
+ }
801
+ },
802
+ "language": {
803
+ "$ref": "#/definitions/LanguageReference"
804
+ }
805
+ },
806
+ "example": "{\n \"function\": \"Reception\",\n \"name\": \"John Smith\",\n \"phone\": \"+1234567890\",\n \"email\": \"email@spam.com\",\n \"messengers\": [\n {\n \"type\": \"whatsapp\",\n \"value\": \"+1234567890\"\n },\n {\n \"type\": \"kik\",\n \"value\": \"acme.ny.reception\"\n }\n ]\n}"
807
+ },
808
+ "MessengerReference": {
809
+ "description": "Messenger account information",
810
+ "type": "object",
811
+ "required": [
812
+ "type",
813
+ "value"
814
+ ],
815
+ "properties": {
816
+ "type": {
817
+ "description": "whatsapp, telegram, viber, wechat, messenger, line, etc.",
818
+ "type": "string"
819
+ },
820
+ "value": {
821
+ "description": "Messenger account ID",
822
+ "type": "string"
823
+ }
824
+ },
825
+ "example": "[\n {\n \"type\": \"whatsapp\",\n \"value\": \"+1234567890\"\n },\n {\n \"type\": \"kik\",\n \"value\": \"acme.ny.reception\"\n }\n]"
826
+ },
827
+ "LanguageReference": {
828
+ "description": "Preferred languages",
829
+ "type": "array",
830
+ "items": {
831
+ "allOf": [
832
+ {
833
+ "$ref": "#/definitions/LanguageItemReference"
834
+ }
835
+ ]
836
+ },
837
+ "example": "[\n \"en-US\",\n \"en-GB\",\n \"cs-CZ\"\n]"
838
+ },
839
+ "LanguageItemReference": {
840
+ "description": "Language tag according to RFC 4646. Represented as combination of the ISO 639-1 language code and ISO 3166-1 alpha-2 country code. Examples: en-US, en-GB, cs-CZ, etc.",
841
+ "type": "string",
842
+ "example": "en-US"
843
+ },
844
+ "MediaListReference": {
845
+ "description": "List of media files",
846
+ "type": "object",
847
+ "required": [
848
+ "logo"
849
+ ],
850
+ "properties": {
851
+ "logo": {
852
+ "description": "Organization or unit logo",
853
+ "type": "string"
854
+ },
855
+ "images": {
856
+ "description": "List of images",
857
+ "type": "array",
858
+ "items": {
859
+ "allOf": [
860
+ {
861
+ "$ref": "#/definitions/MediaReference"
862
+ }
863
+ ]
864
+ }
865
+ },
866
+ "videos": {
867
+ "description": "List of video files",
868
+ "type": "array",
869
+ "items": {
870
+ "allOf": [
871
+ {
872
+ "$ref": "#/definitions/MediaReference"
873
+ }
874
+ ]
875
+ }
876
+ },
877
+ "documents": {
878
+ "description": "List of documents",
879
+ "type": "array",
880
+ "items": {
881
+ "allOf": [
882
+ {
883
+ "$ref": "#/definitions/MediaReference"
884
+ }
885
+ ]
886
+ }
887
+ },
888
+ "others": {
889
+ "description": "Files other than images, video files or documents",
890
+ "type": "array",
891
+ "items": {
892
+ "allOf": [
893
+ {
894
+ "$ref": "#/definitions/MediaReference"
895
+ }
896
+ ]
897
+ }
898
+ }
899
+ },
900
+ "example": "{\n \"logo\": \"https://imagehosting/hotel.jpg\",\n \"images\": [\n {\n \"description\": \"Hotel Lobby\",\n \"uri\": \"https://imagehosting/123456789.jpg\",\n \"thumbnail\": \"https://imagehosting/123456789-thumbnail.jpg\"\n }\n ],\n \"videos\": [\n {\n \"description\": \"Hotel Tour\",\n \"uri\": \"https://videohosting/hotel-tour.mp4\",\n \"cover\": \"https://imagehosting/hotel-tour-cover.jpg\",\n \"thumbnail\": \"https://imagehosting/hotel-tour-cover-thumbnail.jpg\"\n }\n ],\n \"documents\": [\n {\n \"description\": \"Hotel Presentation\",\n \"uri\": \"https://filehosting/hotel-presentation.pdf\"\n }\n ]\n}"
901
+ },
902
+ "MediaReference": {
903
+ "description": "Media file",
904
+ "type": "object",
905
+ "required": [
906
+ "uri"
907
+ ],
908
+ "properties": {
909
+ "description": {
910
+ "description": "File description",
911
+ "type": "string"
912
+ },
913
+ "thumbnail": {
914
+ "description": "Thumbnail image",
915
+ "type": "string",
916
+ "format": "uri"
917
+ },
918
+ "uri": {
919
+ "description": "Link to the media resource",
920
+ "type": "string",
921
+ "format": "uri"
922
+ }
923
+ },
924
+ "example": "{\n \"description\": \"Hotel Tour\",\n \"uri\": \"https://videohosting/hotel-tour.mp4\",\n \"cover\": \"https://imagehosting/hotel-tour-cover.jpg\",\n \"thumbnail\": \"https://imagehosting/hotel-tour-cover-thumbnail.jpg\"\n}"
925
+ },
926
+ "Currency": {
927
+ "description": "Currency code",
928
+ "type": "string",
929
+ "pattern": "^[a-zA-Z]{2,}$",
930
+ "example": "EUR"
931
+ },
932
+ "BlockchainAccountId": {
933
+ "description": "Public key of the blockchain account",
934
+ "type": "string",
935
+ "pattern": "^([-a-zA-Z0-9]{5,41}):([-a-zA-Z0-9]{1,32}):([a-zA-Z0-9]{1,64})|([a-zA-Z0-9]{1,64})@([-a-z0-9]{5,41}):([-a-zA-Z-0-9]{1,32})$",
936
+ "example": "eip155:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb 0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb@eip155:1 # Legacy format"
937
+ },
938
+ "SwiftCode": {
939
+ "description": "SWIFT/BIC bank code according to ISO 9326",
940
+ "type": "string",
941
+ "pattern": "^[a-zA-Z]{4}[ -]{0,1}[a-zA-Z]{2}[ -]{0,1}[a-zA-Z0-9]{2}[ -]{0,1}[XXX0-9]{0,3}$",
942
+ "example": "UBSWUS33CHI"
943
+ },
944
+ "IbanCode": {
945
+ "description": "International Bank Account Number (IBAN) according to ISO 13616:1997",
946
+ "type": "string",
947
+ "pattern": "^([A-Z]{2}[ -]?[0-9]{2})(?=(?:[ -]?[A-Z0-9]){9,30}$)((?:[ -]?[A-Z0-9]{3,5}){2,7})([ -]?[A-Z0-9]{1,3})?$",
948
+ "example": "DE91100000000123456789"
949
+ },
950
+ "CryptographicSuiteReference": {
951
+ "description": "The cryptographic suite type that can be used for signatures verification",
952
+ "type": "string",
953
+ "enum": [
954
+ "EcdsaSecp256k1VerificationKey2019",
955
+ "EcdsaSecp256k1RecoveryMethod2020",
956
+ "JsonWebKey2020"
957
+ ]
958
+ },
959
+ "CapabilityDelegationReference": {
960
+ "description": "The capability delegation is used to specify mechanism that might be used by the DID subject (organization entity or person) to delegate a cryptographic capability to another party, such as delegating the authority to access a specific HTTP API to a subordinate or to specify a method of verification of credentials. ORGiD protocol uses capability delegation to specify an own method of ORG.JSON VC verification or a third party verification method to do it.",
961
+ "type": "array",
962
+ "items": {
963
+ "oneOf": [
964
+ {
965
+ "$ref": "#/definitions/DIDReference"
966
+ },
967
+ {
968
+ "$ref": "#/definitions/VerificationMethodReference"
969
+ }
970
+ ]
971
+ },
972
+ "example": "\"capabilityDelegation\": [\n \"did:orgid:4:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75#key1\",\n {\n \"id\": \"did:orgid:1:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75#key1\",\n \"type\": \"EcdsaSecp256k1VerificationKey2019\",\n \"controller\": \"did:orgid:1:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75\",\n \"publicKeyPem\": \"MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgA...M8LZ6is0rMBMAXCvb9FH2g==\"\n }\n]"
973
+ },
974
+ "CredentialReference": {
975
+ "description": "ORGiD Verifiable Credentials Schema",
976
+ "type": "object",
977
+ "required": [
978
+ "@context",
979
+ "id",
980
+ "type",
981
+ "issuer",
982
+ "issuanceDate",
983
+ "credentialSubject"
984
+ ],
985
+ "properties": {
986
+ "@context": {
987
+ "$ref": "#/definitions/ContextReference"
988
+ },
989
+ "id": {
990
+ "description": "Unique identifier of the VC generated by the issuer",
991
+ "$ref": "#/definitions/UUIDReference"
992
+ },
993
+ "type": {
994
+ "description": "Type of the VC",
995
+ "type": "array",
996
+ "items": {
997
+ "allOf": [
998
+ {
999
+ "type": "string"
1000
+ }
1001
+ ]
1002
+ },
1003
+ "example": "[ \"VerifiableCredential\", \"UniversityDegreeCredential\" ]"
1004
+ },
1005
+ "issuer": {
1006
+ "description": "VC issuer",
1007
+ "$ref": "#/definitions/DIDReference"
1008
+ },
1009
+ "holder": {
1010
+ "description": "VC holder",
1011
+ "oneOf": [
1012
+ {
1013
+ "$ref": "#/definitions/VCHolderReference"
1014
+ },
1015
+ {
1016
+ "$ref": "#/definitions/VCTypedHolderReference"
1017
+ }
1018
+ ]
1019
+ },
1020
+ "issuanceDate": {
1021
+ "description": "When the VC was issued",
1022
+ "type": "string",
1023
+ "format": "date-time"
1024
+ },
1025
+ "expirationDate": {
1026
+ "description": "When the VC will be expired",
1027
+ "type": "string",
1028
+ "format": "date-time"
1029
+ },
1030
+ "validFrom": {
1031
+ "description": "When the VC will becomes valid. Useful when the credential usage is time dependent. E.g. Entrance card to the SPA",
1032
+ "type": "string",
1033
+ "format": "date-time"
1034
+ },
1035
+ "validUntil": {
1036
+ "validFrom": null,
1037
+ "description": "When the VC will becomes invalid. Useful when the credential usage is time dependent. E.g. Entrance card to the SPA",
1038
+ "type": "string",
1039
+ "format": "date-time"
1040
+ },
1041
+ "credentialSubject": {
1042
+ "description": "Claims about the subject of VC",
1043
+ "type": "object"
1044
+ },
1045
+ "proof": {
1046
+ "$ref": "#/definitions/VCProofReference"
1047
+ }
1048
+ }
1049
+ },
1050
+ "UUIDReference": {
1051
+ "description": "Unique identifier",
1052
+ "type": "string",
1053
+ "format": "uuid",
1054
+ "minLength": 36,
1055
+ "maxLength": 36,
1056
+ "pattern": "^(?:^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}$)|(?:^0{8}-0{4}-0{4}-0{4}-0{12}$)$",
1057
+ "example": "11111111-2222-3333-4444-000000000001"
1058
+ },
1059
+ "VCHolderReference": {
1060
+ "description": "Holder' ORGiD",
1061
+ "$ref": "#/definitions/DIDReference"
1062
+ },
1063
+ "VCTypedHolderReference": {
1064
+ "description": "This type of the holder definition can be used when a credential issued to a holder who is not the (only) subject of the credential, who has no relationship with the subject of the credential, but who has a relationship with the issuer",
1065
+ "type": "object",
1066
+ "required": [
1067
+ "type",
1068
+ "id"
1069
+ ],
1070
+ "properties": {
1071
+ "type": {
1072
+ "description": "A type of activity during which the issuer permits to own the credential",
1073
+ "type": "string",
1074
+ "example": "LawEnforcement"
1075
+ },
1076
+ "id": {
1077
+ "description": "Holder's ORGiD",
1078
+ "$ref": "#/definitions/DIDReference"
1079
+ }
1080
+ }
1081
+ },
1082
+ "VCProofReference": {
1083
+ "description": "Digital proof that makes the credential tamper-evident",
1084
+ "type": "object",
1085
+ "required": [
1086
+ "type",
1087
+ "created",
1088
+ "proofPurpose",
1089
+ "verificationMethod",
1090
+ "jws"
1091
+ ],
1092
+ "properties": {
1093
+ "type": {
1094
+ "$ref": "#/definitions/CryptographicSignatureSuiteReference"
1095
+ },
1096
+ "created": {
1097
+ "description": "When proof was created",
1098
+ "type": "string",
1099
+ "format": "date-time"
1100
+ },
1101
+ "proofPurpose": {
1102
+ "description": "Purpose of the proof",
1103
+ "type": "string",
1104
+ "example": "assertionMethod"
1105
+ },
1106
+ "verificationMethod": {
1107
+ "description": "The identifier of the public key that can verify the signature",
1108
+ "$ref": "#/definitions/DIDReference"
1109
+ },
1110
+ "jws": {
1111
+ "description": "The digital signature value",
1112
+ "type": "string"
1113
+ }
1114
+ }
1115
+ },
1116
+ "CryptographicSignatureSuiteReference": {
1117
+ "description": "The cryptographic signature suite that was used to generate the signature",
1118
+ "type": "string",
1119
+ "enum": [
1120
+ "EcdsaSecp256k1Signature2019",
1121
+ "EcdsaSecp256k1RecoverySignature2020",
1122
+ "JsonWebSignature2020"
1123
+ ]
1124
+ }
1125
+ }
1126
+ }