Skip to content

Commit b8a9f5c

Browse files
davidlehndlongley
authored andcommitted
Update VP params.
- Add optional domain for example. - Formatting.
1 parent 5ecbb4c commit b8a9f5c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

examples/rt.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,12 @@ async function main({credential, documentLoader}) {
170170
vpDidVm['@context'] = 'https://w3id.org/security/multikey/v1';
171171
loader.addStatic(vpDidVm.id, vpDidVm);
172172

173-
// presentation challenge
174-
const challenge = 'abc123';
175-
176173
// presentation holder
177174
const holder = 'did:web:example.com:holder:456';
175+
// presentation challenge - required for authentication proof purpose
176+
const challenge = 'abc123';
177+
// preentation domain - optional in this use case
178+
const domain = 'https://example.com/';
178179

179180
const presentation = await vc.createPresentation({
180181
verifiableCredential,
@@ -187,7 +188,11 @@ async function main({credential, documentLoader}) {
187188
// sign presentation
188189
// note this adds the proof to the input presentation
189190
const vp = await vc.signPresentation({
190-
presentation, suite: vpSigningSuite, challenge, documentLoader
191+
presentation,
192+
suite: vpSigningSuite,
193+
challenge,
194+
domain,
195+
documentLoader
191196
});
192197

193198
console.log('SIGNED PRESENTATION:');

0 commit comments

Comments
 (0)