@sphereon/ssi-sdk.credential-vcdm-jsonld-provider 0.33.1-feature.jose.vcdm.67 → 0.33.1-feature.vcdm.verification.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2929,9 +2929,9 @@ var LdDefaultContexts = /* @__PURE__ */ new Map([
2929
2929
  // src/agent/CredentialProviderJsonld.ts
2930
2930
  var import_ssi_sdk_ext2 = require("@sphereon/ssi-sdk-ext.did-utils");
2931
2931
  var import_ssi_sdk5 = require("@sphereon/ssi-sdk.core");
2932
- var import_ssi_sdk6 = require("@sphereon/ssi-sdk.vc-status-list");
2932
+ var import_ssi_sdk6 = require("@sphereon/ssi-sdk.credential-vcdm");
2933
+ var import_ssi_sdk7 = require("@sphereon/ssi-sdk.vc-status-list");
2933
2934
  var import_debug3 = __toESM(require("debug"), 1);
2934
- var import_ssi_sdk7 = require("@sphereon/ssi-sdk.credential-vcdm");
2935
2935
  var debug3 = (0, import_debug3.default)("sphereon:ssi-sdk:ld-credential-module-local");
2936
2936
  var CredentialProviderJsonld = class {
2937
2937
  static {
@@ -2971,6 +2971,9 @@ var CredentialProviderJsonld = class {
2971
2971
  /** {@inheritdoc @veramo/credential-w3c#AbstractCredentialProvider.canVerifyDocumentType */
2972
2972
  canVerifyDocumentType(args) {
2973
2973
  const { document } = args;
2974
+ if (typeof document === "string") {
2975
+ return false;
2976
+ }
2974
2977
  const proofType = document?.proof?.type ?? "_never_";
2975
2978
  for (const suite of this.ldCredentialModule.ldSuiteLoader.getAllSignatureSuites()) {
2976
2979
  if (suite.getSupportedProofType() === proofType) {
@@ -2984,7 +2987,7 @@ var CredentialProviderJsonld = class {
2984
2987
  /** {@inheritDoc ICredentialIssuerLDLocal.createVerifiableCredential} */
2985
2988
  async createVerifiableCredential(args, context) {
2986
2989
  debug3("Entry of createVerifiableCredential");
2987
- const { credential, issuer } = (0, import_ssi_sdk7.preProcessCredentialPayload)(args);
2990
+ const { credential, issuer } = (0, import_ssi_sdk6.preProcessCredentialPayload)(args);
2988
2991
  let identifier;
2989
2992
  try {
2990
2993
  debug3(`Retrieving identifier for issuer ${issuer} from DID manager...`);
@@ -3035,7 +3038,7 @@ var CredentialProviderJsonld = class {
3035
3038
  }
3036
3039
  /** {@inheritdoc ICredentialIssuerLD.createVerifiablePresentationLD} */
3037
3040
  async createVerifiablePresentation(args, context) {
3038
- const { presentation, holder } = (0, import_ssi_sdk7.preProcessPresentation)(args);
3041
+ const { presentation, holder } = (0, import_ssi_sdk6.preProcessPresentation)(args);
3039
3042
  if (presentation.verifiableCredential) {
3040
3043
  const credentials = presentation.verifiableCredential.map((cred) => {
3041
3044
  if (typeof cred !== "string" && cred.proof?.jwt) {
@@ -3072,7 +3075,7 @@ var CredentialProviderJsonld = class {
3072
3075
  const credential = args.credential;
3073
3076
  let checkStatus = args.checkStatus;
3074
3077
  if (typeof checkStatus !== "function" && (!args.statusList || args.statusList.disableCheckStatusList2021 !== true)) {
3075
- checkStatus = (0, import_ssi_sdk6.vcLibCheckStatusFunction)({
3078
+ checkStatus = (0, import_ssi_sdk7.vcLibCheckStatusFunction)({
3076
3079
  ...args.statusList,
3077
3080
  verifyStatusListCredential: false
3078
3081
  });
@@ -3084,7 +3087,7 @@ var CredentialProviderJsonld = class {
3084
3087
  const presentation = args.presentation;
3085
3088
  let checkStatus = args.checkStatus;
3086
3089
  if (typeof checkStatus !== "function" && args.statusList && !args.statusList.disableCheckStatusList2021) {
3087
- checkStatus = (0, import_ssi_sdk6.vcLibCheckStatusFunction)({
3090
+ checkStatus = (0, import_ssi_sdk7.vcLibCheckStatusFunction)({
3088
3091
  ...args.statusList
3089
3092
  });
3090
3093
  }