Skip to content

Commit c6cbbfe

Browse files
committed
feat: Add DIF presentation exchange context.
1 parent 46b12a2 commit c6cbbfe

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/main/java/com/danubetech/verifiablecredentials/jsonld/VerifiableCredentialContexts.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class VerifiableCredentialContexts {
1919
public static final URI JSONLD_CONTEXT_W3C_NS_ODRL = URI.create("https://www.w3.org/ns/odrl.jsonld");
2020
public static final URI JSONLD_CONTEXT_DANUBETECH_2020_CREDENTIALS_V1 = URI.create("https://danubetech.com/2020/credentials/v1");
2121
public static final URI JSONLD_CONTEXT_W3ID_VC_REVOCATION_LIST_2020_V1 = URI.create("https://w3id.org/vc-revocation-list-2020/v1");
22+
public static final URI JSONLD_CONTEXT_DIF_PRESENTATION_EXCHANGE_SUBMISSIONS_V1 = URI.create("https://identity.foundation/presentation-exchange/submission/v1");
2223

2324
public static final Map<URI, JsonDocument> CONTEXTS;
2425
public static final DocumentLoader DOCUMENT_LOADER;
@@ -43,6 +44,8 @@ public class VerifiableCredentialContexts {
4344
JsonDocument.of(MediaType.JSON_LD, VerifiableCredentialContexts.class.getResourceAsStream("danubetech-v1.jsonld")));
4445
CONTEXTS.put(JSONLD_CONTEXT_W3ID_VC_REVOCATION_LIST_2020_V1,
4546
JsonDocument.of(MediaType.JSON_LD, VerifiableCredentialContexts.class.getResourceAsStream("vc-revocation-list-2020-v1.jsonld")));
47+
CONTEXTS.put(JSONLD_CONTEXT_DIF_PRESENTATION_EXCHANGE_SUBMISSIONS_V1,
48+
JsonDocument.of(MediaType.JSON_LD, VerifiableCredentialContexts.class.getResourceAsStream("presentation-exchange-submissions-v1.jsonld")));
4649

4750
for (Map.Entry<URI, JsonDocument> context : CONTEXTS.entrySet()) {
4851
context.getValue().setDocumentUrl(context.getKey());
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"PresentationSubmission": {
5+
"@id": "https://identity.foundation/presentation-exchange/#presentation-submission",
6+
"@context": {
7+
"@version": 1.1,
8+
"presentation_submission": {
9+
"@id": "https://identity.foundation/presentation-exchange/#presentation-submission",
10+
"@type": "@json"
11+
}
12+
}
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)