@sovrahq/waci 3.4.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/.eslintignore +2 -0
- package/.eslintrc.js +21 -0
- package/.prettierrc +4 -0
- package/LICENSE +201 -0
- package/dist/callbacks/index.d.ts +108 -0
- package/dist/callbacks/index.js +9 -0
- package/dist/callbacks/index.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +5 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/handlers/common/problem-report.handler.d.ts +4 -0
- package/dist/handlers/common/problem-report.handler.js +72 -0
- package/dist/handlers/common/problem-report.handler.js.map +1 -0
- package/dist/handlers/common/step-2-oob-invitation.handler.d.ts +4 -0
- package/dist/handlers/common/step-2-oob-invitation.handler.js +93 -0
- package/dist/handlers/common/step-2-oob-invitation.handler.js.map +1 -0
- package/dist/handlers/decorators/register-handler.decorator.d.ts +2 -0
- package/dist/handlers/decorators/register-handler.decorator.js +13 -0
- package/dist/handlers/decorators/register-handler.decorator.js.map +1 -0
- package/dist/handlers/index.d.ts +6 -0
- package/dist/handlers/index.js +11 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/handlers/issuance/step-3-propose-credential.handler.d.ts +32 -0
- package/dist/handlers/issuance/step-3-propose-credential.handler.js +180 -0
- package/dist/handlers/issuance/step-3-propose-credential.handler.js.map +1 -0
- package/dist/handlers/issuance/step-4-1-offer-credential-proceed.handler.d.ts +5 -0
- package/dist/handlers/issuance/step-4-1-offer-credential-proceed.handler.js +152 -0
- package/dist/handlers/issuance/step-4-1-offer-credential-proceed.handler.js.map +1 -0
- package/dist/handlers/issuance/step-4-offer-credential.handler.d.ts +5 -0
- package/dist/handlers/issuance/step-4-offer-credential.handler.js +169 -0
- package/dist/handlers/issuance/step-4-offer-credential.handler.js.map +1 -0
- package/dist/handlers/issuance/step-5-request-credential.handler.d.ts +4 -0
- package/dist/handlers/issuance/step-5-request-credential.handler.js +275 -0
- package/dist/handlers/issuance/step-5-request-credential.handler.js.map +1 -0
- package/dist/handlers/issuance/step-6-issue-credential.handler.d.ts +4 -0
- package/dist/handlers/issuance/step-6-issue-credential.handler.js +106 -0
- package/dist/handlers/issuance/step-6-issue-credential.handler.js.map +1 -0
- package/dist/handlers/issuance/step-7-ack-message.handler.d.ts +4 -0
- package/dist/handlers/issuance/step-7-ack-message.handler.js +78 -0
- package/dist/handlers/issuance/step-7-ack-message.handler.js.map +1 -0
- package/dist/handlers/presentation/step-3-propose-presentation.handler.d.ts +5 -0
- package/dist/handlers/presentation/step-3-propose-presentation.handler.js +107 -0
- package/dist/handlers/presentation/step-3-propose-presentation.handler.js.map +1 -0
- package/dist/handlers/presentation/step-4-1-presentation-proceed.handler.d.ts +5 -0
- package/dist/handlers/presentation/step-4-1-presentation-proceed.handler.js +130 -0
- package/dist/handlers/presentation/step-4-1-presentation-proceed.handler.js.map +1 -0
- package/dist/handlers/presentation/step-4-request-presentation.handler.d.ts +5 -0
- package/dist/handlers/presentation/step-4-request-presentation.handler.js +151 -0
- package/dist/handlers/presentation/step-4-request-presentation.handler.js.map +1 -0
- package/dist/handlers/presentation/step-5-present-proof.handler.d.ts +4 -0
- package/dist/handlers/presentation/step-5-present-proof.handler.js +211 -0
- package/dist/handlers/presentation/step-5-present-proof.handler.js.map +1 -0
- package/dist/handlers/presentation/step-6-ack-message.handler.d.ts +4 -0
- package/dist/handlers/presentation/step-6-ack-message.handler.js +72 -0
- package/dist/handlers/presentation/step-6-ack-message.handler.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/services/waci-interpreter.d.ts +17 -0
- package/dist/services/waci-interpreter.js +222 -0
- package/dist/services/waci-interpreter.js.map +1 -0
- package/dist/types/actor.d.ts +5 -0
- package/dist/types/actor.js +10 -0
- package/dist/types/actor.js.map +1 -0
- package/dist/types/credential-application.d.ts +36 -0
- package/dist/types/credential-application.js +3 -0
- package/dist/types/credential-application.js.map +1 -0
- package/dist/types/credential-manifest.d.ts +173 -0
- package/dist/types/credential-manifest.js +3 -0
- package/dist/types/credential-manifest.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/problem-report.d.ts +13 -0
- package/dist/types/problem-report.js +18 -0
- package/dist/types/problem-report.js.map +1 -0
- package/dist/types/waci-message.d.ts +106 -0
- package/dist/types/waci-message.js +106 -0
- package/dist/types/waci-message.js.map +1 -0
- package/dist/utils/erros.d.ts +15 -0
- package/dist/utils/erros.js +42 -0
- package/dist/utils/erros.js.map +1 -0
- package/dist/utils/index.d.ts +22 -0
- package/dist/utils/index.js +356 -0
- package/dist/utils/index.js.map +1 -0
- package/jest.config.json +17 -0
- package/package.json +39 -0
- package/readme.md +1 -0
- package/src/callbacks/index.ts +75 -0
- package/src/constants/index.ts +1 -0
- package/src/handlers/common/problem-report.handler.ts +15 -0
- package/src/handlers/common/step-2-oob-invitation.handler.ts +45 -0
- package/src/handlers/decorators/register-handler.decorator.ts +10 -0
- package/src/handlers/index.ts +7 -0
- package/src/handlers/issuance/step-3-propose-credential.handler.ts +186 -0
- package/src/handlers/issuance/step-4-1-offer-credential-proceed.handler.ts +129 -0
- package/src/handlers/issuance/step-4-offer-credential.handler.ts +137 -0
- package/src/handlers/issuance/step-5-request-credential.handler.ts +205 -0
- package/src/handlers/issuance/step-6-issue-credential.handler.ts +63 -0
- package/src/handlers/issuance/step-7-ack-message.handler.ts +21 -0
- package/src/handlers/presentation/step-3-propose-presentation.handler.ts +67 -0
- package/src/handlers/presentation/step-4-1-presentation-proceed.handler.ts +100 -0
- package/src/handlers/presentation/step-4-request-presentation.handler.ts +115 -0
- package/src/handlers/presentation/step-5-present-proof.handler.ts +159 -0
- package/src/handlers/presentation/step-6-ack-message.handler.ts +15 -0
- package/src/index.ts +18 -0
- package/src/services/waci-interpreter.ts +161 -0
- package/src/types/actor.ts +5 -0
- package/src/types/credential-application.ts +38 -0
- package/src/types/credential-manifest.ts +184 -0
- package/src/types/index.ts +4 -0
- package/src/types/problem-report.ts +29 -0
- package/src/types/waci-message.ts +148 -0
- package/src/utils/erros.ts +21 -0
- package/src/utils/index.ts +272 -0
- package/test/handlers/issuance/step-3-propose-credential.handler.spec.ts +43 -0
- package/test/handlers/issuance/step-4-offer-credential.handler.spec.ts +53 -0
- package/test/handlers/issuance/step-5-request-credential.handler.spec.ts +102 -0
- package/test/handlers/presentation/step-5-present-proof.handler.spec.ts +142 -0
- package/test/handlers/shared/step-2-oob-invitation.handler.spec.ts +55 -0
- package/test/stubs/index.ts +842 -0
- package/test/waci-interpreter.spec.ts +113 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
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
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.PresentationProceed = void 0;
|
|
40
|
+
var types_1 = require("../../types");
|
|
41
|
+
var utils_1 = require("../../utils");
|
|
42
|
+
var PresentationProceed = /** @class */ (function () {
|
|
43
|
+
function PresentationProceed() {
|
|
44
|
+
}
|
|
45
|
+
PresentationProceed.presentCredentials = function (messageThread, credentialsToPresent, callbacks) {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
47
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
+
var message, holderDID, verifierDID, presentationDefinition, challenge, credentialPresentation;
|
|
49
|
+
return __generator(this, function (_k) {
|
|
50
|
+
switch (_k.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
message = messageThread[messageThread.length - 1];
|
|
53
|
+
holderDID = message.to[0];
|
|
54
|
+
verifierDID = message.from;
|
|
55
|
+
presentationDefinition = (_d = (_c = (_b = (_a = message.attachments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.json) === null || _d === void 0 ? void 0 : _d.presentation_definition;
|
|
56
|
+
challenge = (_j = (_h = (_g = (_f = (_e = message.attachments) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.json) === null || _h === void 0 ? void 0 : _h.options) === null || _j === void 0 ? void 0 : _j.challenge;
|
|
57
|
+
if (!challenge)
|
|
58
|
+
throw new Error('No challenge defined');
|
|
59
|
+
if (!(presentationDefinition === null || presentationDefinition === void 0 ? void 0 : presentationDefinition.input_descriptors)) {
|
|
60
|
+
throw new Error('Presentation definition without input required');
|
|
61
|
+
}
|
|
62
|
+
return [4 /*yield*/, this.createMessage(presentationDefinition, challenge, credentialsToPresent, holderDID, message, callbacks)];
|
|
63
|
+
case 1:
|
|
64
|
+
credentialPresentation = _k.sent();
|
|
65
|
+
return [2 /*return*/, {
|
|
66
|
+
responseType: 1 /* WACIMessageResponseType.ReplyThread */,
|
|
67
|
+
message: {
|
|
68
|
+
type: types_1.WACIMessageType.PresentProof,
|
|
69
|
+
id: (0, utils_1.createUUID)(),
|
|
70
|
+
thid: message.thid,
|
|
71
|
+
from: holderDID,
|
|
72
|
+
to: [verifierDID],
|
|
73
|
+
body: {},
|
|
74
|
+
attachments: [credentialPresentation],
|
|
75
|
+
},
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
PresentationProceed.createMessage = function (presentationDefinition, challenge, credentialsToPresent, holderDID, message, callbacks) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var definition_id, descriptor_map, messageData, signedData;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
definition_id = presentationDefinition.id;
|
|
88
|
+
descriptor_map = presentationDefinition.input_descriptors.map(function (descriptor, index) { return ({
|
|
89
|
+
id: descriptor.id,
|
|
90
|
+
format: 'ldp_vp',
|
|
91
|
+
path: "$.verifiableCredential[".concat(index, "]"),
|
|
92
|
+
}); });
|
|
93
|
+
messageData = {
|
|
94
|
+
'@context': [
|
|
95
|
+
'https://extrimian.blob.core.windows.net/rskec/securityv1.jsonld',
|
|
96
|
+
'https://extrimian.blob.core.windows.net/rskec/credentialsv1.jsonld',
|
|
97
|
+
'https://extrimian.blob.core.windows.net/rskec/presentation-exchangesubmissionv1.jsonld',
|
|
98
|
+
],
|
|
99
|
+
type: ['VerifiablePresentation', 'PresentationSubmission'],
|
|
100
|
+
holder: holderDID,
|
|
101
|
+
presentation_submission: {
|
|
102
|
+
id: (0, utils_1.createUUID)(),
|
|
103
|
+
definition_id: definition_id,
|
|
104
|
+
descriptor_map: descriptor_map,
|
|
105
|
+
},
|
|
106
|
+
verifiableCredential: credentialsToPresent,
|
|
107
|
+
};
|
|
108
|
+
return [4 /*yield*/, callbacks[types_1.Actor.Holder].signPresentation({
|
|
109
|
+
contentToSign: messageData,
|
|
110
|
+
challenge: challenge,
|
|
111
|
+
message: message
|
|
112
|
+
})];
|
|
113
|
+
case 1:
|
|
114
|
+
signedData = _a.sent();
|
|
115
|
+
return [2 /*return*/, {
|
|
116
|
+
id: (0, utils_1.createUUID)(),
|
|
117
|
+
media_type: 'application/ld+json',
|
|
118
|
+
format: 'dif/presentation-exchange/submission@v1.0',
|
|
119
|
+
data: {
|
|
120
|
+
json: signedData,
|
|
121
|
+
},
|
|
122
|
+
}];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
return PresentationProceed;
|
|
128
|
+
}());
|
|
129
|
+
exports.PresentationProceed = PresentationProceed;
|
|
130
|
+
//# sourceMappingURL=step-4-1-presentation-proceed.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-4-1-presentation-proceed.handler.js","sourceRoot":"","sources":["../../../src/handlers/presentation/step-4-1-presentation-proceed.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAQqB;AACrB,qCAAyC;AAEzC;IAAA;IAwFA,CAAC;IAvFc,sCAAkB,GAA/B,UACE,aAA4B,EAC5B,oBAA2B,EAC3B,SAAc;;;;;;;wBAER,OAAO,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;wBAClD,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;wBAC1B,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;wBAC3B,sBAAsB,GAC1B,MAAA,MAAA,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAG,CAAC,CAAC,0CAAE,IAAI,0CAAE,IAAI,0CAAE,uBAAiD,CAAC;wBACpF,SAAS,GAAG,MAAA,MAAA,MAAA,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAG,CAAC,CAAC,0CAAE,IAAI,0CAAE,IAAI,0CAAE,OAAO,0CAAE,SAAS,CAAC;wBAE3E,IAAI,CAAC,SAAS;4BAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;wBACxD,IAAI,CAAC,CAAA,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,iBAAiB,CAAA,EAAE;4BAC9C,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC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,MAAM,CAAC,CAAC,gBAAgB,CAAC;gCAChE,aAAa,EAAE,WAAW;gCAC1B,SAAS,WAAA;gCACT,OAAO,SAAA;6BACR,CAAC,EAAA;;wBAJI,UAAU,GAAG,SAIjB;wBAEF,sBAAO;gCACL,EAAE,EAAE,IAAA,kBAAU,GAAE;gCAChB,UAAU,EAAE,qBAAqB;gCACjC,MAAM,EAAE,2CAA2C;gCACnD,IAAI,EAAE;oCACJ,IAAI,EAAE,UAAU;iCACjB;6BACwB,EAAC;;;;KAC7B;IACH,0BAAC;AAAD,CAAC,AAxFD,IAwFC;AAxFY,kDAAmB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { WACIMessage, WACIMessageHandler, WACIMessageHandlerResponse } from '../../types';
|
|
2
|
+
export declare class RequestPresentationHandler implements WACIMessageHandler {
|
|
3
|
+
handle(messageThread: WACIMessage[], callbacks: any): Promise<WACIMessageHandlerResponse>;
|
|
4
|
+
private createMessage;
|
|
5
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
18
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
19
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
21
|
+
function step(op) {
|
|
22
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
23
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
24
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
25
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
26
|
+
switch (op[0]) {
|
|
27
|
+
case 0: case 1: t = op; break;
|
|
28
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
29
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
30
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
31
|
+
default:
|
|
32
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
33
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
34
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
35
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
36
|
+
if (t[2]) _.ops.pop();
|
|
37
|
+
_.trys.pop(); continue;
|
|
38
|
+
}
|
|
39
|
+
op = body.call(thisArg, _);
|
|
40
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
41
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.RequestPresentationHandler = void 0;
|
|
46
|
+
var register_handler_decorator_1 = require("../decorators/register-handler.decorator");
|
|
47
|
+
var types_1 = require("../../types");
|
|
48
|
+
var utils_1 = require("../../utils");
|
|
49
|
+
var callbacks_1 = require("../../callbacks");
|
|
50
|
+
var RequestPresentationHandler = /** @class */ (function () {
|
|
51
|
+
function RequestPresentationHandler() {
|
|
52
|
+
}
|
|
53
|
+
RequestPresentationHandler.prototype.handle = function (messageThread, callbacks) {
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
55
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
56
|
+
var message, holderDID, verifierDID, presentationDefinition, challenge, response, credentialPresentation;
|
|
57
|
+
return __generator(this, function (_k) {
|
|
58
|
+
switch (_k.label) {
|
|
59
|
+
case 0:
|
|
60
|
+
message = messageThread[messageThread.length - 1];
|
|
61
|
+
holderDID = message.to[0];
|
|
62
|
+
verifierDID = message.from;
|
|
63
|
+
presentationDefinition = (_d = (_c = (_b = (_a = message.attachments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.json) === null || _d === void 0 ? void 0 : _d.presentation_definition;
|
|
64
|
+
challenge = (_j = (_h = (_g = (_f = (_e = message.attachments) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.json) === null || _h === void 0 ? void 0 : _h.options) === null || _j === void 0 ? void 0 : _j.challenge;
|
|
65
|
+
if (!challenge)
|
|
66
|
+
throw new Error('No challenge defined');
|
|
67
|
+
if (!(presentationDefinition === null || presentationDefinition === void 0 ? void 0 : presentationDefinition.input_descriptors)) {
|
|
68
|
+
throw new Error('Presentation definition without input required');
|
|
69
|
+
}
|
|
70
|
+
return [4 /*yield*/, callbacks[types_1.Actor.Holder].getCredentialPresentation({
|
|
71
|
+
frame: presentationDefinition.frame,
|
|
72
|
+
inputDescriptors: presentationDefinition.input_descriptors,
|
|
73
|
+
message: message
|
|
74
|
+
})];
|
|
75
|
+
case 1:
|
|
76
|
+
response = _k.sent();
|
|
77
|
+
if (response == callbacks_1.CredentialPresentationResponse.AsyncProcess) {
|
|
78
|
+
return [2 /*return*/];
|
|
79
|
+
}
|
|
80
|
+
return [4 /*yield*/, this.createMessage(presentationDefinition, challenge, response.credentialsToPresent, holderDID, message, callbacks)];
|
|
81
|
+
case 2:
|
|
82
|
+
credentialPresentation = _k.sent();
|
|
83
|
+
return [2 /*return*/, {
|
|
84
|
+
responseType: 1 /* WACIMessageResponseType.ReplyThread */,
|
|
85
|
+
message: {
|
|
86
|
+
type: types_1.WACIMessageType.PresentProof,
|
|
87
|
+
id: (0, utils_1.createUUID)(),
|
|
88
|
+
thid: message.thid,
|
|
89
|
+
from: holderDID,
|
|
90
|
+
to: [verifierDID],
|
|
91
|
+
body: {},
|
|
92
|
+
attachments: [credentialPresentation],
|
|
93
|
+
},
|
|
94
|
+
}];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
RequestPresentationHandler.prototype.createMessage = function (presentationDefinition, challenge, credentialsToPresent, holderDID, message, callbacks) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
var definition_id, descriptor_map, messageData, signedData;
|
|
102
|
+
return __generator(this, function (_a) {
|
|
103
|
+
switch (_a.label) {
|
|
104
|
+
case 0:
|
|
105
|
+
definition_id = presentationDefinition.id;
|
|
106
|
+
descriptor_map = presentationDefinition.input_descriptors.map(function (descriptor, index) { return ({
|
|
107
|
+
id: descriptor.id,
|
|
108
|
+
format: 'ldp_vp',
|
|
109
|
+
path: "$.verifiableCredential[".concat(index, "]"),
|
|
110
|
+
}); });
|
|
111
|
+
messageData = {
|
|
112
|
+
'@context': [
|
|
113
|
+
'https://extrimian.blob.core.windows.net/rskec/securityv1.jsonld',
|
|
114
|
+
'https://extrimian.blob.core.windows.net/rskec/credentialsv1.jsonld',
|
|
115
|
+
'https://extrimian.blob.core.windows.net/rskec/presentation-exchangesubmissionv1.jsonld',
|
|
116
|
+
],
|
|
117
|
+
type: ['VerifiablePresentation', 'PresentationSubmission'],
|
|
118
|
+
holder: holderDID,
|
|
119
|
+
presentation_submission: {
|
|
120
|
+
id: (0, utils_1.createUUID)(),
|
|
121
|
+
definition_id: definition_id,
|
|
122
|
+
descriptor_map: descriptor_map,
|
|
123
|
+
},
|
|
124
|
+
verifiableCredential: credentialsToPresent,
|
|
125
|
+
};
|
|
126
|
+
return [4 /*yield*/, callbacks[types_1.Actor.Holder].signPresentation({
|
|
127
|
+
contentToSign: messageData,
|
|
128
|
+
challenge: challenge,
|
|
129
|
+
message: message
|
|
130
|
+
})];
|
|
131
|
+
case 1:
|
|
132
|
+
signedData = _a.sent();
|
|
133
|
+
return [2 /*return*/, {
|
|
134
|
+
id: (0, utils_1.createUUID)(),
|
|
135
|
+
media_type: 'application/ld+json',
|
|
136
|
+
format: 'dif/presentation-exchange/submission@v1.0',
|
|
137
|
+
data: {
|
|
138
|
+
json: signedData,
|
|
139
|
+
},
|
|
140
|
+
}];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
RequestPresentationHandler = __decorate([
|
|
146
|
+
(0, register_handler_decorator_1.RegisterHandler)(types_1.Actor.Holder, types_1.WACIMessageType.RequestPresentation)
|
|
147
|
+
], RequestPresentationHandler);
|
|
148
|
+
return RequestPresentationHandler;
|
|
149
|
+
}());
|
|
150
|
+
exports.RequestPresentationHandler = RequestPresentationHandler;
|
|
151
|
+
//# sourceMappingURL=step-4-request-presentation.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-4-request-presentation.handler.js","sourceRoot":"","sources":["../../../src/handlers/presentation/step-4-request-presentation.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uFAA2E;AAC3E,qCASqB;AACrB,qCAAyC;AACzC,6CAAiE;AAGjE;IAAA;IAmGA,CAAC;IAlGO,2CAAM,GAAZ,UACE,aAA4B,EAC5B,SAAc;;;;;;;wBAER,OAAO,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;wBAClD,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;wBAC1B,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;wBAC3B,sBAAsB,GAC1B,MAAA,MAAA,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAG,CAAC,CAAC,0CAAE,IAAI,0CAAE,IAAI,0CAAE,uBAAiD,CAAC;wBACpF,SAAS,GAAG,MAAA,MAAA,MAAA,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAG,CAAC,CAAC,0CAAE,IAAI,0CAAE,IAAI,0CAAE,OAAO,0CAAE,SAAS,CAAC;wBAE3E,IAAI,CAAC,SAAS;4BAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;wBACxD,IAAI,CAAC,CAAA,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,iBAAiB,CAAA,EAAE;4BAC9C,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;yBACnE;wBACgB,qBAAM,SAAS,CAC9B,aAAK,CAAC,MAAM,CACb,CAAC,yBAAyB,CAAC;gCAC1B,KAAK,EAAE,sBAAsB,CAAC,KAAK;gCACnC,gBAAgB,EAAE,sBAAsB,CAAC,iBAAiB;g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AA,kBAAU,GAAE;gCAChB,aAAa,eAAA;gCACb,cAAc,gBAAA;6BACf;4BACD,oBAAoB,EAAE,oBAAoB;yBAC3C,CAAC;wBAEiB,qBAAM,SAAS,CAAC,aAAK,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC;gCAChE,aAAa,EAAE,WAAW;gCAC1B,SAAS,WAAA;gCACT,OAAO,SAAA;6BACR,CAAC,EAAA;;wBAJI,UAAU,GAAG,SAIjB;wBAEF,sBAAO;gCACL,EAAE,EAAE,IAAA,kBAAU,GAAE;gCAChB,UAAU,EAAE,qBAAqB;gCACjC,MAAM,EAAE,2CAA2C;gCACnD,IAAI,EAAE;oCACJ,IAAI,EAAE,UAAU;iCACjB;6BACwB,EAAC;;;;KAC7B;IAlGU,0BAA0B;QADtC,IAAA,4CAAe,EAAC,aAAK,CAAC,MAAM,EAAE,uBAAe,CAAC,mBAAmB,CAAC;OACtD,0BAA0B,CAmGtC;IAAD,iCAAC;CAAA,AAnGD,IAmGC;AAnGY,gEAA0B"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
18
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
19
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
21
|
+
function step(op) {
|
|
22
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
23
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
24
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
25
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
26
|
+
switch (op[0]) {
|
|
27
|
+
case 0: case 1: t = op; break;
|
|
28
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
29
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
30
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
31
|
+
default:
|
|
32
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
33
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
34
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
35
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
36
|
+
if (t[2]) _.ops.pop();
|
|
37
|
+
_.trys.pop(); continue;
|
|
38
|
+
}
|
|
39
|
+
op = body.call(thisArg, _);
|
|
40
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
41
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
45
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
46
|
+
var m = o[Symbol.asyncIterator], i;
|
|
47
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
48
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
49
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
50
|
+
};
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
+
exports.PresentProofHandler = void 0;
|
|
53
|
+
var lodash_1 = require("lodash");
|
|
54
|
+
var register_handler_decorator_1 = require("../decorators/register-handler.decorator");
|
|
55
|
+
var types_1 = require("../../types");
|
|
56
|
+
var utils_1 = require("../../utils");
|
|
57
|
+
var problem_report_1 = require("../../types/problem-report");
|
|
58
|
+
var PresentProofHandler = /** @class */ (function () {
|
|
59
|
+
function PresentProofHandler() {
|
|
60
|
+
}
|
|
61
|
+
PresentProofHandler.prototype.handle = function (messageThread, callbacks) {
|
|
62
|
+
var _a, e_1, _b, _c;
|
|
63
|
+
var _d, _e, _f;
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
var messageToProcess, holderDID, verifierDID, problemReport, requestPresentationMessage, response, challengeToCheck, presentation, verifyPresentationResult, requests, submissionsToCheck, result, verificationResultCallback, vcs, _g, submissionsToCheck_1, submissionsToCheck_1_1, submissionToCheck, verify, _i, _h, vc, e_1_1;
|
|
66
|
+
return __generator(this, function (_j) {
|
|
67
|
+
switch (_j.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
messageToProcess = messageThread[messageThread.length - 1];
|
|
70
|
+
holderDID = messageToProcess.from;
|
|
71
|
+
verifierDID = messageToProcess.to[0];
|
|
72
|
+
problemReport = new problem_report_1.ProblemReportMessage();
|
|
73
|
+
requestPresentationMessage = messageThread.find(function (message) { return message.type === types_1.WACIMessageType.RequestPresentation; });
|
|
74
|
+
response = {
|
|
75
|
+
responseType: 1 /* WACIMessageResponseType.ReplyThread */,
|
|
76
|
+
message: {
|
|
77
|
+
type: types_1.WACIMessageType.PresentationAck,
|
|
78
|
+
id: (0, utils_1.createUUID)(),
|
|
79
|
+
thid: messageToProcess.thid,
|
|
80
|
+
from: verifierDID,
|
|
81
|
+
to: [holderDID],
|
|
82
|
+
body: { status: undefined },
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
challengeToCheck = (0, utils_1.extractExpectedChallenge)(requestPresentationMessage);
|
|
86
|
+
presentation = (_f = (_e = (_d = messageToProcess === null || messageToProcess === void 0 ? void 0 : messageToProcess.attachments) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.json;
|
|
87
|
+
return [4 /*yield*/, callbacks[types_1.Actor.Verifier].verifyPresentation({ presentation: presentation, challenge: challengeToCheck, message: messageToProcess, holderDid: holderDID })];
|
|
88
|
+
case 1:
|
|
89
|
+
verifyPresentationResult = _j.sent();
|
|
90
|
+
if (!verifyPresentationResult.result) {
|
|
91
|
+
//TO DO error codes from vc suite
|
|
92
|
+
return [2 /*return*/, {
|
|
93
|
+
responseType: 1 /* WACIMessageResponseType.ReplyThread */,
|
|
94
|
+
message: {
|
|
95
|
+
type: types_1.WACIMessageType.ProblemReport,
|
|
96
|
+
id: (0, utils_1.createUUID)(),
|
|
97
|
+
thid: messageToProcess.id,
|
|
98
|
+
from: verifierDID,
|
|
99
|
+
to: [holderDID],
|
|
100
|
+
body: problemReport.presentProofMessage(verifyPresentationResult.error.name, verifyPresentationResult.error.description),
|
|
101
|
+
},
|
|
102
|
+
}];
|
|
103
|
+
}
|
|
104
|
+
requests = requestPresentationMessage.attachments.filter(function (attachment) { return !(0, lodash_1.isNil)(attachment.data.json.presentation_definition); });
|
|
105
|
+
submissionsToCheck = requests
|
|
106
|
+
.filter(function (request) { var _a, _b; return !(0, lodash_1.isNil)((_b = (_a = request === null || request === void 0 ? void 0 : request.data) === null || _a === void 0 ? void 0 : _a.json) === null || _b === void 0 ? void 0 : _b.presentation_definition); })
|
|
107
|
+
.map(function (request) { return ({
|
|
108
|
+
presentationDefinition: request.data.json.presentation_definition,
|
|
109
|
+
submission: messageToProcess.attachments.find(function (attachment) {
|
|
110
|
+
var _a, _b, _c;
|
|
111
|
+
return ((_c = (_b = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.data) === null || _a === void 0 ? void 0 : _a.json) === null || _b === void 0 ? void 0 : _b.presentation_submission) === null || _c === void 0 ? void 0 : _c.definition_id) ===
|
|
112
|
+
request.data.json.presentation_definition.id;
|
|
113
|
+
}),
|
|
114
|
+
}); });
|
|
115
|
+
result = false;
|
|
116
|
+
verificationResultCallback = callbacks[types_1.Actor.Verifier].credentialVerificationResult;
|
|
117
|
+
vcs = [];
|
|
118
|
+
if (!submissionsToCheck.every(function (submissionToCheck) { return !(0, lodash_1.isNil)(submissionToCheck.submission); })) return [3 /*break*/, 17];
|
|
119
|
+
_j.label = 2;
|
|
120
|
+
case 2:
|
|
121
|
+
_j.trys.push([2, 10, 11, 16]);
|
|
122
|
+
_g = true, submissionsToCheck_1 = __asyncValues(submissionsToCheck);
|
|
123
|
+
_j.label = 3;
|
|
124
|
+
case 3: return [4 /*yield*/, submissionsToCheck_1.next()];
|
|
125
|
+
case 4:
|
|
126
|
+
if (!(submissionsToCheck_1_1 = _j.sent(), _a = submissionsToCheck_1_1.done, !_a)) return [3 /*break*/, 9];
|
|
127
|
+
_c = submissionsToCheck_1_1.value;
|
|
128
|
+
_g = false;
|
|
129
|
+
_j.label = 5;
|
|
130
|
+
case 5:
|
|
131
|
+
_j.trys.push([5, , 7, 8]);
|
|
132
|
+
submissionToCheck = _c;
|
|
133
|
+
return [4 /*yield*/, (0, utils_1.verifyPresentation)(submissionToCheck.presentationDefinition, submissionToCheck.submission, callbacks[types_1.Actor.Verifier].verifyCredential)];
|
|
134
|
+
case 6:
|
|
135
|
+
verify = _j.sent();
|
|
136
|
+
result = verify.result;
|
|
137
|
+
for (_i = 0, _h = verify.vcs; _i < _h.length; _i++) {
|
|
138
|
+
vc = _h[_i];
|
|
139
|
+
vcs.push(vc);
|
|
140
|
+
}
|
|
141
|
+
if (!result) {
|
|
142
|
+
if (verificationResultCallback) {
|
|
143
|
+
verificationResultCallback({
|
|
144
|
+
result: verify.result,
|
|
145
|
+
error: verify.errors,
|
|
146
|
+
thid: messageToProcess.thid,
|
|
147
|
+
vcs: verify.vcs,
|
|
148
|
+
message: messageToProcess,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
return [2 /*return*/, {
|
|
152
|
+
responseType: 1 /* WACIMessageResponseType.ReplyThread */,
|
|
153
|
+
message: {
|
|
154
|
+
type: types_1.WACIMessageType.ProblemReport,
|
|
155
|
+
id: (0, utils_1.createUUID)(),
|
|
156
|
+
thid: messageToProcess.id,
|
|
157
|
+
from: verifierDID,
|
|
158
|
+
to: [holderDID],
|
|
159
|
+
body: problemReport.presentProofMessage(verify.error.name, verify.error.description),
|
|
160
|
+
},
|
|
161
|
+
}];
|
|
162
|
+
}
|
|
163
|
+
return [3 /*break*/, 8];
|
|
164
|
+
case 7:
|
|
165
|
+
_g = true;
|
|
166
|
+
return [7 /*endfinally*/];
|
|
167
|
+
case 8: return [3 /*break*/, 3];
|
|
168
|
+
case 9: return [3 /*break*/, 16];
|
|
169
|
+
case 10:
|
|
170
|
+
e_1_1 = _j.sent();
|
|
171
|
+
e_1 = { error: e_1_1 };
|
|
172
|
+
return [3 /*break*/, 16];
|
|
173
|
+
case 11:
|
|
174
|
+
_j.trys.push([11, , 14, 15]);
|
|
175
|
+
if (!(!_g && !_a && (_b = submissionsToCheck_1.return))) return [3 /*break*/, 13];
|
|
176
|
+
return [4 /*yield*/, _b.call(submissionsToCheck_1)];
|
|
177
|
+
case 12:
|
|
178
|
+
_j.sent();
|
|
179
|
+
_j.label = 13;
|
|
180
|
+
case 13: return [3 /*break*/, 15];
|
|
181
|
+
case 14:
|
|
182
|
+
if (e_1) throw e_1.error;
|
|
183
|
+
return [7 /*endfinally*/];
|
|
184
|
+
case 15: return [7 /*endfinally*/];
|
|
185
|
+
case 16:
|
|
186
|
+
if (result) {
|
|
187
|
+
if (verificationResultCallback) {
|
|
188
|
+
verificationResultCallback({
|
|
189
|
+
result: result,
|
|
190
|
+
error: null,
|
|
191
|
+
thid: messageToProcess.thid,
|
|
192
|
+
vcs: vcs,
|
|
193
|
+
message: messageToProcess,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
response.message.body.status = "OK" /* AckStatus.Ok */;
|
|
197
|
+
return [2 /*return*/, response];
|
|
198
|
+
}
|
|
199
|
+
_j.label = 17;
|
|
200
|
+
case 17: return [2 /*return*/];
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
PresentProofHandler = __decorate([
|
|
206
|
+
(0, register_handler_decorator_1.RegisterHandler)(types_1.Actor.Verifier, types_1.WACIMessageType.PresentProof)
|
|
207
|
+
], PresentProofHandler);
|
|
208
|
+
return PresentProofHandler;
|
|
209
|
+
}());
|
|
210
|
+
exports.PresentProofHandler = PresentProofHandler;
|
|
211
|
+
//# sourceMappingURL=step-5-present-proof.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-5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C1B,CAAC,CAAA;6BACH;4BAED,sBAAO;oCACL,YAAY,6CAAqC;oCACjD,OAAO,EAAE;wCACP,IAAI,EAAE,uBAAe,CAAC,aAAa;wCACnC,EAAE,EAAE,IAAA,kBAAU,GAAE;wCAChB,IAAI,EAAE,gBAAgB,CAAC,EAAE;wCACzB,IAAI,EAAE,WAAW;wCACjB,EAAE,EAAE,CAAC,SAAS,CAAC;wCACf,IAAI,EAAE,aAAa,CAAC,mBAAmB,CACrC,MAAM,CAAC,KAAK,CAAC,IAAI,EACjB,MAAM,CAAC,KAAK,CAAC,WAAW,CACzB;qCACF;iCACF,EAAC;yBACH;;;;;;;;;;;;;;;;;;;;;;;;wBAGH,IAAI,MAAM,EAAE;4BACV,IAAI,0BAA0B,EAAE;gCAC9B,0BAA0B,CAAC;oCACzB,MAAM,EAAE,MAAM;oCACd,KAAK,EAAE,IAAI;oCACX,IAAI,EAAE,gBAAgB,CAAC,IAAI;oCAC3B,GAAG,EAAE,GAAG;oCACR,OAAO,EAAE,gBAAgB;iCAC1B,CAAC,CAAA;6BACH;4BAED,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,0BAAe,CAAC;4BAC5C,sBAAO,QAAQ,EAAC;yBACjB;;;;;;KAEJ;IA1IU,mBAAmB;QAD/B,IAAA,4CAAe,EAAC,aAAK,CAAC,QAAQ,EAAE,uBAAe,CAAC,YAAY,CAAC;OACjD,mBAAmB,CA2I/B;IAAD,0BAAC;CAAA,AA3ID,IA2IC;AA3IY,kDAAmB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
18
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
19
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
21
|
+
function step(op) {
|
|
22
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
23
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
24
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
25
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
26
|
+
switch (op[0]) {
|
|
27
|
+
case 0: case 1: t = op; break;
|
|
28
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
29
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
30
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
31
|
+
default:
|
|
32
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
33
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
34
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
35
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
36
|
+
if (t[2]) _.ops.pop();
|
|
37
|
+
_.trys.pop(); continue;
|
|
38
|
+
}
|
|
39
|
+
op = body.call(thisArg, _);
|
|
40
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
41
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.PresentationAckMessageHandler = void 0;
|
|
46
|
+
var register_handler_decorator_1 = require("../decorators/register-handler.decorator");
|
|
47
|
+
var types_1 = require("../../types");
|
|
48
|
+
var PresentationAckMessageHandler = /** @class */ (function () {
|
|
49
|
+
function PresentationAckMessageHandler() {
|
|
50
|
+
}
|
|
51
|
+
PresentationAckMessageHandler.prototype.handle = function (messageThread, callbacks) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
+
var message;
|
|
54
|
+
return __generator(this, function (_a) {
|
|
55
|
+
switch (_a.label) {
|
|
56
|
+
case 0:
|
|
57
|
+
message = messageThread[messageThread.length - 1];
|
|
58
|
+
return [4 /*yield*/, callbacks[types_1.Actor.Holder].handlePresentationAck({ status: message.body, message: message })];
|
|
59
|
+
case 1:
|
|
60
|
+
_a.sent();
|
|
61
|
+
return [2 /*return*/];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
PresentationAckMessageHandler = __decorate([
|
|
67
|
+
(0, register_handler_decorator_1.RegisterHandler)(types_1.Actor.Holder, types_1.WACIMessageType.PresentationAck)
|
|
68
|
+
], PresentationAckMessageHandler);
|
|
69
|
+
return PresentationAckMessageHandler;
|
|
70
|
+
}());
|
|
71
|
+
exports.PresentationAckMessageHandler = PresentationAckMessageHandler;
|
|
72
|
+
//# sourceMappingURL=step-6-ack-message.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-6-ack-message.handler.js","sourceRoot":"","sources":["../../../src/handlers/presentation/step-6-ack-message.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uFAA2E;AAC3E,qCAKqB;AAGrB;IAAA;IAKA,CAAC;IAJO,8CAAM,GAAZ,UAAa,aAA6B,EAAE,SAAc;;;;;;wBAClD,OAAO,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;wBACxD,qBAAM,SAAS,CAAC,aAAK,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,SAAA,EAAE,CAAC,EAAA;;wBAAtF,SAAsF,CAAC;;;;;KACxF;IAJU,6BAA6B;QADzC,IAAA,4CAAe,EAAC,aAAK,CAAC,MAAM,EAAE,uBAAe,CAAC,eAAe,CAAC;OAClD,6BAA6B,CAKzC;IAAD,oCAAC;CAAA,AALD,IAKC;AALY,sEAA6B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './handlers/common/step-2-oob-invitation.handler';
|
|
2
|
+
import './handlers/common/problem-report.handler';
|
|
3
|
+
import './handlers/issuance/step-3-propose-credential.handler';
|
|
4
|
+
import './handlers/issuance/step-4-offer-credential.handler';
|
|
5
|
+
import './handlers/issuance/step-5-request-credential.handler';
|
|
6
|
+
import './handlers/issuance/step-6-issue-credential.handler';
|
|
7
|
+
import './handlers/issuance/step-7-ack-message.handler';
|
|
8
|
+
import './handlers/presentation/step-3-propose-presentation.handler';
|
|
9
|
+
import './handlers/presentation/step-4-request-presentation.handler';
|
|
10
|
+
import './handlers/presentation/step-5-present-proof.handler';
|
|
11
|
+
import './handlers/presentation/step-6-ack-message.handler';
|
|
12
|
+
export * from "./handlers/issuance/step-3-propose-credential.handler";
|
|
13
|
+
export { InputCallbacks, CredentialPresentationResponse } from './callbacks';
|
|
14
|
+
export * from './services/waci-interpreter';
|
|
15
|
+
export * from './types/waci-message';
|
|
16
|
+
export * from './types';
|
|
17
|
+
export { validateVcByInputDescriptor } from "./utils/index";
|