@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.
- package/dist/ceramic-plugin.cjs.development.cjs +6 -1
- package/dist/ceramic-plugin.cjs.development.cjs.map +3 -3
- package/dist/ceramic-plugin.cjs.production.min.cjs +123 -123
- package/dist/ceramic-plugin.cjs.production.min.cjs.map +4 -4
- package/dist/ceramic-plugin.esm.js +7 -2
- package/dist/ceramic-plugin.esm.js.map +3 -3
- package/dist/ceramic.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -40036,7 +40036,7 @@ function abortable(source, signal) {
|
|
|
40036
40036
|
}
|
|
40037
40037
|
__name(abortable, "abortable");
|
|
40038
40038
|
|
|
40039
|
-
// ../../../node_modules/.pnpm/nanoid@3.3.
|
|
40039
|
+
// ../../../node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/index.browser.js
|
|
40040
40040
|
var nanoid = /* @__PURE__ */ __name((size = 21) => crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
40041
40041
|
byte &= 63;
|
|
40042
40042
|
if (byte < 36) {
|
|
@@ -50305,7 +50305,7 @@ __name(_CeramicClient, "CeramicClient");
|
|
|
50305
50305
|
var CeramicClient = _CeramicClient;
|
|
50306
50306
|
|
|
50307
50307
|
// src/ceramic.ts
|
|
50308
|
-
import { VCValidator, VPValidator } from "@learncard/types";
|
|
50308
|
+
import { VCValidator, VPValidator, isStoredCredentialEnvelope } from "@learncard/types";
|
|
50309
50309
|
|
|
50310
50310
|
// src/helpers.ts
|
|
50311
50311
|
var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
|
|
@@ -63461,6 +63461,9 @@ var getCeramicPlugin = /* @__PURE__ */ __name(async (learnCard, { ceramicEndpoin
|
|
|
63461
63461
|
await VCValidator.or(VPValidator).parseAsync(vc);
|
|
63462
63462
|
return streamIdToCeramicURI(await publishContentToCeramic(vc, {}, {}, encryption));
|
|
63463
63463
|
}, "uploadCredential");
|
|
63464
|
+
const envelopeRejection = /* @__PURE__ */ __name((envelope) => new Error(
|
|
63465
|
+
`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.).`
|
|
63466
|
+
), "envelopeRejection");
|
|
63464
63467
|
return {
|
|
63465
63468
|
name: "Ceramic",
|
|
63466
63469
|
displayName: "Ceramic",
|
|
@@ -63468,10 +63471,12 @@ var getCeramicPlugin = /* @__PURE__ */ __name(async (learnCard, { ceramicEndpoin
|
|
|
63468
63471
|
store: {
|
|
63469
63472
|
upload: /* @__PURE__ */ __name(async (_learnCard, vc) => {
|
|
63470
63473
|
_learnCard.debug?.("learnCard.store.Ceramic.upload");
|
|
63474
|
+
if (isStoredCredentialEnvelope(vc)) throw envelopeRejection(vc);
|
|
63471
63475
|
return uploadCredential(vc);
|
|
63472
63476
|
}, "upload"),
|
|
63473
63477
|
uploadEncrypted: /* @__PURE__ */ __name(async (_learnCard, vc, params) => {
|
|
63474
63478
|
_learnCard.debug?.("learnCard.store.Ceramic.uploadEncrypted");
|
|
63479
|
+
if (isStoredCredentialEnvelope(vc)) throw envelopeRejection(vc);
|
|
63475
63480
|
return uploadCredential(vc, {
|
|
63476
63481
|
encrypt: true,
|
|
63477
63482
|
controllersCanDecrypt: true,
|