@nmshd/transport 1.0.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/LICENSE +1 -0
- package/README.md +18 -0
- package/dist/TransportBuildInformation.d.ts +13 -0
- package/dist/TransportBuildInformation.js +25 -0
- package/dist/TransportBuildInformation.js.map +1 -0
- package/dist/core/CoreCrypto.d.ts +108 -0
- package/dist/core/CoreCrypto.js +205 -0
- package/dist/core/CoreCrypto.js.map +1 -0
- package/dist/core/CoreError.d.ts +18 -0
- package/dist/core/CoreError.js +63 -0
- package/dist/core/CoreError.js.map +1 -0
- package/dist/core/CoreIdHelper.d.ts +9 -0
- package/dist/core/CoreIdHelper.js +23 -0
- package/dist/core/CoreIdHelper.js.map +1 -0
- package/dist/core/CoreIds.d.ts +9 -0
- package/dist/core/CoreIds.js +14 -0
- package/dist/core/CoreIds.js.map +1 -0
- package/dist/core/CoreSerializable.d.ts +18 -0
- package/dist/core/CoreSerializable.js +44 -0
- package/dist/core/CoreSerializable.js.map +1 -0
- package/dist/core/CoreSerializableAsync.d.ts +18 -0
- package/dist/core/CoreSerializableAsync.js +44 -0
- package/dist/core/CoreSerializableAsync.js.map +1 -0
- package/dist/core/CoreSynchronizable.d.ts +11 -0
- package/dist/core/CoreSynchronizable.js +30 -0
- package/dist/core/CoreSynchronizable.js.map +1 -0
- package/dist/core/CoreUtil.d.ts +6 -0
- package/dist/core/CoreUtil.js +38 -0
- package/dist/core/CoreUtil.js.map +1 -0
- package/dist/core/DbCollectionNames.d.ts +11 -0
- package/dist/core/DbCollectionNames.js +16 -0
- package/dist/core/DbCollectionNames.js.map +1 -0
- package/dist/core/ICacheable.d.ts +4 -0
- package/dist/core/ICacheable.js +14 -0
- package/dist/core/ICacheable.js.map +1 -0
- package/dist/core/Transport.d.ts +47 -0
- package/dist/core/Transport.js +71 -0
- package/dist/core/Transport.js.map +1 -0
- package/dist/core/TransportContext.d.ts +8 -0
- package/dist/core/TransportContext.js +29 -0
- package/dist/core/TransportContext.js.map +1 -0
- package/dist/core/TransportController.d.ts +51 -0
- package/dist/core/TransportController.js +99 -0
- package/dist/core/TransportController.js.map +1 -0
- package/dist/core/TransportErrors.d.ts +125 -0
- package/dist/core/TransportErrors.js +255 -0
- package/dist/core/TransportErrors.js.map +1 -0
- package/dist/core/TransportLoggerFactory.d.ts +7 -0
- package/dist/core/TransportLoggerFactory.js +23 -0
- package/dist/core/TransportLoggerFactory.js.map +1 -0
- package/dist/core/backbone/AuthClient.d.ts +17 -0
- package/dist/core/backbone/AuthClient.js +47 -0
- package/dist/core/backbone/AuthClient.js.map +1 -0
- package/dist/core/backbone/Authenticator.d.ts +16 -0
- package/dist/core/backbone/Authenticator.js +62 -0
- package/dist/core/backbone/Authenticator.js.map +1 -0
- package/dist/core/backbone/BackboneIds.d.ts +11 -0
- package/dist/core/backbone/BackboneIds.js +16 -0
- package/dist/core/backbone/BackboneIds.js.map +1 -0
- package/dist/core/backbone/ClientResult.d.ts +19 -0
- package/dist/core/backbone/ClientResult.js +58 -0
- package/dist/core/backbone/ClientResult.js.map +1 -0
- package/dist/core/backbone/Paginator.d.ts +17 -0
- package/dist/core/backbone/Paginator.js +44 -0
- package/dist/core/backbone/Paginator.js.map +1 -0
- package/dist/core/backbone/PlatformError.d.ts +9 -0
- package/dist/core/backbone/PlatformError.js +3 -0
- package/dist/core/backbone/PlatformError.js.map +1 -0
- package/dist/core/backbone/PlatformParameters.d.ts +6 -0
- package/dist/core/backbone/PlatformParameters.js +3 -0
- package/dist/core/backbone/PlatformParameters.js.map +1 -0
- package/dist/core/backbone/PlatformResponse.d.ts +16 -0
- package/dist/core/backbone/PlatformResponse.js +3 -0
- package/dist/core/backbone/PlatformResponse.js.map +1 -0
- package/dist/core/backbone/RESTClient.d.ts +46 -0
- package/dist/core/backbone/RESTClient.js +425 -0
- package/dist/core/backbone/RESTClient.js.map +1 -0
- package/dist/core/backbone/RESTClientAuthenticate.d.ts +23 -0
- package/dist/core/backbone/RESTClientAuthenticate.js +72 -0
- package/dist/core/backbone/RESTClientAuthenticate.js.map +1 -0
- package/dist/core/backbone/RequestError.d.ts +24 -0
- package/dist/core/backbone/RequestError.js +101 -0
- package/dist/core/backbone/RequestError.js.map +1 -0
- package/dist/core/backbone/index.d.ts +6 -0
- package/dist/core/backbone/index.js +19 -0
- package/dist/core/backbone/index.js.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.js +29 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logging/logExecutionTime.d.ts +26 -0
- package/dist/core/logging/logExecutionTime.js +58 -0
- package/dist/core/logging/logExecutionTime.js.map +1 -0
- package/dist/core/types/CoreAddress.d.ts +15 -0
- package/dist/core/types/CoreAddress.js +56 -0
- package/dist/core/types/CoreAddress.js.map +1 -0
- package/dist/core/types/CoreDate.d.ts +37 -0
- package/dist/core/types/CoreDate.js +156 -0
- package/dist/core/types/CoreDate.js.map +1 -0
- package/dist/core/types/CoreHash.d.ts +37 -0
- package/dist/core/types/CoreHash.js +75 -0
- package/dist/core/types/CoreHash.js.map +1 -0
- package/dist/core/types/CoreId.d.ts +16 -0
- package/dist/core/types/CoreId.js +57 -0
- package/dist/core/types/CoreId.js.map +1 -0
- package/dist/core/types/TransportVersion.d.ts +4 -0
- package/dist/core/types/TransportVersion.js +9 -0
- package/dist/core/types/TransportVersion.js.map +1 -0
- package/dist/core/types/index.d.ts +5 -0
- package/dist/core/types/index.js +18 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/accounts/AccountController.d.ts +77 -0
- package/dist/modules/accounts/AccountController.js +337 -0
- package/dist/modules/accounts/AccountController.js.map +1 -0
- package/dist/modules/accounts/IdentityController.d.ts +21 -0
- package/dist/modules/accounts/IdentityController.js +67 -0
- package/dist/modules/accounts/IdentityController.js.map +1 -0
- package/dist/modules/accounts/IdentityUtil.d.ts +6 -0
- package/dist/modules/accounts/IdentityUtil.js +56 -0
- package/dist/modules/accounts/IdentityUtil.js.map +1 -0
- package/dist/modules/accounts/backbone/IdentityClient.d.ts +23 -0
- package/dist/modules/accounts/backbone/IdentityClient.js +15 -0
- package/dist/modules/accounts/backbone/IdentityClient.js.map +1 -0
- package/dist/modules/accounts/data/Identity.d.ts +34 -0
- package/dist/modules/accounts/data/Identity.js +69 -0
- package/dist/modules/accounts/data/Identity.js.map +1 -0
- package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts +16 -0
- package/dist/modules/accounts/data/IdentitySecretCredentials.js +47 -0
- package/dist/modules/accounts/data/IdentitySecretCredentials.js.map +1 -0
- package/dist/modules/certificates/CertificateController.d.ts +14 -0
- package/dist/modules/certificates/CertificateController.js +20 -0
- package/dist/modules/certificates/CertificateController.js.map +1 -0
- package/dist/modules/certificates/CertificateIssuer.d.ts +27 -0
- package/dist/modules/certificates/CertificateIssuer.js +42 -0
- package/dist/modules/certificates/CertificateIssuer.js.map +1 -0
- package/dist/modules/certificates/CertificateValidator.d.ts +14 -0
- package/dist/modules/certificates/CertificateValidator.js +20 -0
- package/dist/modules/certificates/CertificateValidator.js.map +1 -0
- package/dist/modules/certificates/data/Certificate.d.ts +34 -0
- package/dist/modules/certificates/data/Certificate.js +65 -0
- package/dist/modules/certificates/data/Certificate.js.map +1 -0
- package/dist/modules/certificates/data/CertificateConstraint.d.ts +10 -0
- package/dist/modules/certificates/data/CertificateConstraint.js +28 -0
- package/dist/modules/certificates/data/CertificateConstraint.js.map +1 -0
- package/dist/modules/certificates/data/CertificateContent.d.ts +28 -0
- package/dist/modules/certificates/data/CertificateContent.js +70 -0
- package/dist/modules/certificates/data/CertificateContent.js.map +1 -0
- package/dist/modules/certificates/data/CertificateItem.d.ts +11 -0
- package/dist/modules/certificates/data/CertificateItem.js +29 -0
- package/dist/modules/certificates/data/CertificateItem.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts +29 -0
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js +57 -0
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts +31 -0
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js +60 -0
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +9 -0
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +31 -0
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +16 -0
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +41 -0
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts +17 -0
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js +39 -0
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts +18 -0
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js +46 -0
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +19 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +42 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +25 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +55 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts +14 -0
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js +39 -0
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts +16 -0
- package/dist/modules/certificates/data/items/CertificateRoleItem.js +38 -0
- package/dist/modules/certificates/data/items/CertificateRoleItem.js.map +1 -0
- package/dist/modules/challenges/ChallengeController.d.ts +16 -0
- package/dist/modules/challenges/ChallengeController.js +123 -0
- package/dist/modules/challenges/ChallengeController.js.map +1 -0
- package/dist/modules/challenges/backbone/ChallengeAuthClient.d.ts +18 -0
- package/dist/modules/challenges/backbone/ChallengeAuthClient.js +14 -0
- package/dist/modules/challenges/backbone/ChallengeAuthClient.js.map +1 -0
- package/dist/modules/challenges/backbone/ChallengeClient.d.ts +6 -0
- package/dist/modules/challenges/backbone/ChallengeClient.js +11 -0
- package/dist/modules/challenges/backbone/ChallengeClient.js.map +1 -0
- package/dist/modules/challenges/data/Challenge.d.ts +22 -0
- package/dist/modules/challenges/data/Challenge.js +59 -0
- package/dist/modules/challenges/data/Challenge.js.map +1 -0
- package/dist/modules/challenges/data/ChallengeSigned.d.ts +18 -0
- package/dist/modules/challenges/data/ChallengeSigned.js +50 -0
- package/dist/modules/challenges/data/ChallengeSigned.js.map +1 -0
- package/dist/modules/devices/DeviceController.d.ts +27 -0
- package/dist/modules/devices/DeviceController.js +120 -0
- package/dist/modules/devices/DeviceController.js.map +1 -0
- package/dist/modules/devices/DeviceSecretController.d.ts +36 -0
- package/dist/modules/devices/DeviceSecretController.js +163 -0
- package/dist/modules/devices/DeviceSecretController.js.map +1 -0
- package/dist/modules/devices/DevicesController.d.ts +20 -0
- package/dist/modules/devices/DevicesController.js +96 -0
- package/dist/modules/devices/DevicesController.js.map +1 -0
- package/dist/modules/devices/backbone/BackbonePostDevices.d.ts +11 -0
- package/dist/modules/devices/backbone/BackbonePostDevices.js +3 -0
- package/dist/modules/devices/backbone/BackbonePostDevices.js.map +1 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.d.ts +18 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.js +21 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.js.map +1 -0
- package/dist/modules/devices/backbone/DeviceClient.d.ts +7 -0
- package/dist/modules/devices/backbone/DeviceClient.js +15 -0
- package/dist/modules/devices/backbone/DeviceClient.js.map +1 -0
- package/dist/modules/devices/local/Device.d.ts +46 -0
- package/dist/modules/devices/local/Device.js +115 -0
- package/dist/modules/devices/local/Device.js.map +1 -0
- package/dist/modules/devices/local/DeviceSecretCredentials.d.ts +12 -0
- package/dist/modules/devices/local/DeviceSecretCredentials.js +40 -0
- package/dist/modules/devices/local/DeviceSecretCredentials.js.map +1 -0
- package/dist/modules/devices/local/SendDeviceParameters.d.ts +13 -0
- package/dist/modules/devices/local/SendDeviceParameters.js +43 -0
- package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -0
- package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts +33 -0
- package/dist/modules/devices/transmission/DeviceSharedSecret.js +90 -0
- package/dist/modules/devices/transmission/DeviceSharedSecret.js.map +1 -0
- package/dist/modules/files/FileController.d.ts +25 -0
- package/dist/modules/files/FileController.js +196 -0
- package/dist/modules/files/FileController.js.map +1 -0
- package/dist/modules/files/backbone/BackboneGetFiles.d.ts +21 -0
- package/dist/modules/files/backbone/BackboneGetFiles.js +3 -0
- package/dist/modules/files/backbone/BackboneGetFiles.js.map +1 -0
- package/dist/modules/files/backbone/BackbonePostFiles.d.ts +25 -0
- package/dist/modules/files/backbone/BackbonePostFiles.js +3 -0
- package/dist/modules/files/backbone/BackbonePostFiles.js.map +1 -0
- package/dist/modules/files/backbone/FileClient.d.ts +12 -0
- package/dist/modules/files/backbone/FileClient.js +23 -0
- package/dist/modules/files/backbone/FileClient.js.map +1 -0
- package/dist/modules/files/local/CachedFile.d.ts +47 -0
- package/dist/modules/files/local/CachedFile.js +140 -0
- package/dist/modules/files/local/CachedFile.js.map +1 -0
- package/dist/modules/files/local/File.d.ts +27 -0
- package/dist/modules/files/local/File.js +88 -0
- package/dist/modules/files/local/File.js.map +1 -0
- package/dist/modules/files/local/SendFileParameters.d.ts +23 -0
- package/dist/modules/files/local/SendFileParameters.js +65 -0
- package/dist/modules/files/local/SendFileParameters.js.map +1 -0
- package/dist/modules/files/transmission/FileMetadata.d.ts +24 -0
- package/dist/modules/files/transmission/FileMetadata.js +69 -0
- package/dist/modules/files/transmission/FileMetadata.js.map +1 -0
- package/dist/modules/files/transmission/FileReference.d.ts +15 -0
- package/dist/modules/files/transmission/FileReference.js +66 -0
- package/dist/modules/files/transmission/FileReference.js.map +1 -0
- package/dist/modules/index.d.ts +110 -0
- package/dist/modules/index.js +123 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/messages/MessageController.d.ts +29 -0
- package/dist/modules/messages/MessageController.js +316 -0
- package/dist/modules/messages/MessageController.js.map +1 -0
- package/dist/modules/messages/backbone/BackboneGetMessages.d.ts +25 -0
- package/dist/modules/messages/backbone/BackboneGetMessages.js +3 -0
- package/dist/modules/messages/backbone/BackboneGetMessages.js.map +1 -0
- package/dist/modules/messages/backbone/BackbonePostMessages.d.ts +16 -0
- package/dist/modules/messages/backbone/BackbonePostMessages.js +3 -0
- package/dist/modules/messages/backbone/BackbonePostMessages.js.map +1 -0
- package/dist/modules/messages/backbone/MessageClient.d.ts +12 -0
- package/dist/modules/messages/backbone/MessageClient.js +23 -0
- package/dist/modules/messages/backbone/MessageClient.js.map +1 -0
- package/dist/modules/messages/local/CachedMessage.d.ts +23 -0
- package/dist/modules/messages/local/CachedMessage.js +67 -0
- package/dist/modules/messages/local/CachedMessage.js.map +1 -0
- package/dist/modules/messages/local/Message.d.ts +26 -0
- package/dist/modules/messages/local/Message.js +87 -0
- package/dist/modules/messages/local/Message.js.map +1 -0
- package/dist/modules/messages/local/SendMessageParameters.d.ts +15 -0
- package/dist/modules/messages/local/SendMessageParameters.js +44 -0
- package/dist/modules/messages/local/SendMessageParameters.js.map +1 -0
- package/dist/modules/messages/transmission/MessageEnvelope.d.ts +24 -0
- package/dist/modules/messages/transmission/MessageEnvelope.js +81 -0
- package/dist/modules/messages/transmission/MessageEnvelope.js.map +1 -0
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts +16 -0
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js +47 -0
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js.map +1 -0
- package/dist/modules/messages/transmission/MessagePlain.d.ts +29 -0
- package/dist/modules/messages/transmission/MessagePlain.js +68 -0
- package/dist/modules/messages/transmission/MessagePlain.js.map +1 -0
- package/dist/modules/messages/transmission/MessageSignature.d.ts +11 -0
- package/dist/modules/messages/transmission/MessageSignature.js +36 -0
- package/dist/modules/messages/transmission/MessageSignature.js.map +1 -0
- package/dist/modules/messages/transmission/MessageSigned.d.ts +15 -0
- package/dist/modules/messages/transmission/MessageSigned.js +43 -0
- package/dist/modules/messages/transmission/MessageSigned.js.map +1 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +26 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +156 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -0
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.d.ts +17 -0
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.js +3 -0
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.js.map +1 -0
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.d.ts +9 -0
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.js +3 -0
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.js.map +1 -0
- package/dist/modules/relationshipTemplates/backbone/RelationshipTemplateClient.d.ts +11 -0
- package/dist/modules/relationshipTemplates/backbone/RelationshipTemplateClient.js +20 -0
- package/dist/modules/relationshipTemplates/backbone/RelationshipTemplateClient.js.map +1 -0
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +29 -0
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +80 -0
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -0
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +26 -0
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +85 -0
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -0
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +14 -0
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +44 -0
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.d.ts +16 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js +45 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js.map +1 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts +19 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js +61 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map +1 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts +12 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js +39 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js.map +1 -0
- package/dist/modules/relationships/RelationshipSecretController.d.ts +31 -0
- package/dist/modules/relationships/RelationshipSecretController.js +161 -0
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -0
- package/dist/modules/relationships/RelationshipsController.d.ts +47 -0
- package/dist/modules/relationships/RelationshipsController.js +472 -0
- package/dist/modules/relationships/RelationshipsController.js.map +1 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationships.d.ts +18 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationships.js +3 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationships.js.map +1 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationshipsChanges.d.ts +23 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationshipsChanges.js +3 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationshipsChanges.js.map +1 -0
- package/dist/modules/relationships/backbone/BackbonePostRelationshipsChanges.d.ts +8 -0
- package/dist/modules/relationships/backbone/BackbonePostRelationshipsChanges.js +3 -0
- package/dist/modules/relationships/backbone/BackbonePostRelationshipsChanges.js.map +1 -0
- package/dist/modules/relationships/backbone/RelationshipClient.d.ts +17 -0
- package/dist/modules/relationships/backbone/RelationshipClient.js +42 -0
- package/dist/modules/relationships/backbone/RelationshipClient.js.map +1 -0
- package/dist/modules/relationships/local/CachedRelationship.d.ts +18 -0
- package/dist/modules/relationships/local/CachedRelationship.js +53 -0
- package/dist/modules/relationships/local/CachedRelationship.js.map +1 -0
- package/dist/modules/relationships/local/Relationship.d.ts +37 -0
- package/dist/modules/relationships/local/Relationship.js +140 -0
- package/dist/modules/relationships/local/Relationship.js.map +1 -0
- package/dist/modules/relationships/local/SendRelationshipParameters.d.ts +13 -0
- package/dist/modules/relationships/local/SendRelationshipParameters.js +39 -0
- package/dist/modules/relationships/local/SendRelationshipParameters.js.map +1 -0
- package/dist/modules/relationships/transmission/RelationshipStatus.d.ts +8 -0
- package/dist/modules/relationships/transmission/RelationshipStatus.js +13 -0
- package/dist/modules/relationships/transmission/RelationshipStatus.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChange.d.ts +27 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js +72 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.d.ts +20 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js +53 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.d.ts +20 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js +53 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeStatus.d.ts +6 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeStatus.js +11 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeStatus.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeType.d.ts +5 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeType.js +10 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeType.js.map +1 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.d.ts +13 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js +42 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js.map +1 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.d.ts +15 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js +44 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js.map +1 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.d.ts +14 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js +44 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js.map +1 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.d.ts +13 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js +42 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js.map +1 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.d.ts +12 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js +38 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js.map +1 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.d.ts +14 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js +44 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js.map +1 -0
- package/dist/modules/secrets/SecretController.d.ts +39 -0
- package/dist/modules/secrets/SecretController.js +168 -0
- package/dist/modules/secrets/SecretController.js.map +1 -0
- package/dist/modules/secrets/data/SecretContainerCipher.d.ts +25 -0
- package/dist/modules/secrets/data/SecretContainerCipher.js +87 -0
- package/dist/modules/secrets/data/SecretContainerCipher.js.map +1 -0
- package/dist/modules/secrets/data/SecretContainerPlain.d.ts +25 -0
- package/dist/modules/secrets/data/SecretContainerPlain.js +76 -0
- package/dist/modules/secrets/data/SecretContainerPlain.js.map +1 -0
- package/dist/modules/sync/ChangedItems.d.ts +9 -0
- package/dist/modules/sync/ChangedItems.js +17 -0
- package/dist/modules/sync/ChangedItems.js.map +1 -0
- package/dist/modules/sync/DatawalletModificationMapper.d.ts +7 -0
- package/dist/modules/sync/DatawalletModificationMapper.js +62 -0
- package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -0
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts +21 -0
- package/dist/modules/sync/DatawalletModificationsProcessor.js +111 -0
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -0
- package/dist/modules/sync/ExternalEventsProcessor.d.ts +19 -0
- package/dist/modules/sync/ExternalEventsProcessor.js +83 -0
- package/dist/modules/sync/ExternalEventsProcessor.js.map +1 -0
- package/dist/modules/sync/SyncController.d.ts +37 -0
- package/dist/modules/sync/SyncController.js +214 -0
- package/dist/modules/sync/SyncController.js.map +1 -0
- package/dist/modules/sync/SynchronizedCollection.d.ts +18 -0
- package/dist/modules/sync/SynchronizedCollection.js +163 -0
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -0
- package/dist/modules/sync/WhatToSync.d.ts +1 -0
- package/dist/modules/sync/WhatToSync.js +3 -0
- package/dist/modules/sync/WhatToSync.js.map +1 -0
- package/dist/modules/sync/backbone/BackboneDatawalletModification.d.ts +11 -0
- package/dist/modules/sync/backbone/BackboneDatawalletModification.js +3 -0
- package/dist/modules/sync/backbone/BackboneDatawalletModification.js.map +1 -0
- package/dist/modules/sync/backbone/BackboneExternalEvent.d.ts +8 -0
- package/dist/modules/sync/backbone/BackboneExternalEvent.js +3 -0
- package/dist/modules/sync/backbone/BackboneExternalEvent.js.map +1 -0
- package/dist/modules/sync/backbone/BackboneSyncRun.d.ts +9 -0
- package/dist/modules/sync/backbone/BackboneSyncRun.js +3 -0
- package/dist/modules/sync/backbone/BackboneSyncRun.js.map +1 -0
- package/dist/modules/sync/backbone/CreateDatawalletModifications.d.ts +19 -0
- package/dist/modules/sync/backbone/CreateDatawalletModifications.js +3 -0
- package/dist/modules/sync/backbone/CreateDatawalletModifications.js.map +1 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.d.ts +23 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.js +3 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.js.map +1 -0
- package/dist/modules/sync/backbone/GetDatawalletModifications.d.ts +3 -0
- package/dist/modules/sync/backbone/GetDatawalletModifications.js +3 -0
- package/dist/modules/sync/backbone/GetDatawalletModifications.js.map +1 -0
- package/dist/modules/sync/backbone/StartSyncRun.d.ts +9 -0
- package/dist/modules/sync/backbone/StartSyncRun.js +9 -0
- package/dist/modules/sync/backbone/StartSyncRun.js.map +1 -0
- package/dist/modules/sync/backbone/SyncClient.d.ts +15 -0
- package/dist/modules/sync/backbone/SyncClient.js +23 -0
- package/dist/modules/sync/backbone/SyncClient.js.map +1 -0
- package/dist/modules/sync/local/DatawalletModification.d.ts +30 -0
- package/dist/modules/sync/local/DatawalletModification.js +71 -0
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -0
- package/dist/modules/tokens/AnonymousTokenController.d.ts +11 -0
- package/dist/modules/tokens/AnonymousTokenController.js +47 -0
- package/dist/modules/tokens/AnonymousTokenController.js.map +1 -0
- package/dist/modules/tokens/TokenController.d.ts +24 -0
- package/dist/modules/tokens/TokenController.js +137 -0
- package/dist/modules/tokens/TokenController.js.map +1 -0
- package/dist/modules/tokens/backbone/AnonymousTokenClient.d.ts +6 -0
- package/dist/modules/tokens/backbone/AnonymousTokenClient.js +11 -0
- package/dist/modules/tokens/backbone/AnonymousTokenClient.js.map +1 -0
- package/dist/modules/tokens/backbone/BackboneGetTokens.d.ts +11 -0
- package/dist/modules/tokens/backbone/BackboneGetTokens.js +3 -0
- package/dist/modules/tokens/backbone/BackboneGetTokens.js.map +1 -0
- package/dist/modules/tokens/backbone/BackbonePostTokens.d.ts +9 -0
- package/dist/modules/tokens/backbone/BackbonePostTokens.js +3 -0
- package/dist/modules/tokens/backbone/BackbonePostTokens.js.map +1 -0
- package/dist/modules/tokens/backbone/TokenClient.d.ts +11 -0
- package/dist/modules/tokens/backbone/TokenClient.js +20 -0
- package/dist/modules/tokens/backbone/TokenClient.js.map +1 -0
- package/dist/modules/tokens/local/CachedToken.d.ts +18 -0
- package/dist/modules/tokens/local/CachedToken.js +53 -0
- package/dist/modules/tokens/local/CachedToken.js.map +1 -0
- package/dist/modules/tokens/local/SendTokenParameters.d.ts +14 -0
- package/dist/modules/tokens/local/SendTokenParameters.js +43 -0
- package/dist/modules/tokens/local/SendTokenParameters.js.map +1 -0
- package/dist/modules/tokens/local/Token.d.ts +28 -0
- package/dist/modules/tokens/local/Token.js +91 -0
- package/dist/modules/tokens/local/Token.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts +10 -0
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js +34 -0
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenContentFile.d.ts +12 -0
- package/dist/modules/tokens/transmission/TokenContentFile.js +39 -0
- package/dist/modules/tokens/transmission/TokenContentFile.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts +12 -0
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js +39 -0
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenReference.d.ts +14 -0
- package/dist/modules/tokens/transmission/TokenReference.js +71 -0
- package/dist/modules/tokens/transmission/TokenReference.js.map +1 -0
- package/dist/util/PasswordGenerator.d.ts +28 -0
- package/dist/util/PasswordGenerator.js +179 -0
- package/dist/util/PasswordGenerator.js.map +1 -0
- package/dist/util/Random.d.ts +50 -0
- package/dist/util/Random.js +129 -0
- package/dist/util/Random.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.js +15 -0
- package/dist/util/index.js.map +1 -0
- package/lib-web/nmshd.transport.js +54733 -0
- package/lib-web/nmshd.transport.js.map +1 -0
- package/lib-web/nmshd.transport.min.js +3 -0
- package/lib-web/nmshd.transport.min.js.map +1 -0
- package/package.json +109 -0
- package/ui5.yaml +9 -0
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
};
|
|
11
|
+
var Identity_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Identity = exports.Realm = void 0;
|
|
14
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const crypto_1 = require("@nmshd/crypto");
|
|
16
|
+
const CoreSerializableAsync_1 = require("../../../core/CoreSerializableAsync");
|
|
17
|
+
const CoreAddress_1 = require("../../../core/types/CoreAddress");
|
|
18
|
+
const CoreDate_1 = require("../../../core/types/CoreDate");
|
|
19
|
+
var Realm;
|
|
20
|
+
(function (Realm) {
|
|
21
|
+
Realm["Dev"] = "dev";
|
|
22
|
+
Realm["Stage"] = "id0";
|
|
23
|
+
Realm["Prod"] = "id1";
|
|
24
|
+
})(Realm = exports.Realm || (exports.Realm = {}));
|
|
25
|
+
let Identity = Identity_1 = class Identity extends CoreSerializableAsync_1.CoreSerializableAsync {
|
|
26
|
+
static async from(value) {
|
|
27
|
+
return await super.fromT(value, Identity_1);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, ts_serval_1.validate)(),
|
|
32
|
+
(0, ts_serval_1.serialize)(),
|
|
33
|
+
__metadata("design:type", CoreAddress_1.CoreAddress)
|
|
34
|
+
], Identity.prototype, "address", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, ts_serval_1.validate)(),
|
|
37
|
+
(0, ts_serval_1.serialize)(),
|
|
38
|
+
__metadata("design:type", crypto_1.CryptoSignaturePublicKey)
|
|
39
|
+
], Identity.prototype, "publicKey", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, ts_serval_1.validate)(),
|
|
42
|
+
(0, ts_serval_1.serialize)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Identity.prototype, "realm", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, ts_serval_1.validate)(),
|
|
47
|
+
(0, ts_serval_1.serialize)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Identity.prototype, "name", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, ts_serval_1.validate)(),
|
|
52
|
+
(0, ts_serval_1.serialize)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], Identity.prototype, "description", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, ts_serval_1.validate)(),
|
|
57
|
+
(0, ts_serval_1.serialize)(),
|
|
58
|
+
__metadata("design:type", CoreDate_1.CoreDate)
|
|
59
|
+
], Identity.prototype, "createdAt", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, ts_serval_1.validate)(),
|
|
62
|
+
(0, ts_serval_1.serialize)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], Identity.prototype, "type", void 0);
|
|
65
|
+
Identity = Identity_1 = __decorate([
|
|
66
|
+
(0, ts_serval_1.type)("Identity")
|
|
67
|
+
], Identity);
|
|
68
|
+
exports.Identity = Identity;
|
|
69
|
+
//# sourceMappingURL=Identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Identity.js","sourceRoot":"","sources":["../../../../src/modules/accounts/data/Identity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAmF;AACnF,+EAAmG;AACnG,iEAA6D;AAC7D,2DAAuD;AAmBvD,IAAY,KAIX;AAJD,WAAY,KAAK;IACb,oBAAW,CAAA;IACX,sBAAa,CAAA;IACb,qBAAY,CAAA;AAChB,CAAC,EAJW,KAAK,GAAL,aAAK,KAAL,aAAK,QAIhB;AAGD,IAAa,QAAQ,gBAArB,MAAa,QAAS,SAAQ,6CAAqB;IA6BxC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAgB;QACrC,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,UAAQ,CAAC,CAAA;IAC7C,CAAC;CACJ,CAAA;AA7BG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,yBAAW;yCAAA;AAI3B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,iCAAwB;2CAAA;AAI1C;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;uCACO;AAInB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;sCACO;AAInB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;6CACc;AAI1B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,mBAAQ;2CAAA;AAI1B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;sCACa;AA3BhB,QAAQ;IADpB,IAAA,gBAAI,EAAC,UAAU,CAAC;GACJ,QAAQ,CAgCpB;AAhCY,4BAAQ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CryptoSecretKey, CryptoSignaturePrivateKey, CryptoSignaturePublicKey, ICryptoSecretKey, ICryptoSignaturePrivateKey, ICryptoSignaturePublicKey } from "@nmshd/crypto";
|
|
2
|
+
import { CoreSerializableAsync, ICoreSerializableAsync } from "../../../core";
|
|
3
|
+
import { Realm } from "./Identity";
|
|
4
|
+
export interface IIdentitySecretCredentials extends ICoreSerializableAsync {
|
|
5
|
+
publicKey?: ICryptoSignaturePublicKey;
|
|
6
|
+
realm: Realm;
|
|
7
|
+
synchronizationKey: ICryptoSecretKey;
|
|
8
|
+
privateKey?: ICryptoSignaturePrivateKey;
|
|
9
|
+
}
|
|
10
|
+
export declare class IdentitySecretCredentials extends CoreSerializableAsync implements IIdentitySecretCredentials {
|
|
11
|
+
realm: Realm;
|
|
12
|
+
publicKey?: CryptoSignaturePublicKey;
|
|
13
|
+
synchronizationKey: CryptoSecretKey;
|
|
14
|
+
privateKey?: CryptoSignaturePrivateKey;
|
|
15
|
+
static from(value: IIdentitySecretCredentials): Promise<IdentitySecretCredentials>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
};
|
|
11
|
+
var IdentitySecretCredentials_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.IdentitySecretCredentials = void 0;
|
|
14
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const crypto_1 = require("@nmshd/crypto");
|
|
16
|
+
const core_1 = require("../../../core");
|
|
17
|
+
const Identity_1 = require("./Identity");
|
|
18
|
+
let IdentitySecretCredentials = IdentitySecretCredentials_1 = class IdentitySecretCredentials extends core_1.CoreSerializableAsync {
|
|
19
|
+
static async from(value) {
|
|
20
|
+
return await super.fromT(value, IdentitySecretCredentials_1);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, ts_serval_1.validate)(),
|
|
25
|
+
(0, ts_serval_1.serialize)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], IdentitySecretCredentials.prototype, "realm", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
30
|
+
(0, ts_serval_1.serialize)(),
|
|
31
|
+
__metadata("design:type", crypto_1.CryptoSignaturePublicKey)
|
|
32
|
+
], IdentitySecretCredentials.prototype, "publicKey", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, ts_serval_1.validate)(),
|
|
35
|
+
(0, ts_serval_1.serialize)(),
|
|
36
|
+
__metadata("design:type", crypto_1.CryptoSecretKey)
|
|
37
|
+
], IdentitySecretCredentials.prototype, "synchronizationKey", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
40
|
+
(0, ts_serval_1.serialize)(),
|
|
41
|
+
__metadata("design:type", crypto_1.CryptoSignaturePrivateKey)
|
|
42
|
+
], IdentitySecretCredentials.prototype, "privateKey", void 0);
|
|
43
|
+
IdentitySecretCredentials = IdentitySecretCredentials_1 = __decorate([
|
|
44
|
+
(0, ts_serval_1.type)("IdentitySecretCredentials")
|
|
45
|
+
], IdentitySecretCredentials);
|
|
46
|
+
exports.IdentitySecretCredentials = IdentitySecretCredentials;
|
|
47
|
+
//# sourceMappingURL=IdentitySecretCredentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentitySecretCredentials.js","sourceRoot":"","sources":["../../../../src/modules/accounts/data/IdentitySecretCredentials.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAOsB;AACtB,wCAA6E;AAC7E,yCAAkC;AAUlC,IAAa,yBAAyB,iCAAtC,MAAa,yBAA0B,SAAQ,4BAAqB;IAiBzD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAiC;QACtD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,2BAAyB,CAAC,CAAA;IAC9D,CAAC;CACJ,CAAA;AAjBG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;wDACO;AAInB;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACO,iCAAwB;4DAAA;AAI3C;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACe,wBAAe;qEAAA;AAI1C;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACQ,kCAAyB;6DAAA;AAfpC,yBAAyB;IADrC,IAAA,gBAAI,EAAC,2BAA2B,CAAC;GACrB,yBAAyB,CAoBrC;AApBY,8DAAyB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TransportController } from "../../core";
|
|
2
|
+
import { AccountController } from "../accounts/AccountController";
|
|
3
|
+
/**
|
|
4
|
+
* The CertificateController keeps track of all created and received certificates.
|
|
5
|
+
*
|
|
6
|
+
* For example:
|
|
7
|
+
* - Store certificates for technical identities (per relationship)
|
|
8
|
+
* - Store certificates for own attributes
|
|
9
|
+
* - Store certificates for own relationships/roles/authorization
|
|
10
|
+
* - Store certificates for other identities
|
|
11
|
+
*/
|
|
12
|
+
export declare class CertificateController extends TransportController {
|
|
13
|
+
constructor(parent: AccountController);
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CertificateController = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
/**
|
|
6
|
+
* The CertificateController keeps track of all created and received certificates.
|
|
7
|
+
*
|
|
8
|
+
* For example:
|
|
9
|
+
* - Store certificates for technical identities (per relationship)
|
|
10
|
+
* - Store certificates for own attributes
|
|
11
|
+
* - Store certificates for own relationships/roles/authorization
|
|
12
|
+
* - Store certificates for other identities
|
|
13
|
+
*/
|
|
14
|
+
class CertificateController extends core_1.TransportController {
|
|
15
|
+
constructor(parent) {
|
|
16
|
+
super(core_1.ControllerName.Certificate, parent);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.CertificateController = CertificateController;
|
|
20
|
+
//# sourceMappingURL=CertificateController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CertificateController.js","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateController.ts"],"names":[],"mappings":";;;AAAA,qCAAgE;AAGhE;;;;;;;;GAQG;AACH,MAAa,qBAAsB,SAAQ,0BAAmB;IAC1D,YAAmB,MAAyB;QACxC,KAAK,CAAC,qBAAc,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC;CACJ;AAJD,sDAIC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IDatabaseCollection } from "@js-soft/docdb-access-abstractions";
|
|
2
|
+
import { ICryptoSignaturePublicKey } from "@nmshd/crypto";
|
|
3
|
+
import { ICoreAddress, ICoreDate, TransportController } from "../../core";
|
|
4
|
+
import { AccountController } from "../accounts/AccountController";
|
|
5
|
+
import { Certificate } from "./data/Certificate";
|
|
6
|
+
import { ICertificateConstraint } from "./data/CertificateConstraint";
|
|
7
|
+
import { ICertificateContent } from "./data/CertificateContent";
|
|
8
|
+
import { ICertificateItem } from "./data/CertificateItem";
|
|
9
|
+
/**
|
|
10
|
+
* The CertificateIssuer combines the functionality to create new certificates
|
|
11
|
+
* for own identity (e.g. for technical communication) or others (e.g. verification
|
|
12
|
+
* of other identities or certification of attributes).
|
|
13
|
+
*/
|
|
14
|
+
export declare class CertificateIssuer extends TransportController {
|
|
15
|
+
certificatesIssued: IDatabaseCollection;
|
|
16
|
+
constructor(parent: AccountController);
|
|
17
|
+
init(): Promise<this>;
|
|
18
|
+
issueCertificate(value: CertificateContentParam | ICertificateContent): Promise<Certificate>;
|
|
19
|
+
}
|
|
20
|
+
export declare class CertificateContentParam implements ICertificateContent {
|
|
21
|
+
issuedAt: ICoreDate;
|
|
22
|
+
issuer: ICoreAddress;
|
|
23
|
+
subject: ICoreAddress;
|
|
24
|
+
subjectPublicKey: ICryptoSignaturePublicKey;
|
|
25
|
+
constraints: ICertificateConstraint[];
|
|
26
|
+
items: ICertificateItem[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CertificateContentParam = exports.CertificateIssuer = void 0;
|
|
4
|
+
const crypto_1 = require("@nmshd/crypto");
|
|
5
|
+
const core_1 = require("../../core");
|
|
6
|
+
const DbCollectionNames_1 = require("../../core/DbCollectionNames");
|
|
7
|
+
const Certificate_1 = require("./data/Certificate");
|
|
8
|
+
const CertificateContent_1 = require("./data/CertificateContent");
|
|
9
|
+
/**
|
|
10
|
+
* The CertificateIssuer combines the functionality to create new certificates
|
|
11
|
+
* for own identity (e.g. for technical communication) or others (e.g. verification
|
|
12
|
+
* of other identities or certification of attributes).
|
|
13
|
+
*/
|
|
14
|
+
class CertificateIssuer extends core_1.TransportController {
|
|
15
|
+
constructor(parent) {
|
|
16
|
+
super(core_1.ControllerName.CertificateIssuer, parent);
|
|
17
|
+
}
|
|
18
|
+
async init() {
|
|
19
|
+
await super.init();
|
|
20
|
+
this.certificatesIssued = await this.db.getCollection(DbCollectionNames_1.DbCollectionNames.CertificatesIssued);
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
async issueCertificate(value) {
|
|
24
|
+
const content = await CertificateContent_1.CertificateContent.from(value);
|
|
25
|
+
const serializedContent = content.serialize();
|
|
26
|
+
const contentBuffer = crypto_1.CoreBuffer.fromUtf8(serializedContent);
|
|
27
|
+
const signature = await this.parent.identity.sign(contentBuffer);
|
|
28
|
+
const cert = await Certificate_1.Certificate.from({
|
|
29
|
+
content: serializedContent,
|
|
30
|
+
signature: signature
|
|
31
|
+
});
|
|
32
|
+
return cert;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.CertificateIssuer = CertificateIssuer;
|
|
36
|
+
class CertificateContentParam {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.issuedAt = core_1.CoreDate.utc();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.CertificateContentParam = CertificateContentParam;
|
|
42
|
+
//# sourceMappingURL=CertificateIssuer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CertificateIssuer.js","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateIssuer.ts"],"names":[],"mappings":";;;AACA,0CAAqE;AACrE,qCAAmG;AACnG,oEAAgE;AAEhE,oDAAgD;AAEhD,kEAAmF;AAGnF;;;;GAIG;AACH,MAAa,iBAAkB,SAAQ,0BAAmB;IAGtD,YAAmB,MAAyB;QACxC,KAAK,CAAC,qBAAc,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;IACnD,CAAC;IAEM,KAAK,CAAC,IAAI;QACb,MAAM,KAAK,CAAC,IAAI,EAAE,CAAA;QAElB,IAAI,CAAC,kBAAkB,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,qCAAiB,CAAC,kBAAkB,CAAC,CAAA;QAC3F,OAAO,IAAI,CAAA;IACf,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,KAAoD;QAC9E,MAAM,OAAO,GAAG,MAAM,uCAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACpD,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAA;QAC7C,MAAM,aAAa,GAAe,mBAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;QAExE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAEhE,MAAM,IAAI,GAAgB,MAAM,yBAAW,CAAC,IAAI,CAAC;YAC7C,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE,SAAS;SACvB,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACf,CAAC;CACJ;AA3BD,8CA2BC;AAED,MAAa,uBAAuB;IAApC;QACW,aAAQ,GAAc,eAAQ,CAAC,GAAG,EAAE,CAAA;IAM/C,CAAC;CAAA;AAPD,0DAOC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TransportController } from "../../core";
|
|
2
|
+
import { AccountController } from "../accounts/AccountController";
|
|
3
|
+
/**
|
|
4
|
+
* The CertificateValidator includes all functionality for validating certificates.
|
|
5
|
+
* - Check Issuer (+Signature)
|
|
6
|
+
* - Check Subject
|
|
7
|
+
* - Check Revocation (online vs. cached)
|
|
8
|
+
* -> possibly register for push notifications on status changes of this certificate
|
|
9
|
+
* - Check Constraints (Time, Region, ...)
|
|
10
|
+
* - Check Content
|
|
11
|
+
*/
|
|
12
|
+
export declare class CertificateValidator extends TransportController {
|
|
13
|
+
constructor(parent: AccountController);
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CertificateValidator = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
/**
|
|
6
|
+
* The CertificateValidator includes all functionality for validating certificates.
|
|
7
|
+
* - Check Issuer (+Signature)
|
|
8
|
+
* - Check Subject
|
|
9
|
+
* - Check Revocation (online vs. cached)
|
|
10
|
+
* -> possibly register for push notifications on status changes of this certificate
|
|
11
|
+
* - Check Constraints (Time, Region, ...)
|
|
12
|
+
* - Check Content
|
|
13
|
+
*/
|
|
14
|
+
class CertificateValidator extends core_1.TransportController {
|
|
15
|
+
constructor(parent) {
|
|
16
|
+
super(core_1.ControllerName.CertificateValidator, parent);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.CertificateValidator = CertificateValidator;
|
|
20
|
+
//# sourceMappingURL=CertificateValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CertificateValidator.js","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateValidator.ts"],"names":[],"mappings":";;;AAAA,qCAAgE;AAGhE;;;;;;;;GAQG;AACH,MAAa,oBAAqB,SAAQ,0BAAmB;IACzD,YAAmB,MAAyB;QACxC,KAAK,CAAC,qBAAc,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAA;IACtD,CAAC;CACJ;AAJD,oDAIC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CryptoSignature, CryptoSignaturePublicKey, ICryptoSignature } from "@nmshd/crypto";
|
|
2
|
+
import { CoreSerializableAsync, ICoreSerializableAsync } from "../../../core";
|
|
3
|
+
export interface ICertificate extends ICoreSerializableAsync {
|
|
4
|
+
content: string;
|
|
5
|
+
signature: ICryptoSignature;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A Certificate is digitally signed data which is issued by one user A (issuer) for another user B (subject).
|
|
9
|
+
* The subject is eligible to share the certificate to any other user C, who in turn can verify, if the information
|
|
10
|
+
* provided really comes from user A. Certificates always contain structured data, thus it is machine readable and
|
|
11
|
+
* can be used for automatic checks.
|
|
12
|
+
*
|
|
13
|
+
* The content of a certificate is comparable with standardized SSL/TLS certificates, but they are not compatible
|
|
14
|
+
* with each other. However, the content can be transformed.
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export declare class Certificate extends CoreSerializableAsync {
|
|
19
|
+
content: string;
|
|
20
|
+
signature: CryptoSignature;
|
|
21
|
+
static from(value: ICertificate): Promise<Certificate>;
|
|
22
|
+
static deserialize(value: string): Promise<Certificate>;
|
|
23
|
+
/**
|
|
24
|
+
* Checks the validity of the digital signature. You have to provide the
|
|
25
|
+
* public key of the issuer.
|
|
26
|
+
*
|
|
27
|
+
* Careful: This method does only check the digital signature (if the certificate
|
|
28
|
+
* really comes from the issuer). Anything else, like validity, revocation or other
|
|
29
|
+
* constraints is not checked!
|
|
30
|
+
*
|
|
31
|
+
* @param publicKey The issuer's public key.
|
|
32
|
+
*/
|
|
33
|
+
verify(publicKey: CryptoSignaturePublicKey): Promise<boolean>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
};
|
|
11
|
+
var Certificate_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Certificate = void 0;
|
|
14
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const crypto_1 = require("@nmshd/crypto");
|
|
16
|
+
const core_1 = require("../../../core");
|
|
17
|
+
/**
|
|
18
|
+
* A Certificate is digitally signed data which is issued by one user A (issuer) for another user B (subject).
|
|
19
|
+
* The subject is eligible to share the certificate to any other user C, who in turn can verify, if the information
|
|
20
|
+
* provided really comes from user A. Certificates always contain structured data, thus it is machine readable and
|
|
21
|
+
* can be used for automatic checks.
|
|
22
|
+
*
|
|
23
|
+
* The content of a certificate is comparable with standardized SSL/TLS certificates, but they are not compatible
|
|
24
|
+
* with each other. However, the content can be transformed.
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
let Certificate = Certificate_1 = class Certificate extends core_1.CoreSerializableAsync {
|
|
29
|
+
static async from(value) {
|
|
30
|
+
return await super.fromT(value, Certificate_1);
|
|
31
|
+
}
|
|
32
|
+
static async deserialize(value) {
|
|
33
|
+
return await super.deserializeT(value, Certificate_1);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Checks the validity of the digital signature. You have to provide the
|
|
37
|
+
* public key of the issuer.
|
|
38
|
+
*
|
|
39
|
+
* Careful: This method does only check the digital signature (if the certificate
|
|
40
|
+
* really comes from the issuer). Anything else, like validity, revocation or other
|
|
41
|
+
* constraints is not checked!
|
|
42
|
+
*
|
|
43
|
+
* @param publicKey The issuer's public key.
|
|
44
|
+
*/
|
|
45
|
+
async verify(publicKey) {
|
|
46
|
+
const buffer = crypto_1.CoreBuffer.fromUtf8(this.content);
|
|
47
|
+
const correct = await core_1.CoreCrypto.verify(buffer, this.signature, publicKey);
|
|
48
|
+
return correct;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, ts_serval_1.validate)(),
|
|
53
|
+
(0, ts_serval_1.serialize)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Certificate.prototype, "content", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, ts_serval_1.validate)(),
|
|
58
|
+
(0, ts_serval_1.serialize)(),
|
|
59
|
+
__metadata("design:type", crypto_1.CryptoSignature)
|
|
60
|
+
], Certificate.prototype, "signature", void 0);
|
|
61
|
+
Certificate = Certificate_1 = __decorate([
|
|
62
|
+
(0, ts_serval_1.type)("Certificate")
|
|
63
|
+
], Certificate);
|
|
64
|
+
exports.Certificate = Certificate;
|
|
65
|
+
//# sourceMappingURL=Certificate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Certificate.js","sourceRoot":"","sources":["../../../../src/modules/certificates/data/Certificate.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAuG;AACvG,wCAAyF;AAOzF;;;;;;;;;;GAUG;AAEH,IAAa,WAAW,mBAAxB,MAAa,WAAY,SAAQ,4BAAqB;IAS3C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAmB;QACxC,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,aAAW,CAAC,CAAA;IAChD,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAa;QACzC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,aAAW,CAAC,CAAA;IACvD,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,MAAM,CAAC,SAAmC;QACnD,MAAM,MAAM,GAAG,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAChD,MAAM,OAAO,GAAG,MAAM,iBAAU,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAC1E,OAAO,OAAO,CAAA;IAClB,CAAC;CACJ,CAAA;AA7BG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;4CACU;AAItB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;8CAAA;AAPxB,WAAW;IADvB,IAAA,gBAAI,EAAC,aAAa,CAAC;GACP,WAAW,CAgCvB;AAhCY,kCAAW"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CoreSerializableAsync, ICoreSerializableAsync } from "../../../core";
|
|
2
|
+
export interface ICertificateConstraint extends ICoreSerializableAsync {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A CertificateConstraint limits a Certificate to a specific time, region or identity.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CertificateConstraint extends CoreSerializableAsync {
|
|
8
|
+
static from(value: ICertificateConstraint): Promise<CertificateConstraint>;
|
|
9
|
+
static deserialize(value: string): Promise<CertificateConstraint>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 CertificateConstraint_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CertificateConstraint = void 0;
|
|
11
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
12
|
+
const core_1 = require("../../../core");
|
|
13
|
+
/**
|
|
14
|
+
* A CertificateConstraint limits a Certificate to a specific time, region or identity.
|
|
15
|
+
*/
|
|
16
|
+
let CertificateConstraint = CertificateConstraint_1 = class CertificateConstraint extends core_1.CoreSerializableAsync {
|
|
17
|
+
static async from(value) {
|
|
18
|
+
return await super.fromT(value, CertificateConstraint_1);
|
|
19
|
+
}
|
|
20
|
+
static async deserialize(value) {
|
|
21
|
+
return await super.deserializeT(value, CertificateConstraint_1);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
CertificateConstraint = CertificateConstraint_1 = __decorate([
|
|
25
|
+
(0, ts_serval_1.type)("CertificateConstraint")
|
|
26
|
+
], CertificateConstraint);
|
|
27
|
+
exports.CertificateConstraint = CertificateConstraint;
|
|
28
|
+
//# sourceMappingURL=CertificateConstraint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CertificateConstraint.js","sourceRoot":"","sources":["../../../../src/modules/certificates/data/CertificateConstraint.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,kDAAyC;AACzC,wCAA6E;AAI7E;;GAEG;AAEH,IAAa,qBAAqB,6BAAlC,MAAa,qBAAsB,SAAQ,4BAAqB;IACrD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAA6B;QAClD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,uBAAqB,CAAC,CAAA;IAC1D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAa;QACzC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,uBAAqB,CAAC,CAAA;IACjE,CAAC;CACJ,CAAA;AARY,qBAAqB;IADjC,IAAA,gBAAI,EAAC,uBAAuB,CAAC;GACjB,qBAAqB,CAQjC;AARY,sDAAqB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CryptoSignaturePublicKey, ICryptoSignaturePublicKey } from "@nmshd/crypto";
|
|
2
|
+
import { CoreAddress, CoreDate, CoreSerializable, CoreSerializableAsync, ICoreAddress, ICoreDate, ICoreSerializable, ICoreSerializableAsync } from "../../../core";
|
|
3
|
+
import { CertificateConstraint, ICertificateConstraint } from "./CertificateConstraint";
|
|
4
|
+
import { CertificateItem, ICertificateItem } from "./CertificateItem";
|
|
5
|
+
export interface ICertificateContent extends ICoreSerializableAsync {
|
|
6
|
+
issuedAt: ICoreDate;
|
|
7
|
+
issuer: ICoreAddress;
|
|
8
|
+
issuerData?: ICoreSerializable;
|
|
9
|
+
subject: ICoreAddress;
|
|
10
|
+
subjectPublicKey: ICryptoSignaturePublicKey;
|
|
11
|
+
constraints: ICertificateConstraint[];
|
|
12
|
+
items: ICertificateItem[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A CertificateContent is the content which should be digitally signed. The digital signature
|
|
16
|
+
* is done on top of the serialized content of this data structure.
|
|
17
|
+
*/
|
|
18
|
+
export declare class CertificateContent extends CoreSerializableAsync {
|
|
19
|
+
issuedAt: CoreDate;
|
|
20
|
+
issuer: CoreAddress;
|
|
21
|
+
issuerData: CoreSerializable;
|
|
22
|
+
subject: CoreAddress;
|
|
23
|
+
subjectPublicKey: CryptoSignaturePublicKey;
|
|
24
|
+
constraints: CertificateConstraint[];
|
|
25
|
+
items: CertificateItem[];
|
|
26
|
+
static from(value: ICertificateContent): Promise<CertificateContent>;
|
|
27
|
+
static deserialize(value: string): Promise<CertificateContent>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
};
|
|
11
|
+
var CertificateContent_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.CertificateContent = void 0;
|
|
14
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
|
+
const crypto_1 = require("@nmshd/crypto");
|
|
16
|
+
const core_1 = require("../../../core");
|
|
17
|
+
const CertificateConstraint_1 = require("./CertificateConstraint");
|
|
18
|
+
const CertificateItem_1 = require("./CertificateItem");
|
|
19
|
+
/**
|
|
20
|
+
* A CertificateContent is the content which should be digitally signed. The digital signature
|
|
21
|
+
* is done on top of the serialized content of this data structure.
|
|
22
|
+
*/
|
|
23
|
+
let CertificateContent = CertificateContent_1 = class CertificateContent extends core_1.CoreSerializableAsync {
|
|
24
|
+
static async from(value) {
|
|
25
|
+
return await super.fromT(value, CertificateContent_1);
|
|
26
|
+
}
|
|
27
|
+
static async deserialize(value) {
|
|
28
|
+
return await super.deserializeT(value, CertificateContent_1);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, ts_serval_1.validate)(),
|
|
33
|
+
(0, ts_serval_1.serialize)(),
|
|
34
|
+
__metadata("design:type", core_1.CoreDate)
|
|
35
|
+
], CertificateContent.prototype, "issuedAt", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, ts_serval_1.validate)(),
|
|
38
|
+
(0, ts_serval_1.serialize)(),
|
|
39
|
+
__metadata("design:type", core_1.CoreAddress)
|
|
40
|
+
], CertificateContent.prototype, "issuer", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, ts_serval_1.validate)(),
|
|
43
|
+
(0, ts_serval_1.serialize)(),
|
|
44
|
+
__metadata("design:type", core_1.CoreSerializable)
|
|
45
|
+
], CertificateContent.prototype, "issuerData", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, ts_serval_1.validate)(),
|
|
48
|
+
(0, ts_serval_1.serialize)(),
|
|
49
|
+
__metadata("design:type", core_1.CoreAddress)
|
|
50
|
+
], CertificateContent.prototype, "subject", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, ts_serval_1.validate)(),
|
|
53
|
+
(0, ts_serval_1.serialize)(),
|
|
54
|
+
__metadata("design:type", crypto_1.CryptoSignaturePublicKey)
|
|
55
|
+
], CertificateContent.prototype, "subjectPublicKey", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, ts_serval_1.validate)(),
|
|
58
|
+
(0, ts_serval_1.serialize)({ type: CertificateConstraint_1.CertificateConstraint }),
|
|
59
|
+
__metadata("design:type", Array)
|
|
60
|
+
], CertificateContent.prototype, "constraints", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, ts_serval_1.validate)(),
|
|
63
|
+
(0, ts_serval_1.serialize)({ type: CertificateItem_1.CertificateItem }),
|
|
64
|
+
__metadata("design:type", Array)
|
|
65
|
+
], CertificateContent.prototype, "items", void 0);
|
|
66
|
+
CertificateContent = CertificateContent_1 = __decorate([
|
|
67
|
+
(0, ts_serval_1.type)("CertificateContent")
|
|
68
|
+
], CertificateContent);
|
|
69
|
+
exports.CertificateContent = CertificateContent;
|
|
70
|
+
//# sourceMappingURL=CertificateContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CertificateContent.js","sourceRoot":"","sources":["../../../../src/modules/certificates/data/CertificateContent.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAmF;AACnF,wCASsB;AACtB,mEAAuF;AACvF,uDAAqE;AAYrE;;;GAGG;AAEH,IAAa,kBAAkB,0BAA/B,MAAa,kBAAmB,SAAQ,4BAAqB;IA6BlD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAA0B;QAC/C,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,oBAAkB,CAAC,CAAA;IACvD,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAa;QACzC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,oBAAkB,CAAC,CAAA;IAC9D,CAAC;CACJ,CAAA;AAjCG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACK,eAAQ;oDAAA;AAIzB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACG,kBAAW;kDAAA;AAI1B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACO,uBAAgB;sDAAA;AAInC;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,kBAAW;mDAAA;AAI3B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACa,iCAAwB;4DAAA;AAIjD;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,EAAC,EAAE,IAAI,EAAE,6CAAqB,EAAE,CAAC;;uDACA;AAI3C;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,EAAC,EAAE,IAAI,EAAE,iCAAe,EAAE,CAAC;;iDACN;AA3BtB,kBAAkB;IAD9B,IAAA,gBAAI,EAAC,oBAAoB,CAAC;GACd,kBAAkB,CAoC9B;AApCY,gDAAkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CoreSerializableAsync, ICoreSerializableAsync } from "../../../core";
|
|
2
|
+
export interface ICertificateItem extends ICoreSerializableAsync {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A CertificateItem is a digitally signed hash with information about the signature date,
|
|
6
|
+
* the signer, the signature algorithm and the version.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CertificateItem extends CoreSerializableAsync {
|
|
9
|
+
static from(value: ICertificateItem): Promise<CertificateItem>;
|
|
10
|
+
static deserialize(value: string): Promise<CertificateItem>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 CertificateItem_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CertificateItem = void 0;
|
|
11
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
12
|
+
const core_1 = require("../../../core");
|
|
13
|
+
/**
|
|
14
|
+
* A CertificateItem is a digitally signed hash with information about the signature date,
|
|
15
|
+
* the signer, the signature algorithm and the version.
|
|
16
|
+
*/
|
|
17
|
+
let CertificateItem = CertificateItem_1 = class CertificateItem extends core_1.CoreSerializableAsync {
|
|
18
|
+
static async from(value) {
|
|
19
|
+
return await super.fromT(value, CertificateItem_1);
|
|
20
|
+
}
|
|
21
|
+
static async deserialize(value) {
|
|
22
|
+
return await super.deserializeT(value, CertificateItem_1);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
CertificateItem = CertificateItem_1 = __decorate([
|
|
26
|
+
(0, ts_serval_1.type)("CertificateItem")
|
|
27
|
+
], CertificateItem);
|
|
28
|
+
exports.CertificateItem = CertificateItem;
|
|
29
|
+
//# sourceMappingURL=CertificateItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CertificateItem.js","sourceRoot":"","sources":["../../../../src/modules/certificates/data/CertificateItem.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,kDAAyC;AACzC,wCAA6E;AAI7E;;;GAGG;AAEH,IAAa,eAAe,uBAA5B,MAAa,eAAgB,SAAQ,4BAAqB;IAC/C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAuB;QAC5C,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,iBAAe,CAAC,CAAA;IACpD,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAa;QACzC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,iBAAe,CAAC,CAAA;IAC3D,CAAC;CACJ,CAAA;AARY,eAAe;IAD3B,IAAA,gBAAI,EAAC,iBAAiB,CAAC;GACX,eAAe,CAQ3B;AARY,0CAAe"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CertificateConstraint, ICertificateConstraint } from "../CertificateConstraint";
|
|
2
|
+
export interface ICertificateBorderConstraint extends ICertificateConstraint {
|
|
3
|
+
union: string;
|
|
4
|
+
country: string;
|
|
5
|
+
state: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A CertificateBorderConstraint specifies a state, a country or a union in which
|
|
9
|
+
* this certificate should be valid.
|
|
10
|
+
*
|
|
11
|
+
* This constraint is primarily telling any verifier, that the issuer of the certificate does not
|
|
12
|
+
* hold the eligibility to issue a certificate anywhere else. Thus, the certificate should be
|
|
13
|
+
* treated as not valid outside the specified border.
|
|
14
|
+
*
|
|
15
|
+
* However, showing a certificate which is valid within a certain country (e.g. Germany) might be
|
|
16
|
+
* much better than not having a certificate at all. Therefore, the verifier could still treat this
|
|
17
|
+
* certificate as valid, although the issuer is no longer taking liability.
|
|
18
|
+
*
|
|
19
|
+
* Examples:
|
|
20
|
+
* - Freight papers for the EU
|
|
21
|
+
* - Access rights to buildings of the UN
|
|
22
|
+
* - German driver license
|
|
23
|
+
*/
|
|
24
|
+
export declare class CertificateBorderConstraint extends CertificateConstraint {
|
|
25
|
+
union: string;
|
|
26
|
+
country: string;
|
|
27
|
+
state: string;
|
|
28
|
+
static from(value: ICertificateBorderConstraint): Promise<CertificateBorderConstraint>;
|
|
29
|
+
}
|