Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
update sample VCs
  • Loading branch information
jchartrand authored Oct 5, 2023
1 parent a65ac88 commit d2dfd9b
Showing 1 changed file with 128 additions and 99 deletions.
227 changes: 128 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,96 +84,110 @@ Issue cryptographhically signed credentials by posting unsigned verifiable crede
```
curl --location 'http://localhost:4005/instance/test/credentials/issue' \
--header 'Content-Type: application/json' \
--data-raw '{
--data-raw '{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json"
],
"id": "urn:uuid:951b475e-b795-43bc-ba8f-a2d01efd2eb1",
"id": "urn:uuid:2fe53dc9-b2ec-4939-9b2c-0d00f6663b6c",
"type": [
"VerifiableCredential",
"OpenBadgeCredential"
],
"name": "DCC Test Credential",
"issuer": {
"id": "the issuer code will set this as the issuing DID",
"type": "Profile",
"name": "DCC Test Issuer",
"description": "A test DID used to issue test credentials",
"url": "https://digitalcredentials.mit.edu",
"image": {
"id": "https://certificates.cs50.io/static/success.jpg",
"type": "Image"
}
"type": [
"Profile"
],
"id": "did:key:z6MkhVTX9BF3NGYX6cc7jWpbNnR7cAjH8LUffabZP8Qu4ysC",
"name": "Digital Credentials Consortium Test Issuer",
"url": "https://dcconsortium.org",
"image": "https://user-images.githubusercontent.com/752326/230469660-8f80d264-eccf-4edd-8e50-ea634d407778.png"
},
"issuanceDate": "2020-01-01T00:00:00Z",
"expirationDate": "2025-01-01T00:00:00Z",
"name": "Successful Installation",
"issuanceDate": "2023-08-02T17:43:32.903Z",
"credentialSubject": {
"type": "AchievementSubject",
"name": "Me!",
"achievement": {
"id": "http://digitalcredentials.mit.edu",
"type": "Achievement",
"criteria": {
"narrative": "Successfully installed the DCC issuer."
},
"description": "DCC congratulates you on your successful installation of the DCC Issuer.",
"name": "Successful Installation",
"image": {
"id": "https://certificates.cs50.io/static/success.jpg",
"type": "Image"
}
"type": [
"AchievementSubject"
],
"achievement": {
"id": "urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922",
"type": [
"Achievement"
],
"achievementType": "Diploma",
"name": "Badge",
"description": "This is a sample credential issued by the Digital Credentials Consortium to demonstrate the functionality of Verifiable Credentials for wallets and verifiers.",
"criteria": {
"type": "Criteria",
"narrative": "This credential was issued to a student that demonstrated proficiency in the Python programming language that occurred from **February 17, 2023** to **June 12, 2023**."
},
"image": {
"id": "https://user-images.githubusercontent.com/752326/214947713-15826a3a-b5ac-4fba-8d4a-884b60cb7157.png",
"type": "Image"
}
}
},
"name": "Jane Doe"
}
}'
```

