{"version":3,"file":"index.cjs","sources":["../../../src/vc/index.js"],"sourcesContent":["import { verifyPresentation } from './presentations';\nimport { verifyCredential } from './credentials';\n\n/**\n * Check that credential is verified, i.e. the credential has VCDM compliant structure and the `proof`\n * (signature by issuer) is correct.\n * @param {object} [credential] The credential to verify\n * @param {object} [params] Verify parameters (TODO: add type info for this object)\n * @returns {Promise<boolean>} Returns promise that resolves to true if credential is valid and not revoked and false otherwise\n */\nexport async function isVerifiedCredential(credential, params) {\n  const result = await verifyCredential(credential, params);\n  return result.verified;\n}\n\n/**\n * Check that presentation is verified, i.e. the presentation and credentials have VCDM compliant structure and\n * the `proof` (signature by holder) is correct.\n * @param {object} [params] Verify parameters (TODO: add type info for this object)\n * @returns {Promise<boolean>} - Returns promise that resolves to true if the\n * presentation is valid and all the credentials are valid and not revoked and false otherwise. The `error` will\n * describe the error if any.\n */\nexport async function isVerifiedPresentation(presentation, params) {\n  const result = await verifyPresentation(presentation, params);\n  return result.verified;\n}\n\nexport { default as Presentation } from './presentation';\nexport { default as VerifiableCredential } from './verifiable-credential';\nexport { default as VerifiablePresentation } from './verifiable-presentation';\nexport { default as StatusList2021Credential } from './status-list2021-credential';\nexport { default as PrivateStatusList2021Credential } from './private-status-list2021-credential';\nexport * from './credentials';\nexport * from './helpers';\nexport * from './schema';\nexport * from './constants';\nexport { default as CredentialIssuancePurpose } from './CredentialIssuancePurpose';\nexport { default as documentLoader } from './document-loader';\nexport * from './jws';\nexport * from './presentations';\nexport * from './revocation';\nexport * from './crypto';\n"],"names":["verifyCredential","verifyPresentation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE;AAC/D,EAAE,MAAM,MAAM,GAAG,MAAMA,+BAAgB,CAAC,UAAU,EAAE,MAAM,CAAC;AAC3D,EAAE,OAAO,MAAM,CAAC,QAAQ;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE;AACnE,EAAE,MAAM,MAAM,GAAG,MAAMC,mCAAkB,CAAC,YAAY,EAAE,MAAM,CAAC;AAC/D,EAAE,OAAO,MAAM,CAAC,QAAQ;AACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}