Skip to content

Commit

Permalink
Update VDL context (#68)
Browse files Browse the repository at this point in the history
* Add pcr base credential

* Create mandatoryPointers.json

* Create selectivePointers.json

* Delete tests/fixtures/pcr directory

* Update credential.json

* Update credential.json

* Update selectivePointers.json

* Update selectivePointers.json

* Update 30-bbs-interop.js
  • Loading branch information
PatStLouis authored Dec 6, 2024
1 parent 7f75905 commit 9c9cc4f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 64 deletions.
2 changes: 1 addition & 1 deletion tests/30-bbs-interop.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const {
({disclosedCredential} = await createDisclosedVc({
selectivePointers: [
'/credentialSubject/id',
'/credentialSubject/driverLicense/issuingAuthority'
'/credentialSubject/driversLicense/document_number'
],
signedCredential: issuedVc,
vcHolder
Expand Down
36 changes: 9 additions & 27 deletions tests/fixtures/license/1.1/credential.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"@protected": true,
"DriverLicenseCredential": "urn:example:DriverLicenseCredential",
"DriverLicense": {
"@id": "urn:example:DriverLicense",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"documentIdentifier": "urn:example:documentIdentifier",
"dateOfBirth": "urn:example:dateOfBirth",
"expirationDate": "urn:example:expiration",
"issuingAuthority": "urn:example:issuingAuthority"
}
},
"driverLicense": {
"@id": "urn:example:driverLicense",
"@type": "@id"
}
}
"https://w3id.org/vdl/v2"
],
"id": "urn:uuid:36245ee9-9074-4b05-a777-febff2e69757",
"type": ["VerifiableCredential", "DriverLicenseCredential"],
"type": ["VerifiableCredential", "Iso18013DriversLicenseCredential"],
"credentialSubject": {
"id": "urn:uuid:1a0e4ef5-091f-4060-842e-18e519ab9440",
"driverLicense": {
"type": "DriverLicense",
"documentIdentifier": "T21387yc328c7y32h23f23",
"dateOfBirth": "01-01-1990",
"expirationDate": "01-01-2030",
"issuingAuthority": "VA"
"type": "LicensedDriver",
"driversLicense": {
"type": "Iso18013DriversLicense",
"document_number": "T21387yc328c7y32h23f23",
"birth_date": "01-01-1990",
"expiry_date": "01-01-2030",
"issuing_authority": "VA"
}
}
}
8 changes: 4 additions & 4 deletions tests/fixtures/license/1.1/selectivePointers.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
"/credentialSubject/driverLicense/documentIdentifier",
"/credentialSubject/driverLicense/dateOfBirth",
"/credentialSubject/driverLicense/expirationDate",
"/credentialSubject/driverLicense/issuingAuthority"
"/credentialSubject/driversLicense/document_number",
"/credentialSubject/driversLicense/birth_date",
"/credentialSubject/driversLicense/expiry_date",
"/credentialSubject/driversLicense/issuing_authority"
]
37 changes: 9 additions & 28 deletions tests/fixtures/license/2.0/credential.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
{
"@protected": true,
"DriverLicenseCredential": "urn:example:DriverLicenseCredential",
"DriverLicense": {
"@id": "urn:example:DriverLicense",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"documentIdentifier": "urn:example:documentIdentifier",
"dateOfBirth": "urn:example:dateOfBirth",
"expirationDate": "urn:example:expiration",
"issuingAuthority": "urn:example:issuingAuthority"
}
},
"driverLicense": {
"@id": "urn:example:driverLicense",
"@type": "@id"
}
}
"https://w3id.org/vdl/v2"
],
"id": "urn:uuid:36245ee9-9074-4b05-a777-febff2e69757",
"type": ["VerifiableCredential", "DriverLicenseCredential"],
"type": ["VerifiableCredential", "Iso18013DriversLicenseCredential"],
"credentialSubject": {
"id": "urn:uuid:1a0e4ef5-091f-4060-842e-18e519ab9440",
"driverLicense": {
"type": "DriverLicense",
"documentIdentifier": "T21387yc328c7y32h23f23",
"dateOfBirth": "01-01-1990",
"expirationDate": "01-01-2030",
"issuingAuthority": "VA"
"type": "LicensedDriver",
"driversLicense": {
"type": "Iso18013DriversLicense",
"document_number": "T21387yc328c7y32h23f23",
"birth_date": "01-01-1990",
"expiry_date": "01-01-2030",
"issuing_authority": "VA"
}
}
}

8 changes: 4 additions & 4 deletions tests/fixtures/license/2.0/selectivePointers.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
"/credentialSubject/driverLicense/documentIdentifier",
"/credentialSubject/driverLicense/dateOfBirth",
"/credentialSubject/driverLicense/expirationDate",
"/credentialSubject/driverLicense/issuingAuthority"
"/credentialSubject/driversLicense/document_number",
"/credentialSubject/driversLicense/birth_date",
"/credentialSubject/driversLicense/expiry_date",
"/credentialSubject/driversLicense/issuing_authority"
]

0 comments on commit 9c9cc4f

Please sign in to comment.