@nmshd/transport 1.2.0 → 2.0.0-alpha.2
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.js +8 -8
- package/dist/core/CoreCrypto.js.map +1 -1
- package/dist/core/CoreSerializable.d.ts +1 -3
- package/dist/core/CoreSerializable.js +4 -11
- package/dist/core/CoreSerializable.js.map +1 -1
- package/dist/core/CoreSerializableAsync.d.ts +1 -3
- package/dist/core/CoreSerializableAsync.js +5 -11
- package/dist/core/CoreSerializableAsync.js.map +1 -1
- package/dist/core/CoreSynchronizable.d.ts +3 -3
- package/dist/core/CoreSynchronizable.js +2 -2
- package/dist/core/CoreSynchronizable.js.map +1 -1
- package/dist/core/Transport.d.ts +1 -0
- package/dist/core/TransportController.d.ts +1 -3
- package/dist/core/TransportController.js +2 -20
- package/dist/core/TransportController.js.map +1 -1
- package/dist/core/TransportErrors.d.ts +1 -0
- package/dist/core/TransportErrors.js +3 -0
- package/dist/core/TransportErrors.js.map +1 -1
- package/dist/core/backbone/RESTClient.d.ts +1 -0
- package/dist/core/backbone/RESTClientAuthenticate.js.map +1 -1
- package/dist/core/backbone/RequestError.js.map +1 -1
- package/dist/core/types/CoreAddress.d.ts +1 -1
- package/dist/core/types/CoreAddress.js +7 -13
- package/dist/core/types/CoreAddress.js.map +1 -1
- package/dist/core/types/CoreDate.d.ts +4 -3
- package/dist/core/types/CoreDate.js +17 -14
- package/dist/core/types/CoreDate.js.map +1 -1
- package/dist/core/types/CoreHash.d.ts +1 -1
- package/dist/core/types/CoreHash.js +9 -9
- package/dist/core/types/CoreHash.js.map +1 -1
- package/dist/core/types/CoreId.d.ts +1 -1
- package/dist/core/types/CoreId.js +9 -9
- package/dist/core/types/CoreId.js.map +1 -1
- package/dist/modules/accounts/AccountController.js +5 -5
- package/dist/modules/accounts/AccountController.js.map +1 -1
- package/dist/modules/accounts/IdentityController.js.map +1 -1
- package/dist/modules/accounts/IdentityUtil.js +8 -8
- package/dist/modules/accounts/IdentityUtil.js.map +1 -1
- package/dist/modules/accounts/backbone/IdentityClient.js.map +1 -1
- package/dist/modules/accounts/data/Identity.d.ts +5 -4
- package/dist/modules/accounts/data/Identity.js +12 -11
- package/dist/modules/accounts/data/Identity.js.map +1 -1
- package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts +4 -4
- package/dist/modules/accounts/data/IdentitySecretCredentials.js +4 -5
- package/dist/modules/accounts/data/IdentitySecretCredentials.js.map +1 -1
- package/dist/modules/certificates/CertificateIssuer.js +2 -2
- package/dist/modules/certificates/CertificateIssuer.js.map +1 -1
- package/dist/modules/certificates/data/Certificate.d.ts +4 -5
- package/dist/modules/certificates/data/Certificate.js +4 -8
- package/dist/modules/certificates/data/Certificate.js.map +1 -1
- package/dist/modules/certificates/data/CertificateConstraint.d.ts +4 -5
- package/dist/modules/certificates/data/CertificateConstraint.js +4 -8
- package/dist/modules/certificates/data/CertificateConstraint.js.map +1 -1
- package/dist/modules/certificates/data/CertificateContent.d.ts +4 -5
- package/dist/modules/certificates/data/CertificateContent.js +4 -8
- package/dist/modules/certificates/data/CertificateContent.js.map +1 -1
- package/dist/modules/certificates/data/CertificateItem.d.ts +4 -5
- package/dist/modules/certificates/data/CertificateItem.js +4 -8
- package/dist/modules/certificates/data/CertificateItem.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +4 -5
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificateRoleItem.js.map +1 -1
- package/dist/modules/challenges/ChallengeController.js +5 -5
- package/dist/modules/challenges/ChallengeController.js.map +1 -1
- package/dist/modules/challenges/data/Challenge.d.ts +4 -5
- package/dist/modules/challenges/data/Challenge.js +4 -8
- package/dist/modules/challenges/data/Challenge.js.map +1 -1
- package/dist/modules/challenges/data/ChallengeSigned.d.ts +5 -5
- package/dist/modules/challenges/data/ChallengeSigned.js +7 -8
- package/dist/modules/challenges/data/ChallengeSigned.js.map +1 -1
- package/dist/modules/devices/DeviceController.js.map +1 -1
- package/dist/modules/devices/DeviceSecretController.js +6 -6
- package/dist/modules/devices/DeviceSecretController.js.map +1 -1
- package/dist/modules/devices/DevicesController.js +4 -4
- package/dist/modules/devices/DevicesController.js.map +1 -1
- package/dist/modules/devices/backbone/DeviceAuthClient.js.map +1 -1
- package/dist/modules/devices/backbone/DeviceClient.js.map +1 -1
- package/dist/modules/devices/local/Device.d.ts +1 -1
- package/dist/modules/devices/local/Device.js +4 -5
- package/dist/modules/devices/local/Device.js.map +1 -1
- package/dist/modules/devices/local/DeviceSecretCredentials.d.ts +3 -3
- package/dist/modules/devices/local/DeviceSecretCredentials.js +4 -5
- package/dist/modules/devices/local/DeviceSecretCredentials.js.map +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.d.ts +4 -5
- package/dist/modules/devices/local/SendDeviceParameters.js +4 -8
- package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -1
- package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts +3 -4
- package/dist/modules/devices/transmission/DeviceSharedSecret.js +4 -8
- package/dist/modules/devices/transmission/DeviceSharedSecret.js.map +1 -1
- package/dist/modules/files/FileController.d.ts +2 -2
- package/dist/modules/files/FileController.js +18 -18
- package/dist/modules/files/FileController.js.map +1 -1
- package/dist/modules/files/local/CachedFile.d.ts +5 -5
- package/dist/modules/files/local/CachedFile.js +6 -6
- package/dist/modules/files/local/CachedFile.js.map +1 -1
- package/dist/modules/files/local/File.d.ts +2 -3
- package/dist/modules/files/local/File.js +10 -11
- package/dist/modules/files/local/File.js.map +1 -1
- package/dist/modules/files/local/SendFileParameters.d.ts +4 -5
- package/dist/modules/files/local/SendFileParameters.js +4 -8
- package/dist/modules/files/local/SendFileParameters.js.map +1 -1
- package/dist/modules/files/transmission/FileMetadata.d.ts +4 -5
- package/dist/modules/files/transmission/FileMetadata.js +4 -8
- package/dist/modules/files/transmission/FileMetadata.js.map +1 -1
- package/dist/modules/files/transmission/FileReference.d.ts +5 -7
- package/dist/modules/files/transmission/FileReference.js +6 -9
- package/dist/modules/files/transmission/FileReference.js.map +1 -1
- package/dist/modules/messages/MessageController.d.ts +2 -2
- package/dist/modules/messages/MessageController.js +28 -28
- package/dist/modules/messages/MessageController.js.map +1 -1
- package/dist/modules/messages/local/CachedMessage.d.ts +7 -7
- package/dist/modules/messages/local/CachedMessage.js +5 -6
- package/dist/modules/messages/local/CachedMessage.js.map +1 -1
- package/dist/modules/messages/local/Message.d.ts +1 -1
- package/dist/modules/messages/local/Message.js +4 -5
- package/dist/modules/messages/local/Message.js.map +1 -1
- package/dist/modules/messages/local/SendMessageParameters.d.ts +7 -8
- package/dist/modules/messages/local/SendMessageParameters.js +5 -9
- package/dist/modules/messages/local/SendMessageParameters.js.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelope.d.ts +5 -5
- package/dist/modules/messages/transmission/MessageEnvelope.js +6 -7
- package/dist/modules/messages/transmission/MessageEnvelope.js.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts +4 -4
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js +4 -5
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js.map +1 -1
- package/dist/modules/messages/transmission/MessagePlain.d.ts +8 -8
- package/dist/modules/messages/transmission/MessagePlain.js +7 -8
- package/dist/modules/messages/transmission/MessagePlain.js.map +1 -1
- package/dist/modules/messages/transmission/MessageSignature.d.ts +4 -4
- package/dist/modules/messages/transmission/MessageSignature.js +4 -5
- package/dist/modules/messages/transmission/MessageSignature.js.map +1 -1
- package/dist/modules/messages/transmission/MessageSigned.d.ts +4 -5
- package/dist/modules/messages/transmission/MessageSigned.js +4 -9
- package/dist/modules/messages/transmission/MessageSigned.js.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +2 -2
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +23 -18
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.d.ts +1 -0
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.d.ts +6 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +20 -10
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +30 -20
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +1 -2
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +4 -8
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +18 -8
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +18 -7
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.d.ts +7 -8
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js +5 -9
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts +4 -5
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js +15 -24
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts +4 -5
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js +4 -8
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.d.ts +6 -6
- package/dist/modules/relationships/RelationshipSecretController.js +7 -3
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
- package/dist/modules/relationships/RelationshipsController.d.ts +2 -2
- package/dist/modules/relationships/RelationshipsController.js +32 -32
- package/dist/modules/relationships/RelationshipsController.js.map +1 -1
- package/dist/modules/relationships/local/CachedRelationship.d.ts +4 -5
- package/dist/modules/relationships/local/CachedRelationship.js +4 -8
- package/dist/modules/relationships/local/CachedRelationship.js.map +1 -1
- package/dist/modules/relationships/local/Relationship.d.ts +3 -4
- package/dist/modules/relationships/local/Relationship.js +8 -11
- package/dist/modules/relationships/local/Relationship.js.map +1 -1
- package/dist/modules/relationships/local/SendRelationshipParameters.d.ts +7 -8
- package/dist/modules/relationships/local/SendRelationshipParameters.js +5 -9
- package/dist/modules/relationships/local/SendRelationshipParameters.js.map +1 -1
- package/dist/modules/relationships/transmission/changes/RelationshipChange.d.ts +5 -6
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js +11 -11
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js.map +1 -1
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.d.ts +6 -7
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js +10 -10
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js.map +1 -1
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.d.ts +8 -9
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js +10 -10
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.d.ts +5 -6
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js +6 -10
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.d.ts +7 -8
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js +5 -9
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.d.ts +4 -5
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js +4 -8
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.d.ts +5 -6
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js +6 -10
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.d.ts +7 -8
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js +5 -9
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.d.ts +4 -5
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js +4 -8
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js.map +1 -1
- package/dist/modules/secrets/SecretController.js +7 -7
- package/dist/modules/secrets/SecretController.js.map +1 -1
- package/dist/modules/secrets/data/SecretContainerCipher.d.ts +1 -1
- package/dist/modules/secrets/data/SecretContainerCipher.js +4 -5
- package/dist/modules/secrets/data/SecretContainerCipher.js.map +1 -1
- package/dist/modules/secrets/data/SecretContainerPlain.d.ts +7 -7
- package/dist/modules/secrets/data/SecretContainerPlain.js +5 -6
- package/dist/modules/secrets/data/SecretContainerPlain.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.js +4 -4
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
- package/dist/modules/sync/SyncController.js.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.js +2 -2
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
- package/dist/modules/sync/backbone/SyncClient.js +1 -1
- package/dist/modules/sync/backbone/SyncClient.js.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.d.ts +0 -1
- package/dist/modules/sync/local/DatawalletModification.js +3 -7
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.js +6 -6
- package/dist/modules/tokens/AnonymousTokenController.js.map +1 -1
- package/dist/modules/tokens/TokenController.d.ts +2 -2
- package/dist/modules/tokens/TokenController.js +14 -14
- package/dist/modules/tokens/TokenController.js.map +1 -1
- package/dist/modules/tokens/local/CachedToken.d.ts +7 -8
- package/dist/modules/tokens/local/CachedToken.js +5 -9
- package/dist/modules/tokens/local/CachedToken.js.map +1 -1
- package/dist/modules/tokens/local/SendTokenParameters.d.ts +7 -8
- package/dist/modules/tokens/local/SendTokenParameters.js +5 -9
- package/dist/modules/tokens/local/SendTokenParameters.js.map +1 -1
- package/dist/modules/tokens/local/Token.d.ts +3 -4
- package/dist/modules/tokens/local/Token.js +12 -13
- package/dist/modules/tokens/local/Token.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts +4 -5
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js +4 -8
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentFile.d.ts +4 -5
- package/dist/modules/tokens/transmission/TokenContentFile.js +4 -8
- package/dist/modules/tokens/transmission/TokenContentFile.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts +4 -5
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js +4 -8
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenReference.d.ts +5 -6
- package/dist/modules/tokens/transmission/TokenReference.js +6 -14
- package/dist/modules/tokens/transmission/TokenReference.js.map +1 -1
- package/lib-web/nmshd.transport.js +1617 -1262
- 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 +28 -26
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CoreDate,
|
|
3
|
-
export interface ISendRelationshipTemplateParameters extends
|
|
4
|
-
content:
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { CoreDate, CoreSerializable, ICoreSerializable } from "../../../core";
|
|
3
|
+
export interface ISendRelationshipTemplateParameters extends ICoreSerializable {
|
|
4
|
+
content: ISerializable;
|
|
5
5
|
expiresAt: CoreDate;
|
|
6
|
+
maxNumberOfAllocations?: number;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use `maxNumberOfAllocations` instead
|
|
9
|
+
* @see maxNumberOfAllocations
|
|
10
|
+
*/
|
|
6
11
|
maxNumberOfRelationships?: number;
|
|
7
12
|
}
|
|
8
|
-
export declare class SendRelationshipTemplateParameters extends
|
|
9
|
-
content:
|
|
13
|
+
export declare class SendRelationshipTemplateParameters extends CoreSerializable implements ISendRelationshipTemplateParameters {
|
|
14
|
+
content: Serializable;
|
|
10
15
|
expiresAt: CoreDate;
|
|
16
|
+
maxNumberOfAllocations?: number;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated use `maxNumberOfAllocations` instead
|
|
19
|
+
* @see maxNumberOfAllocations
|
|
20
|
+
*/
|
|
11
21
|
maxNumberOfRelationships?: number;
|
|
12
|
-
static
|
|
13
|
-
static
|
|
22
|
+
protected static postFrom<T extends Serializable>(value: T): T;
|
|
23
|
+
static from(value: ISendRelationshipTemplateParameters): SendRelationshipTemplateParameters;
|
|
14
24
|
}
|
|
@@ -12,20 +12,26 @@ var SendRelationshipTemplateParameters_1;
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.SendRelationshipTemplateParameters = void 0;
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
15
16
|
const core_1 = require("../../../core");
|
|
16
17
|
const CachedRelationshipTemplate_1 = require("./CachedRelationshipTemplate");
|
|
17
|
-
let SendRelationshipTemplateParameters = SendRelationshipTemplateParameters_1 = class SendRelationshipTemplateParameters extends core_1.
|
|
18
|
-
static
|
|
19
|
-
|
|
18
|
+
let SendRelationshipTemplateParameters = SendRelationshipTemplateParameters_1 = class SendRelationshipTemplateParameters extends core_1.CoreSerializable {
|
|
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;
|
|
20
26
|
}
|
|
21
|
-
static
|
|
22
|
-
return
|
|
27
|
+
static from(value) {
|
|
28
|
+
return this.fromAny(value);
|
|
23
29
|
}
|
|
24
30
|
};
|
|
25
31
|
__decorate([
|
|
26
32
|
(0, ts_serval_1.validate)(),
|
|
27
33
|
(0, ts_serval_1.serialize)(),
|
|
28
|
-
__metadata("design:type", ts_serval_1.
|
|
34
|
+
__metadata("design:type", ts_serval_1.Serializable)
|
|
29
35
|
], SendRelationshipTemplateParameters.prototype, "content", void 0);
|
|
30
36
|
__decorate([
|
|
31
37
|
(0, ts_serval_1.validate)(),
|
|
@@ -33,7 +39,12 @@ __decorate([
|
|
|
33
39
|
__metadata("design:type", core_1.CoreDate)
|
|
34
40
|
], SendRelationshipTemplateParameters.prototype, "expiresAt", void 0);
|
|
35
41
|
__decorate([
|
|
36
|
-
(0, ts_serval_1.validate)({ nullable: true, customValidator: CachedRelationshipTemplate_1.
|
|
42
|
+
(0, ts_serval_1.validate)({ nullable: true, customValidator: CachedRelationshipTemplate_1.validateMaxNumberOfAllocations }),
|
|
43
|
+
(0, ts_serval_1.serialize)(),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], SendRelationshipTemplateParameters.prototype, "maxNumberOfAllocations", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, ts_serval_1.validate)({ nullable: true, customValidator: CachedRelationshipTemplate_1.validateMaxNumberOfRelationships }),
|
|
37
48
|
(0, ts_serval_1.serialize)(),
|
|
38
49
|
__metadata("design:type", Number)
|
|
39
50
|
], SendRelationshipTemplateParameters.prototype, "maxNumberOfRelationships", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendRelationshipTemplateParameters.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"SendRelationshipTemplateParameters.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA4G;AAC5G,uDAAyC;AACzC,wCAA6E;AAC7E,6EAA+G;AAe/G,IAAa,kCAAkC,0CAA/C,MAAa,kCACT,SAAQ,uBAAgB;IAuBd,MAAM,CAAU,QAAQ,CAAyB,KAAQ;QAC/D,IAAI,CAAC,CAAC,KAAK,YAAY,oCAAkC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAEvG,IAAI,KAAK,CAAC,sBAAsB,IAAI,KAAK,CAAC,wBAAwB,EAAE;YAChE,MAAM,IAAI,2BAAe,CACrB,oCAAkC,CAAC,IAAI,EACvC,IAAA,yBAAM,EAAqC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,EAC3E,2BAA2B,IAAA,yBAAM,EAC7B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAClC,QAAQ,IAAA,yBAAM,EAAqC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC,GAAG,CAC5F,CAAA;SACJ;QAED,OAAO,KAAK,CAAA;IAChB,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAA0C;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AArCG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,wBAAY;mEAAA;AAI5B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,eAAQ;qEAAA;AAI1B;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,2DAA8B,EAAE,CAAC;IAC7E,IAAA,qBAAS,GAAE;;kFAC0B;AAQtC;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,6DAAgC,EAAE,CAAC;IAC/E,IAAA,qBAAS,GAAE;;oFAC4B;AAtB/B,kCAAkC;IAD9C,IAAA,gBAAI,EAAC,oCAAoC,CAAC;GAC9B,kCAAkC,CA2C9C;AA3CY,gFAAkC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
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 IRelationshipTemplateContent extends
|
|
5
|
+
export interface IRelationshipTemplateContent extends ICoreSerializable {
|
|
6
6
|
identity: IIdentity;
|
|
7
7
|
templateKey: IRelationshipTemplatePublicKey;
|
|
8
|
-
content:
|
|
8
|
+
content: ISerializable;
|
|
9
9
|
}
|
|
10
|
-
export declare class RelationshipTemplateContent extends
|
|
10
|
+
export declare class RelationshipTemplateContent extends CoreSerializable implements IRelationshipTemplateContent {
|
|
11
11
|
identity: Identity;
|
|
12
12
|
templateKey: RelationshipTemplatePublicKey;
|
|
13
|
-
content:
|
|
14
|
-
static from(value: IRelationshipTemplateContent):
|
|
15
|
-
static deserialize(value: string): Promise<RelationshipTemplateContent>;
|
|
13
|
+
content: Serializable;
|
|
14
|
+
static from(value: IRelationshipTemplateContent): RelationshipTemplateContent;
|
|
16
15
|
}
|
|
@@ -8,19 +8,15 @@ 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 RelationshipTemplateContent_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.RelationshipTemplateContent = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
14
|
const core_1 = require("../../../core");
|
|
16
15
|
const Identity_1 = require("../../accounts/data/Identity");
|
|
17
16
|
const RelationshipTemplatePublicKey_1 = require("./RelationshipTemplatePublicKey");
|
|
18
|
-
let RelationshipTemplateContent =
|
|
19
|
-
static
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
static async deserialize(value) {
|
|
23
|
-
return await super.deserializeT(value, RelationshipTemplateContent_1);
|
|
17
|
+
let RelationshipTemplateContent = class RelationshipTemplateContent extends core_1.CoreSerializable {
|
|
18
|
+
static from(value) {
|
|
19
|
+
return this.fromAny(value);
|
|
24
20
|
}
|
|
25
21
|
};
|
|
26
22
|
__decorate([
|
|
@@ -36,9 +32,9 @@ __decorate([
|
|
|
36
32
|
__decorate([
|
|
37
33
|
(0, ts_serval_1.validate)(),
|
|
38
34
|
(0, ts_serval_1.serialize)(),
|
|
39
|
-
__metadata("design:type", ts_serval_1.
|
|
35
|
+
__metadata("design:type", ts_serval_1.Serializable)
|
|
40
36
|
], RelationshipTemplateContent.prototype, "content", void 0);
|
|
41
|
-
RelationshipTemplateContent =
|
|
37
|
+
RelationshipTemplateContent = __decorate([
|
|
42
38
|
(0, ts_serval_1.type)("RelationshipTemplateContent")
|
|
43
39
|
], RelationshipTemplateContent);
|
|
44
40
|
exports.RelationshipTemplateContent = RelationshipTemplateContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipTemplateContent.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/transmission/RelationshipTemplateContent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RelationshipTemplateContent.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/transmission/RelationshipTemplateContent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,wCAAmE;AACnE,2DAAkE;AAClE,mFAA+G;AAS/G,IAAa,2BAA2B,GAAxC,MAAa,2BAA4B,SAAQ,uBAAgB;IAatD,MAAM,CAAC,IAAI,CAAC,KAAmC;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAbG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACK,mBAAQ;6DAAA;AAIzB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACQ,6DAA6B;gEAAA;AAIjD;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,wBAAY;4DAAA;AAXnB,2BAA2B;IADvC,IAAA,gBAAI,EAAC,6BAA6B,CAAC;GACvB,2BAA2B,CAgBvC;AAhBY,kEAA2B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ISerialized } from "@js-soft/ts-serval";
|
|
2
|
-
import {
|
|
2
|
+
import { CryptoExchangePublicKey, ICryptoExchangePublicKey, ICryptoExchangePublicKeySerialized } from "@nmshd/crypto";
|
|
3
3
|
import { CoreId, ICoreId } from "../../../core";
|
|
4
4
|
export interface IRelationshipTemplatePublicKey extends ICryptoExchangePublicKey {
|
|
5
5
|
id: ICoreId;
|
|
@@ -9,11 +9,10 @@ export interface IRelationshipTemplatePublicKeySerialized extends ICryptoExchang
|
|
|
9
9
|
}
|
|
10
10
|
export declare class RelationshipTemplatePublicKey extends CryptoExchangePublicKey implements IRelationshipTemplatePublicKey {
|
|
11
11
|
id: CoreId;
|
|
12
|
-
constructor(id: CoreId, algorithm: CryptoExchangeAlgorithm, publicKey: CoreBuffer);
|
|
13
12
|
toJSON(verbose?: boolean): IRelationshipTemplatePublicKeySerialized;
|
|
14
13
|
toBase64(): string;
|
|
15
14
|
serialize(verbose?: boolean): string;
|
|
16
|
-
static
|
|
17
|
-
static
|
|
18
|
-
static
|
|
15
|
+
protected static preFrom(value: any): any;
|
|
16
|
+
static fromJSON(value: IRelationshipTemplatePublicKeySerialized): RelationshipTemplatePublicKey;
|
|
17
|
+
static from(value: IRelationshipTemplatePublicKey): RelationshipTemplatePublicKey;
|
|
19
18
|
}
|
|
@@ -8,27 +8,19 @@ 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 RelationshipTemplatePublicKey_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.RelationshipTemplatePublicKey = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
14
|
const crypto_1 = require("@nmshd/crypto");
|
|
16
15
|
const core_1 = require("../../../core");
|
|
17
|
-
let RelationshipTemplatePublicKey =
|
|
18
|
-
constructor(id, algorithm, publicKey) {
|
|
19
|
-
super(algorithm, publicKey);
|
|
20
|
-
this.id = id;
|
|
21
|
-
}
|
|
16
|
+
let RelationshipTemplatePublicKey = class RelationshipTemplatePublicKey extends crypto_1.CryptoExchangePublicKey {
|
|
22
17
|
toJSON(verbose = true) {
|
|
23
|
-
|
|
18
|
+
return {
|
|
24
19
|
id: this.id.toString(),
|
|
25
20
|
pub: this.publicKey.toBase64URL(),
|
|
26
|
-
alg: this.algorithm
|
|
21
|
+
alg: this.algorithm,
|
|
22
|
+
"@type": verbose ? "RelationshipTemplatePublicKey" : undefined
|
|
27
23
|
};
|
|
28
|
-
if (verbose) {
|
|
29
|
-
obj["@type"] = "RelationshipTemplatePublicKey";
|
|
30
|
-
}
|
|
31
|
-
return obj;
|
|
32
24
|
}
|
|
33
25
|
toBase64() {
|
|
34
26
|
return crypto_1.CoreBuffer.utf8_base64(this.serialize());
|
|
@@ -36,26 +28,25 @@ let RelationshipTemplatePublicKey = RelationshipTemplatePublicKey_1 = class Rela
|
|
|
36
28
|
serialize(verbose = true) {
|
|
37
29
|
return JSON.stringify(this.toJSON(verbose));
|
|
38
30
|
}
|
|
39
|
-
static
|
|
40
|
-
const
|
|
41
|
-
|
|
31
|
+
static preFrom(value) {
|
|
32
|
+
const newValue = super.preFrom(value);
|
|
33
|
+
newValue.id = value.id;
|
|
34
|
+
return newValue;
|
|
42
35
|
}
|
|
43
|
-
static
|
|
44
|
-
return
|
|
36
|
+
static fromJSON(value) {
|
|
37
|
+
return this.fromAny(value);
|
|
45
38
|
}
|
|
46
|
-
static
|
|
47
|
-
|
|
48
|
-
return await this.fromJSON(obj);
|
|
39
|
+
static from(value) {
|
|
40
|
+
return this.fromAny(value);
|
|
49
41
|
}
|
|
50
42
|
};
|
|
51
43
|
__decorate([
|
|
52
|
-
(0, ts_serval_1.serialize)(
|
|
44
|
+
(0, ts_serval_1.serialize)(),
|
|
53
45
|
(0, ts_serval_1.validate)(),
|
|
54
46
|
__metadata("design:type", core_1.CoreId)
|
|
55
47
|
], RelationshipTemplatePublicKey.prototype, "id", void 0);
|
|
56
|
-
RelationshipTemplatePublicKey =
|
|
57
|
-
(0, ts_serval_1.type)("RelationshipTemplatePublicKey")
|
|
58
|
-
__metadata("design:paramtypes", [core_1.CoreId, Number, crypto_1.CoreBuffer])
|
|
48
|
+
RelationshipTemplatePublicKey = __decorate([
|
|
49
|
+
(0, ts_serval_1.type)("RelationshipTemplatePublicKey")
|
|
59
50
|
], RelationshipTemplatePublicKey);
|
|
60
51
|
exports.RelationshipTemplatePublicKey = RelationshipTemplatePublicKey;
|
|
61
52
|
//# sourceMappingURL=RelationshipTemplatePublicKey.js.map
|
package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipTemplatePublicKey.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RelationshipTemplatePublicKey.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2E;AAC3E,0CAKsB;AACtB,wCAA+C;AAU/C,IAAa,6BAA6B,GAA1C,MAAa,6BAA8B,SAAQ,gCAAuB;IAKtD,MAAM,CAAC,OAAO,GAAG,IAAI;QACjC,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE;YACtB,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;YACjC,GAAG,EAAE,IAAI,CAAC,SAAS;YACnB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,SAAS;SACjE,CAAA;IACL,CAAC;IAEe,QAAQ;QACpB,OAAO,mBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAA;IACnD,CAAC;IAEe,SAAS,CAAC,OAAO,GAAG,IAAI;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IAC/C,CAAC;IAES,MAAM,CAAU,OAAO,CAAC,KAAU;QACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACrC,QAAQ,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAA;QAEtB,OAAO,QAAQ,CAAA;IACnB,CAAC;IAEM,MAAM,CAAU,QAAQ,CAAC,KAA+C;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAEM,MAAM,CAAU,IAAI,CAAC,KAAqC;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAjCG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACA,aAAM;yDAAA;AAHR,6BAA6B;IADzC,IAAA,gBAAI,EAAC,+BAA+B,CAAC;GACzB,6BAA6B,CAoCzC;AApCY,sEAA6B"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { CryptoSignature, ICryptoSignature } from "@nmshd/crypto";
|
|
2
|
-
import {
|
|
3
|
-
export interface IRelationshipTemplateSigned extends
|
|
2
|
+
import { CoreSerializable, ICoreSerializable } from "../../../core";
|
|
3
|
+
export interface IRelationshipTemplateSigned extends ICoreSerializable {
|
|
4
4
|
serializedTemplate: string;
|
|
5
5
|
deviceSignature: ICryptoSignature;
|
|
6
6
|
}
|
|
7
|
-
export declare class RelationshipTemplateSigned extends
|
|
7
|
+
export declare class RelationshipTemplateSigned extends CoreSerializable implements IRelationshipTemplateSigned {
|
|
8
8
|
serializedTemplate: string;
|
|
9
9
|
deviceSignature: CryptoSignature;
|
|
10
|
-
static from(value: IRelationshipTemplateSigned):
|
|
11
|
-
static deserialize(value: string): Promise<RelationshipTemplateSigned>;
|
|
10
|
+
static from(value: IRelationshipTemplateSigned): RelationshipTemplateSigned;
|
|
12
11
|
}
|
|
@@ -8,18 +8,14 @@ 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 RelationshipTemplateSigned_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.RelationshipTemplateSigned = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
14
|
const crypto_1 = require("@nmshd/crypto");
|
|
16
15
|
const core_1 = require("../../../core");
|
|
17
|
-
let RelationshipTemplateSigned =
|
|
18
|
-
static
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
static async deserialize(value) {
|
|
22
|
-
return await super.deserializeT(value, RelationshipTemplateSigned_1);
|
|
16
|
+
let RelationshipTemplateSigned = class RelationshipTemplateSigned extends core_1.CoreSerializable {
|
|
17
|
+
static from(value) {
|
|
18
|
+
return this.fromAny(value);
|
|
23
19
|
}
|
|
24
20
|
};
|
|
25
21
|
__decorate([
|
|
@@ -32,7 +28,7 @@ __decorate([
|
|
|
32
28
|
(0, ts_serval_1.serialize)(),
|
|
33
29
|
__metadata("design:type", crypto_1.CryptoSignature)
|
|
34
30
|
], RelationshipTemplateSigned.prototype, "deviceSignature", void 0);
|
|
35
|
-
RelationshipTemplateSigned =
|
|
31
|
+
RelationshipTemplateSigned = __decorate([
|
|
36
32
|
(0, ts_serval_1.type)("RelationshipTemplateSigned")
|
|
37
33
|
], RelationshipTemplateSigned);
|
|
38
34
|
exports.RelationshipTemplateSigned = RelationshipTemplateSigned;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipTemplateSigned.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RelationshipTemplateSigned.js","sourceRoot":"","sources":["../../../../src/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,wCAAmE;AAQnE,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,uBAAgB;IASrD,MAAM,CAAC,IAAI,CAAC,KAAkC;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AATG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;sEACqB;AAIjC;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACY,wBAAe;mEAAA;AAP9B,0BAA0B;IADtC,IAAA,gBAAI,EAAC,4BAA4B,CAAC;GACtB,0BAA0B,CAYtC;AAZY,gEAA0B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Serializable
|
|
1
|
+
import { Serializable } from "@js-soft/ts-serval";
|
|
2
2
|
import { CoreBuffer, CryptoCipher, CryptoRelationshipPublicRequest, CryptoRelationshipPublicResponse, CryptoSecretKey, CryptoSignature, CryptoSignaturePublicKey } from "@nmshd/crypto";
|
|
3
3
|
import { CoreId } from "../../core";
|
|
4
4
|
import { AccountController } from "../accounts/AccountController";
|
|
@@ -18,14 +18,14 @@ export declare class RelationshipSecretController extends SecretController {
|
|
|
18
18
|
deleteSecretForRequest(peerIdentity: Identity): Promise<boolean>;
|
|
19
19
|
decryptTemplate(cipher: CryptoCipher, secretKey: CryptoSecretKey): Promise<CoreBuffer>;
|
|
20
20
|
verifyTemplate(buffer: CoreBuffer, signature: CryptoSignature, templatorDeviceKey: CryptoSignaturePublicKey): Promise<boolean>;
|
|
21
|
-
encryptRequest(relationshipSecretId: CoreId, content:
|
|
22
|
-
encrypt(relationshipSecretId: CoreId, content:
|
|
21
|
+
encryptRequest(relationshipSecretId: CoreId, content: Serializable | string | CoreBuffer): Promise<CryptoCipher>;
|
|
22
|
+
encrypt(relationshipSecretId: CoreId, content: Serializable | string): Promise<CryptoCipher>;
|
|
23
23
|
decryptRequest(relationshipSecretId: CoreId, cipher: CryptoCipher): Promise<CoreBuffer>;
|
|
24
24
|
createTemplateKey(): Promise<RelationshipTemplatePublicKey>;
|
|
25
25
|
decryptPeer(relationshipSecretId: CoreId, cipher: CryptoCipher, omitCounterCheck?: boolean): Promise<CoreBuffer>;
|
|
26
26
|
hasCryptoRelationshipSecrets(relationshipSecretId: CoreId): Promise<boolean>;
|
|
27
27
|
decryptOwn(relationshipSecretId: CoreId, cipher: CryptoCipher): Promise<CoreBuffer>;
|
|
28
|
-
sign(relationshipSecretId: CoreId, content:
|
|
29
|
-
verifyOwn(relationshipSecretId: CoreId, content:
|
|
30
|
-
verifyPeer(relationshipSecretId: CoreId, content:
|
|
28
|
+
sign(relationshipSecretId: CoreId, content: Serializable | string | CoreBuffer): Promise<CryptoSignature>;
|
|
29
|
+
verifyOwn(relationshipSecretId: CoreId, content: Serializable | string | CoreBuffer, signature: CryptoSignature): Promise<boolean>;
|
|
30
|
+
verifyPeer(relationshipSecretId: CoreId, content: Serializable | string | CoreBuffer, signature: CryptoSignature): Promise<boolean>;
|
|
31
31
|
}
|
|
@@ -36,7 +36,7 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
36
36
|
async createRequestorSecrets(template, relationshipSecretId) {
|
|
37
37
|
const secrets = await crypto_1.CryptoRelationshipRequestSecrets.fromPeer(template.templateKey, template.identity.publicKey);
|
|
38
38
|
await this.storeSecret(secrets, relationshipSecretId.toString(), "");
|
|
39
|
-
const publicRequest =
|
|
39
|
+
const publicRequest = secrets.toPublicRequest();
|
|
40
40
|
return publicRequest;
|
|
41
41
|
}
|
|
42
42
|
async createTemplatorSecrets(relationshipSecretId, template, publicRequestCrypto) {
|
|
@@ -63,7 +63,7 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
63
63
|
if (!(secret.secret instanceof crypto_1.CryptoRelationshipSecrets)) {
|
|
64
64
|
throw TransportErrors_1.TransportErrors.secrets.wrongSecretType(secret.id.toString()).logWith(this._log);
|
|
65
65
|
}
|
|
66
|
-
const publicResponse =
|
|
66
|
+
const publicResponse = secret.secret.toPublicResponse();
|
|
67
67
|
return publicResponse;
|
|
68
68
|
}
|
|
69
69
|
async convertSecrets(relationshipSecretId, response) {
|
|
@@ -117,7 +117,11 @@ class RelationshipSecretController extends SecretController_1.SecretController {
|
|
|
117
117
|
const templateKeyId = await TransportIds_1.TransportIds.relationshipTemplateKey.generate();
|
|
118
118
|
const key = await this.createExchangeKey(`${templateKeyId.toString()}`);
|
|
119
119
|
const publicKey = key[0];
|
|
120
|
-
return
|
|
120
|
+
return RelationshipTemplatePublicKey_1.RelationshipTemplatePublicKey.from({
|
|
121
|
+
id: templateKeyId,
|
|
122
|
+
algorithm: publicKey.algorithm,
|
|
123
|
+
publicKey: publicKey.publicKey
|
|
124
|
+
});
|
|
121
125
|
}
|
|
122
126
|
async decryptPeer(relationshipSecretId, cipher, omitCounterCheck = false) {
|
|
123
127
|
const secrets = await this.getSecret(relationshipSecretId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipSecretController.js","sourceRoot":"","sources":["../../../src/modules/relationships/RelationshipSecretController.ts"],"names":[],"mappings":";;;AACA,0CAWsB;AACtB,qCAA+D;AAC/D,kDAA8C;AAC9C,gEAA4D;AAC5D,0DAAsD;AAItD,uHAAmH;AAEnH,kEAA8D;AAE9D,MAAa,4BAA6B,SAAQ,mCAAgB;IAM9D,YAAmB,MAAyB;QACxC,KAAK,CAAC,MAAM,EAAE,qBAAc,CAAC,kBAAkB,CAAC,CAAA;QANnC,UAAK,GAA8E,IAAI,GAAG,EAGxG,CAAA;IAIH,CAAC;IAEO,KAAK,CAAC,SAAS,CACnB,oBAA4B;QAE5B,MAAM,gBAAgB,GAAW,oBAAoB,CAAC,QAAQ,EAAE,CAAA;QAChE,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;QAC1D,IAAI,aAAa,EAAE;YACf,OAAO,aAAa,CAAA;SACvB;QAED,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAA;QAC3E,IAAI,CAAC,eAAe,EAAE;YAClB,MAAM,iCAAe,CAAC,OAAO;iBACxB,cAAc,CAAC,8DAA8D,EAAE,gBAAgB,CAAC;iBAChG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SAC1B;QAED,IACI,CAAC,CAAC,eAAe,CAAC,MAAM,YAAY,yCAAgC,CAAC;YACrE,CAAC,CAAC,eAAe,CAAC,MAAM,YAAY,kCAAyB,CAAC,EAChE;YACE,MAAM,iCAAe,CAAC,OAAO,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SACrF;QACD,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAA;QAC5C,OAAO,MAAM,CAAA;IACjB,CAAC;IAEM,KAAK,CAAC,sBAAsB,CAC/B,QAAoC,EACpC,oBAA4B;QAE5B,MAAM,OAAO,GAAG,MAAM,yCAAgC,CAAC,QAAQ,CAC3D,QAAQ,CAAC,WAAW,EACpB,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAC9B,CAAA;QACD,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,oBAAoB,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAA;QAEpE,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"RelationshipSecretController.js","sourceRoot":"","sources":["../../../src/modules/relationships/RelationshipSecretController.ts"],"names":[],"mappings":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AC,QAAQ,CAAC,OAAO,CAAC,CAAA;QACjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAA;QAC1D,OAAO,MAAM,OAAO,CAAC,SAAS,CAAC,cAAc,EAAE,SAAS,CAAC,CAAA;IAC7D,CAAC;IAEM,KAAK,CAAC,UAAU,CACnB,oBAA4B,EAC5B,OAA2C,EAC3C,SAA0B;QAE1B,MAAM,cAAc,GAAG,mBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAEjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAA;QAC1D,IAAI,OAAO,YAAY,yCAAgC,EAAE;YACrD,MAAM,iCAAe,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SAC/E;QAED,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,SAAS,CAAC,CAAA;QACjE,OAAO,KAAK,CAAA;IAChB,CAAC;CACJ;AA7OD,oEA6OC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISerializable } from "@js-soft/ts-serval";
|
|
2
2
|
import { CoreBuffer, CryptoSignature } from "@nmshd/crypto";
|
|
3
3
|
import { CoreAddress, CoreId, ICoreSerializable, TransportController } from "../../core";
|
|
4
4
|
import { AccountController } from "../accounts/AccountController";
|
|
@@ -29,7 +29,7 @@ export declare class RelationshipsController extends TransportController {
|
|
|
29
29
|
verify(relationship: Relationship, content: CoreBuffer, signature: CryptoSignature): Promise<boolean>;
|
|
30
30
|
verifyIdentity(relationship: Relationship, content: CoreBuffer, signature: CryptoSignature): Promise<boolean>;
|
|
31
31
|
sendRelationship(parameters: ISendRelationshipParameters): Promise<Relationship>;
|
|
32
|
-
setRelationshipMetadata(idOrRelationship: CoreId | Relationship, metadata:
|
|
32
|
+
setRelationshipMetadata(idOrRelationship: CoreId | Relationship, metadata: ISerializable): Promise<Relationship>;
|
|
33
33
|
requestTermination(): void;
|
|
34
34
|
acceptChange(change: RelationshipChange, content?: ICoreSerializable): Promise<Relationship>;
|
|
35
35
|
rejectChange(change: RelationshipChange, content?: ICoreSerializable): Promise<Relationship>;
|