Skip to content

Commit 2a588a8

Browse files
committed
Sync context with latest spec version.
- Switch `encodingFormat` term back to `mediaType`. - w3c/vc-data-model#1408 - w3c/vc-data-model#1440 - Add `EnvelopedVerifiablePresentation`. - Add type for `statusReference` and `statusSize`. - Fix whitespace.
1 parent 277d50b commit 2a588a8

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

contexts/credentials-v2.jsonld

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@
7171
"@id": "https://w3id.org/security#digestMultibase",
7272
"@type": "https://w3id.org/security#multibase"
7373
},
74-
"encodingFormat": {
74+
"mediaType": {
7575
"@id": "https://schema.org/encodingFormat"
7676
},
7777
"description": "https://schema.org/description",
7878
"name": "https://schema.org/name",
7979
"EnvelopedVerifiableCredential": "https://www.w3.org/2018/credentials#EnvelopedVerifiableCredential",
80+
"EnvelopedVerifiablePresentation": "https://www.w3.org/2018/credentials#EnvelopedVerifiablePresentation",
8081
"VerifiableCredential": {
8182
"@id": "https://www.w3.org/2018/credentials#VerifiableCredential",
8283
"@context": {
@@ -189,8 +190,14 @@
189190
"@type": "https://w3id.org/security#multibase"
190191
},
191192
"ttl": "https://www.w3.org/ns/credentials/status#ttl",
192-
"statusReference": "https://www.w3.org/ns/credentials/status#statusReference",
193-
"statusSize": "https://www.w3.org/ns/credentials/status#statusSize",
193+
"statusReference": {
194+
"@id": "https://www.w3.org/ns/credentials/status#statusReference",
195+
"@type": "@id"
196+
},
197+
"statusSize": {
198+
"@id": "https://www.w3.org/ns/credentials/status#statusSize",
199+
"@type": "https://www.w3.org/2001/XMLSchema#positiveInteger"
200+
},
194201
"statusMessage": {
195202
"@id": "https://www.w3.org/ns/credentials/status#statusMessage",
196203
"@context": {

js/context.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default
8484
"@type": "https://w3id.org/security#multibase"
8585
},
8686

87-
"encodingFormat": {
87+
"mediaType": {
8888
"@id": "https://schema.org/encodingFormat"
8989
},
9090

@@ -94,6 +94,9 @@ export default
9494
"EnvelopedVerifiableCredential":
9595
"https://www.w3.org/2018/credentials#EnvelopedVerifiableCredential",
9696

97+
"EnvelopedVerifiablePresentation":
98+
"https://www.w3.org/2018/credentials#EnvelopedVerifiablePresentation",
99+
97100
"VerifiableCredential": {
98101
"@id": "https://www.w3.org/2018/credentials#VerifiableCredential",
99102
"@context": {
@@ -163,6 +166,7 @@ export default
163166

164167
"id": "@id",
165168
"type": "@type",
169+
166170
"holder": {
167171
"@id": "https://www.w3.org/2018/credentials#holder",
168172
"@type": "@id"
@@ -219,8 +223,14 @@ export default
219223
"@type": "https://w3id.org/security#multibase"
220224
},
221225
"ttl": "https://www.w3.org/ns/credentials/status#ttl",
222-
"statusReference": "https://www.w3.org/ns/credentials/status#statusReference",
223-
"statusSize": "https://www.w3.org/ns/credentials/status#statusSize",
226+
"statusReference": {
227+
"@id": "https://www.w3.org/ns/credentials/status#statusReference",
228+
"@type": "@id"
229+
},
230+
"statusSize": {
231+
"@id": "https://www.w3.org/ns/credentials/status#statusSize",
232+
"@type": "https://www.w3.org/2001/XMLSchema#positiveInteger"
233+
},
224234
"statusMessage": {
225235
"@id": "https://www.w3.org/ns/credentials/status#statusMessage",
226236
"@context": {

0 commit comments

Comments
 (0)