@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
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -1255,6 +1255,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1255
1255
|
JWERecipientValidator: () => JWERecipientValidator2,
|
|
1256
1256
|
JWEValidator: () => JWEValidator2,
|
|
1257
1257
|
JWKValidator: () => JWKValidator2,
|
|
1258
|
+
JWKWithPrivateKeyValidator: () => JWKWithPrivateKeyValidator2,
|
|
1258
1259
|
KnownAchievementTypeValidator: () => KnownAchievementTypeValidator2,
|
|
1259
1260
|
LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
|
|
1260
1261
|
LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
|
|
@@ -4795,8 +4796,9 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
4795
4796
|
x: mod2.string(),
|
|
4796
4797
|
y: mod2.string().optional(),
|
|
4797
4798
|
n: mod2.string().optional(),
|
|
4798
|
-
d: mod2.string()
|
|
4799
|
+
d: mod2.string().optional()
|
|
4799
4800
|
});
|
|
4801
|
+
var JWKWithPrivateKeyValidator2 = JWKValidator2.omit({ d: true }).extend({ d: mod2.string() });
|
|
4800
4802
|
var JWERecipientHeaderValidator2 = mod2.object({
|
|
4801
4803
|
alg: mod2.string(),
|
|
4802
4804
|
iv: mod2.string(),
|
|
@@ -8999,8 +9001,9 @@ var JWKValidator = mod.object({
|
|
|
8999
9001
|
x: mod.string(),
|
|
9000
9002
|
y: mod.string().optional(),
|
|
9001
9003
|
n: mod.string().optional(),
|
|
9002
|
-
d: mod.string()
|
|
9004
|
+
d: mod.string().optional()
|
|
9003
9005
|
});
|
|
9006
|
+
var JWKWithPrivateKeyValidator = JWKValidator.omit({ d: true }).extend({ d: mod.string() });
|
|
9004
9007
|
var JWERecipientHeaderValidator = mod.object({
|
|
9005
9008
|
alg: mod.string(),
|
|
9006
9009
|
iv: mod.string(),
|
|
@@ -10087,7 +10090,11 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10087
10090
|
throw new Error("Please make an account first!");
|
|
10088
10091
|
if (!profileId)
|
|
10089
10092
|
return client.boost.updateBoostPermissions.query({ uri, updates });
|
|
10090
|
-
const result = await client.boost.updateOtherBoostPermissions.query({
|
|
10093
|
+
const result = await client.boost.updateOtherBoostPermissions.query({
|
|
10094
|
+
uri,
|
|
10095
|
+
profileId,
|
|
10096
|
+
updates
|
|
10097
|
+
});
|
|
10091
10098
|
if (result)
|
|
10092
10099
|
await _learnCard.invoke.clearDidWebCache?.();
|
|
10093
10100
|
return result;
|
|
@@ -10251,6 +10258,40 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10251
10258
|
verifyConsent: async (_learnCard, uri, profileId) => {
|
|
10252
10259
|
return client.contracts.verifyConsent.query({ uri, profileId });
|
|
10253
10260
|
},
|
|
10261
|
+
addDidMetadata: async (_learnCard, metadata) => {
|
|
10262
|
+
if (!userData)
|
|
10263
|
+
throw new Error("Please make an account first!");
|
|
10264
|
+
const result = await client.didMetadata.addDidMetadata.mutate(metadata);
|
|
10265
|
+
if (result)
|
|
10266
|
+
await _learnCard.invoke.clearDidWebCache?.();
|
|
10267
|
+
return result;
|
|
10268
|
+
},
|
|
10269
|
+
getDidMetadata: async (_learnCard, id) => {
|
|
10270
|
+
if (!userData)
|
|
10271
|
+
throw new Error("Please make an account first!");
|
|
10272
|
+
return client.didMetadata.getDidMetadata.query({ id });
|
|
10273
|
+
},
|
|
10274
|
+
getMyDidMetadata: async () => {
|
|
10275
|
+
if (!userData)
|
|
10276
|
+
throw new Error("Please make an account first!");
|
|
10277
|
+
return client.didMetadata.getMyDidMetadata.query();
|
|
10278
|
+
},
|
|
10279
|
+
updateDidMetadata: async (_learnCard, id, updates) => {
|
|
10280
|
+
if (!userData)
|
|
10281
|
+
throw new Error("Please make an account first!");
|
|
10282
|
+
const result = await client.didMetadata.updateDidMetadata.mutate({ id, updates });
|
|
10283
|
+
if (result)
|
|
10284
|
+
await _learnCard.invoke.clearDidWebCache?.();
|
|
10285
|
+
return result;
|
|
10286
|
+
},
|
|
10287
|
+
deleteDidMetadata: async (_learnCard, id) => {
|
|
10288
|
+
if (!userData)
|
|
10289
|
+
throw new Error("Please make an account first!");
|
|
10290
|
+
const result = await client.didMetadata.deleteDidMetadata.mutate({ id });
|
|
10291
|
+
if (result)
|
|
10292
|
+
await _learnCard.invoke.clearDidWebCache?.();
|
|
10293
|
+
return result;
|
|
10294
|
+
},
|
|
10254
10295
|
resolveFromLCN: async (_learnCard, uri) => {
|
|
10255
10296
|
const result = await client.storage.resolve.query({ uri });
|
|
10256
10297
|
return UnsignedVCValidator.or(VCValidator).or(VPValidator).or(JWEValidator).or(ConsentFlowContractValidator).or(ConsentFlowTermsValidator).parseAsync(result);
|