Skip to content

Commit e2f661a

Browse files
authored
Update examples-ldp.md
1 parent cd9eeaf commit e2f661a

File tree

1 file changed

+23
-28
lines changed

1 file changed

+23
-28
lines changed

examples-ldp.md

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,29 @@
33
Verifiable Credentials with Linked Data Proofs:
44

55
### Example Verifiable Credential
6-
7-
{
8-
"@context" : [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ],
9-
"type" : [ "VerifiableCredential", "UniversityDegreeCredential" ],
10-
"id" : "http://example.edu/credentials/3732",
11-
"issuer" : "did:example:76e12ec712ebc6f1c221ebfeb1f",
12-
"issuanceDate" : "2019-06-16T18:56:59Z",
13-
"expirationDate" : "2019-06-17T18:56:59Z",
14-
"credentialSubject" : {
15-
"id" : "did:example:ebfeb1f712ebc6f1c276e12ec21",
16-
"college" : "Test University",
17-
"degree" : {
18-
"name" : "Bachelor of Science and Arts",
19-
"type" : "BachelorDegree"
20-
}
21-
},
22-
"proof" : {
23-
"type" : "Ed25519Signature2018",
24-
"created" : "2020-10-15T09:44:25Z",
25-
"domain" : "example.com",
26-
"nonce" : "343s$FSFDa-",
27-
"proofPurpose" : "assertionMethod",
28-
"verificationMethod" : "did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1",
29-
"jws" : "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..yJbi7RlKaNTNf3lhaOXUotKUNBg9N4llcD7--QRFYid_WjRcAovU-qOqtlVWngL_6vbjZWeBCRG-fv2Q9o4_CQ"
30-
}
31-
}
6+
{
7+
"@context" : [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ],
8+
"type" : [ "VerifiableCredential", "UniversityDegreeCredential" ],
9+
"id" : "http://example.edu/credentials/3732",
10+
"issuer" : "did:example:76e12ec712ebc6f1c221ebfeb1f",
11+
"issuanceDate" : "2019-06-16T18:56:59Z",
12+
"expirationDate" : "2019-06-17T18:56:59Z",
13+
"credentialSubject" : {
14+
"id" : "did:example:ebfeb1f712ebc6f1c276e12ec21",
15+
"college" : "Test University",
16+
"degree" : {
17+
"name" : "Bachelor of Science and Arts",
18+
"type" : "BachelorDegree"
19+
}
20+
},
21+
"proof" : {
22+
"type" : "Ed25519Signature2018",
23+
"created" : "2021-11-17T22:20:27Z",
24+
"proofPurpose" : "assertionMethod",
25+
"verificationMethod" : "did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1",
26+
"jws" : "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg"
27+
}
28+
}
3229

3330
Process finished with exit code 0
3431

@@ -62,8 +59,6 @@ Process finished with exit code 0
6259
signer.setCreated(new Date());
6360
signer.setProofPurpose(LDSecurityKeywords.JSONLD_TERM_ASSERTIONMETHOD);
6461
signer.setVerificationMethod(URI.create("did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1"));
65-
signer.setDomain("example.com");
66-
signer.setNonce("343s$FSFDa-");
6762
LdProof ldProof = signer.sign(verifiableCredential);
6863

6964
System.out.println(verifiableCredential.toJson(true));

0 commit comments

Comments
 (0)