Skip to content

Commit

Permalink
Update VP params.
Browse files Browse the repository at this point in the history
- Add optional domain for example.
- Formatting.
  • Loading branch information
davidlehn committed Aug 14, 2024
1 parent 6362466 commit 2673e51
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions examples/rt.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ async function main({credential, documentLoader}) {
vpDidVm['@context'] = 'https://w3id.org/security/multikey/v1';
loader.addStatic(vpDidVm.id, vpDidVm);

// presentation challenge
const challenge = 'abc123';

// presentation holder
const holder = 'did:web:example.com:holder:456';
// presentation challenge - required for authentication proof purpose
const challenge = 'abc123';
// preentation domain - optional in this use case
const domain = 'https://example.com/';

const presentation = await vc.createPresentation({
verifiableCredential,
Expand All @@ -187,7 +188,11 @@ async function main({credential, documentLoader}) {
// sign presentation
// note this adds the proof to the input presentation
const vp = await vc.signPresentation({
presentation, suite: vpSigningSuite, challenge, documentLoader
presentation,
suite: vpSigningSuite,
challenge,
domain,
documentLoader
});

console.log('SIGNED PRESENTATION:');
Expand Down

0 comments on commit 2673e51

Please sign in to comment.