@brightchain/brightchain-lib 0.13.0 → 0.15.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/brightchain-lib/BROWSER_COMPAT.md +54 -0
- package/package.json +15 -4
- package/src/browser.d.ts +1 -1
- package/src/browser.d.ts.map +1 -1
- package/src/browser.js +3 -3
- package/src/browser.js.map +1 -1
- package/src/lib/blocks/cblBase.d.ts +16 -1
- package/src/lib/blocks/cblBase.d.ts.map +1 -1
- package/src/lib/blocks/cblBase.js +33 -4
- package/src/lib/blocks/cblBase.js.map +1 -1
- package/src/lib/blocks/encryptedBlockFactory.d.ts +6 -1
- package/src/lib/blocks/encryptedBlockFactory.d.ts.map +1 -1
- package/src/lib/blocks/encryptedBlockFactory.js +14 -5
- package/src/lib/blocks/encryptedBlockFactory.js.map +1 -1
- package/src/lib/blocks/extendedCbl.d.ts.map +1 -1
- package/src/lib/blocks/extendedCbl.js +2 -1
- package/src/lib/blocks/extendedCbl.js.map +1 -1
- package/src/lib/blocks/handle.d.ts +5 -0
- package/src/lib/blocks/handle.d.ts.map +1 -1
- package/src/lib/blocks/handle.js.map +1 -1
- package/src/lib/blocks/handleTuple.d.ts +9 -1
- package/src/lib/blocks/handleTuple.d.ts.map +1 -1
- package/src/lib/blocks/handleTuple.js +23 -1
- package/src/lib/blocks/handleTuple.js.map +1 -1
- package/src/lib/blocks/index.d.ts +1 -0
- package/src/lib/blocks/index.d.ts.map +1 -1
- package/src/lib/blocks/index.js +1 -0
- package/src/lib/blocks/index.js.map +1 -1
- package/src/lib/blocks/memoryTuple.d.ts +9 -2
- package/src/lib/blocks/memoryTuple.d.ts.map +1 -1
- package/src/lib/blocks/memoryTuple.js +12 -3
- package/src/lib/blocks/memoryTuple.js.map +1 -1
- package/src/lib/blocks/vcbl.d.ts +27 -0
- package/src/lib/blocks/vcbl.d.ts.map +1 -0
- package/src/lib/blocks/vcbl.js +107 -0
- package/src/lib/blocks/vcbl.js.map +1 -0
- package/src/lib/constants.d.ts +5 -1
- package/src/lib/constants.d.ts.map +1 -1
- package/src/lib/constants.js +4 -0
- package/src/lib/constants.js.map +1 -1
- package/src/lib/crypto/index.d.ts +12 -0
- package/src/lib/crypto/index.d.ts.map +1 -0
- package/src/lib/crypto/index.js +23 -0
- package/src/lib/crypto/index.js.map +1 -0
- package/src/lib/crypto/platformCrypto.d.ts +132 -0
- package/src/lib/crypto/platformCrypto.d.ts.map +1 -0
- package/src/lib/crypto/platformCrypto.js +181 -0
- package/src/lib/crypto/platformCrypto.js.map +1 -0
- package/src/lib/enumeration-translations/blockType.d.ts.map +1 -1
- package/src/lib/enumeration-translations/blockType.js +16 -0
- package/src/lib/enumeration-translations/blockType.js.map +1 -1
- package/src/lib/enumerations/blockType.d.ts +12 -0
- package/src/lib/enumerations/blockType.d.ts.map +1 -1
- package/src/lib/enumerations/blockType.js +14 -0
- package/src/lib/enumerations/blockType.js.map +1 -1
- package/src/lib/enumerations/brightChainStrings.d.ts +5 -1
- package/src/lib/enumerations/brightChainStrings.d.ts.map +1 -1
- package/src/lib/enumerations/brightChainStrings.js +5 -1
- package/src/lib/enumerations/brightChainStrings.js.map +1 -1
- package/src/lib/enumerations/cblErrorType.d.ts +2 -1
- package/src/lib/enumerations/cblErrorType.d.ts.map +1 -1
- package/src/lib/enumerations/cblErrorType.js +1 -0
- package/src/lib/enumerations/cblErrorType.js.map +1 -1
- package/src/lib/enumerations/communication.d.ts +57 -0
- package/src/lib/enumerations/communication.d.ts.map +1 -0
- package/src/lib/enumerations/communication.js +89 -0
- package/src/lib/enumerations/communication.js.map +1 -0
- package/src/lib/enumerations/deviceType.d.ts +15 -0
- package/src/lib/enumerations/deviceType.d.ts.map +1 -0
- package/src/lib/enumerations/deviceType.js +19 -0
- package/src/lib/enumerations/deviceType.js.map +1 -0
- package/src/lib/enumerations/handleTupleErrorType.d.ts +2 -1
- package/src/lib/enumerations/handleTupleErrorType.d.ts.map +1 -1
- package/src/lib/enumerations/handleTupleErrorType.js +1 -0
- package/src/lib/enumerations/handleTupleErrorType.js.map +1 -1
- package/src/lib/enumerations/index.d.ts +6 -0
- package/src/lib/enumerations/index.d.ts.map +1 -1
- package/src/lib/enumerations/index.js +11 -0
- package/src/lib/enumerations/index.js.map +1 -1
- package/src/lib/enumerations/messaging/deliveryStatus.d.ts +50 -0
- package/src/lib/enumerations/messaging/deliveryStatus.d.ts.map +1 -0
- package/src/lib/enumerations/messaging/deliveryStatus.js +68 -0
- package/src/lib/enumerations/messaging/deliveryStatus.js.map +1 -0
- package/src/lib/enumerations/messaging/emailErrorType.d.ts +36 -0
- package/src/lib/enumerations/messaging/emailErrorType.d.ts.map +1 -0
- package/src/lib/enumerations/messaging/emailErrorType.js +46 -0
- package/src/lib/enumerations/messaging/emailErrorType.js.map +1 -0
- package/src/lib/enumerations/messaging/index.d.ts +2 -1
- package/src/lib/enumerations/messaging/index.d.ts.map +1 -1
- package/src/lib/enumerations/messaging/index.js +2 -1
- package/src/lib/enumerations/messaging/index.js.map +1 -1
- package/src/lib/enumerations/messaging/messageEncryptionScheme.d.ts +4 -2
- package/src/lib/enumerations/messaging/messageEncryptionScheme.d.ts.map +1 -1
- package/src/lib/enumerations/messaging/messageEncryptionScheme.js +3 -1
- package/src/lib/enumerations/messaging/messageEncryptionScheme.js.map +1 -1
- package/src/lib/enumerations/paperKeyPurpose.d.ts +15 -0
- package/src/lib/enumerations/paperKeyPurpose.d.ts.map +1 -0
- package/src/lib/enumerations/paperKeyPurpose.js +19 -0
- package/src/lib/enumerations/paperKeyPurpose.js.map +1 -0
- package/src/lib/enumerations/proofPlatform.d.ts +24 -0
- package/src/lib/enumerations/proofPlatform.d.ts.map +1 -0
- package/src/lib/enumerations/proofPlatform.js +28 -0
- package/src/lib/enumerations/proofPlatform.js.map +1 -0
- package/src/lib/enumerations/readConcern.d.ts +22 -0
- package/src/lib/enumerations/readConcern.d.ts.map +1 -0
- package/src/lib/enumerations/readConcern.js +26 -0
- package/src/lib/enumerations/readConcern.js.map +1 -0
- package/src/lib/enumerations/tupleErrorType.d.ts +2 -1
- package/src/lib/enumerations/tupleErrorType.d.ts.map +1 -1
- package/src/lib/enumerations/tupleErrorType.js +1 -0
- package/src/lib/enumerations/tupleErrorType.js.map +1 -1
- package/src/lib/enumerations/verificationStatus.d.ts +17 -0
- package/src/lib/enumerations/verificationStatus.d.ts.map +1 -0
- package/src/lib/enumerations/verificationStatus.js +21 -0
- package/src/lib/enumerations/verificationStatus.js.map +1 -0
- package/src/lib/errors/blockFetchError.d.ts +51 -0
- package/src/lib/errors/blockFetchError.d.ts.map +1 -0
- package/src/lib/errors/blockFetchError.js +63 -0
- package/src/lib/errors/blockFetchError.js.map +1 -0
- package/src/lib/errors/cblError.d.ts.map +1 -1
- package/src/lib/errors/cblError.js +1 -0
- package/src/lib/errors/cblError.js.map +1 -1
- package/src/lib/errors/handleTupleError.d.ts +10 -1
- package/src/lib/errors/handleTupleError.d.ts.map +1 -1
- package/src/lib/errors/handleTupleError.js +10 -1
- package/src/lib/errors/handleTupleError.js.map +1 -1
- package/src/lib/errors/index.d.ts +16 -0
- package/src/lib/errors/index.d.ts.map +1 -1
- package/src/lib/errors/index.js +22 -0
- package/src/lib/errors/index.js.map +1 -1
- package/src/lib/errors/messaging/emailError.d.ts +55 -0
- package/src/lib/errors/messaging/emailError.d.ts.map +1 -0
- package/src/lib/errors/messaging/emailError.js +64 -0
- package/src/lib/errors/messaging/emailError.js.map +1 -0
- package/src/lib/errors/messaging/index.d.ts +1 -0
- package/src/lib/errors/messaging/index.d.ts.map +1 -1
- package/src/lib/errors/messaging/index.js +1 -0
- package/src/lib/errors/messaging/index.js.map +1 -1
- package/src/lib/errors/poolDeletionError.d.ts +10 -0
- package/src/lib/errors/poolDeletionError.d.ts.map +1 -0
- package/src/lib/errors/poolDeletionError.js +16 -0
- package/src/lib/errors/poolDeletionError.js.map +1 -0
- package/src/lib/errors/poolDeletionTombstoneError.d.ts +12 -0
- package/src/lib/errors/poolDeletionTombstoneError.d.ts.map +1 -0
- package/src/lib/errors/poolDeletionTombstoneError.js +18 -0
- package/src/lib/errors/poolDeletionTombstoneError.js.map +1 -0
- package/src/lib/errors/tupleError.d.ts.map +1 -1
- package/src/lib/errors/tupleError.js +1 -0
- package/src/lib/errors/tupleError.js.map +1 -1
- package/src/lib/i18n/i18n-setup.d.ts +7 -2
- package/src/lib/i18n/i18n-setup.d.ts.map +1 -1
- package/src/lib/i18n/i18n-setup.js +84 -24
- package/src/lib/i18n/i18n-setup.js.map +1 -1
- package/src/lib/i18n/strings/englishUs.d.ts.map +1 -1
- package/src/lib/i18n/strings/englishUs.js +4 -0
- package/src/lib/i18n/strings/englishUs.js.map +1 -1
- package/src/lib/i18n/strings/french.d.ts.map +1 -1
- package/src/lib/i18n/strings/french.js +4 -0
- package/src/lib/i18n/strings/french.js.map +1 -1
- package/src/lib/i18n/strings/german.d.ts.map +1 -1
- package/src/lib/i18n/strings/german.js +4 -0
- package/src/lib/i18n/strings/german.js.map +1 -1
- package/src/lib/i18n/strings/japanese.d.ts.map +1 -1
- package/src/lib/i18n/strings/japanese.js +4 -0
- package/src/lib/i18n/strings/japanese.js.map +1 -1
- package/src/lib/i18n/strings/mandarin.d.ts.map +1 -1
- package/src/lib/i18n/strings/mandarin.js +4 -0
- package/src/lib/i18n/strings/mandarin.js.map +1 -1
- package/src/lib/i18n/strings/spanish.d.ts.map +1 -1
- package/src/lib/i18n/strings/spanish.js +4 -0
- package/src/lib/i18n/strings/spanish.js.map +1 -1
- package/src/lib/i18n/strings/ukrainian.d.ts.map +1 -1
- package/src/lib/i18n/strings/ukrainian.js +4 -0
- package/src/lib/i18n/strings/ukrainian.js.map +1 -1
- package/src/lib/index.d.ts +4 -0
- package/src/lib/index.d.ts.map +1 -1
- package/src/lib/index.js +4 -0
- package/src/lib/index.js.map +1 -1
- package/src/lib/interfaces/auth/index.d.ts +4 -0
- package/src/lib/interfaces/auth/index.d.ts.map +1 -0
- package/src/lib/interfaces/auth/index.js +8 -0
- package/src/lib/interfaces/auth/index.js.map +1 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.d.ts +19 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.d.ts.map +1 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.js +3 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.js.map +1 -0
- package/src/lib/interfaces/auth/poolAcl.d.ts +65 -0
- package/src/lib/interfaces/auth/poolAcl.d.ts.map +1 -0
- package/src/lib/interfaces/auth/poolAcl.js +52 -0
- package/src/lib/interfaces/auth/poolAcl.js.map +1 -0
- package/src/lib/interfaces/availability/availabilityService.d.ts +5 -3
- package/src/lib/interfaces/availability/availabilityService.d.ts.map +1 -1
- package/src/lib/interfaces/availability/availabilityService.js.map +1 -1
- package/src/lib/interfaces/availability/blockRegistry.d.ts +52 -3
- package/src/lib/interfaces/availability/blockRegistry.d.ts.map +1 -1
- package/src/lib/interfaces/availability/blockRegistry.js +1 -1
- package/src/lib/interfaces/availability/discoveryProtocol.d.ts +81 -3
- package/src/lib/interfaces/availability/discoveryProtocol.d.ts.map +1 -1
- package/src/lib/interfaces/availability/discoveryProtocol.js.map +1 -1
- package/src/lib/interfaces/availability/gossipService.d.ts +279 -8
- package/src/lib/interfaces/availability/gossipService.d.ts.map +1 -1
- package/src/lib/interfaces/availability/gossipService.js +232 -0
- package/src/lib/interfaces/availability/gossipService.js.map +1 -1
- package/src/lib/interfaces/availability/index.d.ts +1 -0
- package/src/lib/interfaces/availability/index.d.ts.map +1 -1
- package/src/lib/interfaces/availability/index.js +1 -0
- package/src/lib/interfaces/availability/index.js.map +1 -1
- package/src/lib/interfaces/availability/locationRecord.d.ts +6 -0
- package/src/lib/interfaces/availability/locationRecord.d.ts.map +1 -1
- package/src/lib/interfaces/availability/locationRecord.js +12 -0
- package/src/lib/interfaces/availability/locationRecord.js.map +1 -1
- package/src/lib/interfaces/availability/poolDeletionTombstone.d.ts +40 -0
- package/src/lib/interfaces/availability/poolDeletionTombstone.d.ts.map +1 -0
- package/src/lib/interfaces/availability/poolDeletionTombstone.js +19 -0
- package/src/lib/interfaces/availability/poolDeletionTombstone.js.map +1 -0
- package/src/lib/interfaces/availability/reconciliationService.d.ts +52 -0
- package/src/lib/interfaces/availability/reconciliationService.d.ts.map +1 -1
- package/src/lib/interfaces/availability/reconciliationService.js.map +1 -1
- package/src/lib/interfaces/blockCapacity.d.ts +9 -0
- package/src/lib/interfaces/blockCapacity.d.ts.map +1 -1
- package/src/lib/interfaces/blockEncryption.d.ts +4 -2
- package/src/lib/interfaces/blockEncryption.d.ts.map +1 -1
- package/src/lib/interfaces/blockFetch/blockFetchTransport.d.ts +26 -0
- package/src/lib/interfaces/blockFetch/blockFetchTransport.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/blockFetchTransport.js +12 -0
- package/src/lib/interfaces/blockFetch/blockFetchTransport.js.map +1 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.d.ts +71 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.js +22 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.js.map +1 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.d.ts +43 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.js +13 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.js.map +1 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.d.ts +70 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.js +18 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.js.map +1 -0
- package/src/lib/interfaces/blockFetch/index.d.ts +10 -0
- package/src/lib/interfaces/blockFetch/index.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/index.js +13 -0
- package/src/lib/interfaces/blockFetch/index.js.map +1 -0
- package/src/lib/interfaces/blocks/index.d.ts +1 -0
- package/src/lib/interfaces/blocks/index.d.ts.map +1 -1
- package/src/lib/interfaces/blocks/vcbl.d.ts +16 -0
- package/src/lib/interfaces/blocks/vcbl.d.ts.map +1 -0
- package/src/lib/interfaces/{messaging/messageRouter.js → blocks/vcbl.js} +1 -1
- package/src/lib/interfaces/blocks/vcbl.js.map +1 -0
- package/src/lib/interfaces/brightpass/auditLog.d.ts +25 -0
- package/src/lib/interfaces/brightpass/auditLog.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/auditLog.js +21 -0
- package/src/lib/interfaces/brightpass/auditLog.js.map +1 -0
- package/src/lib/interfaces/brightpass/emergencyAccess.d.ts +11 -0
- package/src/lib/interfaces/brightpass/emergencyAccess.d.ts.map +1 -0
- package/src/lib/interfaces/{network/networkTransport.js → brightpass/emergencyAccess.js} +1 -1
- package/src/lib/interfaces/brightpass/emergencyAccess.js.map +1 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.d.ts +11 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.js +3 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.js.map +1 -0
- package/src/lib/interfaces/brightpass/importTypes.d.ts +10 -0
- package/src/lib/interfaces/brightpass/importTypes.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/importTypes.js +3 -0
- package/src/lib/interfaces/brightpass/importTypes.js.map +1 -0
- package/src/lib/interfaces/brightpass/index.d.ts +7 -0
- package/src/lib/interfaces/brightpass/index.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/index.js +10 -0
- package/src/lib/interfaces/brightpass/index.js.map +1 -0
- package/src/lib/interfaces/brightpass/vaultEntry.d.ts +48 -0
- package/src/lib/interfaces/brightpass/vaultEntry.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/vaultEntry.js +3 -0
- package/src/lib/interfaces/brightpass/vaultEntry.js.map +1 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.d.ts +34 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.js +3 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.js.map +1 -0
- package/src/lib/interfaces/clusterKeys.d.ts +4 -2
- package/src/lib/interfaces/clusterKeys.d.ts.map +1 -1
- package/src/lib/interfaces/communication.d.ts +173 -0
- package/src/lib/interfaces/communication.d.ts.map +1 -0
- package/src/lib/interfaces/communication.js +17 -0
- package/src/lib/interfaces/communication.js.map +1 -0
- package/src/lib/interfaces/communicationEvents.d.ts +168 -0
- package/src/lib/interfaces/communicationEvents.d.ts.map +1 -0
- package/src/lib/interfaces/communicationEvents.js +12 -0
- package/src/lib/interfaces/communicationEvents.js.map +1 -0
- package/src/lib/interfaces/crypto/ethereumWallet.d.ts +72 -0
- package/src/lib/interfaces/crypto/ethereumWallet.d.ts.map +1 -0
- package/src/lib/interfaces/crypto/ethereumWallet.js +12 -0
- package/src/lib/interfaces/crypto/ethereumWallet.js.map +1 -0
- package/src/lib/interfaces/crypto/gitSignature.d.ts +95 -0
- package/src/lib/interfaces/crypto/gitSignature.d.ts.map +1 -0
- package/src/lib/interfaces/crypto/gitSignature.js +12 -0
- package/src/lib/interfaces/crypto/gitSignature.js.map +1 -0
- package/src/lib/interfaces/crypto/index.d.ts +3 -0
- package/src/lib/interfaces/crypto/index.d.ts.map +1 -0
- package/src/lib/interfaces/crypto/index.js +3 -0
- package/src/lib/interfaces/crypto/index.js.map +1 -0
- package/src/lib/interfaces/dataKeyComponents.d.ts +7 -2
- package/src/lib/interfaces/dataKeyComponents.d.ts.map +1 -1
- package/src/lib/interfaces/encryptedBlockCreator.d.ts +4 -2
- package/src/lib/interfaces/encryptedBlockCreator.d.ts.map +1 -1
- package/src/lib/interfaces/events/communicationEventEmitter.d.ts +65 -0
- package/src/lib/interfaces/events/communicationEventEmitter.d.ts.map +1 -0
- package/src/lib/interfaces/events/communicationEventEmitter.js +60 -0
- package/src/lib/interfaces/events/communicationEventEmitter.js.map +1 -0
- package/src/lib/interfaces/events/index.d.ts +2 -0
- package/src/lib/interfaces/events/index.d.ts.map +1 -0
- package/src/lib/interfaces/events/index.js +5 -0
- package/src/lib/interfaces/events/index.js.map +1 -0
- package/src/lib/interfaces/failableResult.d.ts +15 -0
- package/src/lib/interfaces/failableResult.d.ts.map +1 -0
- package/src/lib/interfaces/failableResult.js +3 -0
- package/src/lib/interfaces/failableResult.js.map +1 -0
- package/src/lib/interfaces/identity/device.d.ts +59 -0
- package/src/lib/interfaces/identity/device.d.ts.map +1 -0
- package/src/lib/interfaces/identity/device.js +17 -0
- package/src/lib/interfaces/identity/device.js.map +1 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.d.ts +71 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.d.ts.map +1 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.js +16 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.js.map +1 -0
- package/src/lib/interfaces/identity/identityProof.d.ts +90 -0
- package/src/lib/interfaces/identity/identityProof.d.ts.map +1 -0
- package/src/lib/interfaces/identity/identityProof.js +18 -0
- package/src/lib/interfaces/identity/identityProof.js.map +1 -0
- package/src/lib/interfaces/identity/index.d.ts +7 -0
- package/src/lib/interfaces/identity/index.d.ts.map +1 -0
- package/src/lib/interfaces/identity/index.js +3 -0
- package/src/lib/interfaces/identity/index.js.map +1 -0
- package/src/lib/interfaces/identity/paperKey.d.ts +97 -0
- package/src/lib/interfaces/identity/paperKey.d.ts.map +1 -0
- package/src/lib/interfaces/identity/paperKey.js +17 -0
- package/src/lib/interfaces/identity/paperKey.js.map +1 -0
- package/src/lib/interfaces/identity/publicProfile.d.ts +74 -0
- package/src/lib/interfaces/identity/publicProfile.d.ts.map +1 -0
- package/src/lib/interfaces/identity/publicProfile.js +18 -0
- package/src/lib/interfaces/identity/publicProfile.js.map +1 -0
- package/src/lib/interfaces/identity/splitPaperKey.d.ts +73 -0
- package/src/lib/interfaces/identity/splitPaperKey.d.ts.map +1 -0
- package/src/lib/interfaces/identity/splitPaperKey.js +20 -0
- package/src/lib/interfaces/identity/splitPaperKey.js.map +1 -0
- package/src/lib/interfaces/index.d.ts +11 -2
- package/src/lib/interfaces/index.d.ts.map +1 -1
- package/src/lib/interfaces/index.js +12 -0
- package/src/lib/interfaces/index.js.map +1 -1
- package/src/lib/interfaces/messaging/attachmentMetadata.d.ts +47 -0
- package/src/lib/interfaces/messaging/attachmentMetadata.d.ts.map +1 -0
- package/src/lib/interfaces/messaging/attachmentMetadata.js +3 -0
- package/src/lib/interfaces/messaging/attachmentMetadata.js.map +1 -0
- package/src/lib/interfaces/messaging/emailAddress.d.ts +210 -0
- package/src/lib/interfaces/messaging/emailAddress.d.ts.map +1 -0
- package/src/lib/interfaces/messaging/emailAddress.js +213 -0
- package/src/lib/interfaces/messaging/emailAddress.js.map +1 -0
- package/src/lib/interfaces/messaging/emailDelivery.d.ts +80 -0
- package/src/lib/interfaces/messaging/emailDelivery.d.ts.map +1 -0
- package/src/lib/interfaces/messaging/emailDelivery.js +50 -0
- package/src/lib/interfaces/messaging/emailDelivery.js.map +1 -0
- package/src/lib/interfaces/messaging/emailMetadata.d.ts +269 -0
- package/src/lib/interfaces/messaging/emailMetadata.d.ts.map +1 -0
- package/src/lib/interfaces/messaging/emailMetadata.js +16 -0
- package/src/lib/interfaces/messaging/emailMetadata.js.map +1 -0
- package/src/lib/interfaces/messaging/index.d.ts +5 -1
- package/src/lib/interfaces/messaging/index.d.ts.map +1 -1
- package/src/lib/interfaces/messaging/index.js +5 -1
- package/src/lib/interfaces/messaging/index.js.map +1 -1
- package/src/lib/interfaces/messaging/messageMetadata.d.ts +2 -2
- package/src/lib/interfaces/messaging/messageMetadata.d.ts.map +1 -1
- package/src/lib/interfaces/messaging/messageMetadataStore.d.ts +2 -2
- package/src/lib/interfaces/messaging/messageMetadataStore.d.ts.map +1 -1
- package/src/lib/interfaces/messaging/mimePart.d.ts +214 -0
- package/src/lib/interfaces/messaging/mimePart.d.ts.map +1 -0
- package/src/lib/interfaces/messaging/mimePart.js +71 -0
- package/src/lib/interfaces/messaging/mimePart.js.map +1 -0
- package/src/lib/interfaces/network/index.d.ts +0 -1
- package/src/lib/interfaces/network/index.d.ts.map +1 -1
- package/src/lib/interfaces/network/node.d.ts +4 -2
- package/src/lib/interfaces/network/node.d.ts.map +1 -1
- package/src/lib/interfaces/network/nodeAdvertisement.d.ts +4 -2
- package/src/lib/interfaces/network/nodeAdvertisement.d.ts.map +1 -1
- package/src/lib/interfaces/privateVotingDerivation.d.ts +7 -2
- package/src/lib/interfaces/privateVotingDerivation.d.ts.map +1 -1
- package/src/lib/interfaces/requests/communicationRequests.d.ts +154 -0
- package/src/lib/interfaces/requests/communicationRequests.d.ts.map +1 -0
- package/src/lib/interfaces/requests/communicationRequests.js +10 -0
- package/src/lib/interfaces/requests/communicationRequests.js.map +1 -0
- package/src/lib/interfaces/requests/index.d.ts +2 -0
- package/src/lib/interfaces/requests/index.d.ts.map +1 -0
- package/src/lib/interfaces/requests/index.js +3 -0
- package/src/lib/interfaces/requests/index.js.map +1 -0
- package/src/lib/interfaces/responses/blockDataResponse.d.ts +11 -0
- package/src/lib/interfaces/responses/blockDataResponse.d.ts.map +1 -0
- package/src/lib/interfaces/responses/blockDataResponse.js +3 -0
- package/src/lib/interfaces/responses/blockDataResponse.js.map +1 -0
- package/src/lib/interfaces/responses/communicationResponses.d.ts +82 -0
- package/src/lib/interfaces/responses/communicationResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/communicationResponses.js +17 -0
- package/src/lib/interfaces/responses/communicationResponses.js.map +1 -0
- package/src/lib/interfaces/responses/cryptoResponses.d.ts +30 -0
- package/src/lib/interfaces/responses/cryptoResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/cryptoResponses.js +12 -0
- package/src/lib/interfaces/responses/cryptoResponses.js.map +1 -0
- package/src/lib/interfaces/responses/deviceResponses.d.ts +26 -0
- package/src/lib/interfaces/responses/deviceResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/deviceResponses.js +15 -0
- package/src/lib/interfaces/responses/deviceResponses.js.map +1 -0
- package/src/lib/interfaces/responses/directoryResponses.d.ts +26 -0
- package/src/lib/interfaces/responses/directoryResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/directoryResponses.js +12 -0
- package/src/lib/interfaces/responses/directoryResponses.js.map +1 -0
- package/src/lib/interfaces/responses/emailResponses.d.ts +40 -0
- package/src/lib/interfaces/responses/emailResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/emailResponses.js +18 -0
- package/src/lib/interfaces/responses/emailResponses.js.map +1 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.d.ts +42 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.js +11 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.js.map +1 -0
- package/src/lib/interfaces/responses/identityProofResponses.d.ts +33 -0
- package/src/lib/interfaces/responses/identityProofResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/identityProofResponses.js +12 -0
- package/src/lib/interfaces/responses/identityProofResponses.js.map +1 -0
- package/src/lib/interfaces/responses/index.d.ts +3 -1
- package/src/lib/interfaces/responses/index.d.ts.map +1 -1
- package/src/lib/interfaces/sealResults.d.ts +7 -2
- package/src/lib/interfaces/sealResults.d.ts.map +1 -1
- package/src/lib/interfaces/services/fecService.d.ts +7 -5
- package/src/lib/interfaces/services/fecService.d.ts.map +1 -1
- package/src/lib/interfaces/services/fecService.js +2 -0
- package/src/lib/interfaces/services/fecService.js.map +1 -1
- package/src/lib/interfaces/singleEncryptedBlockDetails.d.ts +7 -2
- package/src/lib/interfaces/singleEncryptedBlockDetails.d.ts.map +1 -1
- package/src/lib/interfaces/storage/blockMetadata.d.ts +8 -1
- package/src/lib/interfaces/storage/blockMetadata.d.ts.map +1 -1
- package/src/lib/interfaces/storage/blockMetadata.js +3 -1
- package/src/lib/interfaces/storage/blockMetadata.js.map +1 -1
- package/src/lib/interfaces/storage/cblIndex.d.ts +141 -0
- package/src/lib/interfaces/storage/cblIndex.d.ts.map +1 -0
- package/src/lib/interfaces/storage/cblIndex.js +28 -0
- package/src/lib/interfaces/storage/cblIndex.js.map +1 -0
- package/src/lib/interfaces/storage/clientSession.d.ts +22 -0
- package/src/lib/interfaces/storage/clientSession.d.ts.map +1 -0
- package/src/lib/interfaces/storage/clientSession.js +3 -0
- package/src/lib/interfaces/storage/clientSession.js.map +1 -0
- package/src/lib/interfaces/storage/collection.d.ts +80 -0
- package/src/lib/interfaces/storage/collection.d.ts.map +1 -0
- package/src/lib/interfaces/storage/collection.js +3 -0
- package/src/lib/interfaces/storage/collection.js.map +1 -0
- package/src/lib/interfaces/storage/database.d.ts +30 -0
- package/src/lib/interfaces/storage/database.d.ts.map +1 -0
- package/src/lib/interfaces/storage/database.js +3 -0
- package/src/lib/interfaces/storage/database.js.map +1 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.d.ts +43 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.d.ts.map +1 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.js +3 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.js.map +1 -0
- package/src/lib/interfaces/storage/documentTypes.d.ts +413 -0
- package/src/lib/interfaces/storage/documentTypes.d.ts.map +1 -0
- package/src/lib/interfaces/storage/documentTypes.js +8 -0
- package/src/lib/interfaces/storage/documentTypes.js.map +1 -0
- package/src/lib/interfaces/storage/encryptedPool.d.ts +64 -0
- package/src/lib/interfaces/storage/encryptedPool.d.ts.map +1 -0
- package/src/lib/interfaces/storage/encryptedPool.js +26 -0
- package/src/lib/interfaces/storage/encryptedPool.js.map +1 -0
- package/src/lib/interfaces/storage/headRegistry.d.ts +128 -0
- package/src/lib/interfaces/storage/headRegistry.d.ts.map +1 -0
- package/src/lib/interfaces/storage/headRegistry.js +3 -0
- package/src/lib/interfaces/storage/headRegistry.js.map +1 -0
- package/src/lib/interfaces/storage/index.d.ts +14 -0
- package/src/lib/interfaces/storage/index.d.ts.map +1 -1
- package/src/lib/interfaces/storage/index.js +14 -1
- package/src/lib/interfaces/storage/index.js.map +1 -1
- package/src/lib/interfaces/storage/pooledBlockStore.d.ts +163 -0
- package/src/lib/interfaces/storage/pooledBlockStore.d.ts.map +1 -0
- package/src/lib/interfaces/storage/pooledBlockStore.js +77 -0
- package/src/lib/interfaces/storage/pooledBlockStore.js.map +1 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.d.ts +47 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.d.ts.map +1 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.js +29 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.js.map +1 -0
- package/src/lib/interfaces/symmetricEncryptionResults.d.ts +7 -5
- package/src/lib/interfaces/symmetricEncryptionResults.d.ts.map +1 -1
- package/src/lib/schemas/messaging/messageMetadataSchema.d.ts.map +1 -1
- package/src/lib/schemas/messaging/messageMetadataSchema.js.map +1 -1
- package/src/lib/services/blockCapacity.service.d.ts.map +1 -1
- package/src/lib/services/blockCapacity.service.js +15 -0
- package/src/lib/services/blockCapacity.service.js.map +1 -1
- package/src/lib/services/brightpass/auditLogger.d.ts +41 -0
- package/src/lib/services/brightpass/auditLogger.d.ts.map +1 -0
- package/src/lib/services/brightpass/auditLogger.js +47 -0
- package/src/lib/services/brightpass/auditLogger.js.map +1 -0
- package/src/lib/services/brightpass/breachDetector.d.ts +68 -0
- package/src/lib/services/brightpass/breachDetector.d.ts.map +1 -0
- package/src/lib/services/brightpass/breachDetector.js +102 -0
- package/src/lib/services/brightpass/breachDetector.js.map +1 -0
- package/src/lib/services/brightpass/importParser.d.ts +105 -0
- package/src/lib/services/brightpass/importParser.d.ts.map +1 -0
- package/src/lib/services/brightpass/importParser.js +380 -0
- package/src/lib/services/brightpass/importParser.js.map +1 -0
- package/src/lib/services/brightpass/index.d.ts +16 -0
- package/src/lib/services/brightpass/index.d.ts.map +1 -0
- package/src/lib/services/brightpass/index.js +19 -0
- package/src/lib/services/brightpass/index.js.map +1 -0
- package/src/lib/services/brightpass/passwordGenerator.d.ts +111 -0
- package/src/lib/services/brightpass/passwordGenerator.d.ts.map +1 -0
- package/src/lib/services/brightpass/passwordGenerator.js +162 -0
- package/src/lib/services/brightpass/passwordGenerator.js.map +1 -0
- package/src/lib/services/brightpass/totpEngine.d.ts +191 -0
- package/src/lib/services/brightpass/totpEngine.d.ts.map +1 -0
- package/src/lib/services/brightpass/totpEngine.js +198 -0
- package/src/lib/services/brightpass/totpEngine.js.map +1 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.d.ts +26 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.d.ts.map +1 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.js +42 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.js.map +1 -0
- package/src/lib/services/brightpass/vaultSerializer.d.ts +14 -0
- package/src/lib/services/brightpass/vaultSerializer.d.ts.map +1 -0
- package/src/lib/services/brightpass/vaultSerializer.js +77 -0
- package/src/lib/services/brightpass/vaultSerializer.js.map +1 -0
- package/src/lib/services/cblService.d.ts +4 -2
- package/src/lib/services/cblService.d.ts.map +1 -1
- package/src/lib/services/cblService.js +8 -4
- package/src/lib/services/cblService.js.map +1 -1
- package/src/lib/services/communication/channelService.d.ts +208 -0
- package/src/lib/services/communication/channelService.d.ts.map +1 -0
- package/src/lib/services/communication/channelService.js +575 -0
- package/src/lib/services/communication/channelService.js.map +1 -0
- package/src/lib/services/communication/conversationService.d.ts +130 -0
- package/src/lib/services/communication/conversationService.d.ts.map +1 -0
- package/src/lib/services/communication/conversationService.js +279 -0
- package/src/lib/services/communication/conversationService.js.map +1 -0
- package/src/lib/services/communication/explodingMessageService.d.ts +168 -0
- package/src/lib/services/communication/explodingMessageService.d.ts.map +1 -0
- package/src/lib/services/communication/explodingMessageService.js +287 -0
- package/src/lib/services/communication/explodingMessageService.js.map +1 -0
- package/src/lib/services/communication/groupService.d.ts +165 -0
- package/src/lib/services/communication/groupService.d.ts.map +1 -0
- package/src/lib/services/communication/groupService.js +437 -0
- package/src/lib/services/communication/groupService.js.map +1 -0
- package/src/lib/services/communication/index.d.ts +16 -0
- package/src/lib/services/communication/index.d.ts.map +1 -0
- package/src/lib/services/communication/index.js +63 -0
- package/src/lib/services/communication/index.js.map +1 -0
- package/src/lib/services/communication/messageOperationsService.d.ts +81 -0
- package/src/lib/services/communication/messageOperationsService.d.ts.map +1 -0
- package/src/lib/services/communication/messageOperationsService.js +162 -0
- package/src/lib/services/communication/messageOperationsService.js.map +1 -0
- package/src/lib/services/communication/permissionService.d.ts +47 -0
- package/src/lib/services/communication/permissionService.d.ts.map +1 -0
- package/src/lib/services/communication/permissionService.js +82 -0
- package/src/lib/services/communication/permissionService.js.map +1 -0
- package/src/lib/services/communication/searchService.d.ts +30 -0
- package/src/lib/services/communication/searchService.d.ts.map +1 -0
- package/src/lib/services/communication/searchService.js +83 -0
- package/src/lib/services/communication/searchService.js.map +1 -0
- package/src/lib/services/crypto/ethereumWalletService.d.ts +159 -0
- package/src/lib/services/crypto/ethereumWalletService.d.ts.map +1 -0
- package/src/lib/services/crypto/ethereumWalletService.js +345 -0
- package/src/lib/services/crypto/ethereumWalletService.js.map +1 -0
- package/src/lib/services/crypto/gitSigningService.d.ts +145 -0
- package/src/lib/services/crypto/gitSigningService.d.ts.map +1 -0
- package/src/lib/services/crypto/gitSigningService.js +291 -0
- package/src/lib/services/crypto/gitSigningService.js.map +1 -0
- package/src/lib/services/crypto/index.d.ts +3 -0
- package/src/lib/services/crypto/index.d.ts.map +1 -0
- package/src/lib/services/crypto/index.js +6 -0
- package/src/lib/services/crypto/index.js.map +1 -0
- package/src/lib/services/identity/deviceProvisioningService.d.ts +146 -0
- package/src/lib/services/identity/deviceProvisioningService.d.ts.map +1 -0
- package/src/lib/services/identity/deviceProvisioningService.js +219 -0
- package/src/lib/services/identity/deviceProvisioningService.js.map +1 -0
- package/src/lib/services/identity/identityProofService.d.ts +139 -0
- package/src/lib/services/identity/identityProofService.d.ts.map +1 -0
- package/src/lib/services/identity/identityProofService.js +245 -0
- package/src/lib/services/identity/identityProofService.js.map +1 -0
- package/src/lib/services/identity/index.d.ts +14 -0
- package/src/lib/services/identity/index.d.ts.map +1 -0
- package/src/lib/services/identity/index.js +17 -0
- package/src/lib/services/identity/index.js.map +1 -0
- package/src/lib/services/identity/memberIdentityProofService.d.ts +179 -0
- package/src/lib/services/identity/memberIdentityProofService.d.ts.map +1 -0
- package/src/lib/services/identity/memberIdentityProofService.js +232 -0
- package/src/lib/services/identity/memberIdentityProofService.js.map +1 -0
- package/src/lib/services/identity/memberPaperKeyService.d.ts +223 -0
- package/src/lib/services/identity/memberPaperKeyService.d.ts.map +1 -0
- package/src/lib/services/identity/memberPaperKeyService.js +279 -0
- package/src/lib/services/identity/memberPaperKeyService.js.map +1 -0
- package/src/lib/services/identity/paperKeyService.d.ts +106 -0
- package/src/lib/services/identity/paperKeyService.d.ts.map +1 -0
- package/src/lib/services/identity/paperKeyService.js +161 -0
- package/src/lib/services/identity/paperKeyService.js.map +1 -0
- package/src/lib/services/identity/publicKeyDirectoryService.d.ts +210 -0
- package/src/lib/services/identity/publicKeyDirectoryService.d.ts.map +1 -0
- package/src/lib/services/identity/publicKeyDirectoryService.js +328 -0
- package/src/lib/services/identity/publicKeyDirectoryService.js.map +1 -0
- package/src/lib/services/identity/splitPaperKeyService.d.ts +92 -0
- package/src/lib/services/identity/splitPaperKeyService.d.ts.map +1 -0
- package/src/lib/services/identity/splitPaperKeyService.js +305 -0
- package/src/lib/services/identity/splitPaperKeyService.js.map +1 -0
- package/src/lib/services/index.d.ts +4 -0
- package/src/lib/services/index.d.ts.map +1 -1
- package/src/lib/services/index.js +7 -0
- package/src/lib/services/index.js.map +1 -1
- package/src/lib/services/messaging/deliveryTimeoutService.js +2 -2
- package/src/lib/services/messaging/deliveryTimeoutService.js.map +1 -1
- package/src/lib/services/messaging/emailEncryptionService.d.ts +250 -0
- package/src/lib/services/messaging/emailEncryptionService.d.ts.map +1 -0
- package/src/lib/services/messaging/emailEncryptionService.js +420 -0
- package/src/lib/services/messaging/emailEncryptionService.js.map +1 -0
- package/src/lib/services/messaging/emailMessageService.d.ts +669 -0
- package/src/lib/services/messaging/emailMessageService.d.ts.map +1 -0
- package/src/lib/services/messaging/emailMessageService.js +1030 -0
- package/src/lib/services/messaging/emailMessageService.js.map +1 -0
- package/src/lib/services/messaging/emailParser.d.ts +476 -0
- package/src/lib/services/messaging/emailParser.d.ts.map +1 -0
- package/src/lib/services/messaging/emailParser.js +1316 -0
- package/src/lib/services/messaging/emailParser.js.map +1 -0
- package/src/lib/services/messaging/emailSerializer.d.ts +403 -0
- package/src/lib/services/messaging/emailSerializer.d.ts.map +1 -0
- package/src/lib/services/messaging/emailSerializer.js +852 -0
- package/src/lib/services/messaging/emailSerializer.js.map +1 -0
- package/src/lib/services/messaging/emailValidator.d.ts +448 -0
- package/src/lib/services/messaging/emailValidator.d.ts.map +1 -0
- package/src/lib/services/messaging/emailValidator.js +810 -0
- package/src/lib/services/messaging/emailValidator.js.map +1 -0
- package/src/lib/services/messaging/gossipRetryService.d.ts +204 -0
- package/src/lib/services/messaging/gossipRetryService.d.ts.map +1 -0
- package/src/lib/services/messaging/gossipRetryService.js +319 -0
- package/src/lib/services/messaging/gossipRetryService.js.map +1 -0
- package/src/lib/services/messaging/inMemoryEmailMetadataStore.d.ts +60 -0
- package/src/lib/services/messaging/inMemoryEmailMetadataStore.d.ts.map +1 -0
- package/src/lib/services/messaging/inMemoryEmailMetadataStore.js +281 -0
- package/src/lib/services/messaging/inMemoryEmailMetadataStore.js.map +1 -0
- package/src/lib/services/messaging/index.d.ts +11 -5
- package/src/lib/services/messaging/index.d.ts.map +1 -1
- package/src/lib/services/messaging/index.js +19 -5
- package/src/lib/services/messaging/index.js.map +1 -1
- package/src/lib/services/messaging/messageCBLService.js +2 -2
- package/src/lib/services/messaging/messageCBLService.js.map +1 -1
- package/src/lib/services/tuple.service.d.ts +27 -2
- package/src/lib/services/tuple.service.d.ts.map +1 -1
- package/src/lib/services/tuple.service.js +62 -20
- package/src/lib/services/tuple.service.js.map +1 -1
- package/src/lib/services/vcblService.d.ts +36 -0
- package/src/lib/services/vcblService.d.ts.map +1 -0
- package/src/lib/services/vcblService.js +326 -0
- package/src/lib/services/vcblService.js.map +1 -0
- package/src/lib/stores/index.d.ts +1 -0
- package/src/lib/stores/index.d.ts.map +1 -1
- package/src/lib/stores/index.js +1 -0
- package/src/lib/stores/index.js.map +1 -1
- package/src/lib/stores/messaging/memoryMessageMetadataStore.d.ts +2 -2
- package/src/lib/stores/messaging/memoryMessageMetadataStore.d.ts.map +1 -1
- package/src/lib/stores/messaging/memoryMessageMetadataStore.js +2 -2
- package/src/lib/stores/messaging/memoryMessageMetadataStore.js.map +1 -1
- package/src/lib/stores/pooledMemoryBlockStore.d.ts +134 -0
- package/src/lib/stores/pooledMemoryBlockStore.d.ts.map +1 -0
- package/src/lib/stores/pooledMemoryBlockStore.js +583 -0
- package/src/lib/stores/pooledMemoryBlockStore.js.map +1 -0
- package/src/lib/types/checksum.d.ts +11 -0
- package/src/lib/types/checksum.d.ts.map +1 -1
- package/src/lib/types/checksum.js +11 -0
- package/src/lib/types/checksum.js.map +1 -1
- package/src/lib/utils/index.d.ts +9 -0
- package/src/lib/utils/index.d.ts.map +1 -1
- package/src/lib/utils/index.js +12 -0
- package/src/lib/utils/index.js.map +1 -1
- package/src/lib/utils/pagination.d.ts +27 -0
- package/src/lib/utils/pagination.d.ts.map +1 -0
- package/src/lib/utils/pagination.js +38 -0
- package/src/lib/utils/pagination.js.map +1 -0
- package/src/lib/enumerations/messaging/messageDeliveryStatus.d.ts +0 -18
- package/src/lib/enumerations/messaging/messageDeliveryStatus.d.ts.map +0 -1
- package/src/lib/enumerations/messaging/messageDeliveryStatus.js +0 -22
- package/src/lib/enumerations/messaging/messageDeliveryStatus.js.map +0 -1
- package/src/lib/enumerations/messaging/routingStrategy.d.ts +0 -12
- package/src/lib/enumerations/messaging/routingStrategy.d.ts.map +0 -1
- package/src/lib/enumerations/messaging/routingStrategy.js +0 -16
- package/src/lib/enumerations/messaging/routingStrategy.js.map +0 -1
- package/src/lib/interfaces/messaging/messageRouter.d.ts +0 -48
- package/src/lib/interfaces/messaging/messageRouter.d.ts.map +0 -1
- package/src/lib/interfaces/messaging/messageRouter.js.map +0 -1
- package/src/lib/interfaces/network/networkTransport.d.ts +0 -19
- package/src/lib/interfaces/network/networkTransport.d.ts.map +0 -1
- package/src/lib/interfaces/network/networkTransport.js.map +0 -1
- package/src/lib/services/messaging/broadcastMessageRouter.d.ts +0 -18
- package/src/lib/services/messaging/broadcastMessageRouter.d.ts.map +0 -1
- package/src/lib/services/messaging/broadcastMessageRouter.js +0 -32
- package/src/lib/services/messaging/broadcastMessageRouter.js.map +0 -1
- package/src/lib/services/messaging/directMessageRouter.d.ts +0 -25
- package/src/lib/services/messaging/directMessageRouter.d.ts.map +0 -1
- package/src/lib/services/messaging/directMessageRouter.js +0 -58
- package/src/lib/services/messaging/directMessageRouter.js.map +0 -1
- package/src/lib/services/messaging/messageForwardingService.d.ts +0 -40
- package/src/lib/services/messaging/messageForwardingService.d.ts.map +0 -1
- package/src/lib/services/messaging/messageForwardingService.js +0 -74
- package/src/lib/services/messaging/messageForwardingService.js.map +0 -1
- package/src/lib/services/messaging/messageRouter.d.ts +0 -24
- package/src/lib/services/messaging/messageRouter.d.ts.map +0 -1
- package/src/lib/services/messaging/messageRouter.js +0 -111
- package/src/lib/services/messaging/messageRouter.js.map +0 -1
- package/src/lib/services/messaging/webSocketTransport.d.ts +0 -34
- package/src/lib/services/messaging/webSocketTransport.d.ts.map +0 -1
- package/src/lib/services/messaging/webSocketTransport.js +0 -115
- package/src/lib/services/messaging/webSocketTransport.js.map +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MemberIdentityProofService — companion service for managing identity proofs
|
|
3
|
+
* associated with BrightChain members.
|
|
4
|
+
*
|
|
5
|
+
* Since {@link Member} is an external class from `@digitaldefiance/ecies-lib`,
|
|
6
|
+
* this service follows the same companion-service pattern as
|
|
7
|
+
* {@link MemberPaperKeyService}: it maintains an in-memory store of identity
|
|
8
|
+
* proofs keyed by member ID, with full audit logging.
|
|
9
|
+
*
|
|
10
|
+
* Requirements: 4.5, 4.7
|
|
11
|
+
*/
|
|
12
|
+
import { VerificationStatus } from '../../enumerations/verificationStatus';
|
|
13
|
+
import { IIdentityProof } from '../../interfaces/identity/identityProof';
|
|
14
|
+
/**
|
|
15
|
+
* Error thrown when a proof operation references a proof that does not exist.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ProofNotFoundError extends Error {
|
|
18
|
+
constructor(proofId: string);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error thrown when attempting to revoke an already-revoked proof.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ProofAlreadyRevokedError extends Error {
|
|
24
|
+
constructor(proofId: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Actions that can be recorded in the identity proof audit log.
|
|
28
|
+
*/
|
|
29
|
+
export type ProofAuditAction = 'added' | 'revoked' | 'verified' | 'failed';
|
|
30
|
+
/**
|
|
31
|
+
* A single entry in the identity proof audit log.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* The audit log is append-only and provides a complete history of
|
|
35
|
+
* proof lifecycle events for a member.
|
|
36
|
+
*/
|
|
37
|
+
export interface IProofAuditEntry<TId = string> {
|
|
38
|
+
/** Unique identifier for this audit entry */
|
|
39
|
+
id: TId;
|
|
40
|
+
/** The proof this entry relates to */
|
|
41
|
+
proofId: TId;
|
|
42
|
+
/** The action that was performed */
|
|
43
|
+
action: ProofAuditAction;
|
|
44
|
+
/** When the action occurred */
|
|
45
|
+
timestamp: Date;
|
|
46
|
+
/** Optional reason or context for the action */
|
|
47
|
+
reason?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Companion service for managing identity proofs associated with members.
|
|
51
|
+
*
|
|
52
|
+
* Maintains an in-memory store of identity proofs keyed by member ID,
|
|
53
|
+
* with full audit logging. Provides methods to add, revoke, and query
|
|
54
|
+
* proofs without modifying the external Member class.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const service = new MemberIdentityProofService();
|
|
59
|
+
*
|
|
60
|
+
* // Add a proof
|
|
61
|
+
* service.addProof(memberId, proof);
|
|
62
|
+
*
|
|
63
|
+
* // Get all verified proofs
|
|
64
|
+
* const verified = service.getVerifiedProofs(memberId);
|
|
65
|
+
*
|
|
66
|
+
* // Revoke a proof
|
|
67
|
+
* service.revokeProof(memberId, proofId, 'Account compromised');
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare class MemberIdentityProofService<TId = string> {
|
|
71
|
+
/**
|
|
72
|
+
* Identity proofs keyed by member ID.
|
|
73
|
+
*/
|
|
74
|
+
private readonly proofsByMember;
|
|
75
|
+
/**
|
|
76
|
+
* Append-only audit log keyed by member ID.
|
|
77
|
+
*/
|
|
78
|
+
private readonly auditLogByMember;
|
|
79
|
+
/**
|
|
80
|
+
* Factory for generating unique IDs.
|
|
81
|
+
*/
|
|
82
|
+
private readonly idFactory;
|
|
83
|
+
constructor(idFactory?: () => TId);
|
|
84
|
+
/**
|
|
85
|
+
* Add an identity proof for a member.
|
|
86
|
+
*
|
|
87
|
+
* Stores the proof and appends an 'added' entry to the audit log.
|
|
88
|
+
*
|
|
89
|
+
* **Validates: Requirement 4.5**
|
|
90
|
+
*
|
|
91
|
+
* @param memberId - The member this proof belongs to
|
|
92
|
+
* @param proof - The identity proof to add
|
|
93
|
+
*/
|
|
94
|
+
addProof(memberId: TId, proof: IIdentityProof<TId>): void;
|
|
95
|
+
/**
|
|
96
|
+
* Revoke an identity proof.
|
|
97
|
+
*
|
|
98
|
+
* Sets the proof's verification status to REVOKED and records
|
|
99
|
+
* a revokedAt timestamp. Appends a 'revoked' entry to the audit log.
|
|
100
|
+
*
|
|
101
|
+
* **Validates: Requirement 4.7**
|
|
102
|
+
*
|
|
103
|
+
* @param memberId - The member who owns the proof
|
|
104
|
+
* @param proofId - The proof to revoke
|
|
105
|
+
* @param reason - Optional reason for revocation
|
|
106
|
+
* @throws {ProofNotFoundError} If the proof does not exist
|
|
107
|
+
* @throws {ProofAlreadyRevokedError} If the proof is already revoked
|
|
108
|
+
*/
|
|
109
|
+
revokeProof(memberId: TId, proofId: TId, reason?: string): void;
|
|
110
|
+
/**
|
|
111
|
+
* Update the verification status of a proof.
|
|
112
|
+
*
|
|
113
|
+
* Used after checking a proof URL to record whether verification
|
|
114
|
+
* succeeded or failed.
|
|
115
|
+
*
|
|
116
|
+
* @param memberId - The member who owns the proof
|
|
117
|
+
* @param proofId - The proof to update
|
|
118
|
+
* @param verified - Whether verification succeeded
|
|
119
|
+
*/
|
|
120
|
+
updateVerificationStatus(memberId: TId, proofId: TId, verified: boolean): void;
|
|
121
|
+
/**
|
|
122
|
+
* Get all identity proofs for a member.
|
|
123
|
+
*
|
|
124
|
+
* @param memberId - The member to query
|
|
125
|
+
* @returns Read-only array of identity proofs (empty if none exist)
|
|
126
|
+
*/
|
|
127
|
+
getProofs(memberId: TId): ReadonlyArray<IIdentityProof<TId>>;
|
|
128
|
+
/**
|
|
129
|
+
* Get only verified identity proofs for a member.
|
|
130
|
+
*
|
|
131
|
+
* **Validates: Requirement 4.5**
|
|
132
|
+
*
|
|
133
|
+
* @param memberId - The member to query
|
|
134
|
+
* @returns Read-only array of verified identity proofs
|
|
135
|
+
*/
|
|
136
|
+
getVerifiedProofs(memberId: TId): ReadonlyArray<IIdentityProof<TId>>;
|
|
137
|
+
/**
|
|
138
|
+
* Get a specific proof by ID.
|
|
139
|
+
*
|
|
140
|
+
* @param memberId - The member who owns the proof
|
|
141
|
+
* @param proofId - The proof to retrieve
|
|
142
|
+
* @returns The identity proof
|
|
143
|
+
* @throws {ProofNotFoundError} If the proof does not exist
|
|
144
|
+
*/
|
|
145
|
+
getProof(memberId: TId, proofId: TId): IIdentityProof<TId>;
|
|
146
|
+
/**
|
|
147
|
+
* Get the audit log for a member's identity proofs.
|
|
148
|
+
*
|
|
149
|
+
* @param memberId - The member to query
|
|
150
|
+
* @returns Read-only array of audit entries (empty if none exist)
|
|
151
|
+
*/
|
|
152
|
+
getAuditLog(memberId: TId): ReadonlyArray<IProofAuditEntry<TId>>;
|
|
153
|
+
/**
|
|
154
|
+
* Check whether a proof is revoked.
|
|
155
|
+
*
|
|
156
|
+
* @param memberId - The member who owns the proof
|
|
157
|
+
* @param proofId - The proof to check
|
|
158
|
+
* @returns `true` if the proof is revoked
|
|
159
|
+
* @throws {ProofNotFoundError} If the proof does not exist
|
|
160
|
+
*/
|
|
161
|
+
isRevoked(memberId: TId, proofId: TId): boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Get the count of proofs for a member, optionally filtered by status.
|
|
164
|
+
*
|
|
165
|
+
* @param memberId - The member to query
|
|
166
|
+
* @param status - Optional status filter
|
|
167
|
+
* @returns The number of matching proofs
|
|
168
|
+
*/
|
|
169
|
+
getProofCount(memberId: TId, status?: VerificationStatus): number;
|
|
170
|
+
/**
|
|
171
|
+
* Remove all data for a member. Useful for testing.
|
|
172
|
+
*
|
|
173
|
+
* @param memberId - The member whose data to clear
|
|
174
|
+
*/
|
|
175
|
+
clearMemberData(memberId: TId): void;
|
|
176
|
+
private findProof;
|
|
177
|
+
private appendAuditEntry;
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=memberIdentityProofService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memberIdentityProofService.d.ts","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/memberIdentityProofService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAu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,GAAG,EACZ,QAAQ,EAAE,OAAO,GAChB,IAAI;IAmBP;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,GAAG,GAAG,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAI5D;;;;;;;OAOG;IACH,iBAAiB,CAAC,QAAQ,EAAE,GAAG,GAAG,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAOpE;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC;IAI1D;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,GAAG,GAAG,aAAa,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAIhE;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO;IAK/C;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,MAAM;IAMjE;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAOpC,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,gBAAgB;CAgBzB"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MemberIdentityProofService — companion service for managing identity proofs
|
|
4
|
+
* associated with BrightChain members.
|
|
5
|
+
*
|
|
6
|
+
* Since {@link Member} is an external class from `@digitaldefiance/ecies-lib`,
|
|
7
|
+
* this service follows the same companion-service pattern as
|
|
8
|
+
* {@link MemberPaperKeyService}: it maintains an in-memory store of identity
|
|
9
|
+
* proofs keyed by member ID, with full audit logging.
|
|
10
|
+
*
|
|
11
|
+
* Requirements: 4.5, 4.7
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.MemberIdentityProofService = exports.ProofAlreadyRevokedError = exports.ProofNotFoundError = void 0;
|
|
15
|
+
const uuid_1 = require("uuid");
|
|
16
|
+
const verificationStatus_1 = require("../../enumerations/verificationStatus");
|
|
17
|
+
// ─── Error classes ──────────────────────────────────────────────────────────
|
|
18
|
+
/**
|
|
19
|
+
* Error thrown when a proof operation references a proof that does not exist.
|
|
20
|
+
*/
|
|
21
|
+
class ProofNotFoundError extends Error {
|
|
22
|
+
constructor(proofId) {
|
|
23
|
+
super(`Identity proof not found: ${proofId}`);
|
|
24
|
+
this.name = 'ProofNotFoundError';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ProofNotFoundError = ProofNotFoundError;
|
|
28
|
+
/**
|
|
29
|
+
* Error thrown when attempting to revoke an already-revoked proof.
|
|
30
|
+
*/
|
|
31
|
+
class ProofAlreadyRevokedError extends Error {
|
|
32
|
+
constructor(proofId) {
|
|
33
|
+
super(`Identity proof already revoked: ${proofId}`);
|
|
34
|
+
this.name = 'ProofAlreadyRevokedError';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.ProofAlreadyRevokedError = ProofAlreadyRevokedError;
|
|
38
|
+
// ─── Service ────────────────────────────────────────────────────────────────
|
|
39
|
+
/**
|
|
40
|
+
* Companion service for managing identity proofs associated with members.
|
|
41
|
+
*
|
|
42
|
+
* Maintains an in-memory store of identity proofs keyed by member ID,
|
|
43
|
+
* with full audit logging. Provides methods to add, revoke, and query
|
|
44
|
+
* proofs without modifying the external Member class.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const service = new MemberIdentityProofService();
|
|
49
|
+
*
|
|
50
|
+
* // Add a proof
|
|
51
|
+
* service.addProof(memberId, proof);
|
|
52
|
+
*
|
|
53
|
+
* // Get all verified proofs
|
|
54
|
+
* const verified = service.getVerifiedProofs(memberId);
|
|
55
|
+
*
|
|
56
|
+
* // Revoke a proof
|
|
57
|
+
* service.revokeProof(memberId, proofId, 'Account compromised');
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
class MemberIdentityProofService {
|
|
61
|
+
constructor(idFactory) {
|
|
62
|
+
/**
|
|
63
|
+
* Identity proofs keyed by member ID.
|
|
64
|
+
*/
|
|
65
|
+
this.proofsByMember = new Map();
|
|
66
|
+
/**
|
|
67
|
+
* Append-only audit log keyed by member ID.
|
|
68
|
+
*/
|
|
69
|
+
this.auditLogByMember = new Map();
|
|
70
|
+
this.idFactory = idFactory ?? (() => (0, uuid_1.v4)());
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Add an identity proof for a member.
|
|
74
|
+
*
|
|
75
|
+
* Stores the proof and appends an 'added' entry to the audit log.
|
|
76
|
+
*
|
|
77
|
+
* **Validates: Requirement 4.5**
|
|
78
|
+
*
|
|
79
|
+
* @param memberId - The member this proof belongs to
|
|
80
|
+
* @param proof - The identity proof to add
|
|
81
|
+
*/
|
|
82
|
+
addProof(memberId, proof) {
|
|
83
|
+
const proofs = this.proofsByMember.get(memberId) ?? [];
|
|
84
|
+
proofs.push({ ...proof });
|
|
85
|
+
this.proofsByMember.set(memberId, proofs);
|
|
86
|
+
this.appendAuditEntry(memberId, proof.id, 'added');
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Revoke an identity proof.
|
|
90
|
+
*
|
|
91
|
+
* Sets the proof's verification status to REVOKED and records
|
|
92
|
+
* a revokedAt timestamp. Appends a 'revoked' entry to the audit log.
|
|
93
|
+
*
|
|
94
|
+
* **Validates: Requirement 4.7**
|
|
95
|
+
*
|
|
96
|
+
* @param memberId - The member who owns the proof
|
|
97
|
+
* @param proofId - The proof to revoke
|
|
98
|
+
* @param reason - Optional reason for revocation
|
|
99
|
+
* @throws {ProofNotFoundError} If the proof does not exist
|
|
100
|
+
* @throws {ProofAlreadyRevokedError} If the proof is already revoked
|
|
101
|
+
*/
|
|
102
|
+
revokeProof(memberId, proofId, reason) {
|
|
103
|
+
const proof = this.findProof(memberId, proofId);
|
|
104
|
+
if (proof.verificationStatus === verificationStatus_1.VerificationStatus.REVOKED) {
|
|
105
|
+
throw new ProofAlreadyRevokedError(String(proofId));
|
|
106
|
+
}
|
|
107
|
+
proof.verificationStatus = verificationStatus_1.VerificationStatus.REVOKED;
|
|
108
|
+
proof.revokedAt = new Date();
|
|
109
|
+
this.appendAuditEntry(memberId, proofId, 'revoked', reason);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Update the verification status of a proof.
|
|
113
|
+
*
|
|
114
|
+
* Used after checking a proof URL to record whether verification
|
|
115
|
+
* succeeded or failed.
|
|
116
|
+
*
|
|
117
|
+
* @param memberId - The member who owns the proof
|
|
118
|
+
* @param proofId - The proof to update
|
|
119
|
+
* @param verified - Whether verification succeeded
|
|
120
|
+
*/
|
|
121
|
+
updateVerificationStatus(memberId, proofId, verified) {
|
|
122
|
+
const proof = this.findProof(memberId, proofId);
|
|
123
|
+
if (proof.verificationStatus === verificationStatus_1.VerificationStatus.REVOKED) {
|
|
124
|
+
return; // Don't update revoked proofs
|
|
125
|
+
}
|
|
126
|
+
proof.verificationStatus = verified
|
|
127
|
+
? verificationStatus_1.VerificationStatus.VERIFIED
|
|
128
|
+
: verificationStatus_1.VerificationStatus.FAILED;
|
|
129
|
+
proof.lastCheckedAt = new Date();
|
|
130
|
+
if (verified) {
|
|
131
|
+
proof.verifiedAt = new Date();
|
|
132
|
+
}
|
|
133
|
+
this.appendAuditEntry(memberId, proofId, verified ? 'verified' : 'failed');
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Get all identity proofs for a member.
|
|
137
|
+
*
|
|
138
|
+
* @param memberId - The member to query
|
|
139
|
+
* @returns Read-only array of identity proofs (empty if none exist)
|
|
140
|
+
*/
|
|
141
|
+
getProofs(memberId) {
|
|
142
|
+
return this.proofsByMember.get(memberId) ?? [];
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get only verified identity proofs for a member.
|
|
146
|
+
*
|
|
147
|
+
* **Validates: Requirement 4.5**
|
|
148
|
+
*
|
|
149
|
+
* @param memberId - The member to query
|
|
150
|
+
* @returns Read-only array of verified identity proofs
|
|
151
|
+
*/
|
|
152
|
+
getVerifiedProofs(memberId) {
|
|
153
|
+
const proofs = this.proofsByMember.get(memberId) ?? [];
|
|
154
|
+
return proofs.filter((p) => p.verificationStatus === verificationStatus_1.VerificationStatus.VERIFIED);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get a specific proof by ID.
|
|
158
|
+
*
|
|
159
|
+
* @param memberId - The member who owns the proof
|
|
160
|
+
* @param proofId - The proof to retrieve
|
|
161
|
+
* @returns The identity proof
|
|
162
|
+
* @throws {ProofNotFoundError} If the proof does not exist
|
|
163
|
+
*/
|
|
164
|
+
getProof(memberId, proofId) {
|
|
165
|
+
return this.findProof(memberId, proofId);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Get the audit log for a member's identity proofs.
|
|
169
|
+
*
|
|
170
|
+
* @param memberId - The member to query
|
|
171
|
+
* @returns Read-only array of audit entries (empty if none exist)
|
|
172
|
+
*/
|
|
173
|
+
getAuditLog(memberId) {
|
|
174
|
+
return this.auditLogByMember.get(memberId) ?? [];
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Check whether a proof is revoked.
|
|
178
|
+
*
|
|
179
|
+
* @param memberId - The member who owns the proof
|
|
180
|
+
* @param proofId - The proof to check
|
|
181
|
+
* @returns `true` if the proof is revoked
|
|
182
|
+
* @throws {ProofNotFoundError} If the proof does not exist
|
|
183
|
+
*/
|
|
184
|
+
isRevoked(memberId, proofId) {
|
|
185
|
+
const proof = this.findProof(memberId, proofId);
|
|
186
|
+
return proof.verificationStatus === verificationStatus_1.VerificationStatus.REVOKED;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Get the count of proofs for a member, optionally filtered by status.
|
|
190
|
+
*
|
|
191
|
+
* @param memberId - The member to query
|
|
192
|
+
* @param status - Optional status filter
|
|
193
|
+
* @returns The number of matching proofs
|
|
194
|
+
*/
|
|
195
|
+
getProofCount(memberId, status) {
|
|
196
|
+
const proofs = this.proofsByMember.get(memberId) ?? [];
|
|
197
|
+
if (!status)
|
|
198
|
+
return proofs.length;
|
|
199
|
+
return proofs.filter((p) => p.verificationStatus === status).length;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Remove all data for a member. Useful for testing.
|
|
203
|
+
*
|
|
204
|
+
* @param memberId - The member whose data to clear
|
|
205
|
+
*/
|
|
206
|
+
clearMemberData(memberId) {
|
|
207
|
+
this.proofsByMember.delete(memberId);
|
|
208
|
+
this.auditLogByMember.delete(memberId);
|
|
209
|
+
}
|
|
210
|
+
// ─── Private helpers ────────────────────────────────────────────────
|
|
211
|
+
findProof(memberId, proofId) {
|
|
212
|
+
const proofs = this.proofsByMember.get(memberId) ?? [];
|
|
213
|
+
const proof = proofs.find((p) => p.id === proofId);
|
|
214
|
+
if (!proof) {
|
|
215
|
+
throw new ProofNotFoundError(String(proofId));
|
|
216
|
+
}
|
|
217
|
+
return proof;
|
|
218
|
+
}
|
|
219
|
+
appendAuditEntry(memberId, proofId, action, reason) {
|
|
220
|
+
const entries = this.auditLogByMember.get(memberId) ?? [];
|
|
221
|
+
entries.push({
|
|
222
|
+
id: this.idFactory(),
|
|
223
|
+
proofId,
|
|
224
|
+
action,
|
|
225
|
+
timestamp: new Date(),
|
|
226
|
+
reason,
|
|
227
|
+
});
|
|
228
|
+
this.auditLogByMember.set(memberId, entries);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.MemberIdentityProofService = MemberIdentityProofService;
|
|
232
|
+
//# sourceMappingURL=memberIdentityProofService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memberIdentityProofService.js","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/memberIdentityProofService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAE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,CAAC,CAAC;IACzC,CAAC;IAED,uEAAuE;IAE/D,SAAS,CAAC,QAAa,EAAE,OAAY;QAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACvD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,gBAAgB,CACtB,QAAa,EACb,OAAY,EACZ,MAAwB,EACxB,MAAe;QAEf,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC;YACX,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE;YACpB,OAAO;YACP,MAAM;YACN,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,MAAM;SACP,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF;AAhND,gEAgNC"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Member Paper Key Service for the BrightChain identity system.
|
|
3
|
+
*
|
|
4
|
+
* Manages paper key metadata lifecycle for members. Since {@link Member}
|
|
5
|
+
* is an external class from `@digitaldefiance/ecies-lib` and cannot be
|
|
6
|
+
* modified directly, this service acts as a companion that tracks paper
|
|
7
|
+
* key metadata (creation, usage, revocation) keyed by member ID.
|
|
8
|
+
*
|
|
9
|
+
* Follows the same stateful-service pattern used by
|
|
10
|
+
* {@link ConversationService}, {@link PermissionService}, and other
|
|
11
|
+
* BrightChain services that manage in-memory state with `Map`s.
|
|
12
|
+
*
|
|
13
|
+
* Requirements: 1.5, 1.6, 1.7
|
|
14
|
+
*/
|
|
15
|
+
import { PaperKeyPurpose } from '../../enumerations/paperKeyPurpose';
|
|
16
|
+
import { IPaperKeyMetadata } from '../../interfaces/identity/paperKey';
|
|
17
|
+
/**
|
|
18
|
+
* Error thrown when a paper key operation references a key that does not exist.
|
|
19
|
+
*/
|
|
20
|
+
export declare class PaperKeyNotFoundError extends Error {
|
|
21
|
+
constructor(paperKeyId: string);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Error thrown when attempting to use or modify an already-revoked paper key.
|
|
25
|
+
*/
|
|
26
|
+
export declare class PaperKeyRevokedError extends Error {
|
|
27
|
+
constructor(paperKeyId: string);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Error thrown when attempting to mark an already-used paper key as used again.
|
|
31
|
+
*/
|
|
32
|
+
export declare class PaperKeyAlreadyUsedError extends Error {
|
|
33
|
+
constructor(paperKeyId: string);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Immutable audit log entry recorded for every paper key state change.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Audit entries are append-only. They capture who performed the action,
|
|
40
|
+
* what changed, and when. This satisfies Requirement 1.7 (revocation
|
|
41
|
+
* with audit logging) and Requirement 1.9 (recovery event logging).
|
|
42
|
+
*/
|
|
43
|
+
export interface IPaperKeyAuditEntry<TId = string> {
|
|
44
|
+
/** Unique identifier for this audit entry */
|
|
45
|
+
id: string;
|
|
46
|
+
/** The paper key this entry relates to */
|
|
47
|
+
paperKeyId: TId;
|
|
48
|
+
/** The member who owns the paper key */
|
|
49
|
+
memberId: TId;
|
|
50
|
+
/** The action that was performed */
|
|
51
|
+
action: 'created' | 'used' | 'revoked';
|
|
52
|
+
/** When the action occurred */
|
|
53
|
+
timestamp: Date;
|
|
54
|
+
/** Optional reason for the action (e.g. revocation reason) */
|
|
55
|
+
reason?: string;
|
|
56
|
+
/** Optional device ID associated with the action */
|
|
57
|
+
deviceId?: TId;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Service that manages paper key metadata for members.
|
|
61
|
+
*
|
|
62
|
+
* Since {@link Member} from `@digitaldefiance/ecies-lib` is an external
|
|
63
|
+
* class, this service provides the `addPaperKey()`, `markPaperKeyUsed()`,
|
|
64
|
+
* and `revokePaperKey()` operations specified in the task, tracking
|
|
65
|
+
* metadata externally keyed by member ID.
|
|
66
|
+
*
|
|
67
|
+
* The generic `TId` parameter follows the project convention of allowing
|
|
68
|
+
* `string` for frontend DTOs and `GuidV4Buffer` for backend usage.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const service = new MemberPaperKeyService();
|
|
73
|
+
*
|
|
74
|
+
* // Add a paper key for a member
|
|
75
|
+
* const metadata = service.addPaperKey(memberId, PaperKeyPurpose.BACKUP);
|
|
76
|
+
*
|
|
77
|
+
* // Mark it as used during device provisioning
|
|
78
|
+
* service.markPaperKeyUsed(memberId, metadata.id, 'device-abc');
|
|
79
|
+
*
|
|
80
|
+
* // Revoke it
|
|
81
|
+
* service.revokePaperKey(memberId, metadata.id, 'Compromised');
|
|
82
|
+
*
|
|
83
|
+
* // Query audit trail
|
|
84
|
+
* const auditLog = service.getAuditLog(memberId);
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export declare class MemberPaperKeyService<TId = string> {
|
|
88
|
+
/**
|
|
89
|
+
* Paper key metadata keyed by member ID.
|
|
90
|
+
* Each member can have multiple paper keys.
|
|
91
|
+
*/
|
|
92
|
+
private readonly paperKeysByMember;
|
|
93
|
+
/**
|
|
94
|
+
* Append-only audit log keyed by member ID.
|
|
95
|
+
* Satisfies Requirement 1.7 (audit logging) and 1.9 (recovery event logging).
|
|
96
|
+
*/
|
|
97
|
+
private readonly auditLogByMember;
|
|
98
|
+
/**
|
|
99
|
+
* Factory for generating unique IDs.
|
|
100
|
+
* Defaults to UUID v4 cast to TId. Can be overridden for testing
|
|
101
|
+
* or when TId is not a string.
|
|
102
|
+
*/
|
|
103
|
+
private readonly idFactory;
|
|
104
|
+
constructor(idFactory?: () => TId);
|
|
105
|
+
/**
|
|
106
|
+
* Register a new paper key for a member.
|
|
107
|
+
*
|
|
108
|
+
* Creates an {@link IPaperKeyMetadata} record and appends a 'created'
|
|
109
|
+
* entry to the audit log.
|
|
110
|
+
*
|
|
111
|
+
* **Validates: Requirement 1.5** — Track paper key metadata
|
|
112
|
+
*
|
|
113
|
+
* @param memberId - The member this paper key belongs to
|
|
114
|
+
* @param purpose - The intended purpose of the paper key
|
|
115
|
+
* @returns The newly created paper key metadata
|
|
116
|
+
*/
|
|
117
|
+
addPaperKey(memberId: TId, purpose: PaperKeyPurpose): IPaperKeyMetadata<TId>;
|
|
118
|
+
/**
|
|
119
|
+
* Mark a paper key as used (e.g. after device provisioning).
|
|
120
|
+
*
|
|
121
|
+
* Sets the `usedAt` timestamp and optionally associates a device ID.
|
|
122
|
+
* A paper key can only be marked as used once and must not be revoked.
|
|
123
|
+
*
|
|
124
|
+
* **Validates: Requirement 1.6** — Mark paper keys as used after device provisioning
|
|
125
|
+
*
|
|
126
|
+
* @param memberId - The member who owns the paper key
|
|
127
|
+
* @param paperKeyId - The paper key to mark as used
|
|
128
|
+
* @param deviceId - Optional device ID that was provisioned
|
|
129
|
+
* @throws {PaperKeyNotFoundError} If the paper key does not exist for this member
|
|
130
|
+
* @throws {PaperKeyRevokedError} If the paper key has been revoked
|
|
131
|
+
* @throws {PaperKeyAlreadyUsedError} If the paper key has already been used
|
|
132
|
+
*/
|
|
133
|
+
markPaperKeyUsed(memberId: TId, paperKeyId: TId, deviceId?: TId): void;
|
|
134
|
+
/**
|
|
135
|
+
* Revoke a paper key with audit logging.
|
|
136
|
+
*
|
|
137
|
+
* Sets the `revokedAt` timestamp and records the revocation reason
|
|
138
|
+
* in the audit log. A revoked paper key cannot be used for recovery
|
|
139
|
+
* or device provisioning.
|
|
140
|
+
*
|
|
141
|
+
* **Validates: Requirement 1.7** — Support paper key revocation with audit logging
|
|
142
|
+
*
|
|
143
|
+
* @param memberId - The member who owns the paper key
|
|
144
|
+
* @param paperKeyId - The paper key to revoke
|
|
145
|
+
* @param reason - Human-readable reason for revocation
|
|
146
|
+
* @throws {PaperKeyNotFoundError} If the paper key does not exist for this member
|
|
147
|
+
* @throws {PaperKeyRevokedError} If the paper key has already been revoked
|
|
148
|
+
*/
|
|
149
|
+
revokePaperKey(memberId: TId, paperKeyId: TId, reason?: string): void;
|
|
150
|
+
/**
|
|
151
|
+
* Get all paper key metadata for a member.
|
|
152
|
+
*
|
|
153
|
+
* Returns a shallow copy of the array to prevent external mutation.
|
|
154
|
+
*
|
|
155
|
+
* @param memberId - The member to query
|
|
156
|
+
* @returns Array of paper key metadata (empty if none registered)
|
|
157
|
+
*/
|
|
158
|
+
getPaperKeys(memberId: TId): ReadonlyArray<IPaperKeyMetadata<TId>>;
|
|
159
|
+
/**
|
|
160
|
+
* Get active (non-revoked) paper keys for a member.
|
|
161
|
+
*
|
|
162
|
+
* @param memberId - The member to query
|
|
163
|
+
* @returns Array of active paper key metadata
|
|
164
|
+
*/
|
|
165
|
+
getActivePaperKeys(memberId: TId): ReadonlyArray<IPaperKeyMetadata<TId>>;
|
|
166
|
+
/**
|
|
167
|
+
* Get a single paper key by ID.
|
|
168
|
+
*
|
|
169
|
+
* @param memberId - The member who owns the paper key
|
|
170
|
+
* @param paperKeyId - The paper key to retrieve
|
|
171
|
+
* @returns The paper key metadata
|
|
172
|
+
* @throws {PaperKeyNotFoundError} If the paper key does not exist
|
|
173
|
+
*/
|
|
174
|
+
getPaperKey(memberId: TId, paperKeyId: TId): IPaperKeyMetadata<TId>;
|
|
175
|
+
/**
|
|
176
|
+
* Get the full audit log for a member's paper keys.
|
|
177
|
+
*
|
|
178
|
+
* Returns a shallow copy of the array to prevent external mutation.
|
|
179
|
+
*
|
|
180
|
+
* **Validates: Requirement 1.7** — Audit logging
|
|
181
|
+
*
|
|
182
|
+
* @param memberId - The member to query
|
|
183
|
+
* @returns Array of audit entries (empty if none recorded)
|
|
184
|
+
*/
|
|
185
|
+
getAuditLog(memberId: TId): ReadonlyArray<IPaperKeyAuditEntry<TId>>;
|
|
186
|
+
/**
|
|
187
|
+
* Check whether a specific paper key is revoked.
|
|
188
|
+
*
|
|
189
|
+
* @param memberId - The member who owns the paper key
|
|
190
|
+
* @param paperKeyId - The paper key to check
|
|
191
|
+
* @returns `true` if the paper key has been revoked
|
|
192
|
+
* @throws {PaperKeyNotFoundError} If the paper key does not exist
|
|
193
|
+
*/
|
|
194
|
+
isRevoked(memberId: TId, paperKeyId: TId): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Check whether a specific paper key has been used.
|
|
197
|
+
*
|
|
198
|
+
* @param memberId - The member who owns the paper key
|
|
199
|
+
* @param paperKeyId - The paper key to check
|
|
200
|
+
* @returns `true` if the paper key has been used
|
|
201
|
+
* @throws {PaperKeyNotFoundError} If the paper key does not exist
|
|
202
|
+
*/
|
|
203
|
+
isUsed(memberId: TId, paperKeyId: TId): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Remove all paper key data for a member.
|
|
206
|
+
*
|
|
207
|
+
* Useful for testing or when a member is deleted.
|
|
208
|
+
*
|
|
209
|
+
* @param memberId - The member whose data should be cleared
|
|
210
|
+
*/
|
|
211
|
+
clearMemberData(memberId: TId): void;
|
|
212
|
+
/**
|
|
213
|
+
* Look up a paper key by member ID and paper key ID.
|
|
214
|
+
*
|
|
215
|
+
* @throws {PaperKeyNotFoundError} If not found
|
|
216
|
+
*/
|
|
217
|
+
private findPaperKey;
|
|
218
|
+
/**
|
|
219
|
+
* Append an entry to the member's audit log.
|
|
220
|
+
*/
|
|
221
|
+
private appendAuditEntry;
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=memberPaperKeyService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memberPaperKeyService.d.ts","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/memberPaperKeyService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,UAAU,EAAE,MAAM;CAI/B;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,UAAU,EAAE,MAAM;CAI/B;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,UAAU,EAAE,MAAM;CAI/B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB,CAAC,GAAG,GAAG,MAAM;IAC/C,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IAEX,0CAA0C;IAC1C,UAAU,EAAE,GAAG,CAAC;IAEhB,wCAAwC;IACxC,QAAQ,EAAE,GAAG,CAAC;IAEd,oCAAoC;IACpC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAEvC,+BAA+B;IAC/B,SAAS,EAAE,IAAI,CAAC;IAEhB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,qBAAqB,CAAC,GAAG,GAAG,MAAM;IAC7C;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4C;IAE9E;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAG7B;IAEJ;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;gBAE1B,SAAS,CAAC,EAAE,MAAM,GAAG;IAIjC;;;;;;;;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