Skip to content

Commit 67e109e

Browse files
dlongleydavidlehn
authored andcommitted
Ensure VC issuer matches key controller.
1 parent 7559543 commit 67e109e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/rt.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ async function main({credential, documentLoader}) {
6767
ecdsaKeyPair.id = didDocument.assertionMethod[0];
6868
ecdsaKeyPair.controller = didDocument.id;
6969

70+
// ensure issuer matches key controller
71+
credential.issuer = ecdsaKeyPair.controller;
72+
7073
// setup ecdsa-rdfc-2019 signing suite
7174
const signingSuite = new DataIntegrityProof({
7275
signer: ecdsaKeyPair.signer(),
@@ -100,7 +103,7 @@ async function main({credential, documentLoader}) {
100103
console.log('SIGNED CREDENTIAL:');
101104
console.log(JSON.stringify(verifiableCredential, null, 2));
102105
console.log('VERIFY RESULT:');
103-
console.log(verifyResult);
106+
console.log(JSON.stringify(verifyResult, null, 2));
104107
}
105108

106109
// sample unsigned credential

0 commit comments

Comments
 (0)