@nmshd/transport 2.0.0-beta.5 → 2.0.0-beta.7
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/buildInformation.js +5 -5
- package/dist/core/CoreCrypto.d.ts +1 -0
- package/dist/core/CoreCrypto.js +14 -12
- package/dist/core/CoreCrypto.js.map +1 -1
- package/dist/core/CoreUtil.js +1 -2
- package/dist/core/CoreUtil.js.map +1 -1
- package/dist/core/Reference.js +2 -2
- package/dist/core/Reference.js.map +1 -1
- package/dist/core/Transport.js +4 -1
- package/dist/core/Transport.js.map +1 -1
- package/dist/core/TransportController.d.ts +1 -1
- package/dist/core/TransportController.js +2 -3
- package/dist/core/TransportController.js.map +1 -1
- package/dist/core/TransportErrors.d.ts +5 -73
- package/dist/core/TransportErrors.js +10 -153
- package/dist/core/TransportErrors.js.map +1 -1
- package/dist/core/TransportLoggerFactory.js +1 -2
- package/dist/core/TransportLoggerFactory.js.map +1 -1
- package/dist/core/types/CoreAddress.d.ts +1 -1
- package/dist/core/types/CoreAddress.js.map +1 -1
- package/dist/core/types/CoreDate.js +3 -4
- package/dist/core/types/CoreDate.js.map +1 -1
- package/dist/core/types/CoreId.d.ts +1 -1
- package/dist/core/types/CoreId.js +1 -2
- package/dist/core/types/CoreId.js.map +1 -1
- package/dist/modules/accounts/AccountController.d.ts +2 -0
- package/dist/modules/accounts/AccountController.js +30 -10
- package/dist/modules/accounts/AccountController.js.map +1 -1
- package/dist/modules/accounts/IdentityController.d.ts +1 -1
- package/dist/modules/accounts/IdentityController.js +24 -4
- package/dist/modules/accounts/IdentityController.js.map +1 -1
- package/dist/modules/accounts/IdentityUtil.d.ts +1 -1
- package/dist/modules/accounts/IdentityUtil.js +3 -4
- package/dist/modules/accounts/IdentityUtil.js.map +1 -1
- package/dist/modules/accounts/data/Identity.d.ts +0 -18
- package/dist/modules/accounts/data/Identity.js +0 -33
- package/dist/modules/accounts/data/Identity.js.map +1 -1
- package/dist/modules/challenges/ChallengeController.js +26 -5
- package/dist/modules/challenges/ChallengeController.js.map +1 -1
- package/dist/modules/devices/DeviceController.d.ts +1 -1
- package/dist/modules/devices/DeviceController.js +42 -14
- package/dist/modules/devices/DeviceController.js.map +1 -1
- package/dist/modules/devices/DeviceSecretController.js +43 -14
- package/dist/modules/devices/DeviceSecretController.js.map +1 -1
- package/dist/modules/files/FileController.js +41 -16
- package/dist/modules/files/FileController.js.map +1 -1
- package/dist/modules/index.d.ts +4 -4
- package/dist/modules/index.js +4 -4
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/messages/MessageController.js +70 -16
- package/dist/modules/messages/MessageController.js.map +1 -1
- package/dist/modules/messages/transmission/{MessagePlain.d.ts → MessageContentWrapper.d.ts} +4 -4
- package/dist/modules/messages/transmission/{MessagePlain.js → MessageContentWrapper.js} +12 -12
- package/dist/modules/messages/transmission/MessageContentWrapper.js.map +1 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +35 -14
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.d.ts +0 -1
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.d.ts +0 -5
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +0 -11
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +1 -15
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +0 -11
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +2 -17
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/{RelationshipTemplateContent.d.ts → RelationshipTemplateContentWrapper.d.ts} +3 -3
- package/dist/modules/relationshipTemplates/transmission/{RelationshipTemplateContent.js → RelationshipTemplateContentWrapper.js} +10 -10
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.js.map +1 -0
- package/dist/modules/relationships/RelationshipSecretController.js +88 -17
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
- package/dist/modules/relationships/RelationshipsController.d.ts +3 -3
- package/dist/modules/relationships/RelationshipsController.js +119 -66
- package/dist/modules/relationships/RelationshipsController.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/{RelationshipCreationChangeRequestContent.d.ts → RelationshipCreationChangeRequestContentWrapper.d.ts} +3 -3
- package/dist/modules/relationships/transmission/requests/{RelationshipCreationChangeRequestContent.js → RelationshipCreationChangeRequestContentWrapper.js} +10 -10
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContentWrapper.js.map +1 -0
- package/dist/modules/relationships/transmission/responses/{RelationshipCreationChangeResponseContent.d.ts → RelationshipCreationChangeResponseContentWrapper.d.ts} +3 -3
- package/dist/modules/relationships/transmission/responses/{RelationshipCreationChangeResponseContent.js → RelationshipCreationChangeResponseContentWrapper.js} +9 -9
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContentWrapper.js.map +1 -0
- package/dist/modules/secrets/SecretController.js +18 -5
- package/dist/modules/secrets/SecretController.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts +1 -0
- package/dist/modules/sync/DatawalletModificationsProcessor.js +20 -3
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
- package/dist/modules/sync/SyncController.d.ts +1 -0
- package/dist/modules/sync/SyncController.js +53 -24
- package/dist/modules/sync/SyncController.js.map +1 -1
- package/dist/modules/tokens/TokenController.js +31 -4
- package/dist/modules/tokens/TokenController.js.map +1 -1
- package/dist/util/PasswordGenerator.js +1 -2
- package/dist/util/PasswordGenerator.js.map +1 -1
- package/dist/util/Random.js +7 -8
- package/dist/util/Random.js.map +1 -1
- package/lib-web/nmshd.transport.js +874 -633
- package/lib-web/nmshd.transport.js.map +1 -1
- package/lib-web/nmshd.transport.min.js +1 -1
- package/lib-web/nmshd.transport.min.js.map +1 -1
- package/package.json +6 -6
- package/dist/modules/messages/transmission/MessagePlain.js.map +0 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js.map +0 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js.map +0 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js.map +0 -1
|
@@ -1,6 +1,16 @@
|
|
|
1
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.RelationshipTemplateController = void 0;
|
|
13
|
+
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
4
14
|
const crypto_1 = require("@nmshd/crypto");
|
|
5
15
|
const core_1 = require("../../core");
|
|
6
16
|
const DbCollectionName_1 = require("../../core/DbCollectionName");
|
|
@@ -10,7 +20,7 @@ const RelationshipTemplateClient_1 = require("./backbone/RelationshipTemplateCli
|
|
|
10
20
|
const CachedRelationshipTemplate_1 = require("./local/CachedRelationshipTemplate");
|
|
11
21
|
const RelationshipTemplate_1 = require("./local/RelationshipTemplate");
|
|
12
22
|
const SendRelationshipTemplateParameters_1 = require("./local/SendRelationshipTemplateParameters");
|
|
13
|
-
const
|
|
23
|
+
const RelationshipTemplateContentWrapper_1 = require("./transmission/RelationshipTemplateContentWrapper");
|
|
14
24
|
const RelationshipTemplateReference_1 = require("./transmission/RelationshipTemplateReference");
|
|
15
25
|
const RelationshipTemplateSigned_1 = require("./transmission/RelationshipTemplateSigned");
|
|
16
26
|
class RelationshipTemplateController extends TransportController_1.TransportController {
|
|
@@ -26,11 +36,8 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
26
36
|
}
|
|
27
37
|
async sendRelationshipTemplate(parameters) {
|
|
28
38
|
parameters = SendRelationshipTemplateParameters_1.SendRelationshipTemplateParameters.from(parameters);
|
|
29
|
-
if (parameters.maxNumberOfRelationships) {
|
|
30
|
-
this.log.warn("`maxNumberOfRelationships` is deprecated and will be removed in the future. Please use `maxNumberOfAllocations` instead.");
|
|
31
|
-
}
|
|
32
39
|
const templateKey = await this.secrets.createTemplateKey();
|
|
33
|
-
const templateContent =
|
|
40
|
+
const templateContent = RelationshipTemplateContentWrapper_1.RelationshipTemplateContentWrapper.from({
|
|
34
41
|
content: parameters.content,
|
|
35
42
|
identity: this.parent.identity.identity,
|
|
36
43
|
templateKey: templateKey
|
|
@@ -48,7 +55,6 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
48
55
|
const backboneResponse = (await this.client.createRelationshipTemplate({
|
|
49
56
|
expiresAt: parameters.expiresAt.toString(),
|
|
50
57
|
maxNumberOfAllocations: parameters.maxNumberOfAllocations,
|
|
51
|
-
maxNumberOfRelationships: parameters.maxNumberOfRelationships,
|
|
52
58
|
content: cipher.toBase64()
|
|
53
59
|
})).value;
|
|
54
60
|
const templateCache = CachedRelationshipTemplate_1.CachedRelationshipTemplate.from({
|
|
@@ -59,7 +65,6 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
59
65
|
expiresAt: parameters.expiresAt,
|
|
60
66
|
identity: this.parent.identity.identity,
|
|
61
67
|
maxNumberOfAllocations: parameters.maxNumberOfAllocations,
|
|
62
|
-
maxNumberOfRelationships: parameters.maxNumberOfRelationships,
|
|
63
68
|
templateKey: templateKey
|
|
64
69
|
});
|
|
65
70
|
const template = RelationshipTemplate_1.RelationshipTemplate.from({
|
|
@@ -84,7 +89,6 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
84
89
|
if (ids.length < 1) {
|
|
85
90
|
return [];
|
|
86
91
|
}
|
|
87
|
-
// TODO: JSSNMSHDD-2820 (check for items that couldn't be fetched e.g. because it is expired)
|
|
88
92
|
const resultItems = (await this.client.getRelationshipTemplates({ ids })).value;
|
|
89
93
|
const promises = [];
|
|
90
94
|
for await (const resultItem of resultItems) {
|
|
@@ -106,7 +110,7 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
106
110
|
async updateCacheOfExistingTemplateInDb(id, response) {
|
|
107
111
|
const templateDoc = await this.templates.read(id);
|
|
108
112
|
if (!templateDoc) {
|
|
109
|
-
throw core_1.TransportErrors.general.recordNotFound(RelationshipTemplate_1.RelationshipTemplate, id)
|
|
113
|
+
throw core_1.TransportErrors.general.recordNotFound(RelationshipTemplate_1.RelationshipTemplate, id);
|
|
110
114
|
}
|
|
111
115
|
const template = RelationshipTemplate_1.RelationshipTemplate.from(templateDoc);
|
|
112
116
|
await this.updateCacheOfTemplate(template, response);
|
|
@@ -123,14 +127,14 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
123
127
|
template.isOwn = this.parent.identity.isMe(cachedTemplate.createdBy);
|
|
124
128
|
}
|
|
125
129
|
async decryptRelationshipTemplate(response, secretKey) {
|
|
126
|
-
var _a
|
|
130
|
+
var _a;
|
|
127
131
|
const cipher = crypto_1.CryptoCipher.fromBase64(response.content);
|
|
128
132
|
const signedTemplateBuffer = await this.secrets.decryptTemplate(cipher, secretKey);
|
|
129
133
|
const signedTemplate = RelationshipTemplateSigned_1.RelationshipTemplateSigned.deserialize(signedTemplateBuffer.toUtf8());
|
|
130
|
-
const templateContent =
|
|
134
|
+
const templateContent = RelationshipTemplateContentWrapper_1.RelationshipTemplateContentWrapper.deserialize(signedTemplate.serializedTemplate);
|
|
131
135
|
const templateSignatureValid = await this.secrets.verifyTemplate(crypto_1.CoreBuffer.fromUtf8(signedTemplate.serializedTemplate), signedTemplate.deviceSignature, templateContent.identity.publicKey);
|
|
132
136
|
if (!templateSignatureValid) {
|
|
133
|
-
throw core_1.TransportErrors.general.signatureNotValid("template")
|
|
137
|
+
throw core_1.TransportErrors.general.signatureNotValid("template");
|
|
134
138
|
}
|
|
135
139
|
const cachedTemplate = CachedRelationshipTemplate_1.CachedRelationshipTemplate.from({
|
|
136
140
|
content: templateContent.content,
|
|
@@ -140,7 +144,6 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
140
144
|
expiresAt: response.expiresAt ? core_1.CoreDate.from(response.expiresAt) : undefined,
|
|
141
145
|
identity: templateContent.identity,
|
|
142
146
|
maxNumberOfAllocations: (_a = response.maxNumberOfAllocations) !== null && _a !== void 0 ? _a : undefined,
|
|
143
|
-
maxNumberOfRelationships: (_b = response.maxNumberOfRelationships) !== null && _b !== void 0 ? _b : undefined,
|
|
144
147
|
templateKey: templateContent.templateKey
|
|
145
148
|
});
|
|
146
149
|
return cachedTemplate;
|
|
@@ -156,7 +159,7 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
156
159
|
const id = idOrTemplate instanceof core_1.CoreId ? idOrTemplate.toString() : idOrTemplate.id.toString();
|
|
157
160
|
const templateDoc = await this.templates.read(id);
|
|
158
161
|
if (!templateDoc) {
|
|
159
|
-
throw core_1.TransportErrors.general.recordNotFound(RelationshipTemplate_1.RelationshipTemplate, id.toString())
|
|
162
|
+
throw core_1.TransportErrors.general.recordNotFound(RelationshipTemplate_1.RelationshipTemplate, id.toString());
|
|
160
163
|
}
|
|
161
164
|
const template = RelationshipTemplate_1.RelationshipTemplate.from(templateDoc);
|
|
162
165
|
template.setMetadata(metadata);
|
|
@@ -188,5 +191,23 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
|
|
|
188
191
|
return relationshipTemplate;
|
|
189
192
|
}
|
|
190
193
|
}
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, ts_utils_1.log)(),
|
|
196
|
+
__metadata("design:type", Function),
|
|
197
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
198
|
+
__metadata("design:returntype", Promise)
|
|
199
|
+
], RelationshipTemplateController.prototype, "updateCacheOfExistingTemplateInDb", null);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, ts_utils_1.log)(),
|
|
202
|
+
__metadata("design:type", Function),
|
|
203
|
+
__metadata("design:paramtypes", [Object, crypto_1.CryptoSecretKey]),
|
|
204
|
+
__metadata("design:returntype", Promise)
|
|
205
|
+
], RelationshipTemplateController.prototype, "decryptRelationshipTemplate", null);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, ts_utils_1.log)(),
|
|
208
|
+
__metadata("design:type", Function),
|
|
209
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
210
|
+
__metadata("design:returntype", Promise)
|
|
211
|
+
], RelationshipTemplateController.prototype, "setRelationshipTemplateMetadata", null);
|
|
191
212
|
exports.RelationshipTemplateController = RelationshipTemplateController;
|
|
192
213
|
//# sourceMappingURL=RelationshipTemplateController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipTemplateController.js","sourceRoot":"","sources":["../../../src/modules/relationshipTemplates/RelationshipTemplateController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RelationshipTemplateController.js","sourceRoot":"","sources":["../../../src/modules/relationshipTemplates/RelationshipTemplateController.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gDAAuC;AACvC,0CAA0F;AAC1F,qCAAuF;AACvF,kEAA8D;AAC9D,wEAAoF;AACpF,yCAAkE;AAKlE,sFAAkF;AAClF,mFAA+E;AAC/E,uEAAmE;AACnE,mGAGmD;AACnD,0GAAsG;AACtG,gGAA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D,EAAE,EAAE,EAAE;YACN,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,KAAK;SACf,CAAC,CAAA;QACF,MAAM,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAA;QAEtD,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAA;QAEjD,IAAI,CAAC,QAAQ,CAAC,OAAO,CACjB,IAAI,4CAAmC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,oBAAoB,CAAC,CACzG,CAAA;QAED,OAAO,oBAAoB,CAAA;IAC/B,CAAC;CACJ;AAhIiB;IADb,IAAA,cAAG,GAAE;;;;uFAYL;AAkBa;IADb,IAAA,cAAG,GAAE;;6CAGS,wBAAe;;iFA8B7B;AAWY;IADZ,IAAA,cAAG,GAAE;;;;qFAgBL;AAlNL,wEA2PC"}
|
|
@@ -2,11 +2,6 @@ export interface BackbonePostRelationshipTemplatesRequest {
|
|
|
2
2
|
expiresAt?: string;
|
|
3
3
|
maxNumberOfAllocations?: number;
|
|
4
4
|
content: string;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated use `maxNumberOfAllocations` instead
|
|
7
|
-
* @see maxNumberOfAllocations
|
|
8
|
-
*/
|
|
9
|
-
maxNumberOfRelationships?: number;
|
|
10
5
|
}
|
|
11
6
|
export interface BackbonePostRelationshipTemplatesResponse {
|
|
12
7
|
id: string;
|
|
@@ -13,11 +13,6 @@ export interface ICachedRelationshipTemplate extends ICoreSerializable {
|
|
|
13
13
|
createdAt: ICoreDate;
|
|
14
14
|
expiresAt?: ICoreDate;
|
|
15
15
|
maxNumberOfAllocations?: number;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated use `maxNumberOfAllocations` instead
|
|
18
|
-
* @see maxNumberOfAllocations
|
|
19
|
-
*/
|
|
20
|
-
maxNumberOfRelationships?: number;
|
|
21
16
|
}
|
|
22
17
|
export declare class CachedRelationshipTemplate extends CoreSerializable implements ICachedRelationshipTemplate {
|
|
23
18
|
identity: Identity;
|
|
@@ -28,12 +23,6 @@ export declare class CachedRelationshipTemplate extends CoreSerializable impleme
|
|
|
28
23
|
createdAt: CoreDate;
|
|
29
24
|
expiresAt?: CoreDate;
|
|
30
25
|
maxNumberOfAllocations?: number;
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated use `maxNumberOfAllocations` instead
|
|
33
|
-
* @see maxNumberOfAllocations
|
|
34
|
-
*/
|
|
35
|
-
maxNumberOfRelationships?: number;
|
|
36
26
|
static from(value: ICachedRelationshipTemplate): CachedRelationshipTemplate;
|
|
37
27
|
}
|
|
38
|
-
export declare function validateMaxNumberOfRelationships(value?: number): string | undefined;
|
|
39
28
|
export declare function validateMaxNumberOfAllocations(value?: number): string | undefined;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.validateMaxNumberOfAllocations = exports.
|
|
12
|
+
exports.validateMaxNumberOfAllocations = exports.CachedRelationshipTemplate = void 0;
|
|
13
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
14
|
const core_1 = require("../../../core");
|
|
15
15
|
const CoreId_1 = require("../../../core/types/CoreId");
|
|
@@ -60,24 +60,10 @@ __decorate([
|
|
|
60
60
|
(0, ts_serval_1.serialize)(),
|
|
61
61
|
__metadata("design:type", Number)
|
|
62
62
|
], CachedRelationshipTemplate.prototype, "maxNumberOfAllocations", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, ts_serval_1.validate)({ nullable: true, customValidator: validateMaxNumberOfRelationships }),
|
|
65
|
-
(0, ts_serval_1.serialize)(),
|
|
66
|
-
__metadata("design:type", Number)
|
|
67
|
-
], CachedRelationshipTemplate.prototype, "maxNumberOfRelationships", void 0);
|
|
68
63
|
CachedRelationshipTemplate = __decorate([
|
|
69
64
|
(0, ts_serval_1.type)("CachedRelationshipTemplate")
|
|
70
65
|
], CachedRelationshipTemplate);
|
|
71
66
|
exports.CachedRelationshipTemplate = CachedRelationshipTemplate;
|
|
72
|
-
function validateMaxNumberOfRelationships(value) {
|
|
73
|
-
if (value === undefined)
|
|
74
|
-
return;
|
|
75
|
-
if (value <= 0) {
|
|
76
|
-
return "maxNumberOfRelationships must be greater than 0";
|
|
77
|
-
}
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
exports.validateMaxNumberOfRelationships = validateMaxNumberOfRelationships;
|
|
81
67
|
function validateMaxNumberOfAllocations(value) {
|
|
82
68
|
if (value === undefined)
|
|
83
69
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CachedRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/local/CachedRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAE3F,wCAAmH;AACnH,uDAA4D;AAC5D,2DAAkE;AAClE,iGAA6F;
|
|
1
|
+
{"version":3,"file":"CachedRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/local/CachedRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAE3F,wCAAmH;AACnH,uDAA4D;AAC5D,2DAAkE;AAClE,iGAA6F;AActF,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,uBAAgB;IAiCrD,MAAM,CAAC,IAAI,CAAC,KAAkC;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAnCG;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACK,mBAAQ;4DAAA;AAEzB;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,kBAAW;6DAAA;AAE7B;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACY,eAAM;mEAAA;AAE9B;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACQ,6DAA6B;+DAAA;AAEjD;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,wBAAY;2DAAA;AAE5B;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,eAAQ;6DAAA;AAE1B;IAAC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACO,eAAQ;6DAAA;AAE3B;IAAC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,8BAA8B,EAAE,CAAC;IAC7E,IAAA,qBAAS,GAAE;;0EAC0B;AA/B7B,0BAA0B;IADtC,IAAA,gBAAI,EAAC,4BAA4B,CAAC;GACtB,0BAA0B,CAoCtC;AApCY,gEAA0B;AAsCvC,SAAgB,8BAA8B,CAAC,KAAc;IACzD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAM;IAE/B,IAAI,KAAK,IAAI,CAAC,EAAE;QACZ,OAAO,+CAA+C,CAAA;KACzD;IAED,OAAM;AACV,CAAC;AARD,wEAQC"}
|
|
@@ -4,21 +4,10 @@ export interface ISendRelationshipTemplateParameters extends ICoreSerializable {
|
|
|
4
4
|
content: ISerializable;
|
|
5
5
|
expiresAt: CoreDate;
|
|
6
6
|
maxNumberOfAllocations?: number;
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated use `maxNumberOfAllocations` instead
|
|
9
|
-
* @see maxNumberOfAllocations
|
|
10
|
-
*/
|
|
11
|
-
maxNumberOfRelationships?: number;
|
|
12
7
|
}
|
|
13
8
|
export declare class SendRelationshipTemplateParameters extends CoreSerializable implements ISendRelationshipTemplateParameters {
|
|
14
9
|
content: Serializable;
|
|
15
10
|
expiresAt: CoreDate;
|
|
16
11
|
maxNumberOfAllocations?: number;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated use `maxNumberOfAllocations` instead
|
|
19
|
-
* @see maxNumberOfAllocations
|
|
20
|
-
*/
|
|
21
|
-
maxNumberOfRelationships?: number;
|
|
22
|
-
protected static postFrom<T extends Serializable>(value: T): T;
|
|
23
12
|
static from(value: ISendRelationshipTemplateParameters): SendRelationshipTemplateParameters;
|
|
24
13
|
}
|
|
@@ -8,22 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var SendRelationshipTemplateParameters_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.SendRelationshipTemplateParameters = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
-
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
16
14
|
const core_1 = require("../../../core");
|
|
17
15
|
const CachedRelationshipTemplate_1 = require("./CachedRelationshipTemplate");
|
|
18
|
-
let SendRelationshipTemplateParameters =
|
|
19
|
-
static postFrom(value) {
|
|
20
|
-
if (!(value instanceof SendRelationshipTemplateParameters_1))
|
|
21
|
-
throw new Error("this should never happen");
|
|
22
|
-
if (value.maxNumberOfAllocations && value.maxNumberOfRelationships) {
|
|
23
|
-
throw new ts_serval_1.ValidationError(SendRelationshipTemplateParameters_1.name, (0, ts_simple_nameof_1.nameof)((x) => x.maxNumberOfAllocations), `You cannot specify both ${(0, ts_simple_nameof_1.nameof)((x) => x.maxNumberOfAllocations)} and ${(0, ts_simple_nameof_1.nameof)((x) => x.maxNumberOfRelationships)}.`);
|
|
24
|
-
}
|
|
25
|
-
return value;
|
|
26
|
-
}
|
|
16
|
+
let SendRelationshipTemplateParameters = class SendRelationshipTemplateParameters extends core_1.CoreSerializable {
|
|
27
17
|
static from(value) {
|
|
28
18
|
return this.fromAny(value);
|
|
29
19
|
}
|
|
@@ -43,12 +33,7 @@ __decorate([
|
|
|
43
33
|
(0, ts_serval_1.serialize)(),
|
|
44
34
|
__metadata("design:type", Number)
|
|
45
35
|
], SendRelationshipTemplateParameters.prototype, "maxNumberOfAllocations", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, ts_serval_1.validate)({ nullable: true, customValidator: CachedRelationshipTemplate_1.validateMaxNumberOfRelationships }),
|
|
48
|
-
(0, ts_serval_1.serialize)(),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], SendRelationshipTemplateParameters.prototype, "maxNumberOfRelationships", void 0);
|
|
51
|
-
SendRelationshipTemplateParameters = SendRelationshipTemplateParameters_1 = __decorate([
|
|
36
|
+
SendRelationshipTemplateParameters = __decorate([
|
|
52
37
|
(0, ts_serval_1.type)("SendRelationshipTemplateParameters")
|
|
53
38
|
], SendRelationshipTemplateParameters);
|
|
54
39
|
exports.SendRelationshipTemplateParameters = SendRelationshipTemplateParameters;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendRelationshipTemplateParameters.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SendRelationshipTemplateParameters.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,wCAA6E;AAC7E,6EAA6E;AAStE,IAAM,kCAAkC,GAAxC,MAAM,kCACT,SAAQ,uBAAgB;IAejB,MAAM,CAAC,IAAI,CAAC,KAA0C;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAfG;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,wBAAY;mEAAA;AAE5B;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,eAAQ;qEAAA;AAE1B;IAAC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,2DAA8B,EAAE,CAAC;IAC7E,IAAA,qBAAS,GAAE;;kFAC0B;AAd7B,kCAAkC;IAD9C,IAAA,gBAAI,EAAC,oCAAoC,CAAC;GAC9B,kCAAkC,CAmB9C;AAnBY,gFAAkC"}
|
|
@@ -2,14 +2,14 @@ import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
|
2
2
|
import { CoreSerializable, ICoreSerializable } from "../../../core";
|
|
3
3
|
import { Identity, IIdentity } from "../../accounts/data/Identity";
|
|
4
4
|
import { IRelationshipTemplatePublicKey, RelationshipTemplatePublicKey } from "./RelationshipTemplatePublicKey";
|
|
5
|
-
export interface
|
|
5
|
+
export interface IRelationshipTemplateContentWrapper extends ICoreSerializable {
|
|
6
6
|
identity: IIdentity;
|
|
7
7
|
templateKey: IRelationshipTemplatePublicKey;
|
|
8
8
|
content: ISerializable;
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class RelationshipTemplateContentWrapper extends CoreSerializable implements IRelationshipTemplateContentWrapper {
|
|
11
11
|
identity: Identity;
|
|
12
12
|
templateKey: RelationshipTemplatePublicKey;
|
|
13
13
|
content: Serializable;
|
|
14
|
-
static from(value:
|
|
14
|
+
static from(value: IRelationshipTemplateContentWrapper): RelationshipTemplateContentWrapper;
|
|
15
15
|
}
|
|
@@ -9,12 +9,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.RelationshipTemplateContentWrapper = void 0;
|
|
13
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
14
|
const core_1 = require("../../../core");
|
|
15
15
|
const Identity_1 = require("../../accounts/data/Identity");
|
|
16
16
|
const RelationshipTemplatePublicKey_1 = require("./RelationshipTemplatePublicKey");
|
|
17
|
-
let
|
|
17
|
+
let RelationshipTemplateContentWrapper = class RelationshipTemplateContentWrapper extends core_1.CoreSerializable {
|
|
18
18
|
static from(value) {
|
|
19
19
|
return this.fromAny(value);
|
|
20
20
|
}
|
|
@@ -23,19 +23,19 @@ __decorate([
|
|
|
23
23
|
(0, ts_serval_1.validate)(),
|
|
24
24
|
(0, ts_serval_1.serialize)(),
|
|
25
25
|
__metadata("design:type", Identity_1.Identity)
|
|
26
|
-
],
|
|
26
|
+
], RelationshipTemplateContentWrapper.prototype, "identity", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, ts_serval_1.validate)(),
|
|
29
29
|
(0, ts_serval_1.serialize)(),
|
|
30
30
|
__metadata("design:type", RelationshipTemplatePublicKey_1.RelationshipTemplatePublicKey)
|
|
31
|
-
],
|
|
31
|
+
], RelationshipTemplateContentWrapper.prototype, "templateKey", void 0);
|
|
32
32
|
__decorate([
|
|
33
33
|
(0, ts_serval_1.validate)(),
|
|
34
34
|
(0, ts_serval_1.serialize)(),
|
|
35
35
|
__metadata("design:type", ts_serval_1.Serializable)
|
|
36
|
-
],
|
|
37
|
-
|
|
38
|
-
(0, ts_serval_1.type)("
|
|
39
|
-
],
|
|
40
|
-
exports.
|
|
41
|
-
//# sourceMappingURL=
|
|
36
|
+
], RelationshipTemplateContentWrapper.prototype, "content", void 0);
|
|
37
|
+
RelationshipTemplateContentWrapper = __decorate([
|
|
38
|
+
(0, ts_serval_1.type)("RelationshipTemplateContentWrapper")
|
|
39
|
+
], RelationshipTemplateContentWrapper);
|
|
40
|
+
exports.RelationshipTemplateContentWrapper = RelationshipTemplateContentWrapper;
|
|
41
|
+
//# sourceMappingURL=RelationshipTemplateContentWrapper.js.map
|
package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationshipTemplateContentWrapper.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,wCAAmE;AACnE,2DAAkE;AAClE,mFAA+G;AASxG,IAAM,kCAAkC,GAAxC,MAAM,kCACT,SAAQ,uBAAgB;IAejB,MAAM,CAAC,IAAI,CAAC,KAA0C;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAfG;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACK,mBAAQ;oEAAA;AAEzB;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACQ,6DAA6B;uEAAA;AAEjD;IAAC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,wBAAY;mEAAA;AAdnB,kCAAkC;IAD9C,IAAA,gBAAI,EAAC,oCAAoC,CAAC;GAC9B,kCAAkC,CAmB9C;AAnBY,gFAAkC"}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.RelationshipSecretController = void 0;
|
|
13
|
+
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
4
14
|
const crypto_1 = require("@nmshd/crypto");
|
|
5
15
|
const core_1 = require("../../core");
|
|
6
16
|
const CoreUtil_1 = require("../../core/CoreUtil");
|
|
7
17
|
const TransportErrors_1 = require("../../core/TransportErrors");
|
|
8
18
|
const TransportIds_1 = require("../../core/TransportIds");
|
|
19
|
+
const CachedRelationshipTemplate_1 = require("../relationshipTemplates/local/CachedRelationshipTemplate");
|
|
9
20
|
const RelationshipTemplatePublicKey_1 = require("../relationshipTemplates/transmission/RelationshipTemplatePublicKey");
|
|
10
21
|
const SecretController_1 = require("../secrets/SecretController");
|
|
11
22
|
class RelationshipSecretController extends SecretController_1.SecretController {
|
|
@@ -21,13 +32,11 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
21
32
|
}
|
|
22
33
|
const secretContainer = await this.loadActiveSecretByName(secretIdAsString);
|
|
23
34
|
if (!secretContainer) {
|
|
24
|
-
throw TransportErrors_1.TransportErrors.general
|
|
25
|
-
.recordNotFound("CryptoRelationshipRequestSecrets | CryptoRelationshipSecrets", secretIdAsString)
|
|
26
|
-
.logWith(this._log);
|
|
35
|
+
throw TransportErrors_1.TransportErrors.general.recordNotFound("CryptoRelationshipRequestSecrets | CryptoRelationshipSecrets", secretIdAsString);
|
|
27
36
|
}
|
|
28
37
|
if (!(secretContainer.secret instanceof crypto_1.CryptoRelationshipRequestSecrets) &&
|
|
29
38
|
!(secretContainer.secret instanceof crypto_1.CryptoRelationshipSecrets)) {
|
|
30
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secretIdAsString)
|
|
39
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secretIdAsString);
|
|
31
40
|
}
|
|
32
41
|
const secret = secretContainer.secret;
|
|
33
42
|
this.cache.set(relationshipSecretId, secret);
|
|
@@ -43,10 +52,10 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
43
52
|
const templateKeyId = template.templateKey.id.toString();
|
|
44
53
|
const exchangeKeypairContainer = await this.loadActiveSecretByName(templateKeyId);
|
|
45
54
|
if (!exchangeKeypairContainer) {
|
|
46
|
-
throw TransportErrors_1.TransportErrors.general.recordNotFound(crypto_1.CryptoExchangeKeypair, templateKeyId)
|
|
55
|
+
throw TransportErrors_1.TransportErrors.general.recordNotFound(crypto_1.CryptoExchangeKeypair, templateKeyId);
|
|
47
56
|
}
|
|
48
57
|
if (!(exchangeKeypairContainer.secret instanceof crypto_1.CryptoExchangeKeypair)) {
|
|
49
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(templateKeyId)
|
|
58
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(templateKeyId);
|
|
50
59
|
}
|
|
51
60
|
const exchangeKeypair = exchangeKeypairContainer.secret;
|
|
52
61
|
const secrets = await crypto_1.CryptoRelationshipSecrets.fromRelationshipRequest(publicRequestCrypto, exchangeKeypair);
|
|
@@ -56,12 +65,10 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
56
65
|
async getPublicResponse(relationshipSecretId) {
|
|
57
66
|
const secret = await this.loadActiveSecretByName(relationshipSecretId.toString());
|
|
58
67
|
if (!secret) {
|
|
59
|
-
throw TransportErrors_1.TransportErrors.general
|
|
60
|
-
.recordNotFound(crypto_1.CryptoRelationshipSecrets, relationshipSecretId.toString())
|
|
61
|
-
.logWith(this._log);
|
|
68
|
+
throw TransportErrors_1.TransportErrors.general.recordNotFound(crypto_1.CryptoRelationshipSecrets, relationshipSecretId.toString());
|
|
62
69
|
}
|
|
63
70
|
if (!(secret.secret instanceof crypto_1.CryptoRelationshipSecrets)) {
|
|
64
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secret.id.toString())
|
|
71
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secret.id.toString());
|
|
65
72
|
}
|
|
66
73
|
const publicResponse = secret.secret.toPublicResponse();
|
|
67
74
|
return publicResponse;
|
|
@@ -69,7 +76,7 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
69
76
|
async convertSecrets(relationshipSecretId, response) {
|
|
70
77
|
const request = await this.getSecret(relationshipSecretId);
|
|
71
78
|
if (request instanceof crypto_1.CryptoRelationshipSecrets) {
|
|
72
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType()
|
|
79
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType();
|
|
73
80
|
}
|
|
74
81
|
const secrets = await crypto_1.CryptoRelationshipSecrets.fromRelationshipResponse(response, request);
|
|
75
82
|
const container = await this.succeedSecretWithName(secrets, relationshipSecretId.toString());
|
|
@@ -94,7 +101,7 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
94
101
|
const buffer = CoreUtil_1.CoreUtil.toBuffer(content);
|
|
95
102
|
const secrets = await this.getSecret(relationshipSecretId);
|
|
96
103
|
if (!(secrets instanceof crypto_1.CryptoRelationshipRequestSecrets)) {
|
|
97
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id)
|
|
104
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id);
|
|
98
105
|
}
|
|
99
106
|
return await secrets.encryptRequest(buffer);
|
|
100
107
|
}
|
|
@@ -102,14 +109,14 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
102
109
|
const buffer = CoreUtil_1.CoreUtil.toBuffer(content);
|
|
103
110
|
const secrets = await this.getSecret(relationshipSecretId);
|
|
104
111
|
if (!(secrets instanceof crypto_1.CryptoRelationshipSecrets)) {
|
|
105
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id)
|
|
112
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id);
|
|
106
113
|
}
|
|
107
114
|
return await secrets.encrypt(buffer);
|
|
108
115
|
}
|
|
109
116
|
async decryptRequest(relationshipSecretId, cipher) {
|
|
110
117
|
const secrets = await this.getSecret(relationshipSecretId);
|
|
111
118
|
if (!(secrets instanceof crypto_1.CryptoRelationshipRequestSecrets) && !(secrets instanceof crypto_1.CryptoRelationshipSecrets)) {
|
|
112
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(relationshipSecretId.toString())
|
|
119
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(relationshipSecretId.toString());
|
|
113
120
|
}
|
|
114
121
|
return await secrets.decryptRequest(cipher);
|
|
115
122
|
}
|
|
@@ -126,7 +133,7 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
126
133
|
async decryptPeer(relationshipSecretId, cipher, omitCounterCheck = false) {
|
|
127
134
|
const secrets = await this.getSecret(relationshipSecretId);
|
|
128
135
|
if (!(secrets instanceof crypto_1.CryptoRelationshipSecrets)) {
|
|
129
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id)
|
|
136
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id);
|
|
130
137
|
}
|
|
131
138
|
return await secrets.decryptPeer(cipher, omitCounterCheck);
|
|
132
139
|
}
|
|
@@ -137,7 +144,7 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
137
144
|
async decryptOwn(relationshipSecretId, cipher) {
|
|
138
145
|
const secrets = await this.getSecret(relationshipSecretId);
|
|
139
146
|
if (!(secrets instanceof crypto_1.CryptoRelationshipSecrets)) {
|
|
140
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id)
|
|
147
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id);
|
|
141
148
|
}
|
|
142
149
|
return await secrets.decryptOwn(cipher);
|
|
143
150
|
}
|
|
@@ -155,11 +162,75 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
155
162
|
const bufferToVerify = CoreUtil_1.CoreUtil.toBuffer(content);
|
|
156
163
|
const secrets = await this.getSecret(relationshipSecretId);
|
|
157
164
|
if (secrets instanceof crypto_1.CryptoRelationshipRequestSecrets) {
|
|
158
|
-
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id)
|
|
165
|
+
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secrets.id);
|
|
159
166
|
}
|
|
160
167
|
const valid = await secrets.verifyPeer(bufferToVerify, signature);
|
|
161
168
|
return valid;
|
|
162
169
|
}
|
|
163
170
|
}
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, ts_utils_1.log)(),
|
|
173
|
+
__metadata("design:type", Function),
|
|
174
|
+
__metadata("design:paramtypes", [core_1.CoreId]),
|
|
175
|
+
__metadata("design:returntype", Promise)
|
|
176
|
+
], RelationshipSecretController.prototype, "getSecret", null);
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, ts_utils_1.log)(),
|
|
179
|
+
__metadata("design:type", Function),
|
|
180
|
+
__metadata("design:paramtypes", [core_1.CoreId,
|
|
181
|
+
CachedRelationshipTemplate_1.CachedRelationshipTemplate,
|
|
182
|
+
crypto_1.CryptoRelationshipPublicRequest]),
|
|
183
|
+
__metadata("design:returntype", Promise)
|
|
184
|
+
], RelationshipSecretController.prototype, "createTemplatorSecrets", null);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, ts_utils_1.log)(),
|
|
187
|
+
__metadata("design:type", Function),
|
|
188
|
+
__metadata("design:paramtypes", [core_1.CoreId]),
|
|
189
|
+
__metadata("design:returntype", Promise)
|
|
190
|
+
], RelationshipSecretController.prototype, "getPublicResponse", null);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, ts_utils_1.log)(),
|
|
193
|
+
__metadata("design:type", Function),
|
|
194
|
+
__metadata("design:paramtypes", [core_1.CoreId,
|
|
195
|
+
crypto_1.CryptoRelationshipPublicResponse]),
|
|
196
|
+
__metadata("design:returntype", Promise)
|
|
197
|
+
], RelationshipSecretController.prototype, "convertSecrets", null);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, ts_utils_1.log)(),
|
|
200
|
+
__metadata("design:type", Function),
|
|
201
|
+
__metadata("design:paramtypes", [core_1.CoreId, Object]),
|
|
202
|
+
__metadata("design:returntype", Promise)
|
|
203
|
+
], RelationshipSecretController.prototype, "encryptRequest", null);
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, ts_utils_1.log)(),
|
|
206
|
+
__metadata("design:type", Function),
|
|
207
|
+
__metadata("design:paramtypes", [core_1.CoreId, Object]),
|
|
208
|
+
__metadata("design:returntype", Promise)
|
|
209
|
+
], RelationshipSecretController.prototype, "encrypt", null);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, ts_utils_1.log)(),
|
|
212
|
+
__metadata("design:type", Function),
|
|
213
|
+
__metadata("design:paramtypes", [core_1.CoreId, crypto_1.CryptoCipher]),
|
|
214
|
+
__metadata("design:returntype", Promise)
|
|
215
|
+
], RelationshipSecretController.prototype, "decryptRequest", null);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, ts_utils_1.log)(),
|
|
218
|
+
__metadata("design:type", Function),
|
|
219
|
+
__metadata("design:paramtypes", [core_1.CoreId,
|
|
220
|
+
crypto_1.CryptoCipher, Object]),
|
|
221
|
+
__metadata("design:returntype", Promise)
|
|
222
|
+
], RelationshipSecretController.prototype, "decryptPeer", null);
|
|
223
|
+
__decorate([
|
|
224
|
+
(0, ts_utils_1.log)(),
|
|
225
|
+
__metadata("design:type", Function),
|
|
226
|
+
__metadata("design:paramtypes", [core_1.CoreId, crypto_1.CryptoCipher]),
|
|
227
|
+
__metadata("design:returntype", Promise)
|
|
228
|
+
], RelationshipSecretController.prototype, "decryptOwn", null);
|
|
229
|
+
__decorate([
|
|
230
|
+
(0, ts_utils_1.log)(),
|
|
231
|
+
__metadata("design:type", Function),
|
|
232
|
+
__metadata("design:paramtypes", [core_1.CoreId, Object, crypto_1.CryptoSignature]),
|
|
233
|
+
__metadata("design:returntype", Promise)
|
|
234
|
+
], RelationshipSecretController.prototype, "verifyPeer", null);
|
|
164
235
|
exports.RelationshipSecretController = RelationshipSecretController;
|
|
165
236
|
//# sourceMappingURL=RelationshipSecretController.js.map
|