@learncard/network-plugin 2.4.16 → 2.4.18
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 +24 -7
- package/dist/lcn-plugin.cjs.development.js.map +2 -2
- package/dist/lcn-plugin.cjs.production.min.js +1 -1
- package/dist/lcn-plugin.cjs.production.min.js.map +2 -2
- package/dist/lcn-plugin.esm.js +24 -7
- package/dist/lcn-plugin.esm.js.map +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -9
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -5340,7 +5340,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5340
5340
|
frontDoorBoostUri: mod2.string().optional(),
|
|
5341
5341
|
createdAt: mod2.string(),
|
|
5342
5342
|
updatedAt: mod2.string(),
|
|
5343
|
-
expiresAt: mod2.string().optional()
|
|
5343
|
+
expiresAt: mod2.string().optional(),
|
|
5344
|
+
autoBoosts: mod2.string().array().optional()
|
|
5344
5345
|
});
|
|
5345
5346
|
var PaginatedConsentFlowContractsValidator2 = PaginationResponseValidator2.extend({
|
|
5346
5347
|
records: ConsentFlowContractDetailsValidator2.omit({ owner: true }).array()
|
|
@@ -9621,7 +9622,8 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
9621
9622
|
frontDoorBoostUri: mod.string().optional(),
|
|
9622
9623
|
createdAt: mod.string(),
|
|
9623
9624
|
updatedAt: mod.string(),
|
|
9624
|
-
expiresAt: mod.string().optional()
|
|
9625
|
+
expiresAt: mod.string().optional(),
|
|
9626
|
+
autoBoosts: mod.string().array().optional()
|
|
9625
9627
|
});
|
|
9626
9628
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
|
9627
9629
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
|
@@ -9825,7 +9827,9 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
9825
9827
|
try {
|
|
9826
9828
|
let result = await client.storage.resolve.query({ uri: vcUri });
|
|
9827
9829
|
if ("ciphertext" in result) {
|
|
9828
|
-
result = await _learnCard.invoke.
|
|
9830
|
+
result = await _learnCard.invoke.decryptDagJwe(result, [
|
|
9831
|
+
_learnCard.id.keypair()
|
|
9832
|
+
]);
|
|
9829
9833
|
}
|
|
9830
9834
|
return await VCValidator.or(VPValidator).parseAsync(result);
|
|
9831
9835
|
} catch (error) {
|
|
@@ -9841,7 +9845,10 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
9841
9845
|
},
|
|
9842
9846
|
uploadEncrypted: async (_learnCard, credential, { recipients = [] } = { recipients: [] }) => {
|
|
9843
9847
|
_learnCard.debug?.("learnCard.store['LearnCard Network'].upload");
|
|
9844
|
-
const jwe = await _learnCard.invoke.
|
|
9848
|
+
const jwe = await _learnCard.invoke.createDagJwe(credential, [
|
|
9849
|
+
_learnCard.id.did(),
|
|
9850
|
+
...recipients
|
|
9851
|
+
]);
|
|
9845
9852
|
return client.storage.store.mutate({ item: jwe });
|
|
9846
9853
|
}
|
|
9847
9854
|
},
|
|
@@ -10041,7 +10048,10 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10041
10048
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
10042
10049
|
if (!target)
|
|
10043
10050
|
throw new Error("Could not find target account");
|
|
10044
|
-
const credential = await _learnCard.invoke.
|
|
10051
|
+
const credential = await _learnCard.invoke.createDagJwe(vc, [
|
|
10052
|
+
userData.did,
|
|
10053
|
+
target.did
|
|
10054
|
+
]);
|
|
10045
10055
|
return client.credential.sendCredential.mutate({ profileId, credential });
|
|
10046
10056
|
},
|
|
10047
10057
|
acceptCredential: async (_learnCard, uri, options) => {
|
|
@@ -10081,7 +10091,10 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10081
10091
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
10082
10092
|
if (!target)
|
|
10083
10093
|
throw new Error("Could not find target account");
|
|
10084
|
-
const presentation = await _learnCard.invoke.
|
|
10094
|
+
const presentation = await _learnCard.invoke.createDagJwe(vp, [
|
|
10095
|
+
userData.did,
|
|
10096
|
+
target.did
|
|
10097
|
+
]);
|
|
10085
10098
|
return client.presentation.sendPresentation.mutate({ profileId, presentation });
|
|
10086
10099
|
},
|
|
10087
10100
|
acceptPresentation: async (_learnCard, uri) => {
|
|
@@ -10322,7 +10335,11 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10322
10335
|
});
|
|
10323
10336
|
}
|
|
10324
10337
|
const lcnDid = await client.utilities.getDid.query();
|
|
10325
|
-
const credential = await _learnCard.invoke.
|
|
10338
|
+
const credential = await _learnCard.invoke.createDagJwe(vc, [
|
|
10339
|
+
userData.did,
|
|
10340
|
+
targetProfile.did,
|
|
10341
|
+
lcnDid
|
|
10342
|
+
]);
|
|
10326
10343
|
return client.boost.sendBoost.mutate({
|
|
10327
10344
|
profileId,
|
|
10328
10345
|
uri: boostUri,
|