@bedrock/vc-delivery 3.1.1 → 3.3.0
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/lib/config.js +9 -0
- package/lib/issue.js +1 -2
- package/package.json +1 -1
package/lib/config.js
CHANGED
|
@@ -8,3 +8,12 @@ const {config} = bedrock;
|
|
|
8
8
|
// use `vc-exchanger` namespace
|
|
9
9
|
const namespace = 'vc-exchanger';
|
|
10
10
|
config[namespace] = {};
|
|
11
|
+
|
|
12
|
+
// create dev application identity for vc-exchanger (must be overridden in
|
|
13
|
+
// deployments) ...and `ensureConfigOverride` has already been set via
|
|
14
|
+
// `bedrock-app-identity` so it doesn't have to be set here
|
|
15
|
+
config['app-identity'].seeds.services['vc-exchanger'] = {
|
|
16
|
+
id: 'did:key:z6MknmKKxYiYo6txxX2bCgzeuBDkPPb5SJ36p232XkVEk7mf',
|
|
17
|
+
seedMultibase: 'z1Abgbd91bbZHPYakVA7EPvhY9NZ2EaTkEpmwdBCfifokDn',
|
|
18
|
+
serviceType: 'vc-exchanger'
|
|
19
|
+
};
|
package/lib/issue.js
CHANGED
|
@@ -15,8 +15,7 @@ export async function issue({exchanger, exchange} = {}) {
|
|
|
15
15
|
// run jsonata compiler; only `jsonata` template type is supported and this
|
|
16
16
|
// was validated when the exchanger was created
|
|
17
17
|
const credentials = await Promise.all(credentialTemplates.map(
|
|
18
|
-
({template: t}) => jsonata(t).evaluate(variables)));
|
|
19
|
-
|
|
18
|
+
({template: t}) => jsonata(t).evaluate(variables, variables)));
|
|
20
19
|
// issue all VCs
|
|
21
20
|
const vcs = await _issue({exchanger, credentials});
|
|
22
21
|
verifiableCredential.push(...vcs);
|