@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,535 @@
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
+ "recordedAt",
230
+ "timezone",
231
+ "timePrecision"
232
+ ],
233
+ "additionalProperties": false
234
+ },
235
+ "where": {
236
+ "type": "object",
237
+ "properties": {
238
+ "jurisdiction": {
239
+ "type": "string",
240
+ "pattern": "^[A-Z]{2}$"
241
+ },
242
+ "readPoint": {
243
+ "type": "object"
244
+ },
245
+ "businessLocation": {
246
+ "type": "object"
247
+ },
248
+ "geoCoordinates": {
249
+ "type": "object",
250
+ "properties": {
251
+ "latitude": {
252
+ "type": "number",
253
+ "minimum": -90,
254
+ "maximum": 90
255
+ },
256
+ "longitude": {
257
+ "type": "number",
258
+ "minimum": -180,
259
+ "maximum": 180
260
+ }
261
+ },
262
+ "required": [
263
+ "latitude",
264
+ "longitude"
265
+ ],
266
+ "additionalProperties": false
267
+ }
268
+ },
269
+ "required": [
270
+ "jurisdiction"
271
+ ],
272
+ "additionalProperties": false
273
+ },
274
+ "who": {
275
+ "type": "object",
276
+ "properties": {
277
+ "actorDid": {
278
+ "type": "string",
279
+ "minLength": 1,
280
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
281
+ },
282
+ "actorRole": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "assertionMethod": {
287
+ "type": "string",
288
+ "minLength": 1,
289
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
290
+ },
291
+ "actorLicense": {
292
+ "type": "object"
293
+ }
294
+ },
295
+ "required": [
296
+ "actorDid",
297
+ "actorRole",
298
+ "assertionMethod"
299
+ ],
300
+ "additionalProperties": false
301
+ },
302
+ "how": {
303
+ "type": "object",
304
+ "properties": {
305
+ "eventType": {
306
+ "type": "string",
307
+ "minLength": 1
308
+ },
309
+ "eventTypeVocab": {
310
+ "type": "string",
311
+ "minLength": 1,
312
+ "pattern": "^urn:"
313
+ },
314
+ "businessStep": {
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "disposition": {
319
+ "enum": [
320
+ "active",
321
+ "in_transit",
322
+ "stored",
323
+ "transshipped",
324
+ "returned",
325
+ "transformed",
326
+ "received",
327
+ "dispensed",
328
+ "destroyed"
329
+ ]
330
+ },
331
+ "action": {
332
+ "enum": [
333
+ "ADD",
334
+ "OBSERVE",
335
+ "DELETE"
336
+ ]
337
+ }
338
+ },
339
+ "required": [
340
+ "eventType",
341
+ "eventTypeVocab",
342
+ "businessStep",
343
+ "disposition",
344
+ "action"
345
+ ],
346
+ "additionalProperties": false
347
+ }
348
+ },
349
+ "required": [
350
+ "what",
351
+ "when",
352
+ "where",
353
+ "who",
354
+ "how"
355
+ ],
356
+ "additionalProperties": false
357
+ },
358
+ "extensions": {
359
+ "type": "object",
360
+ "properties": {
361
+ "+Dn": {
362
+ "type": "object",
363
+ "additionalProperties": {
364
+ "type": "object"
365
+ }
366
+ }
367
+ },
368
+ "required": [
369
+ "+Dn"
370
+ ],
371
+ "additionalProperties": false
372
+ },
373
+ "chainOfCustody": {
374
+ "type": "object",
375
+ "properties": {
376
+ "chainId": {
377
+ "type": "string",
378
+ "minLength": 1,
379
+ "format": "uri"
380
+ },
381
+ "sequenceNumber": {
382
+ "type": "integer",
383
+ "minimum": 1,
384
+ "maximum": 9007199254740991
385
+ },
386
+ "parentSeals": {
387
+ "type": "array",
388
+ "items": {
389
+ "type": "string",
390
+ "minLength": 1,
391
+ "format": "uri"
392
+ },
393
+ "minItems": 0,
394
+ "uniqueItems": true
395
+ },
396
+ "childSeals": {
397
+ "type": "array",
398
+ "items": {
399
+ "type": "string",
400
+ "minLength": 1,
401
+ "format": "uri"
402
+ },
403
+ "minItems": 0,
404
+ "uniqueItems": true
405
+ },
406
+ "topology": {
407
+ "enum": [
408
+ "linear",
409
+ "fork",
410
+ "merge",
411
+ "transform",
412
+ "correction"
413
+ ]
414
+ },
415
+ "topologyNote": {
416
+ "type": "string",
417
+ "minLength": 1
418
+ }
419
+ },
420
+ "required": [
421
+ "chainId",
422
+ "sequenceNumber",
423
+ "parentSeals",
424
+ "topology"
425
+ ],
426
+ "additionalProperties": false
427
+ },
428
+ "proof": {
429
+ "anyOf": [
430
+ {
431
+ "type": "object",
432
+ "properties": {
433
+ "type": {
434
+ "enum": [
435
+ "Ed25519Signature2020",
436
+ "DataIntegrityProof"
437
+ ]
438
+ },
439
+ "verificationMethod": {
440
+ "type": "string",
441
+ "minLength": 1,
442
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
443
+ },
444
+ "proofPurpose": {
445
+ "const": "assertionMethod"
446
+ },
447
+ "proofValue": {
448
+ "type": "string",
449
+ "minLength": 1,
450
+ "pattern": "^[zu][A-Za-z0-9_-]+$"
451
+ },
452
+ "created": {
453
+ "type": "string",
454
+ "minLength": 1,
455
+ "format": "date-time"
456
+ },
457
+ "cryptosuite": {
458
+ "const": "bbs-2023"
459
+ }
460
+ },
461
+ "required": [
462
+ "type",
463
+ "verificationMethod",
464
+ "proofPurpose",
465
+ "proofValue"
466
+ ],
467
+ "additionalProperties": false
468
+ },
469
+ {
470
+ "type": "array",
471
+ "items": {
472
+ "type": "object",
473
+ "properties": {
474
+ "type": {
475
+ "enum": [
476
+ "Ed25519Signature2020",
477
+ "DataIntegrityProof"
478
+ ]
479
+ },
480
+ "verificationMethod": {
481
+ "type": "string",
482
+ "minLength": 1,
483
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$"
484
+ },
485
+ "proofPurpose": {
486
+ "const": "assertionMethod"
487
+ },
488
+ "proofValue": {
489
+ "type": "string",
490
+ "minLength": 1,
491
+ "pattern": "^[zu][A-Za-z0-9_-]+$"
492
+ },
493
+ "created": {
494
+ "type": "string",
495
+ "minLength": 1,
496
+ "format": "date-time"
497
+ },
498
+ "cryptosuite": {
499
+ "const": "bbs-2023"
500
+ }
501
+ },
502
+ "required": [
503
+ "type",
504
+ "verificationMethod",
505
+ "proofPurpose",
506
+ "proofValue"
507
+ ],
508
+ "additionalProperties": false
509
+ },
510
+ "minItems": 1
511
+ }
512
+ ]
513
+ }
514
+ },
515
+ "required": [
516
+ "@context",
517
+ "type",
518
+ "id",
519
+ "issuer",
520
+ "issuanceDate",
521
+ "validFrom",
522
+ "sealVersion",
523
+ "sealTimestamp",
524
+ "correctionOf",
525
+ "credentialSubject",
526
+ "credentialStatus",
527
+ "eventVector",
528
+ "extensions",
529
+ "chainOfCustody",
530
+ "proof"
531
+ ],
532
+ "additionalProperties": false,
533
+ "$schema": "http://json-schema.org/draft-07/schema#",
534
+ "$id": "urn:bsv:vsc:schema:0.1.0"
535
+ }
@@ -0,0 +1,3 @@
1
+ # W3C context artefacts
2
+
3
+ `credentials-v2.jsonld` is the W3C Verifiable Credentials 2.0 JSON-LD context (https://www.w3.org/ns/credentials/v2), retrieved unchanged on 6 September 2026, SHA-256 59955ced6697d61e03f2b2556febe5308ab16842846f5b586d7f1f7adec92734, 10131 bytes. W3C document licence. It is carried so the pinned bytes the external credential profile resolves the context URL to are recorded beside the package's owned artefacts; the runtime document loader continues to serve the same context from the maintained `@digitalbazaar/credentials-context` package, and a test holds the two equal.