@veramo/cli 4.0.1-next.8 → 4.0.1-unstable.4
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/bin/veramo.js +1 -1
- package/build/cli.d.ts +13 -13
- package/build/cli.d.ts.map +1 -1
- package/build/cli.js +19 -23
- package/build/cli.js.map +1 -1
- package/build/config.d.ts +1 -1
- package/build/config.d.ts.map +1 -1
- package/build/config.js +17 -27
- package/build/config.js.map +1 -1
- package/build/credential.js +34 -70
- package/build/credential.js.map +1 -1
- package/build/dev.js +40 -62
- package/build/dev.js.map +1 -1
- package/build/did.js +70 -84
- package/build/did.js.map +1 -1
- package/build/discover.js +9 -20
- package/build/discover.js.map +1 -1
- package/build/execute.js +16 -30
- package/build/execute.js.map +1 -1
- package/build/explore/credentials.d.ts +1 -1
- package/build/explore/credentials.d.ts.map +1 -1
- package/build/explore/credentials.js +19 -37
- package/build/explore/credentials.js.map +1 -1
- package/build/explore/index.js +9 -19
- package/build/explore/index.js.map +1 -1
- package/build/explore/main.d.ts +1 -1
- package/build/explore/main.d.ts.map +1 -1
- package/build/explore/main.js +24 -42
- package/build/explore/main.js.map +1 -1
- package/build/explore/managed-identifiers.d.ts +1 -1
- package/build/explore/managed-identifiers.d.ts.map +1 -1
- package/build/explore/managed-identifiers.js +14 -32
- package/build/explore/managed-identifiers.js.map +1 -1
- package/build/explore/messages.d.ts +1 -1
- package/build/explore/messages.d.ts.map +1 -1
- package/build/explore/messages.js +13 -31
- package/build/explore/messages.js.map +1 -1
- package/build/explore/presentations.d.ts +1 -1
- package/build/explore/presentations.d.ts.map +1 -1
- package/build/explore/presentations.js +19 -37
- package/build/explore/presentations.js.map +1 -1
- package/build/explore/styles.js +1 -4
- package/build/explore/styles.js.map +1 -1
- package/build/explore/utils.js +8 -17
- package/build/explore/utils.js.map +1 -1
- package/build/lib/agentCreator.d.ts +1 -1
- package/build/lib/agentCreator.d.ts.map +1 -1
- package/build/lib/agentCreator.js +3 -7
- package/build/lib/agentCreator.js.map +1 -1
- package/build/lib/objectCreator.d.ts +1 -1
- package/build/lib/objectCreator.d.ts.map +1 -1
- package/build/lib/objectCreator.js +22 -29
- package/build/lib/objectCreator.js.map +1 -1
- package/build/message.js +8 -19
- package/build/message.js.map +1 -1
- package/build/presentation.js +73 -98
- package/build/presentation.js.map +1 -1
- package/build/sdr.js +50 -68
- package/build/sdr.js.map +1 -1
- package/build/server.js +13 -25
- package/build/server.js.map +1 -1
- package/build/setup.d.ts +1 -2
- package/build/setup.d.ts.map +1 -1
- package/build/setup.js +8 -17
- package/build/setup.js.map +1 -1
- package/build/util.js +17 -32
- package/build/util.js.map +1 -1
- package/build/version.js +6 -5
- package/build/version.js.map +1 -1
- package/default/default.yml +1 -17
- package/package.json +29 -23
- package/src/cli.ts +15 -14
- package/src/config.ts +6 -5
- package/src/credential.ts +8 -8
- package/src/dev.ts +7 -3
- package/src/did.ts +12 -12
- package/src/discover.ts +2 -2
- package/src/execute.ts +5 -5
- package/src/explore/credentials.ts +3 -3
- package/src/explore/index.ts +5 -4
- package/src/explore/main.ts +6 -6
- package/src/explore/managed-identifiers.ts +3 -3
- package/src/explore/messages.ts +3 -3
- package/src/explore/presentations.ts +3 -3
- package/src/lib/agentCreator.ts +3 -3
- package/src/lib/objectCreator.ts +15 -15
- package/src/message.ts +3 -3
- package/src/presentation.ts +45 -32
- package/src/sdr.ts +5 -5
- package/src/server.ts +5 -3
- package/src/setup.ts +3 -5
- package/src/version.ts +4 -2
package/build/explore/utils.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.copyToClipboard = exports.shortDate = exports.shortDid = void 0;
|
|
7
|
-
const date_fns_1 = require("date-fns");
|
|
8
|
-
const os_1 = __importDefault(require("os"));
|
|
9
|
-
function shortDid(did) {
|
|
1
|
+
import { formatDistanceToNow } from 'date-fns';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
export function shortDid(did) {
|
|
10
4
|
if (!did)
|
|
11
5
|
return '';
|
|
12
6
|
if (did.slice(0, 7) === 'did:web') {
|
|
@@ -14,31 +8,28 @@ function shortDid(did) {
|
|
|
14
8
|
}
|
|
15
9
|
return did.slice(0, did.lastIndexOf(':')) + '..' + did.slice(-4);
|
|
16
10
|
}
|
|
17
|
-
|
|
18
|
-
function shortDate(date) {
|
|
11
|
+
export function shortDate(date) {
|
|
19
12
|
if (!date)
|
|
20
13
|
return '';
|
|
21
|
-
return
|
|
14
|
+
return formatDistanceToNow(new Date(date));
|
|
22
15
|
}
|
|
23
|
-
exports.shortDate = shortDate;
|
|
24
16
|
// return true if copy worked, false otherwise
|
|
25
|
-
function copyToClipboard(text) {
|
|
17
|
+
export function copyToClipboard(text) {
|
|
26
18
|
/**
|
|
27
19
|
* There's probably a better way than spawning. We tried and failed at the following:
|
|
28
20
|
* - screen.copyToClipboard didn't do anything (and is iTerm2-specific, anyway)
|
|
29
21
|
* - clipboardy wouldn't run due to error "Must use import to load ES Module" (even though we used import)
|
|
30
22
|
*/
|
|
31
|
-
if (
|
|
23
|
+
if (os.platform() === 'darwin') {
|
|
32
24
|
const proc = require('child_process').spawn('pbcopy');
|
|
33
25
|
proc.stdin.write(text);
|
|
34
26
|
proc.stdin.end();
|
|
35
27
|
return true;
|
|
36
28
|
}
|
|
37
|
-
else if (
|
|
29
|
+
else if (os.platform() === 'win32') {
|
|
38
30
|
require('child_process').spawn('clip').stdin.end(text);
|
|
39
31
|
return true;
|
|
40
32
|
}
|
|
41
33
|
return false;
|
|
42
34
|
}
|
|
43
|
-
exports.copyToClipboard = copyToClipboard;
|
|
44
35
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/explore/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","source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
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TAgent, IPluginMethodMap } from '@veramo/core';
|
|
2
|
-
export declare function createAgentFromConfig<T extends IPluginMethodMap>(config: object): TAgent<T
|
|
2
|
+
export declare function createAgentFromConfig<T extends IPluginMethodMap>(config: object): Promise<TAgent<T>>;
|
|
3
3
|
//# sourceMappingURL=agentCreator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentCreator.d.ts","sourceRoot":"","sources":["../../src/lib/agentCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGvD,
|
|
1
|
+
{"version":3,"file":"agentCreator.d.ts","sourceRoot":"","sources":["../../src/lib/agentCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGvD,wBAAsB,qBAAqB,CAAC,CAAC,SAAS,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAI1G"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.createAgentFromConfig = void 0;
|
|
4
|
-
const objectCreator_1 = require("./objectCreator");
|
|
5
|
-
function createAgentFromConfig(config) {
|
|
1
|
+
import { createObjects } from './objectCreator.js';
|
|
2
|
+
export async function createAgentFromConfig(config) {
|
|
6
3
|
//@ts-ignore
|
|
7
|
-
const { agent } =
|
|
4
|
+
const { agent } = await createObjects(config, { agent: '/agent' });
|
|
8
5
|
return agent;
|
|
9
6
|
}
|
|
10
|
-
exports.createAgentFromConfig = createAgentFromConfig;
|
|
11
7
|
//# sourceMappingURL=agentCreator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentCreator.js","sourceRoot":"","sources":["../../src/lib/agentCreator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agentCreator.js","sourceRoot":"","sources":["../../src/lib/agentCreator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAA6B,MAAc;IACpF,YAAY;IACZ,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,aAAa,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;IAClE,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function createObjects(config: object, pointers: Record<string, string>): any
|
|
1
|
+
export declare function createObjects(config: object, pointers: Record<string, string>): Promise<any>;
|
|
2
2
|
//# sourceMappingURL=objectCreator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectCreator.d.ts","sourceRoot":"","sources":["../../src/lib/objectCreator.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"objectCreator.d.ts","sourceRoot":"","sources":["../../src/lib/objectCreator.ts"],"names":[],"mappings":"AAIA,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAqGlG"}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createObjects = void 0;
|
|
7
|
-
const jsonpointer_1 = require("jsonpointer");
|
|
8
|
-
const url_parse_1 = __importDefault(require("url-parse"));
|
|
9
|
-
const { resolve } = require('path');
|
|
10
|
-
function createObjects(config, pointers) {
|
|
1
|
+
import { set, get } from 'jsonpointer';
|
|
2
|
+
import parse from 'url-parse';
|
|
3
|
+
import { resolve } from 'path';
|
|
4
|
+
export async function createObjects(config, pointers) {
|
|
11
5
|
const objects = {};
|
|
12
|
-
function resolveRefs(input) {
|
|
6
|
+
async function resolveRefs(input) {
|
|
13
7
|
if (Array.isArray(input)) {
|
|
14
8
|
const resolved = [];
|
|
15
9
|
for (const item of input) {
|
|
16
|
-
resolved.push(resolveRefs(item));
|
|
10
|
+
resolved.push(await resolveRefs(item));
|
|
17
11
|
}
|
|
18
12
|
return resolved;
|
|
19
13
|
}
|
|
@@ -23,16 +17,16 @@ function createObjects(config, pointers) {
|
|
|
23
17
|
if (input.hasOwnProperty(property)) {
|
|
24
18
|
if (property === '$ref') {
|
|
25
19
|
const pointer = input[property];
|
|
26
|
-
return objectFromPointer(pointer);
|
|
20
|
+
return await objectFromPointer(pointer);
|
|
27
21
|
}
|
|
28
22
|
else if (property === '$require') {
|
|
29
|
-
return objectFromConfig(input);
|
|
23
|
+
return await objectFromConfig(input);
|
|
30
24
|
}
|
|
31
25
|
else if (property === '$env') {
|
|
32
26
|
return process.env[input[property]];
|
|
33
27
|
}
|
|
34
28
|
else {
|
|
35
|
-
resolved[property] = resolveRefs(input[property]);
|
|
29
|
+
resolved[property] = await resolveRefs(input[property]);
|
|
36
30
|
}
|
|
37
31
|
}
|
|
38
32
|
}
|
|
@@ -40,22 +34,22 @@ function createObjects(config, pointers) {
|
|
|
40
34
|
}
|
|
41
35
|
return input;
|
|
42
36
|
}
|
|
43
|
-
function objectFromConfig(objectConfig) {
|
|
37
|
+
async function objectFromConfig(objectConfig) {
|
|
44
38
|
let object;
|
|
45
39
|
// console.log('Requiring', objectConfig['$require'])
|
|
46
|
-
const parsed = (
|
|
40
|
+
const parsed = parse(objectConfig['$require'], {}, true);
|
|
47
41
|
let module = parsed.pathname;
|
|
48
42
|
const member = parsed.hash.length > 1 ? parsed.hash.slice(1) : undefined;
|
|
49
43
|
const type = parsed.query['t'] || 'class';
|
|
50
44
|
const pointer = parsed.query['p'];
|
|
51
45
|
const args = objectConfig['$args'];
|
|
52
|
-
// console.log({module, member, type, query: parsed.query})
|
|
46
|
+
// console.log({module, member, type, query: parsed.query, args, pointer})
|
|
53
47
|
if (module.slice(0, 2) === './') {
|
|
54
48
|
module = resolve(module);
|
|
55
49
|
}
|
|
56
|
-
const resolvedArgs = args !== undefined ? resolveRefs(args) : [];
|
|
50
|
+
const resolvedArgs = args !== undefined ? await resolveRefs(args) : [];
|
|
57
51
|
try {
|
|
58
|
-
let required = member ?
|
|
52
|
+
let required = member ? (await import(module))[member] : (await import(module)).default;
|
|
59
53
|
if (type === 'class') {
|
|
60
54
|
object = new required(...resolvedArgs);
|
|
61
55
|
}
|
|
@@ -70,33 +64,33 @@ function createObjects(config, pointers) {
|
|
|
70
64
|
throw new Error(`Error creating ${module}['${member}']: ${e.message}`);
|
|
71
65
|
}
|
|
72
66
|
if (pointer) {
|
|
73
|
-
return
|
|
67
|
+
return get(object, pointer);
|
|
74
68
|
}
|
|
75
69
|
return object;
|
|
76
70
|
}
|
|
77
|
-
function objectFromPointer(pointer) {
|
|
78
|
-
const existingObject =
|
|
71
|
+
async function objectFromPointer(pointer) {
|
|
72
|
+
const existingObject = get(objects, pointer);
|
|
79
73
|
if (existingObject) {
|
|
80
74
|
// console.log('Existing', pointer)
|
|
81
75
|
return existingObject;
|
|
82
76
|
}
|
|
83
77
|
else {
|
|
84
78
|
// console.log('New', pointer)
|
|
85
|
-
const objectConfig =
|
|
79
|
+
const objectConfig = get(config, pointer);
|
|
86
80
|
if (!objectConfig)
|
|
87
81
|
throw Error('Pointer not found: ' + pointer);
|
|
88
82
|
try {
|
|
89
83
|
let object;
|
|
90
84
|
if (objectConfig['$require']) {
|
|
91
|
-
object = objectFromConfig(objectConfig);
|
|
85
|
+
object = await objectFromConfig(objectConfig);
|
|
92
86
|
}
|
|
93
87
|
else if (objectConfig['$env']) {
|
|
94
88
|
object = process.env[objectConfig['$env']];
|
|
95
89
|
}
|
|
96
90
|
else {
|
|
97
|
-
object = resolveRefs(objectConfig);
|
|
91
|
+
object = await resolveRefs(objectConfig);
|
|
98
92
|
}
|
|
99
|
-
|
|
93
|
+
set(objects, pointer, object);
|
|
100
94
|
return object;
|
|
101
95
|
}
|
|
102
96
|
catch (e) {
|
|
@@ -107,10 +101,9 @@ function createObjects(config, pointers) {
|
|
|
107
101
|
const result = {};
|
|
108
102
|
for (const key of Object.keys(pointers)) {
|
|
109
103
|
if (pointers.hasOwnProperty(key)) {
|
|
110
|
-
result[key] = objectFromPointer(pointers[key]);
|
|
104
|
+
result[key] = await objectFromPointer(pointers[key]);
|
|
111
105
|
}
|
|
112
106
|
}
|
|
113
107
|
return result;
|
|
114
108
|
}
|
|
115
|
-
exports.createObjects = createObjects;
|
|
116
109
|
//# sourceMappingURL=objectCreator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectCreator.js","sourceRoot":"","sources":["../../src/lib/objectCreator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"objectCreator.js","sourceRoot":"","sources":["../../src/lib/objectCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAc,EAAE,QAAgC;IAClF,MAAM,OAAO,GAAG,EAAE,CAAA;IAElB,KAAK,UAAU,WAAW,CAAC,KAAU;QACnC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,QAAQ,GAAG,EAAE,CAAA;YACnB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,QAAQ,CAAC,IAAI,CAAC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA;aACvC;YACD,OAAO,QAAQ,CAAA;SAChB;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,QAAQ,GAAQ,EAAE,CAAA;YACxB,KAA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MAAM,EAAE,OAAO,CAAC,CAAA;YACzC,IAAI,CAAC,YAAY;gBAAE,MAAM,KAAK,CAAC,qBAAqB,GAAG,OAAO,CAAC,CAAA;YAC/D,IAAI;gBACF,IAAI,MAAM,CAAA;gBACV,IAAI,YAAY,CAAC,UAAU,CAAC,EAAE;oBAC5B,MAAM,GAAG,MAAM,gBAAgB,CAAC,YAAY,CAAC,CAAA;iBAC9C;qBAAM,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;oBAC/B,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAA;iBAC3C;qBAAM;oBACL,MAAM,GAAG,MAAM,WAAW,CAAC,YAAY,CAAC,CAAA;iBACzC;gBACD,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;gBAC7B,OAAO,MAAM,CAAA;aACd;YAAC,OAAO,CAAM,EAAE;gBACf,MAAM,KAAK,CAAC,CAAC,CAAC,OAAO,GAAG,wCAAwC,GAAG,OAAO,CAAC,CAAA;aAC5E;SACF;IACH,CAAC;IAED,MAAM,MAAM,GAAQ,EAAE,CAAA;IACtB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QACvC,IAAI,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAChC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;SACrD;KACF;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/build/message.js
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const setup_1 = require("./setup");
|
|
13
|
-
const commander_1 = require("commander");
|
|
14
|
-
const fs = require('fs');
|
|
15
|
-
const message = commander_1.program.command('message').description('Messages');
|
|
1
|
+
import { getAgent } from './setup.js';
|
|
2
|
+
import { program } from 'commander';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
const message = program.command('message').description('Messages');
|
|
16
5
|
message
|
|
17
6
|
.command('handle', { isDefault: true })
|
|
18
7
|
.description('Handle raw message ')
|
|
19
8
|
.option('-r, --raw <string>', 'String containing raw message')
|
|
20
9
|
.option('-f, --file <string>', 'Path to a file containing raw message')
|
|
21
10
|
.option('--save <boolean>', 'Save message', true)
|
|
22
|
-
.action((options) =>
|
|
23
|
-
const agent =
|
|
11
|
+
.action(async (options) => {
|
|
12
|
+
const agent = await getAgent(program.opts().config);
|
|
24
13
|
try {
|
|
25
14
|
let raw;
|
|
26
15
|
if (options.file) {
|
|
@@ -32,7 +21,7 @@ message
|
|
|
32
21
|
else {
|
|
33
22
|
throw Error('Missing file path or raw string');
|
|
34
23
|
}
|
|
35
|
-
const message =
|
|
24
|
+
const message = await agent.handleMessage({
|
|
36
25
|
raw,
|
|
37
26
|
metaData: [{ type: 'cli' }],
|
|
38
27
|
save: options.save,
|
|
@@ -42,5 +31,5 @@ message
|
|
|
42
31
|
catch (e) {
|
|
43
32
|
console.error(e.message);
|
|
44
33
|
}
|
|
45
|
-
})
|
|
34
|
+
});
|
|
46
35
|
//# sourceMappingURL=message.js.map
|
package/build/message.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"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O,CAAM,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;KACzB;AACH,CAAC,CAAC,CAAA"}
|
package/build/presentation.js
CHANGED
|
@@ -1,62 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
const setup_1 = require("./setup");
|
|
39
|
-
const commander_1 = require("commander");
|
|
40
|
-
const inquirer_1 = __importDefault(require("inquirer"));
|
|
41
|
-
const qrcode_terminal_1 = __importDefault(require("qrcode-terminal"));
|
|
42
|
-
const util_1 = require("./util");
|
|
43
|
-
const fs = __importStar(require("fs"));
|
|
44
|
-
const json5 = __importStar(require("json5"));
|
|
45
|
-
const utils_1 = require("@veramo/utils");
|
|
46
|
-
const presentation = commander_1.program.command('presentation').description('W3C Verifiable Presentation');
|
|
1
|
+
import { getAgent } from './setup.js';
|
|
2
|
+
import { program } from 'commander';
|
|
3
|
+
import inquirer from 'inquirer';
|
|
4
|
+
import qrcode from 'qrcode-terminal';
|
|
5
|
+
import { readStdin } from './util.js';
|
|
6
|
+
import * as fs from 'fs';
|
|
7
|
+
import * as json5 from 'json5';
|
|
8
|
+
import { extractIssuer } from '@veramo/utils';
|
|
9
|
+
const presentation = program.command('presentation').description('W3C Verifiable Presentation');
|
|
47
10
|
presentation
|
|
48
11
|
.command('create', { isDefault: true })
|
|
49
12
|
.description('Create W3C Verifiable Presentation')
|
|
50
13
|
.option('-s, --send', 'Send')
|
|
51
14
|
.option('-q, --qrcode', 'Show qrcode')
|
|
52
|
-
.action((cmd) =>
|
|
53
|
-
const agent =
|
|
54
|
-
const myIdentifiers =
|
|
15
|
+
.action(async (cmd) => {
|
|
16
|
+
const agent = await getAgent(program.opts().config);
|
|
17
|
+
const myIdentifiers = await agent.didManagerFind();
|
|
55
18
|
if (myIdentifiers.length === 0) {
|
|
56
19
|
console.error('No dids');
|
|
57
20
|
process.exit();
|
|
58
21
|
}
|
|
59
|
-
const ids =
|
|
22
|
+
const ids = await agent.dataStoreORMGetIdentifiers();
|
|
60
23
|
const identifiers = [
|
|
61
24
|
{
|
|
62
25
|
name: 'Enter manually',
|
|
@@ -64,8 +27,8 @@ presentation
|
|
|
64
27
|
},
|
|
65
28
|
...ids.map((id) => id.did),
|
|
66
29
|
];
|
|
67
|
-
let aud =
|
|
68
|
-
const answers =
|
|
30
|
+
let aud = [];
|
|
31
|
+
const answers = await inquirer.prompt([
|
|
69
32
|
{
|
|
70
33
|
type: 'list',
|
|
71
34
|
name: 'iss',
|
|
@@ -82,10 +45,10 @@ presentation
|
|
|
82
45
|
default: 'xyz123',
|
|
83
46
|
},
|
|
84
47
|
{
|
|
85
|
-
type: '
|
|
86
|
-
name: '
|
|
87
|
-
message: '
|
|
88
|
-
|
|
48
|
+
type: 'input',
|
|
49
|
+
name: 'audnum',
|
|
50
|
+
message: 'Number of Verifiers',
|
|
51
|
+
default: 1,
|
|
89
52
|
},
|
|
90
53
|
{
|
|
91
54
|
type: 'input',
|
|
@@ -94,20 +57,30 @@ presentation
|
|
|
94
57
|
default: 'VerifiablePresentation,Profile',
|
|
95
58
|
},
|
|
96
59
|
]);
|
|
97
|
-
|
|
98
|
-
|
|
60
|
+
for (let i = 0; i < answers.audnum; i++) {
|
|
61
|
+
let answer = null;
|
|
62
|
+
const audAnswer = await inquirer.prompt([
|
|
99
63
|
{
|
|
100
|
-
type: '
|
|
64
|
+
type: 'list',
|
|
101
65
|
name: 'aud',
|
|
102
|
-
message: '
|
|
103
|
-
|
|
66
|
+
message: 'Select Verifier or enter manually',
|
|
67
|
+
choices: identifiers
|
|
68
|
+
}
|
|
104
69
|
]);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
70
|
+
answer = audAnswer.aud;
|
|
71
|
+
if (answer === 'manual') {
|
|
72
|
+
const manualAnswer = await inquirer.prompt([
|
|
73
|
+
{
|
|
74
|
+
type: 'input',
|
|
75
|
+
name: 'aud',
|
|
76
|
+
message: 'Enter Verifier DID',
|
|
77
|
+
},
|
|
78
|
+
]);
|
|
79
|
+
answer = manualAnswer.aud;
|
|
80
|
+
}
|
|
81
|
+
aud = [...aud, answer];
|
|
109
82
|
}
|
|
110
|
-
const credentials =
|
|
83
|
+
const credentials = await agent.dataStoreORMGetVerifiableCredentials({
|
|
111
84
|
where: [{ column: 'subject', value: [answers.iss] }],
|
|
112
85
|
});
|
|
113
86
|
const list = [];
|
|
@@ -116,14 +89,14 @@ presentation
|
|
|
116
89
|
list.push({
|
|
117
90
|
name: JSON.stringify(credential.verifiableCredential.credentialSubject) +
|
|
118
91
|
' | Issuer: ' +
|
|
119
|
-
|
|
92
|
+
extractIssuer(credential.verifiableCredential),
|
|
120
93
|
value: credential.verifiableCredential,
|
|
121
94
|
});
|
|
122
95
|
}
|
|
123
96
|
let addMoreCredentials = true;
|
|
124
97
|
const verifiableCredential = [];
|
|
125
98
|
while (addMoreCredentials) {
|
|
126
|
-
const answers2 =
|
|
99
|
+
const answers2 = await inquirer.prompt([
|
|
127
100
|
{
|
|
128
101
|
type: 'list',
|
|
129
102
|
name: 'credential',
|
|
@@ -143,11 +116,11 @@ presentation
|
|
|
143
116
|
verifiableCredential.push(answers2.credential);
|
|
144
117
|
addMoreCredentials = answers2.addMore;
|
|
145
118
|
}
|
|
146
|
-
const verifiablePresentation =
|
|
119
|
+
const verifiablePresentation = await agent.createVerifiablePresentation({
|
|
147
120
|
save: true,
|
|
148
121
|
presentation: {
|
|
149
122
|
holder: answers.iss,
|
|
150
|
-
verifier:
|
|
123
|
+
verifier: aud,
|
|
151
124
|
tag: answers.tag,
|
|
152
125
|
'@context': ['https://www.w3.org/2018/credentials/v1'],
|
|
153
126
|
type: answers.type.split(','),
|
|
@@ -157,30 +130,32 @@ presentation
|
|
|
157
130
|
proofFormat: 'jwt',
|
|
158
131
|
});
|
|
159
132
|
if (cmd.send) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
133
|
+
for (var verifier in aud) {
|
|
134
|
+
try {
|
|
135
|
+
const message = await agent.sendMessageDIDCommAlpha1({
|
|
136
|
+
save: true,
|
|
137
|
+
data: {
|
|
138
|
+
from: answers.iss,
|
|
139
|
+
to: verifier,
|
|
140
|
+
type: 'jwt',
|
|
141
|
+
body: verifiablePresentation.proof.jwt,
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
console.dir(message, { depth: 10 });
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
console.error(e);
|
|
148
|
+
}
|
|
174
149
|
}
|
|
175
150
|
}
|
|
176
151
|
if (cmd.qrcode) {
|
|
177
|
-
|
|
152
|
+
qrcode.generate(verifiablePresentation.proof.jwt);
|
|
178
153
|
}
|
|
179
154
|
else {
|
|
180
155
|
console.dir(verifiablePresentation, { depth: 10 });
|
|
181
156
|
}
|
|
182
157
|
}
|
|
183
|
-
})
|
|
158
|
+
});
|
|
184
159
|
presentation
|
|
185
160
|
.command('verify')
|
|
186
161
|
.description('Verify a W3C Verifiable Presentation provided as a string param or a file or from stdin')
|
|
@@ -188,17 +163,17 @@ presentation
|
|
|
188
163
|
.option('-d, --domain <string>', 'Optional. Specify a domain that the presentation should match.')
|
|
189
164
|
.option('-f, --filename <string>', 'Optional. Read the presentation from a file instead of stdin')
|
|
190
165
|
.option('-r, --raw <string>', 'Optional. Presentation as a parameter string instead of a file or stdin.')
|
|
191
|
-
.action((options) =>
|
|
192
|
-
const agent =
|
|
166
|
+
.action(async (options) => {
|
|
167
|
+
const agent = await getAgent(program.opts().config);
|
|
193
168
|
let raw = '';
|
|
194
169
|
if (options.raw) {
|
|
195
170
|
raw = options.raw;
|
|
196
171
|
}
|
|
197
172
|
else if (options.filename) {
|
|
198
|
-
raw =
|
|
173
|
+
raw = await fs.promises.readFile(options.filename, 'utf-8');
|
|
199
174
|
}
|
|
200
175
|
else {
|
|
201
|
-
raw =
|
|
176
|
+
raw = await readStdin();
|
|
202
177
|
}
|
|
203
178
|
let presentationAsJSON;
|
|
204
179
|
try {
|
|
@@ -212,7 +187,7 @@ presentation
|
|
|
212
187
|
},
|
|
213
188
|
};
|
|
214
189
|
}
|
|
215
|
-
const result =
|
|
190
|
+
const result = await agent.verifyPresentation({
|
|
216
191
|
presentation: presentationAsJSON,
|
|
217
192
|
challenge: options.challenge,
|
|
218
193
|
domain: options.domain,
|
|
@@ -223,19 +198,19 @@ presentation
|
|
|
223
198
|
else {
|
|
224
199
|
console.error('Presentation could not be verified.');
|
|
225
200
|
}
|
|
226
|
-
})
|
|
201
|
+
});
|
|
227
202
|
presentation
|
|
228
203
|
.command('output')
|
|
229
204
|
.description('Print W3C Verifiable Presentation to stdout')
|
|
230
205
|
.option('-t, --tag <string>', 'Optional. Specify the tag for the presentation.')
|
|
231
|
-
.action((options) =>
|
|
232
|
-
const agent =
|
|
233
|
-
const presentations =
|
|
206
|
+
.action(async (options) => {
|
|
207
|
+
const agent = await getAgent(program.opts().config);
|
|
208
|
+
const presentations = await agent.dataStoreORMGetVerifiablePresentations({});
|
|
234
209
|
if (presentations.length > 0) {
|
|
235
210
|
let selected = null;
|
|
236
211
|
const list = [];
|
|
237
212
|
if (options.tag) {
|
|
238
|
-
const matches = presentations.filter(pres => pres.verifiablePresentation.tag === options.tag);
|
|
213
|
+
const matches = presentations.filter((pres) => pres.verifiablePresentation.tag === options.tag);
|
|
239
214
|
if (matches.length > 1) {
|
|
240
215
|
console.log('Found multiple matching presentations. Only showing the first one.');
|
|
241
216
|
}
|
|
@@ -253,7 +228,7 @@ presentation
|
|
|
253
228
|
value: pres,
|
|
254
229
|
});
|
|
255
230
|
}
|
|
256
|
-
const answers =
|
|
231
|
+
const answers = await inquirer.prompt([
|
|
257
232
|
{
|
|
258
233
|
type: 'list',
|
|
259
234
|
name: 'presentation',
|
|
@@ -273,5 +248,5 @@ presentation
|
|
|
273
248
|
else {
|
|
274
249
|
console.log('No presentations found.');
|
|
275
250
|
}
|
|
276
|
-
})
|
|
251
|
+
});
|
|
277
252
|
//# sourceMappingURL=presentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../src/presentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../src/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE7C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAA;AAE/F,YAAY;KACT,OAAO,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;KACtC,WAAW,CAAC,oCAAoC,CAAC;KACjD,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC;KAC5B,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC;KACrC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACpB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAA;IACnD,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,cAAc,EAAE,CAAA;IAClD,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;QAC9B,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;QACxB,OAAO,CAAC,IAAI,EAAE,CAAA;KACf;IAED,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,0BAA0B,EAAE,CAAA;IAEpD,MAAM,W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