@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
|
@@ -5365,7 +5365,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5365
5365
|
frontDoorBoostUri: mod2.string().optional(),
|
|
5366
5366
|
createdAt: mod2.string(),
|
|
5367
5367
|
updatedAt: mod2.string(),
|
|
5368
|
-
expiresAt: mod2.string().optional()
|
|
5368
|
+
expiresAt: mod2.string().optional(),
|
|
5369
|
+
autoBoosts: mod2.string().array().optional()
|
|
5369
5370
|
});
|
|
5370
5371
|
var PaginatedConsentFlowContractsValidator2 = PaginationResponseValidator2.extend({
|
|
5371
5372
|
records: ConsentFlowContractDetailsValidator2.omit({ owner: true }).array()
|
|
@@ -9646,7 +9647,8 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
9646
9647
|
frontDoorBoostUri: mod.string().optional(),
|
|
9647
9648
|
createdAt: mod.string(),
|
|
9648
9649
|
updatedAt: mod.string(),
|
|
9649
|
-
expiresAt: mod.string().optional()
|
|
9650
|
+
expiresAt: mod.string().optional(),
|
|
9651
|
+
autoBoosts: mod.string().array().optional()
|
|
9650
9652
|
});
|
|
9651
9653
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
|
9652
9654
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
|
@@ -9850,7 +9852,9 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
9850
9852
|
try {
|
|
9851
9853
|
let result = await client.storage.resolve.query({ uri: vcUri });
|
|
9852
9854
|
if ("ciphertext" in result) {
|
|
9853
|
-
result = await _learnCard.invoke.
|
|
9855
|
+
result = await _learnCard.invoke.decryptDagJwe(result, [
|
|
9856
|
+
_learnCard.id.keypair()
|
|
9857
|
+
]);
|
|
9854
9858
|
}
|
|
9855
9859
|
return await VCValidator.or(VPValidator).parseAsync(result);
|
|
9856
9860
|
} catch (error) {
|
|
@@ -9866,7 +9870,10 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
9866
9870
|
},
|
|
9867
9871
|
uploadEncrypted: async (_learnCard, credential, { recipients = [] } = { recipients: [] }) => {
|
|
9868
9872
|
_learnCard.debug?.("learnCard.store['LearnCard Network'].upload");
|
|
9869
|
-
const jwe = await _learnCard.invoke.
|
|
9873
|
+
const jwe = await _learnCard.invoke.createDagJwe(credential, [
|
|
9874
|
+
_learnCard.id.did(),
|
|
9875
|
+
...recipients
|
|
9876
|
+
]);
|
|
9870
9877
|
return client.storage.store.mutate({ item: jwe });
|
|
9871
9878
|
}
|
|
9872
9879
|
},
|
|
@@ -10066,7 +10073,10 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10066
10073
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
10067
10074
|
if (!target)
|
|
10068
10075
|
throw new Error("Could not find target account");
|
|
10069
|
-
const credential = await _learnCard.invoke.
|
|
10076
|
+
const credential = await _learnCard.invoke.createDagJwe(vc, [
|
|
10077
|
+
userData.did,
|
|
10078
|
+
target.did
|
|
10079
|
+
]);
|
|
10070
10080
|
return client.credential.sendCredential.mutate({ profileId, credential });
|
|
10071
10081
|
},
|
|
10072
10082
|
acceptCredential: async (_learnCard, uri, options) => {
|
|
@@ -10106,7 +10116,10 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10106
10116
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
10107
10117
|
if (!target)
|
|
10108
10118
|
throw new Error("Could not find target account");
|
|
10109
|
-
const presentation = await _learnCard.invoke.
|
|
10119
|
+
const presentation = await _learnCard.invoke.createDagJwe(vp, [
|
|
10120
|
+
userData.did,
|
|
10121
|
+
target.did
|
|
10122
|
+
]);
|
|
10110
10123
|
return client.presentation.sendPresentation.mutate({ profileId, presentation });
|
|
10111
10124
|
},
|
|
10112
10125
|
acceptPresentation: async (_learnCard, uri) => {
|
|
@@ -10347,7 +10360,11 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10347
10360
|
});
|
|
10348
10361
|
}
|
|
10349
10362
|
const lcnDid = await client.utilities.getDid.query();
|
|
10350
|
-
const credential = await _learnCard.invoke.
|
|
10363
|
+
const credential = await _learnCard.invoke.createDagJwe(vc, [
|
|
10364
|
+
userData.did,
|
|
10365
|
+
targetProfile.did,
|
|
10366
|
+
lcnDid
|
|
10367
|
+
]);
|
|
10351
10368
|
return client.boost.sendBoost.mutate({
|
|
10352
10369
|
profileId,
|
|
10353
10370
|
uri: boostUri,
|