Skip to content

Update examples to use vcdm 2.0 context and properties #492

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions components/Credential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ components:
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
],
"id": "http://example.gov/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:123",
"issuanceDate": "2020-03-16T22:37:26.544Z",
"validFrom": "2020-03-16T22:37:26.544Z",
"credentialSubject":
{
"id": "did:example:123",
Expand Down Expand Up @@ -80,12 +80,12 @@ components:
type: string
"issuer":
$ref: "./Issuer.yml#/components/schemas/IssuerRequest"
"issuanceDate":
"validFrom":
type: string
description: The issuanceDate
"expirationDate":
description: The validFrom date
"validUntil":
type: string
description: The expirationDate
description: The validUntil date
"credentialSubject":
type: object
description: The subject
Expand All @@ -101,13 +101,13 @@ components:
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
],
"id": "http://example.gov/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:123",
"issuanceDate": "2020-03-16T22:37:26.544Z",
"validFrom": "2020-03-16T22:37:26.544Z",
"credentialSubject":
{
"id": "did:example:123",
Expand Down
8 changes: 6 additions & 2 deletions components/PresentCredentialOptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ components:
properties:
type:
type: string
description: The type of the proof. Default is an appropriate proof type corresponding to the verification method.
description: The type of the proof. Default 'DataIntegrityProof'.
cryptosuite:
type: string
description: The cryptosuite of the proof.
verificationMethod:
type: string
description: The URI of the verificationMethod used for the proof. If omitted, a default verification method will be used.
Expand All @@ -37,7 +40,8 @@ components:
description: The intended domain of validity for the proof. For example website.example
example:
{
"type": "Ed25519Signature2018",
"type": "DataIntegrityProof",
"cryptosuite": "ecdsa-rdfc-2019",
"verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
"proofPurpose": "assertionMethod",
"created": "2020-04-02T18:48:36Z",
Expand Down
15 changes: 8 additions & 7 deletions components/Presentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ components:
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
],
"holder": "did:example:123",
"type": "VerifiablePresentation",
"verifiableCredential":
[
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
],
"id": "http://example.gov/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:123",
"issuanceDate": "2020-03-16T22:37:26.544Z",
"validFrom": "2020-03-16T22:37:26.544Z",
"credentialSubject":
{
"id": "did:example:123",
Expand All @@ -69,11 +69,12 @@ components:
},
"proof":
{
"type": "Ed25519Signature2018",
"type": "DataIntegrityProof",
"cryptosuite": "ecdsa-rdfc-2019",
"created": "2020-04-02T18:28:08Z",
"verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
"proofPurpose": "assertionMethod",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
"proofValue": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
},
],
}
11 changes: 6 additions & 5 deletions components/VerifiableCredential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ components:
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
],
"id": "http://example.gov/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:123",
"issuanceDate": "2020-03-16T22:37:26.544Z",
"validFrom": "2020-03-16T22:37:26.544Z",
"credentialSubject":
{
"id": "did:example:123",
Expand All @@ -43,10 +43,11 @@ components:
},
"proof":
{
"type": "Ed25519Signature2018",
"type": "DataIntegrityProof",
"cryptosuite": "ecdsa-rdfc-2019",
"created": "2020-04-02T18:28:08Z",
"verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
"proofPurpose": "assertionMethod",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
"proofValue": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
},
}
20 changes: 11 additions & 9 deletions components/VerifiablePresentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ components:
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
],
"holder": "did:example:123",
"type": "VerifiablePresentation",
"verifiableCredential":
[
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2",
],
"id": "http://example.gov/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:example:123",
"issuanceDate": "2020-03-16T22:37:26.544Z",
"validFrom": "2020-03-16T22:37:26.544Z",
"credentialSubject":
{
"id": "did:example:123",
Expand All @@ -52,19 +52,21 @@ components:
},
"proof":
{
"type": "Ed25519Signature2018",
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-rdfc-2022",
"created": "2020-04-02T18:28:08Z",
"verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
"proofPurpose": "assertionMethod",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
"proofValue": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
},
],
"proof":
{
"type": "Ed25519Signature2018",
"type": "DataIntegrityProof",
"cryptosuite": "ecdsa-rdfc-2019",
"created": "2020-04-02T18:28:08Z",
"verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
"proofPurpose": "assertionMethod",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
"proofValue": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA",
},
}