This should return a fully formed and signed credential printed to the terminal, that should look something like this (it will be all smushed up, but you can format it in something like [json lint](https://jsonlint.com)):

```
{
"@context": ["https://www.w3.org/2018/credentials/v1", "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json", "https://w3id.org/vc/status-list/2021/v1", "https://w3id.org/security/suites/ed25519-2020/v1"],
"id": "urn:uuid:951b475e-b795-43bc-ba8f-a2d01efd2eb1",
"type": ["VerifiableCredential", "OpenBadgeCredential"],
"issuer": {
"id": "did:key:z6Mkf2rgv7ef8FmLJ5Py87LMa7nofQgv6AstdkgsXiiCUJEy",
"type": "Profile",
"name": "DCC Test Issuer",
"description": "A test DID used to issue test credentials",
"url": "https://digitalcredentials.mit.edu",
"image": {
"id": "https://certificates.cs50.io/static/success.jpg",
"type": "Image"
}
},
"issuanceDate": "2020-01-01T00:00:00Z",
"expirationDate": "2025-01-01T00:00:00Z",
"name": "Successful Installation",
"credentialSubject": {
"type": "AchievementSubject",
"name": "Me!",
"achievement": {
"id": "http://digitalcredentials.mit.edu",
"type": "Achievement",
"criteria": {
"narrative": "Successfully installed the DCC issuer."
},
"description": "DCC congratulates you on your successful installation of the DCC Issuer.",
"name": "Successful Installation",
"image": {
"id": "https://certificates.cs50.io/static/success.jpg",
"type": "Image"
}
}
}
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-05-19T14:47:25Z",
"verificationMethod": "did:key:z6Mkf2rgv7ef8FmLJ5Py87LMa7nofQgv6AstdkgsXiiCUJEy#z6Mkf2rgv7ef8FmLJ5Py87LMa7nofQgv6AstdkgsXiiCUJEy",
"proofPurpose": "assertionMethod",
"proofValue": "zviQazCEMihts4e6BrhxkEu5VbCPFqTFLY5qBkiRztf3eq1vXYXUCQrTL6ohxmMrsAPEJpB9WGbN1NH5DsSDHsCU"
}
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "urn:uuid:2fe53dc9-b2ec-4939-9b2c-0d00f6663b6c",
"type": [
"VerifiableCredential",
"OpenBadgeCredential"
],
"name": "DCC Test Credential",
"issuer": {
"type": [
"Profile"
],
"id": "did:key:z6MknNQD1WHLGGraFi6zcbGevuAgkVfdyCdtZnQTGWVVvR5Q",
"name": "Digital Credentials Consortium Test Issuer",
"url": "https://dcconsortium.org",
"image": "https://user-images.githubusercontent.com/752326/230469660-8f80d264-eccf-4edd-8e50-ea634d407778.png"
},
"issuanceDate": "2023-08-02T17:43:32.903Z",
"credentialSubject": {
"type": [
"AchievementSubject"
],
"achievement": {
"id": "urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922",
"type": [
"Achievement"
],
"achievementType": "Diploma",
"name": "Badge",
"description": "This is a sample credential issued by the Digital Credentials Consortium to demonstrate the functionality of Verifiable Credentials for wallets and verifiers.",
"criteria": {
"type": "Criteria",
"narrative": "This credential was issued to a student that demonstrated proficiency in the Python programming language that occurred from **February 17, 2023** to **June 12, 2023**."
},
"image": {
"id": "https://user-images.githubusercontent.com/752326/214947713-15826a3a-b5ac-4fba-8d4a-884b60cb7157.png",
"type": "Image"
}
},
"name": "Jane Doe"
},
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-10-05T11:17:41Z",
"verificationMethod": "did:key:z6MknNQD1WHLGGraFi6zcbGevuAgkVfdyCdtZnQTGWVVvR5Q#z6MknNQD1WHLGGraFi6zcbGevuAgkVfdyCdtZnQTGWVVvR5Q",
"proofPurpose": "assertionMethod",
"proofValue": "z5fk6gq9upyZvcFvJdRdeL5KmvHr69jxEkyDEd2HyQdyhk9VnDEonNSmrfLAcLEDT9j4gGdCG24WHhojVHPbRsNER"
}
}
```

WARNING: DO NOT USE THIS TO ISSUE `REAL` CREDENTIALS UNTIL YOU'VE [SET YOUR OWN SIGNING KEY](#generate-a-new-key)
Expand Down Expand Up @@ -327,35 +341,50 @@ curl --location 'http://localhost:4005/instance/econ101/credentials/issue' \
--header 'Authorization: Bearer 988DKLAJH93KDSFV' \
--header 'Content-Type: application/json' \
--data-raw '{
"@context": ["https://www.w3.org/2018/credentials/v1", "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json", "https://w3id.org/vc/status-list/2021/v1"],
"id": "urn:uuid:951b475e-b795-43bc-ba8f-a2d01efd2eb1",
"type": ["VerifiableCredential", "OpenBadgeCredential"],
"issuer": {
"id": "did:key:z6MkhVTX9BF3NGYX6cc7jWpbNnR7cAjH8LUffabZP8Qu4ysC",
"type": "Profile",
"name": "School of Wonderful",
"description": "The most wonderful school",
"url": "https://wonderful.edu/",
"image": {
"id": "https://user-images.githubusercontent.com/947005/133544904-29d6139d-2e7b-4fe2-b6e9-7d1022bb6a45.png",
"type": "Image"
}
},
"issuanceDate": "2020-01-01T00:00:00Z",
"name": "A Simply Wonderful Course",
"credentialSubject": {
"type": "AchievementSubject",
"achievement": {
"id": "http://wonderful.wonderful",
"type": "Achievement",
"criteria": {
"narrative": "Completion of the Wonderful Course - well done you!"
},
"description": "Wonderful.",
"name": "Introduction to Wonderfullness"
}
}
}'
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json"
],
"id": "urn:uuid:2fe53dc9-b2ec-4939-9b2c-0d00f6663b6c",
"type": [
"VerifiableCredential",
"OpenBadgeCredential"
],
"name": "DCC Test Credential",
"issuer": {
"type": [
"Profile"
],
"id": "did:key:z6MkhVTX9BF3NGYX6cc7jWpbNnR7cAjH8LUffabZP8Qu4ysC",
"name": "Digital Credentials Consortium Test Issuer",
"url": "https://dcconsortium.org",
"image": "https://user-images.githubusercontent.com/752326/230469660-8f80d264-eccf-4edd-8e50-ea634d407778.png"
},
"issuanceDate": "2023-08-02T17:43:32.903Z",
"credentialSubject": {
"type": [
"AchievementSubject"
],
"achievement": {
"id": "urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922",
"type": [
"Achievement"
],
"achievementType": "Diploma",
"name": "Badge",
"description": "This is a sample credential issued by the Digital Credentials Consortium to demonstrate the functionality of Verifiable Credentials for wallets and verifiers.",
"criteria": {
"type": "Criteria",
"narrative": "This credential was issued to a student that demonstrated proficiency in the Python programming language that occurred from **February 17, 2023** to **June 12, 2023**."
},
"image": {
"id": "https://user-images.githubusercontent.com/752326/214947713-15826a3a-b5ac-4fba-8d4a-884b60cb7157.png",
"type": "Image"
}
},
"name": "Jane Doe"
}
}'
```

### Enable Revocation
Expand Down

0 comments on commit d2dfd9b

Please sign in to comment.