@learncard/ceramic-plugin 1.1.21 → 1.1.23

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.
@@ -40041,7 +40041,7 @@ function abortable(source, signal) {
40041
40041
  }
40042
40042
  __name(abortable, "abortable");
40043
40043
 
40044
- // ../../../node_modules/.pnpm/nanoid@3.3.11/node_modules/nanoid/index.browser.js
40044
+ // ../../../node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/index.browser.js
40045
40045
  var nanoid = /* @__PURE__ */ __name((size = 21) => crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
40046
40046
  byte &= 63;
40047
40047
  if (byte < 36) {
@@ -63466,6 +63466,9 @@ var getCeramicPlugin = /* @__PURE__ */ __name(async (learnCard, { ceramicEndpoin
63466
63466
  await import_types.VCValidator.or(import_types.VPValidator).parseAsync(vc);
63467
63467
  return streamIdToCeramicURI(await publishContentToCeramic(vc, {}, {}, encryption));
63468
63468
  }, "uploadCredential");
63469
+ const envelopeRejection = /* @__PURE__ */ __name((envelope) => new Error(
63470
+ `Ceramic does not support format-tagged credential envelopes (got format="${envelope.format}"). Use LearnCloud or the LearnCard Network store for non-W3C credentials (SD-JWT-VC, mDoc, etc.).`
63471
+ ), "envelopeRejection");
63469
63472
  return {
63470
63473
  name: "Ceramic",
63471
63474
  displayName: "Ceramic",
@@ -63473,10 +63476,12 @@ var getCeramicPlugin = /* @__PURE__ */ __name(async (learnCard, { ceramicEndpoin
63473
63476
  store: {
63474
63477
  upload: /* @__PURE__ */ __name(async (_learnCard, vc) => {
63475
63478
  _learnCard.debug?.("learnCard.store.Ceramic.upload");
63479
+ if ((0, import_types.isStoredCredentialEnvelope)(vc)) throw envelopeRejection(vc);
63476
63480
  return uploadCredential(vc);
63477
63481
  }, "upload"),
63478
63482
  uploadEncrypted: /* @__PURE__ */ __name(async (_learnCard, vc, params) => {
63479
63483
  _learnCard.debug?.("learnCard.store.Ceramic.uploadEncrypted");
63484
+ if ((0, import_types.isStoredCredentialEnvelope)(vc)) throw envelopeRejection(vc);
63480
63485
  return uploadCredential(vc, {
63481
63486
  encrypt: true,
63482
63487
  controllersCanDecrypt: true,