@bsv/vsc 0.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/LICENSE +58 -0
  2. package/README.md +107 -0
  3. package/artifacts/context-0.1.0.jsonld +127 -0
  4. package/artifacts/disclosure-0.1.0.schema.json +526 -0
  5. package/artifacts/epcis/NOTICE.md +11 -0
  6. package/artifacts/epcis/epcis-context-2.0.1.jsonld +593 -0
  7. package/artifacts/epcis/epcis-json-schema-2.0.1.json +2352 -0
  8. package/artifacts/epcis/query-schema-2.0.1.json +968 -0
  9. package/artifacts/external/NOTICE.md +3 -0
  10. package/artifacts/external/dpp-external-passport-1.context.jsonld +8 -0
  11. package/artifacts/external/dpp-external-passport-1.schema.json +158 -0
  12. package/artifacts/profile-0.1.0.json +100 -0
  13. package/artifacts/seal-0.1.0.schema.json +535 -0
  14. package/artifacts/w3c/NOTICE.md +3 -0
  15. package/artifacts/w3c/credentials-v2.jsonld +340 -0
  16. package/dist/context.d.ts +9 -0
  17. package/dist/context.d.ts.map +1 -0
  18. package/dist/context.js +50 -0
  19. package/dist/context.js.map +1 -0
  20. package/dist/crypto.d.ts +50 -0
  21. package/dist/crypto.d.ts.map +1 -0
  22. package/dist/crypto.js +141 -0
  23. package/dist/crypto.js.map +1 -0
  24. package/dist/did-web.d.ts +9 -0
  25. package/dist/did-web.d.ts.map +1 -0
  26. package/dist/did-web.js +66 -0
  27. package/dist/did-web.js.map +1 -0
  28. package/dist/epcis-source.d.ts +251 -0
  29. package/dist/epcis-source.d.ts.map +1 -0
  30. package/dist/epcis-source.js +573 -0
  31. package/dist/epcis-source.js.map +1 -0
  32. package/dist/epcis.d.ts +51 -0
  33. package/dist/epcis.d.ts.map +1 -0
  34. package/dist/epcis.js +171 -0
  35. package/dist/epcis.js.map +1 -0
  36. package/dist/exchange.d.ts +175 -0
  37. package/dist/exchange.d.ts.map +1 -0
  38. package/dist/exchange.js +491 -0
  39. package/dist/exchange.js.map +1 -0
  40. package/dist/index.d.ts +10 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +10 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/jcs.d.ts +25 -0
  45. package/dist/jcs.d.ts.map +1 -0
  46. package/dist/jcs.js +67 -0
  47. package/dist/jcs.js.map +1 -0
  48. package/dist/schema.d.ts +414 -0
  49. package/dist/schema.d.ts.map +1 -0
  50. package/dist/schema.js +537 -0
  51. package/dist/schema.js.map +1 -0
  52. package/dist/types.d.ts +159 -0
  53. package/dist/types.d.ts.map +1 -0
  54. package/dist/types.js +2 -0
  55. package/dist/types.js.map +1 -0
  56. package/dist/validation.d.ts +22 -0
  57. package/dist/validation.d.ts.map +1 -0
  58. package/dist/validation.js +147 -0
  59. package/dist/validation.js.map +1 -0
  60. package/dist/verification.d.ts +10 -0
  61. package/dist/verification.d.ts.map +1 -0
  62. package/dist/verification.js +350 -0
  63. package/dist/verification.js.map +1 -0
  64. package/package.json +68 -0
