File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -170,11 +170,12 @@ async function main({credential, documentLoader}) {
170
170
vpDidVm [ '@context' ] = 'https://w3id.org/security/multikey/v1' ;
171
171
loader . addStatic ( vpDidVm . id , vpDidVm ) ;
172
172
173
- // presentation challenge
174
- const challenge = 'abc123' ;
175
-
176
173
// presentation holder
177
174
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/' ;
178
179
179
180
const presentation = await vc . createPresentation ( {
180
181
verifiableCredential,
@@ -187,7 +188,11 @@ async function main({credential, documentLoader}) {
187
188
// sign presentation
188
189
// note this adds the proof to the input presentation
189
190
const vp = await vc . signPresentation ( {
190
- presentation, suite : vpSigningSuite , challenge, documentLoader
191
+ presentation,
192
+ suite : vpSigningSuite ,
193
+ challenge,
194
+ domain,
195
+ documentLoader
191
196
} ) ;
192
197
193
198
console . log ( 'SIGNED PRESENTATION:' ) ;
You can’t perform that action at this time.
0 commit comments