@@ -361,6 +361,7 @@ export class PresentationRequestService {
361361 holderDidDocSigned : didDocument as any ,
362362 verificationMethodId : verificationMethodIdforAssert ,
363363 challenge,
364+ domain,
364365 privateKeyMultibase,
365366 } ) ;
366367 } else {
@@ -376,7 +377,7 @@ export class PresentationRequestService {
376377 presentation : unsignedverifiablePresentation as IVerifiablePresentation ,
377378 // holderDid,
378379 holderDidDocSigned : didDocument as any ,
379-
380+ domain ,
380381 verificationMethodId : verificationMethodIdforAssert ,
381382 challenge,
382383 privateKeyMultibase,
@@ -389,7 +390,7 @@ export class PresentationRequestService {
389390 return { presentation : signedVerifiablePresentation } ;
390391 }
391392
392- async verifyPresentation ( presentations : VerifyPresentationDto ) {
393+ async verifyPresentation ( presentations : VerifyPresentationDto , appDetail ) {
393394 Logger . log (
394395 'verifyPresentation() method: starts....' ,
395396 'PresentationRequestService' ,
@@ -411,11 +412,17 @@ export class PresentationRequestService {
411412 const issuerDid = presentation [ 'verifiableCredential' ] [ 0 ] [ 'issuer' ] ;
412413 const challenge = presentation [ 'proof' ] [ 'challenge' ] ;
413414 const type = presentation [ 'proof' ] [ 'type' ] ;
415+ const domain = presentation [ 'proof' ] [ 'domain' ] ;
414416
415417 Logger . log (
416418 'verifyPresentation() method:before calling hypersignVP.verify' ,
417419 'PresentationRequestService' ,
418420 ) ;
421+ const holderDidResolved = await this . didService . resolveDid (
422+ appDetail ,
423+ holderDid ,
424+ ) ;
425+
419426 let verifiedPresentationDetail ;
420427 const holderVerificationMethodId =
421428 presentations . holderVerificationMethodId || holderDid + '#key-1' ;
@@ -425,16 +432,19 @@ export class PresentationRequestService {
425432 verifiedPresentationDetail = await hypersignVP . bjjVp . verify ( {
426433 signedPresentation : presentation as any ,
427434 issuerDid,
428- holderDid ,
435+ holderDidDocSigned : holderDidResolved . didDocument ,
429436 holderVerificationMethodId : holderVerificationMethodId ,
430437 issuerVerificationMethodId : issuerVerificationMethodId ,
431438 challenge,
439+ domain,
432440 } ) ;
433441 } else {
442+ // holderDidResolved.didDocument.verificationMethod[0].publicKeyMultibase='z6MkuX5ydorS9Hyf6J1Yu4tKPvzLwUpe6TVfATXqn17SvJA4'
434443 verifiedPresentationDetail = await hypersignVP . verify ( {
435444 signedPresentation : presentation as any ,
436445 issuerDid,
437- holderDid,
446+ domain,
447+ holderDidDocSigned : holderDidResolved . didDocument ,
438448 holderVerificationMethodId : holderVerificationMethodId ,
439449 issuerVerificationMethodId : issuerVerificationMethodId ,
440450 challenge,
0 commit comments