@@ -419,6 +419,7 @@ async function _verifyOBv3LegacySignature(credential,
419419 * @param {string|Date } [options.now] - A string representing date time in
420420 * ISO 8601 format or an instance of Date. Defaults to current date time.
421421 * @param {number } [options.version = 2.0] - The VC context version to use.
422+ * @param {boolean } [options.verify=true]
422423 *
423424 * @throws {TypeError } If verifiableCredential param is missing.
424425 * @throws {Error } If the credential (or the presentation params) are missing
@@ -428,7 +429,7 @@ async function _verifyOBv3LegacySignature(credential,
428429 * VerifiablePresentation.
429430 */
430431export function createPresentation ( {
431- verifiableCredential, id, holder, now, version = 2.0
432+ verifiableCredential, id, holder, now, version = 2.0 , verify = true
432433} = { } ) {
433434 const initialContext = ( version === 2.0 ) ? CREDENTIALS_CONTEXT_V2_URL :
434435 CREDENTIALS_CONTEXT_V1_URL ;
@@ -440,7 +441,8 @@ export function createPresentation({
440441 const credentials = [ ] . concat ( verifiableCredential ) ;
441442 // ensure all credentials are valid
442443 for ( const credential of credentials ) {
443- _checkCredential ( { credential, now} ) ;
444+ _checkCredential (
445+ { credential, now, mode : verify ? 'verify' : 'do not force verify' } ) ;
444446 }
445447 presentation . verifiableCredential = credentials ;
446448 }
0 commit comments