@learncard/network-plugin 2.4.4 → 2.4.5
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/lcn-plugin.cjs.development.js +44 -3
- package/dist/lcn-plugin.cjs.development.js.map +3 -3
- package/dist/lcn-plugin.cjs.production.min.js +2 -2
- package/dist/lcn-plugin.cjs.production.min.js.map +3 -3
- package/dist/lcn-plugin.esm.js +44 -3
- package/dist/lcn-plugin.esm.js.map +3 -3
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +8 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1280,6 +1280,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1280
1280
|
JWERecipientValidator: () => JWERecipientValidator2,
|
|
1281
1281
|
JWEValidator: () => JWEValidator2,
|
|
1282
1282
|
JWKValidator: () => JWKValidator2,
|
|
1283
|
+
JWKWithPrivateKeyValidator: () => JWKWithPrivateKeyValidator2,
|
|
1283
1284
|
KnownAchievementTypeValidator: () => KnownAchievementTypeValidator2,
|
|
1284
1285
|
LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
|
|
1285
1286
|
LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
|
|
@@ -4820,8 +4821,9 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
4820
4821
|
x: mod2.string(),
|
|
4821
4822
|
y: mod2.string().optional(),
|
|
4822
4823
|
n: mod2.string().optional(),
|
|
4823
|
-
d: mod2.string()
|
|
4824
|
+
d: mod2.string().optional()
|
|
4824
4825
|
});
|
|
4826
|
+
var JWKWithPrivateKeyValidator2 = JWKValidator2.omit({ d: true }).extend({ d: mod2.string() });
|
|
4825
4827
|
var JWERecipientHeaderValidator2 = mod2.object({
|
|
4826
4828
|
alg: mod2.string(),
|
|
4827
4829
|
iv: mod2.string(),
|
|
@@ -9024,8 +9026,9 @@ var JWKValidator = mod.object({
|
|
|
9024
9026
|
x: mod.string(),
|
|
9025
9027
|
y: mod.string().optional(),
|
|
9026
9028
|
n: mod.string().optional(),
|
|
9027
|
-
d: mod.string()
|
|
9029
|
+
d: mod.string().optional()
|
|
9028
9030
|
});
|
|
9031
|
+
var JWKWithPrivateKeyValidator = JWKValidator.omit({ d: true }).extend({ d: mod.string() });
|
|
9029
9032
|
var JWERecipientHeaderValidator = mod.object({
|
|
9030
9033
|
alg: mod.string(),
|
|
9031
9034
|
iv: mod.string(),
|
|
@@ -10112,7 +10115,11 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10112
10115
|
throw new Error("Please make an account first!");
|
|
10113
10116
|
if (!profileId)
|
|
10114
10117
|
return client.boost.updateBoostPermissions.query({ uri, updates });
|
|
10115
|
-
const result = await client.boost.updateOtherBoostPermissions.query({
|
|
10118
|
+
const result = await client.boost.updateOtherBoostPermissions.query({
|
|
10119
|
+
uri,
|
|
10120
|
+
profileId,
|
|
10121
|
+
updates
|
|
10122
|
+
});
|
|
10116
10123
|
if (result)
|
|
10117
10124
|
await _learnCard.invoke.clearDidWebCache?.();
|
|
10118
10125
|
return result;
|
|
@@ -10276,6 +10283,40 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10276
10283
|
verifyConsent: async (_learnCard, uri, profileId) => {
|
|
10277
10284
|
return client.contracts.verifyConsent.query({ uri, profileId });
|
|
10278
10285
|
},
|
|
10286
|
+
addDidMetadata: async (_learnCard, metadata) => {
|
|
10287
|
+
if (!userData)
|
|
10288
|
+
throw new Error("Please make an account first!");
|
|
10289
|
+
const result = await client.didMetadata.addDidMetadata.mutate(metadata);
|
|
10290
|
+
if (result)
|
|
10291
|
+
await _learnCard.invoke.clearDidWebCache?.();
|
|
10292
|
+
return result;
|
|
10293
|
+
},
|
|
10294
|
+
getDidMetadata: async (_learnCard, id) => {
|
|
10295
|
+
if (!userData)
|
|
10296
|
+
throw new Error("Please make an account first!");
|
|
10297
|
+
return client.didMetadata.getDidMetadata.query({ id });
|
|
10298
|
+
},
|
|
10299
|
+
getMyDidMetadata: async () => {
|
|
10300
|
+
if (!userData)
|
|
10301
|
+
throw new Error("Please make an account first!");
|
|
10302
|
+
return client.didMetadata.getMyDidMetadata.query();
|
|
10303
|
+
},
|
|
10304
|
+
updateDidMetadata: async (_learnCard, id, updates) => {
|
|
10305
|
+
if (!userData)
|
|
10306
|
+
throw new Error("Please make an account first!");
|
|
10307
|
+
const result = await client.didMetadata.updateDidMetadata.mutate({ id, updates });
|
|
10308
|
+
if (result)
|
|
10309
|
+
await _learnCard.invoke.clearDidWebCache?.();
|
|
10310
|
+
return result;
|
|
10311
|
+
},
|
|
10312
|
+
deleteDidMetadata: async (_learnCard, id) => {
|
|
10313
|
+
if (!userData)
|
|
10314
|
+
throw new Error("Please make an account first!");
|
|
10315
|
+
const result = await client.didMetadata.deleteDidMetadata.mutate({ id });
|
|
10316
|
+
if (result)
|
|
10317
|
+
await _learnCard.invoke.clearDidWebCache?.();
|
|
10318
|
+
return result;
|
|
10319
|
+
},
|
|
10279
10320
|
resolveFromLCN: async (_learnCard, uri) => {
|
|
10280
10321
|
const result = await client.storage.resolve.query({ uri });
|
|
10281
10322
|
return UnsignedVCValidator.or(VCValidator).or(VPValidator).or(JWEValidator).or(ConsentFlowContractValidator).or(ConsentFlowTermsValidator).parseAsync(result);
|