-
Notifications
You must be signed in to change notification settings - Fork 6
Add queries and update credential examples for retail VCs. #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BigBlueHat
merged 17 commits into
credential-handler:main
from
bparth24:bparth24-new-retail-credentials
Sep 3, 2025
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0960934
Add .DS_store in gitignore
bparth24 80c697c
Add queries and update credential examples for retail VCs.
bparth24 c8477b7
correct image urls
bparth24 c9b94d3
Correct svg image and mediaType in renderMethod
bparth24 760fb23
Placeholder issuer did value
bparth24 c2ef557
Add digestMultibase property
bparth24 7ea2658
Add final newline
bparth24 53c9c92
Revise age verification credential example.
msporny 06b813f
Update coupon credential and assets.
msporny 5641851
Update loyalty card credential and assets.
msporny 5bf6d5a
Update payment token credential and assets.
msporny 996ba78
Update renderMethod SVG template for dynamic credential display.
bparth24 a0e526d
Add renderMethod context URLs
bparth24 a6757fb
Clean up svg images - remove number and token
bparth24 83312b0
Update renderMethod templates - remove number, token, and icon
bparth24 9a7922a
Add png logo format
bparth24 ec2866e
Correct naming for image file instead of custom name
bparth24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ package-lock.json | |
_site/ | ||
vocabs/**/vocabulary.* | ||
!vocabs/**/vocabulary.yml | ||
|
||
.DS_Store | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://w3id.org/age/v1", | ||
"https://w3id.org/security/suites/ed25519-2020/v1" | ||
], | ||
"id": "urn:uuid:123445", | ||
"type": [ | ||
"VerifiableCredential", | ||
"AgeVerificationCredential" | ||
], | ||
"issuer": { | ||
"id": "did:example:12345678910111213", | ||
"image": "https://vcplayground.org/examples/age-verification/image.png", | ||
"name": "TruAge" | ||
}, | ||
"issuanceDate": "2025-07-15T00:00:00Z", | ||
"expirationDate": "2025-12-31T23:59:59Z", | ||
"name": "Age Verification Credential", | ||
"description": "Official age verification credential proving you are 21 or older, digitally signed by TruAge for secure age confirmation.", | ||
"anchoredResource": { | ||
"id": "urn:uuid:447b97c8-8446-11f0-ab08-bfebd903a8ad", | ||
"digestMultibase": "uEiBZlVztZpfWHgPyslVv6-UwirFoQoRvW1htfx963sknNA" | ||
}, | ||
"credentialSubject": { | ||
"overAge": 21 | ||
}, | ||
"refreshService": { | ||
"id": "urn:uuid:9016cfcc-8446-11f0-961c-7f6be0d6c7c4", | ||
"type": "VerifiableCredentialRefreshService2021", | ||
"url": "https://example.dev/reissue-age-token", | ||
"refreshToken": "z2BJYfNtmWRiouWhDrbDQmC2zicUkN66gCMqtFaW5e5KcrfoWb4yPquQa9yVn8oTsoqibtJS3DVvJkRkEH6zwbAz4k7vYfuC8jW3zDqy7UNRG85VPBxsPg" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"default": { | ||
"type": "QueryByExample", | ||
"credentialQuery": [{ | ||
"reason": "Please present your AgeVerificationCredential to verify you meet the minimum age requirement.", | ||
"example": { | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://w3id.org/age/v1" | ||
], | ||
"type": ["AgeVerificationCredential"] | ||
}, | ||
"acceptedCryptosuites": [ | ||
"Ed25519Signature2020", | ||
"eddsa-rdfc-2022", | ||
"ecdsa-rdfc-2019", | ||
"bbs-2023", | ||
"ecdsa-sd-2023" | ||
] | ||
}] | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/ns/credentials/v2", | ||
"https://w3id.org/retail-dw/v1rc1", | ||
"https://examples.vcplayground.org/contexts/shim-render-method-term/v1.json", | ||
"https://w3id.org/vc/render-method/v2rc1" | ||
], | ||
"type": [ | ||
"VerifiableCredential", | ||
"RetailCredential" | ||
], | ||
"issuer": { | ||
"id": "did:example:coupon-company", | ||
"name": "Clipco Coupon Company", | ||
"description": "Digital verifiable coupon issuer solutions" | ||
}, | ||
"name": "Digital Coupon", | ||
"description": "A verifiable digital coupon for retail discounts.", | ||
"validFrom": "2025-07-15T00:00:00Z", | ||
"validUntil": "2025-12-31T23:59:59Z", | ||
"credentialSubject": { | ||
"type": "Coupon", | ||
"name": "ClipCo Coupons", | ||
"description": "Clip and Save Coupons", | ||
"barCodeData": "81126789123012345" | ||
}, | ||
"renderMethod": [ | ||
{ | ||
"name": "Landscape", | ||
"mediaQuery": "@media (orientation: landscape)", | ||
"type": "SvgRenderingTemplate2024", | ||
"mediaType": "image/svg+xml", | ||
"template": "<svg viewBox=\"0 0 400 250\" xmlns=\"http://www.w3.org/2000/svg\"><defs><linearGradient id=\"cardGradient\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\"><stop offset=\"0%\" style=\"stop-color:#dc2626;stop-opacity:1\" /><stop offset=\"50%\" style=\"stop-color:#ef4444;stop-opacity:1\" /><stop offset=\"100%\" style=\"stop-color:#fecaca;stop-opacity:1\" /></linearGradient><linearGradient id=\"curve1\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\"><stop offset=\"0%\" style=\"stop-color:#f59e0b;stop-opacity:0.8\" /><stop offset=\"100%\" style=\"stop-color:#d97706;stop-opacity:0.6\" /></linearGradient><linearGradient id=\"curve2\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\"><stop offset=\"0%\" style=\"stop-color:#059669;stop-opacity:0.7\" /><stop offset=\"100%\" style=\"stop-color:#047857;stop-opacity:0.5\" /></linearGradient><linearGradient id=\"curve3\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\"><stop offset=\"0%\" style=\"stop-color:#fbbf24;stop-opacity:0.6\" /><stop offset=\"100%\" style=\"stop-color:#f59e0b;stop-opacity:0.4\" /></linearGradient></defs><rect width=\"400\" height=\"250\" rx=\"15\" fill=\"url(#cardGradient)\"/><path d=\"M -50 50 Q 100 20 200 60 T 450 40\" stroke=\"url(#curve1)\" stroke-width=\"25\" fill=\"none\" opacity=\"0.7\"/><path d=\"M -30 100 Q 150 70 300 110 T 480 90\" stroke=\"url(#curve2)\" stroke-width=\"20\" fill=\"none\" opacity=\"0.6\"/><path d=\"M -70 150 Q 120 120 250 160 T 460 140\" stroke=\"url(#curve3)\" stroke-width=\"30\" fill=\"none\" opacity=\"0.5\"/><path d=\"M 300 -20 Q 350 50 400 80 T 500 120\" stroke=\"url(#curve3)\" stroke-width=\"15\" fill=\"none\" opacity=\"0.4\"/><path d=\"M 250 200 Q 320 180 380 200 T 480 190\" stroke=\"url(#curve1)\" stroke-width=\"18\" fill=\"none\" opacity=\"0.5\"/><text x=\"30\" y=\"40\" font-family=\"Arial, sans-serif\" font-size=\"14\" font-weight=\"normal\" fill=\"#ffffff\" opacity=\"0.9\">{{name}}</text><text x=\"30\" y=\"80\" font-family=\"Arial, sans-serif\" font-size=\"32\" font-weight=\"bold\" fill=\"#ffffff\">{{credentialSubject.name}}</text><text x=\"30\" y=\"150\" font-family=\"Arial, sans-serif\" font-size=\"14\" fill=\"#ffffff\" opacity=\"0.95\">{{credentialSubject.description}}</text></svg>" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"default": { | ||
"type": "QueryByExample", | ||
"credentialQuery": [ | ||
{ | ||
"reason": "Please present your CouponCredential or Verifiable Credential(s) to access available discounts and offers.", | ||
"example": { | ||
"@context": [ | ||
"https://www.w3.org/ns/credentials/v2", | ||
"https://w3id.org/retail-dw/v1rc1" | ||
], | ||
"type": [ | ||
"RetailCredential" | ||
], | ||
"credentialSubject": { | ||
"type": "Coupon" | ||
} | ||
}, | ||
"acceptedCryptosuites": [ | ||
"eddsa-rdfc-2022", | ||
"ecdsa-rdfc-2019", | ||
"bbs-2023", | ||
"ecdsa-sd-2023" | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/ns/credentials/v2", | ||
"https://w3id.org/retail-dw/v1rc1", | ||
"https://examples.vcplayground.org/contexts/shim-render-method-term/v1.json", | ||
"https://w3id.org/vc/render-method/v2rc1" | ||
], | ||
"type": [ | ||
"VerifiableCredential", | ||
"RetailCredential" | ||
], | ||
"issuer": { | ||
"id": "did:example:shopcocompanyissuer123", | ||
"name": "ShopCo Company", | ||
"description": "Digital verifiable loyalty card issuer solutions" | ||
}, | ||
"name": "Digital Loyalty Card", | ||
"description": "A verifiable digital loyalty card for retail discounts.", | ||
"validFrom": "2025-07-15T00:00:00Z", | ||
"validUntil": "2025-12-31T23:59:59Z", | ||
"credentialSubject": { | ||
"type": "LoyaltyCard", | ||
"account": "SHOPCO-LOYALTY-789456123", | ||
"barCodeData": "012345678901047983256789", | ||
"description": "Digital loyalty card for retail rewards and discounts", | ||
"name": "ShopCo Digital Loyalty Card", | ||
"programIdentifier": "SHOPCO-PREMIUM-2025" | ||
}, | ||
"renderMethod": [ | ||
{ | ||
"name": "Landscape", | ||
"mediaQuery": "@media (orientation: landscape)", | ||
"type": "SvgRenderingTemplate2024", | ||
"mediaType": "image/svg+xml", | ||
"template": "<svg viewBox=\"0 0 400 250\" xmlns=\"http://www.w3.org/2000/svg\"><defs><linearGradient id=\"cardGradient\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\"><stop offset=\"0%\" style=\"stop-color:#2563eb;stop-opacity:1\" /><stop offset=\"50%\" style=\"stop-color:#3b82f6;stop-opacity:1\" /><stop offset=\"100%\" style=\"stop-color:#dbeafe;stop-opacity:1\" /></linearGradient><linearGradient id=\"curve1\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\"><stop offset=\"0%\" style=\"stop-color:#059669;stop-opacity:0.8\" /><stop offset=\"100%\" style=\"stop-color:#10b981;stop-opacity:0.6\" /></linearGradient><linearGradient id=\"curve2\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\"><stop offset=\"0%\" style=\"stop-color:#1e40af;stop-opacity:0.7\" /><stop offset=\"100%\" style=\"stop-color:#3b82f6;stop-opacity:0.5\" /></linearGradient><linearGradient id=\"curve3\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\"><stop offset=\"0%\" style=\"stop-color:#047857;stop-opacity:0.6\" /><stop offset=\"100%\" style=\"stop-color:#059669;stop-opacity:0.4\" /></linearGradient></defs><rect width=\"400\" height=\"250\" rx=\"15\" fill=\"url(#cardGradient)\"/><path d=\"M -50 50 Q 100 20 200 60 T 450 40\" stroke=\"url(#curve1)\" stroke-width=\"25\" fill=\"none\" opacity=\"0.7\"/><path d=\"M -30 100 Q 150 70 300 110 T 480 90\" stroke=\"url(#curve2)\" stroke-width=\"20\" fill=\"none\" opacity=\"0.6\"/><path d=\"M -70 150 Q 120 120 250 160 T 460 140\" stroke=\"url(#curve3)\" stroke-width=\"30\" fill=\"none\" opacity=\"0.5\"/><path d=\"M 300 -20 Q 350 50 400 80 T 500 120\" stroke=\"url(#curve3)\" stroke-width=\"15\" fill=\"none\" opacity=\"0.4\"/><path d=\"M 250 200 Q 320 180 380 200 T 480 190\" stroke=\"url(#curve1)\" stroke-width=\"18\" fill=\"none\" opacity=\"0.5\"/><text x=\"30\" y=\"40\" font-family=\"Arial, sans-serif\" font-size=\"12\" font-weight=\"normal\" fill=\"#ffffff\" opacity=\"0.9\">{{name}}</text><text x=\"30\" y=\"80\" font-family=\"Arial, sans-serif\" font-size=\"26\" font-weight=\"bold\" fill=\"#ffffff\">{{issuer.name}}</text><text x=\"30\" y=\"110\" font-family=\"Arial, sans-serif\" font-size=\"26\" font-weight=\"bold\" fill=\"#ffffff\">Loyalty Card</text><text x=\"30\" y=\"180\" font-family=\"Arial, sans-serif\" font-size=\"12\" fill=\"#ffffff\" opacity=\"0.95\">{{description}}</text></svg>" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"default": { | ||
"type": "QueryByExample", | ||
"credentialQuery": [ | ||
{ | ||
"reason": "Please present your LoyaltyCard credential to access loyalty benefits and rewards.", | ||
"example": { | ||
"@context": [ | ||
"https://www.w3.org/ns/credentials/v2", | ||
"https://w3id.org/retail-dw/v1rc1" | ||
], | ||
"type": [ | ||
"RetailCredential" | ||
], | ||
"credentialSubject": { | ||
"type": "LoyaltyCard" | ||
} | ||
}, | ||
"acceptedCryptosuites": [ | ||
"eddsa-rdfc-2022", | ||
"ecdsa-rdfc-2019", | ||
"bbs-2023", | ||
"ecdsa-sd-2023" | ||
] | ||
} | ||
] | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.