@@ -0,0 +1,526 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "@context": {
5
+ "type": "array",
6
+ "items": {
7
+ "enum": [
8
+ "https://www.w3.org/ns/credentials/v2",
9
+ "urn:bsv:vsc:context:0.1.0",
10
+ "https://w3id.org/security/suites/ed25519-2020/v1",
11
+ "https://w3id.org/security/data-integrity/v2"
12
+ ]
13
+ },
14
+ "minItems": 2
15
+ },
16
+ "type": {
17
+ "const": [
18
+ "VerifiableCredential",
19
+ "VSC-SEAL"
20
+ ]
21
+ },
22
+ "id": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "format": "uri"
26
+ },
27
+ "issuer": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
31
+ },
32
+ "issuanceDate": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "format": "date-time"
36
+ },
37
+ "validFrom": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "format": "date-time"
41
+ },
42
+ "validUntil": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "format": "date-time"
46
+ },
47
+ "sealVersion": {
48
+ "const": "1.0"
49
+ },
50
+ "sealTimestamp": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "format": "date-time"
54
+ },
55
+ "correctionOf": {
56
+ "anyOf": [
57
+ {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "format": "uri"
61
+ },
62
+ {
63
+ "type": "null"
64
+ }
65
+ ]
66
+ },
67
+ "credentialSubject": {
68
+ "type": "object",
69
+ "properties": {
70
+ "id": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "format": "uri"
74
+ },
75
+ "predecessorCredentials": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "format": "uri"
81
+ },
82
+ "minItems": 0,
83
+ "uniqueItems": true
84
+ }
85
+ },
86
+ "required": [
87
+ "id"
88
+ ],
89
+ "additionalProperties": false
90
+ },
91
+ "credentialStatus": {
92
+ "type": "object",
93
+ "properties": {
94
+ "id": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "format": "uri"
98
+ },
99
+ "type": {
100
+ "const": "BitstringStatusListEntry"
101
+ },
102
+ "statusPurpose": {
103
+ "enum": [
104
+ "revocation",
105
+ "suspension"
106
+ ]
107
+ },
108
+ "statusListIndex": {
109
+ "type": "string",
110
+ "pattern": "^(0|[1-9][0-9]*)$"
111
+ },
112
+ "statusListCredential": {
113
+ "type": "string",
114
+ "minLength": 1,
115
+ "format": "uri"
116
+ }
117
+ },
118
+ "required": [
119
+ "id",
120
+ "type",
121
+ "statusPurpose",
122
+ "statusListIndex",
123
+ "statusListCredential"
124
+ ],
125
+ "additionalProperties": false
126
+ },
127
+ "eventVector": {
128
+ "type": "object",
129
+ "properties": {
130
+ "what": {
131
+ "type": "object",
132
+ "properties": {
133
+ "productIdentifiers": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "object",
137
+ "properties": {
138
+ "scheme": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ },
142
+ "value": {
143
+ "type": "string",
144
+ "minLength": 1
145
+ },
146
+ "schemeAuthority": {
147
+ "type": "string",
148
+ "minLength": 1
149
+ },
150
+ "serialNumber": {
151
+ "type": "string",
152
+ "minLength": 1
153
+ }
154
+ },
155
+ "required": [
156
+ "scheme",
157
+ "value",
158
+ "schemeAuthority"
159
+ ],
160
+ "additionalProperties": false
161
+ },
162
+ "minItems": 1
163
+ },
164
+ "classifications": {
165
+ "type": "array",
166
+ "items": {
167
+ "type": "object"
168
+ },
169
+ "minItems": 0
170
+ },
171
+ "batchOrLot": {
172
+ "type": "string",
173
+ "minLength": 1
174
+ },
175
+ "expiryDate": {
176
+ "type": "string",
177
+ "format": "date"
178
+ },
179
+ "quantity": {
180
+ "type": "number",
181
+ "minimum": 0
182
+ },
183
+ "quantityUnit": {
184
+ "type": "string",
185
+ "minLength": 1
186
+ },
187
+ "description": {
188
+ "type": "string",
189
+ "minLength": 1
190
+ }
191
+ },
192
+ "required": [
193
+ "productIdentifiers"
194
+ ],
195
+ "additionalProperties": false,
196
+ "dependencies": {
197
+ "quantity": [
198
+ "quantityUnit"
199
+ ]
200
+ }
201
+ },
202
+ "when": {
203
+ "type": "object",
204
+ "properties": {
205
+ "eventTime": {
206
+ "type": "string",
207
+ "minLength": 1,
208
+ "format": "date-time"
209
+ },
210
+ "recordedAt": {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "format": "date-time"
214
+ },
215
+ "timezone": {
216
+ "type": "string",
217
+ "minLength": 1
218
+ },
219
+ "timePrecision": {
220
+ "enum": [
221
+ "millisecond",
222
+ "second",
223
+ "minute"
224
+ ]
225
+ }
226
+ },
227
+ "required": [
228
+ "eventTime",
229
+ "timezone"
230
+ ],
231
+ "additionalProperties": false
232
+ },
233
+ "where": {
234
+ "type": "object",
235
+ "properties": {
236
+ "jurisdiction": {
237
+ "type": "string",
238
+ "pattern": "^[A-Z]{2}$"
239
+ },
240
+ "readPoint": {
241
+ "type": "object"
242
+ },
243
+ "businessLocation": {
244
+ "type": "object"
245
+ },
246
+ "geoCoordinates": {
247
+ "type": "object",
248
+ "properties": {
249
+ "latitude": {
250
+ "type": "number",
251
+ "minimum": -90,
252
+ "maximum": 90
253
+ },
254
+ "longitude": {
255
+ "type": "number",
256
+ "minimum": -180,
257
+ "maximum": 180
258
+ }
259
+ },
260
+ "required": [
261
+ "latitude",
262
+ "longitude"
263
+ ],
264
+ "additionalProperties": false
265
+ }
266
+ },
267
+ "required": [
268
+ "jurisdiction"
269
+ ],
270
+ "additionalProperties": false
271
+ },
272
+ "who": {
273
+ "type": "object",
274
+ "properties": {
275
+ "actorDid": {
276
+ "type": "string",
277
+ "minLength": 1,
278
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
279
+ },
280
+ "actorRole": {
281
+ "type": "string",
282
+ "minLength": 1
283
+ },
284
+ "assertionMethod": {
285
+ "type": "string",
286
+ "minLength": 1,
287
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
288
+ },
289
+ "actorLicense": {
290
+ "type": "object"
291
+ }
292
+ },
293
+ "required": [
294
+ "actorDid",
295
+ "actorRole",
296
+ "assertionMethod"
297
+ ],
298
+ "additionalProperties": false
299
+ },
300
+ "how": {
301
+ "type": "object",
302
+ "properties": {
303
+ "eventType": {
304
+ "type": "string",
305
+ "minLength": 1
306
+ },
307
+ "eventTypeVocab": {
308
+ "type": "string",
309
+ "minLength": 1,
310
+ "pattern": "^urn:"
311
+ },
312
+ "businessStep": {
313
+ "type": "string",
314
+ "minLength": 1
315
+ },
316
+ "disposition": {
317
+ "enum": [
318
+ "active",
319
+ "in_transit",
320
+ "stored",
321
+ "transshipped",
322
+ "returned",
323
+ "transformed",
324
+ "received",
325
+ "dispensed",
326
+ "destroyed"
327
+ ]
328
+ },
329
+ "action": {
330
+ "enum": [
331
+ "ADD",
332
+ "OBSERVE",
333
+ "DELETE"
334
+ ]
335
+ }
336
+ },
337
+ "required": [
338
+ "eventType",
339
+ "eventTypeVocab",
340
+ "disposition"
341
+ ],
342
+ "additionalProperties": false
343
+ }
344
+ },
345
+ "required": [
346
+ "what",
347
+ "when",
348
+ "where",
349
+ "who",
350
+ "how"
351
+ ],
352
+ "additionalProperties": false
353
+ },
354
+ "extensions": {
355
+ "type": "object",
356
+ "properties": {
357
+ "+Dn": {
358
+ "type": "object",
359
+ "additionalProperties": {
360
+ "type": "object"
361
+ }
362
+ }
363
+ },
364
+ "required": [
365
+ "+Dn"
366
+ ],
367
+ "additionalProperties": false
368
+ },
369
+ "chainOfCustody": {
370
+ "type": "object",
371
+ "properties": {
372
+ "chainId": {
373
+ "type": "string",
374
+ "minLength": 1,
375
+ "format": "uri"
376
+ },
377
+ "sequenceNumber": {
378
+ "type": "integer",
379
+ "minimum": 1,
380
+ "maximum": 9007199254740991
381
+ },
382
+ "parentSeals": {
383
+ "type": "array",
384
+ "items": {
385
+ "type": "string",
386
+ "minLength": 1,
387
+ "format": "uri"
388
+ },
389
+ "minItems": 0,
390
+ "uniqueItems": true
391
+ },
392
+ "childSeals": {
393
+ "type": "array",
394
+ "items": {
395
+ "type": "string",
396
+ "minLength": 1,
397
+ "format": "uri"
398
+ },
399
+ "minItems": 0,
400
+ "uniqueItems": true
401
+ },
402
+ "topology": {
403
+ "enum": [
404
+ "linear",
405
+ "fork",
406
+ "merge",
407
+ "transform",
408
+ "correction"
409
+ ]
410
+ },
411
+ "topologyNote": {
412
+ "type": "string",
413
+ "minLength": 1
414
+ }
415
+ },
416
+ "required": [
417
+ "chainId"
418
+ ],
419
+ "additionalProperties": false
420
+ },
421
+ "proof": {
422
+ "anyOf": [
423
+ {
424
+ "type": "object",
425
+ "properties": {
426
+ "type": {
427
+ "enum": [
428
+ "Ed25519Signature2020",
429
+ "DataIntegrityProof"
430
+ ]
431
+ },
432
+ "verificationMethod": {
433
+ "type": "string",
434
+ "minLength": 1,
435
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
436
+ },
437
+ "proofPurpose": {
438
+ "const": "assertionMethod"
439
+ },
440
+ "proofValue": {
441
+ "type": "string",
442
+ "minLength": 1,
443
+ "pattern": "^[zu][A-Za-z0-9_-]+$"
444
+ },
445
+ "created": {
446
+ "type": "string",
447
+ "minLength": 1,
448
+ "format": "date-time"
449
+ },
450
+ "cryptosuite": {
451
+ "const": "bbs-2023"
452
+ }
453
+ },
454
+ "required": [
455
+ "type",
456
+ "verificationMethod",
457
+ "proofPurpose",
458
+ "proofValue"
459
+ ],
460
+ "additionalProperties": false
461
+ },
462
+ {
463
+ "type": "array",
464
+ "items": {
465
+ "type": "object",
466
+ "properties": {
467
+ "type": {
468
+ "enum": [
469
+ "Ed25519Signature2020",
470
+ "DataIntegrityProof"
471
+ ]
472
+ },
473
+ "verificationMethod": {
474
+ "type": "string",
475
+ "minLength": 1,
476
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
477
+ },
478
+ "proofPurpose": {
479
+ "const": "assertionMethod"
480
+ },
481
+ "proofValue": {
482
+ "type": "string",
483
+ "minLength": 1,
484
+ "pattern": "^[zu][A-Za-z0-9_-]+$"
485
+ },
486
+ "created": {
487
+ "type": "string",
488
+ "minLength": 1,
489
+ "format": "date-time"
490
+ },
491
+ "cryptosuite": {
492
+ "const": "bbs-2023"
493
+ }
494
+ },
495
+ "required": [
496
+ "type",
497
+ "verificationMethod",
498
+ "proofPurpose",
499
+ "proofValue"
500
+ ],
501
+ "additionalProperties": false
502
+ },
503
+ "minItems": 1
504
+ }
505
+ ]
506
+ }
507
+ },
508
+ "required": [
509
+ "@context",
510
+ "type",
511
+ "id",
512
+ "issuer",
513
+ "validFrom",
514
+ "sealVersion",
515
+ "sealTimestamp",
516
+ "correctionOf",
517
+ "credentialSubject",
518
+ "credentialStatus",
519
+ "eventVector",
520
+ "chainOfCustody",
521
+ "proof"
522
+ ],
523
+ "additionalProperties": false,
524
+ "$schema": "http://json-schema.org/draft-07/schema#",
525
+ "$id": "urn:bsv:vsc:schema:0.1.0:disclosure"
526
+ }
@@ -0,0 +1,11 @@
1
+ # GS1 EPCIS 2.0.1 artefacts
2
+
3
+ These files are the GS1 EPCIS 2.0.1 JSON Schema, JSON-LD context and query schema, retrieved unchanged from ref.gs1.org on 6 September 2026 and carried here so a source document can be validated against the exact published bytes without a network fetch. GS1 is the publisher and rights holder of these artefacts; they are used under GS1's terms for its published standards artefacts (https://www.gs1.org/standards/epcis) and are not part of this repository's licence. Only the files needed at run time are carried; the EPCIS REST binding (openapi.json, Apache-2.0 per its info block) is pinned by digest in the epcis-json@1 manifest and not redistributed.
4
+
5
+ | File | Source URI | SHA-256 | Bytes |
6
+ | --- | --- | --- | --- |
7
+ | epcis-json-schema-2.0.1.json | https://ref.gs1.org/standards/epcis/2.0.1/epcis-json-schema.json | 0f46ff694efffd8d8ce840a33dfde84228add11b516b8b258f3200740ae210af | 55680 |
8
+ | epcis-context-2.0.1.jsonld | https://ref.gs1.org/standards/epcis/2.0.1/epcis-context.jsonld | 5056c65f991425b1d3a35e35edf4f7d0c7ff56cf688c2912b930f93494713737 | 20690 |
9
+ | query-schema-2.0.1.json | https://ref.gs1.org/standards/epcis/2.0.1/query-schema.json | 4b5583c9a0a715324594617f3cf6744f4f930568484f7df8fb7aa81819355341 | 27229 |
10
+
11
+ A test holds each file to its digest. A changed upstream artefact is a new pinned version, never an edit of these bytes.