@learncard/network-plugin 2.4.8 → 2.4.10
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 +12 -4
- package/dist/lcn-plugin.cjs.development.js.map +2 -2
- package/dist/lcn-plugin.cjs.production.min.js +2 -2
- package/dist/lcn-plugin.cjs.production.min.js.map +2 -2
- package/dist/lcn-plugin.esm.js +12 -4
- package/dist/lcn-plugin.esm.js.map +2 -2
- package/dist/types.d.ts +3 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -5221,7 +5221,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5221
5221
|
canManageChildrenProfiles: mod2.boolean(),
|
|
5222
5222
|
canViewAnalytics: mod2.boolean()
|
|
5223
5223
|
}).partial();
|
|
5224
|
-
var ClaimHookTypeValidator2 = mod2.enum(["GRANT_PERMISSIONS"]);
|
|
5224
|
+
var ClaimHookTypeValidator2 = mod2.enum(["GRANT_PERMISSIONS", "ADD_ADMIN"]);
|
|
5225
5225
|
var ClaimHookValidator2 = mod2.discriminatedUnion("type", [
|
|
5226
5226
|
mod2.object({
|
|
5227
5227
|
type: mod2.literal(ClaimHookTypeValidator2.Values.GRANT_PERMISSIONS),
|
|
@@ -5230,6 +5230,10 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5230
5230
|
targetUri: mod2.string(),
|
|
5231
5231
|
permissions: BoostPermissionsValidator2.partial()
|
|
5232
5232
|
})
|
|
5233
|
+
}),
|
|
5234
|
+
mod2.object({
|
|
5235
|
+
type: mod2.literal(ClaimHookTypeValidator2.Values.ADD_ADMIN),
|
|
5236
|
+
data: mod2.object({ claimUri: mod2.string(), targetUri: mod2.string() })
|
|
5233
5237
|
})
|
|
5234
5238
|
]);
|
|
5235
5239
|
var ClaimHookQueryValidator2 = mod2.object({
|
|
@@ -9463,7 +9467,7 @@ var BoostPermissionsQueryValidator = mod.object({
|
|
|
9463
9467
|
canManageChildrenProfiles: mod.boolean(),
|
|
9464
9468
|
canViewAnalytics: mod.boolean()
|
|
9465
9469
|
}).partial();
|
|
9466
|
-
var ClaimHookTypeValidator = mod.enum(["GRANT_PERMISSIONS"]);
|
|
9470
|
+
var ClaimHookTypeValidator = mod.enum(["GRANT_PERMISSIONS", "ADD_ADMIN"]);
|
|
9467
9471
|
var ClaimHookValidator = mod.discriminatedUnion("type", [
|
|
9468
9472
|
mod.object({
|
|
9469
9473
|
type: mod.literal(ClaimHookTypeValidator.Values.GRANT_PERMISSIONS),
|
|
@@ -9472,6 +9476,10 @@ var ClaimHookValidator = mod.discriminatedUnion("type", [
|
|
|
9472
9476
|
targetUri: mod.string(),
|
|
9473
9477
|
permissions: BoostPermissionsValidator.partial()
|
|
9474
9478
|
})
|
|
9479
|
+
}),
|
|
9480
|
+
mod.object({
|
|
9481
|
+
type: mod.literal(ClaimHookTypeValidator.Values.ADD_ADMIN),
|
|
9482
|
+
data: mod.object({ claimUri: mod.string(), targetUri: mod.string() })
|
|
9475
9483
|
})
|
|
9476
9484
|
]);
|
|
9477
9485
|
var ClaimHookQueryValidator = mod.object({
|
|
@@ -9960,10 +9968,10 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
9960
9968
|
const credential = await _learnCard.invoke.getDIDObject().createDagJWE(vc, [userData.did, target.did]);
|
|
9961
9969
|
return client.credential.sendCredential.mutate({ profileId, credential });
|
|
9962
9970
|
},
|
|
9963
|
-
acceptCredential: async (_learnCard, uri) => {
|
|
9971
|
+
acceptCredential: async (_learnCard, uri, options) => {
|
|
9964
9972
|
if (!userData)
|
|
9965
9973
|
throw new Error("Please make an account first!");
|
|
9966
|
-
return client.credential.acceptCredential.mutate({ uri });
|
|
9974
|
+
return client.credential.acceptCredential.mutate({ uri, options });
|
|
9967
9975
|
},
|
|
9968
9976
|
getReceivedCredentials: async (_learnCard, from) => {
|
|
9969
9977
|
if (!userData)
|