@brightchain/brightchain-lib 0.14.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/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/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 +4 -0
- package/src/lib/enumerations/brightChainStrings.d.ts.map +1 -1
- package/src/lib/enumerations/brightChainStrings.js +4 -0
- 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/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/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 +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 +110 -6
- package/src/lib/interfaces/availability/gossipService.d.ts.map +1 -1
- package/src/lib/interfaces/availability/gossipService.js +94 -1
- 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/blocks/vcbl.js +3 -0
- 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/brightpass/emergencyAccess.js +3 -0
- 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/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/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/emailMessageService.d.ts.map +1 -1
- package/src/lib/services/messaging/emailMessageService.js +26 -9
- package/src/lib/services/messaging/emailMessageService.js.map +1 -1
- package/src/lib/services/messaging/emailParser.d.ts +18 -0
- package/src/lib/services/messaging/emailParser.d.ts.map +1 -1
- package/src/lib/services/messaging/emailParser.js +18 -0
- package/src/lib/services/messaging/emailParser.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/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
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Device Provisioning Service for the BrightChain identity system.
|
|
4
|
+
*
|
|
5
|
+
* Handles the complete device provisioning workflow: validating a paper key,
|
|
6
|
+
* recovering the member identity, generating device-specific keys via BIP32
|
|
7
|
+
* hierarchical deterministic derivation, and persisting device metadata
|
|
8
|
+
* through a platform-independent storage interface.
|
|
9
|
+
*
|
|
10
|
+
* Device keys are derived using the BIP32 path `m/44'/60'/0'/1/<deviceIndex>`
|
|
11
|
+
* where `deviceIndex` is a monotonically increasing counter per member. This
|
|
12
|
+
* keeps device keys deterministic (reproducible from the same mnemonic) while
|
|
13
|
+
* ensuring each device gets a unique key pair.
|
|
14
|
+
*
|
|
15
|
+
* Requirements: 3.1, 3.2, 3.3, 3.4
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DeviceProvisioningService = exports.DeviceKeyStorageError = exports.DeviceKeyGenerationError = exports.InvalidPaperKeyError = void 0;
|
|
19
|
+
const ecies_lib_1 = require("@digitaldefiance/ecies-lib");
|
|
20
|
+
const bip32_1 = require("@scure/bip32");
|
|
21
|
+
const bip39_1 = require("@scure/bip39");
|
|
22
|
+
const uuid_1 = require("uuid");
|
|
23
|
+
const paperKeyService_1 = require("./paperKeyService");
|
|
24
|
+
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
25
|
+
/**
|
|
26
|
+
* BIP32 derivation path prefix for device keys.
|
|
27
|
+
*
|
|
28
|
+
* Uses BIP44 structure: `m / purpose' / coin_type' / account' / change / index`
|
|
29
|
+
* - purpose = 44 (BIP44)
|
|
30
|
+
* - coin_type = 60 (Ethereum, reused for BrightChain compatibility)
|
|
31
|
+
* - account = 0 (default account)
|
|
32
|
+
* - change = 1 (internal chain — used for device keys to avoid collision
|
|
33
|
+
* with external wallet addresses on change=0)
|
|
34
|
+
*
|
|
35
|
+
* The final `/<index>` segment is appended per device.
|
|
36
|
+
*/
|
|
37
|
+
const DEVICE_KEY_DERIVATION_PREFIX = "m/44'/60'/0'/1";
|
|
38
|
+
// ─── Error classes ──────────────────────────────────────────────────────────
|
|
39
|
+
/**
|
|
40
|
+
* Error thrown when a paper key fails validation during device provisioning.
|
|
41
|
+
*/
|
|
42
|
+
class InvalidPaperKeyError extends Error {
|
|
43
|
+
constructor(message = 'Invalid paper key: not a valid 24-word BIP39 mnemonic') {
|
|
44
|
+
super(message);
|
|
45
|
+
this.name = 'InvalidPaperKeyError';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.InvalidPaperKeyError = InvalidPaperKeyError;
|
|
49
|
+
/**
|
|
50
|
+
* Error thrown when device key generation fails.
|
|
51
|
+
*/
|
|
52
|
+
class DeviceKeyGenerationError extends Error {
|
|
53
|
+
constructor(message) {
|
|
54
|
+
super(message);
|
|
55
|
+
this.name = 'DeviceKeyGenerationError';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.DeviceKeyGenerationError = DeviceKeyGenerationError;
|
|
59
|
+
/**
|
|
60
|
+
* Error thrown when device key storage fails.
|
|
61
|
+
*/
|
|
62
|
+
class DeviceKeyStorageError extends Error {
|
|
63
|
+
constructor(message) {
|
|
64
|
+
super(message);
|
|
65
|
+
this.name = 'DeviceKeyStorageError';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.DeviceKeyStorageError = DeviceKeyStorageError;
|
|
69
|
+
// ─── Service ────────────────────────────────────────────────────────────────
|
|
70
|
+
/**
|
|
71
|
+
* Service for provisioning new devices on a BrightChain member account.
|
|
72
|
+
*
|
|
73
|
+
* The provisioning flow:
|
|
74
|
+
* 1. Validate the paper key (Requirement 3.1)
|
|
75
|
+
* 2. Recover the member identity from the paper key (Requirement 3.2)
|
|
76
|
+
* 3. Generate device-specific keys via BIP32 derivation (Requirement 3.3)
|
|
77
|
+
* 4. Store device metadata in platform-independent storage (Requirement 3.4)
|
|
78
|
+
*
|
|
79
|
+
* All methods are static — the service is stateless and safe to call
|
|
80
|
+
* from any context (browser or Node.js).
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const eciesService = ServiceProvider.getInstance().eciesService;
|
|
85
|
+
* const storage = new InMemoryDeviceKeyStorage();
|
|
86
|
+
*
|
|
87
|
+
* const result = await DeviceProvisioningService.provisionDevice(
|
|
88
|
+
* 'abandon abandon abandon ... about',
|
|
89
|
+
* 'Work Laptop',
|
|
90
|
+
* DeviceType.DESKTOP,
|
|
91
|
+
* eciesService,
|
|
92
|
+
* storage,
|
|
93
|
+
* 0,
|
|
94
|
+
* );
|
|
95
|
+
*
|
|
96
|
+
* console.log(result.deviceMetadata.publicKey); // hex-encoded public key
|
|
97
|
+
* console.log(result.member.name); // 'Recovered User'
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
class DeviceProvisioningService {
|
|
101
|
+
/**
|
|
102
|
+
* Provision a new device using a paper key.
|
|
103
|
+
*
|
|
104
|
+
* Performs the complete provisioning workflow: validates the paper key,
|
|
105
|
+
* recovers the member identity, generates device-specific keys, and
|
|
106
|
+
* stores the device metadata.
|
|
107
|
+
*
|
|
108
|
+
* **Validates: Requirements 3.1, 3.2, 3.3, 3.4**
|
|
109
|
+
*
|
|
110
|
+
* @param paperKey - The 24-word BIP39 mnemonic paper key
|
|
111
|
+
* @param deviceName - Human-readable name for the device (e.g. "Work Laptop")
|
|
112
|
+
* @param deviceType - Category of the device (desktop, mobile, web)
|
|
113
|
+
* @param eciesService - The ECIES service instance for key operations
|
|
114
|
+
* @param storage - Platform-independent device key storage
|
|
115
|
+
* @param deviceIndex - The BIP32 child index for this device (0-based)
|
|
116
|
+
* @returns A promise resolving to the full provisioning result
|
|
117
|
+
* @throws {InvalidPaperKeyError} If the paper key is invalid
|
|
118
|
+
* @throws {DeviceKeyGenerationError} If key derivation fails
|
|
119
|
+
* @throws {DeviceKeyStorageError} If storage fails
|
|
120
|
+
*/
|
|
121
|
+
static async provisionDevice(paperKey, deviceName, deviceType, eciesService, storage, deviceIndex) {
|
|
122
|
+
// Requirement 3.1: Validate paper key before provisioning
|
|
123
|
+
if (!paperKeyService_1.PaperKeyService.validatePaperKey(paperKey, eciesService)) {
|
|
124
|
+
throw new InvalidPaperKeyError();
|
|
125
|
+
}
|
|
126
|
+
// Requirement 3.2: Recover member identity from paper key
|
|
127
|
+
const member = paperKeyService_1.PaperKeyService.recoverFromPaperKey(paperKey, eciesService);
|
|
128
|
+
// Requirement 3.3: Generate device-specific keys
|
|
129
|
+
const deviceKeys = DeviceProvisioningService.generateDeviceKeys(paperKey, deviceIndex);
|
|
130
|
+
// Build device metadata
|
|
131
|
+
const now = new Date();
|
|
132
|
+
const deviceMetadata = {
|
|
133
|
+
id: (0, uuid_1.v4)(),
|
|
134
|
+
memberId: (0, ecies_lib_1.uint8ArrayToHex)(member.idBytes),
|
|
135
|
+
deviceName,
|
|
136
|
+
deviceType,
|
|
137
|
+
publicKey: deviceKeys.publicKeyHex,
|
|
138
|
+
provisionedAt: now,
|
|
139
|
+
lastSeenAt: now,
|
|
140
|
+
};
|
|
141
|
+
// Requirement 3.4: Store device keys in local secure storage
|
|
142
|
+
await DeviceProvisioningService.storeDeviceKeys(deviceMetadata, storage);
|
|
143
|
+
return {
|
|
144
|
+
deviceMetadata,
|
|
145
|
+
member,
|
|
146
|
+
deviceKeys,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Generate device-specific keys from a paper key mnemonic using BIP32
|
|
151
|
+
* hierarchical deterministic derivation.
|
|
152
|
+
*
|
|
153
|
+
* The derivation path is `m/44'/60'/0'/1/<deviceIndex>` where the
|
|
154
|
+
* `change=1` branch is reserved for device keys (as opposed to
|
|
155
|
+
* `change=0` which is used for external wallet addresses).
|
|
156
|
+
*
|
|
157
|
+
* **Validates: Requirement 3.3** — Generate device-specific keys derived
|
|
158
|
+
* from member identity
|
|
159
|
+
*
|
|
160
|
+
* @param paperKey - The 24-word BIP39 mnemonic
|
|
161
|
+
* @param deviceIndex - The child index for this device (0-based, non-hardened)
|
|
162
|
+
* @returns The derived device key result
|
|
163
|
+
* @throws {DeviceKeyGenerationError} If BIP32 derivation fails
|
|
164
|
+
*/
|
|
165
|
+
static generateDeviceKeys(paperKey, deviceIndex) {
|
|
166
|
+
if (!Number.isInteger(deviceIndex) || deviceIndex < 0) {
|
|
167
|
+
throw new DeviceKeyGenerationError(`Device index must be a non-negative integer, got ${deviceIndex}`);
|
|
168
|
+
}
|
|
169
|
+
const derivationPath = `${DEVICE_KEY_DERIVATION_PREFIX}/${deviceIndex}`;
|
|
170
|
+
try {
|
|
171
|
+
// Convert mnemonic → 64-byte seed
|
|
172
|
+
const seed = (0, bip39_1.mnemonicToSeedSync)(paperKey);
|
|
173
|
+
// Create HD master key from seed
|
|
174
|
+
const masterKey = bip32_1.HDKey.fromMasterSeed(seed);
|
|
175
|
+
// Derive the device-specific child key
|
|
176
|
+
const deviceKey = masterKey.derive(derivationPath);
|
|
177
|
+
const publicKey = deviceKey.publicKey;
|
|
178
|
+
if (!publicKey) {
|
|
179
|
+
throw new DeviceKeyGenerationError('BIP32 derivation produced no public key');
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
publicKey: new Uint8Array(publicKey),
|
|
183
|
+
publicKeyHex: (0, ecies_lib_1.uint8ArrayToHex)(new Uint8Array(publicKey)),
|
|
184
|
+
derivationPath,
|
|
185
|
+
deviceIndex,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
if (error instanceof DeviceKeyGenerationError) {
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
193
|
+
throw new DeviceKeyGenerationError(`Failed to derive device keys at path ${derivationPath}: ${message}`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Store device metadata in the provided platform-independent storage.
|
|
198
|
+
*
|
|
199
|
+
* This method wraps the storage call with error handling to produce
|
|
200
|
+
* a consistent {@link DeviceKeyStorageError} on failure.
|
|
201
|
+
*
|
|
202
|
+
* **Validates: Requirement 3.4** — Store device keys in local secure storage
|
|
203
|
+
*
|
|
204
|
+
* @param deviceMetadata - The device metadata to persist
|
|
205
|
+
* @param storage - The platform-independent storage implementation
|
|
206
|
+
* @throws {DeviceKeyStorageError} If the storage operation fails
|
|
207
|
+
*/
|
|
208
|
+
static async storeDeviceKeys(deviceMetadata, storage) {
|
|
209
|
+
try {
|
|
210
|
+
await storage.store(deviceMetadata);
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
214
|
+
throw new DeviceKeyStorageError(`Failed to store device keys for device "${deviceMetadata.deviceName}": ${message}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
exports.DeviceProvisioningService = DeviceProvisioningService;
|
|
219
|
+
//# sourceMappingURL=deviceProvisioningService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceProvisioningService.js","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/deviceProvisioningService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,0DAKoC;AACpC,wCAAqC;AACrC,wCAAkD;AAClD,+BAAoC;AAKpC,uDAAoD;AAEpD,+EAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,4BAA4B,GAAG,gBAAgB,CAAC;AAEtD,+EAA+E;AAE/E;;GAEG;AACH,MAAa,oBAAqB,SAAQ,KAAK;IAC7C,YACE,OAAO,GAAG,uDAAuD;QAEjE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAPD,oDAOC;AAED;;GAEG;AACH,MAAa,wBAAyB,SAAQ,KAAK;IACjD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AALD,4DAKC;AAED;;GAEG;AACH,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AALD,sDAKC;AAoCD,+EAA+E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C;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,IAAI,qBAAqB,CAC7B,2CAA2C,cAAc,CAAC,UAAU,MAAM,OAAO,EAAE,CACpF,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAxJD,8DAwJC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity Proof Service for the BrightChain identity system.
|
|
3
|
+
*
|
|
4
|
+
* Creates, verifies, and manages cryptographic identity proofs that link
|
|
5
|
+
* a BrightChain member to external platform accounts (Twitter, GitHub,
|
|
6
|
+
* Reddit, personal websites, and blockchain addresses).
|
|
7
|
+
*
|
|
8
|
+
* Each proof contains a signed statement produced with the member's
|
|
9
|
+
* SECP256k1 private key. Anyone with the member's public key can
|
|
10
|
+
* independently verify the proof without contacting BrightChain.
|
|
11
|
+
*
|
|
12
|
+
* The signed statement format (Requirement 4.8):
|
|
13
|
+
* "I am {username} on {platform}. My BrightChain ID is {memberId}. Timestamp: {ISO8601}"
|
|
14
|
+
*
|
|
15
|
+
* Requirements: 4.1, 4.2, 4.3, 4.4, 4.6, 4.9
|
|
16
|
+
*/
|
|
17
|
+
import { ECIESService, Member, PlatformID } from '@digitaldefiance/ecies-lib';
|
|
18
|
+
import { ProofPlatform } from '../../enumerations/proofPlatform';
|
|
19
|
+
import { IIdentityProof } from '../../interfaces/identity/identityProof';
|
|
20
|
+
/**
|
|
21
|
+
* Error thrown when an unsupported platform is specified.
|
|
22
|
+
*/
|
|
23
|
+
export declare class UnsupportedPlatformError extends Error {
|
|
24
|
+
constructor(platform: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Error thrown when proof creation fails (e.g. member has no private key).
|
|
28
|
+
*/
|
|
29
|
+
export declare class ProofCreationError extends Error {
|
|
30
|
+
constructor(message: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Error thrown when proof URL validation fails.
|
|
34
|
+
*/
|
|
35
|
+
export declare class ProofUrlError extends Error {
|
|
36
|
+
constructor(message: string);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Service for creating and verifying cryptographic identity proofs.
|
|
40
|
+
*
|
|
41
|
+
* Identity proofs link a BrightChain member to an external platform
|
|
42
|
+
* account by signing a standardised statement with the member's
|
|
43
|
+
* SECP256k1 private key. The proof can be independently verified by
|
|
44
|
+
* anyone with the member's public key.
|
|
45
|
+
*
|
|
46
|
+
* All methods are static — the service is stateless and safe to call
|
|
47
|
+
* from any context (browser or Node.js).
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const eciesService = ServiceProvider.getInstance().eciesService;
|
|
52
|
+
* const member = PaperKeyService.recoverFromPaperKey(paperKey, eciesService);
|
|
53
|
+
*
|
|
54
|
+
* // Create a proof
|
|
55
|
+
* const proof = IdentityProofService.create(member, ProofPlatform.GITHUB, 'octocat');
|
|
56
|
+
*
|
|
57
|
+
* // Verify the proof
|
|
58
|
+
* const isValid = IdentityProofService.verify(proof, member.publicKey, eciesService);
|
|
59
|
+
*
|
|
60
|
+
* // Get posting instructions
|
|
61
|
+
* const instructions = IdentityProofService.getInstructions(ProofPlatform.GITHUB);
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare class IdentityProofService {
|
|
65
|
+
/**
|
|
66
|
+
* Create a new identity proof by signing a statement with the member's
|
|
67
|
+
* SECP256k1 private key.
|
|
68
|
+
*
|
|
69
|
+
* The signed statement follows the format defined in Requirement 4.8:
|
|
70
|
+
* "I am {username} on {platform}. My BrightChain ID is {memberId}. Timestamp: {ISO8601}"
|
|
71
|
+
*
|
|
72
|
+
* **Validates: Requirements 4.1, 4.2, 4.3**
|
|
73
|
+
*
|
|
74
|
+
* @param member - The member creating the proof (must have private key loaded)
|
|
75
|
+
* @param platform - The target platform (must be a valid {@link ProofPlatform} value)
|
|
76
|
+
* @param username - The member's username on the target platform
|
|
77
|
+
* @returns A new {@link IIdentityProof} with status {@link VerificationStatus.PENDING}
|
|
78
|
+
* @throws {UnsupportedPlatformError} If the platform is not a valid {@link ProofPlatform}
|
|
79
|
+
* @throws {ProofCreationError} If the member has no private key loaded
|
|
80
|
+
*/
|
|
81
|
+
static create<TID extends PlatformID = Uint8Array>(member: Member<TID>, platform: ProofPlatform, username: string): IIdentityProof;
|
|
82
|
+
/**
|
|
83
|
+
* Verify an identity proof's signature using a public key.
|
|
84
|
+
*
|
|
85
|
+
* Reconstructs the signature from its hex encoding and verifies it
|
|
86
|
+
* against the signed statement using the ECIESService's ECDSA
|
|
87
|
+
* verification.
|
|
88
|
+
*
|
|
89
|
+
* **Validates: Requirement 4.4**
|
|
90
|
+
*
|
|
91
|
+
* @param proof - The identity proof to verify
|
|
92
|
+
* @param publicKey - The SECP256k1 public key to verify against (raw bytes)
|
|
93
|
+
* @param eciesService - The ECIES service instance for signature verification
|
|
94
|
+
* @returns `true` if the signature is valid for the given public key
|
|
95
|
+
*/
|
|
96
|
+
static verify<TID extends PlatformID = Uint8Array>(proof: IIdentityProof, publicKey: Uint8Array, eciesService: ECIESService<TID>): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Check whether a proof URL contains the expected signed statement.
|
|
99
|
+
*
|
|
100
|
+
* Fetches the proof URL and checks that the response body includes
|
|
101
|
+
* the full signed statement text. This is used for initial verification
|
|
102
|
+
* and periodic re-verification (Requirement 4.10).
|
|
103
|
+
*
|
|
104
|
+
* **Validates: Requirement 4.6**
|
|
105
|
+
*
|
|
106
|
+
* @param proof - The identity proof whose URL to check
|
|
107
|
+
* @returns A promise resolving to `true` if the URL is accessible and
|
|
108
|
+
* contains the signed statement, `false` otherwise
|
|
109
|
+
*/
|
|
110
|
+
static checkProofUrl(proof: IIdentityProof): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* Get platform-specific instructions for posting an identity proof.
|
|
113
|
+
*
|
|
114
|
+
* Returns human-readable instructions explaining how to post the
|
|
115
|
+
* signed statement on the specified platform and what URL to provide
|
|
116
|
+
* for verification.
|
|
117
|
+
*
|
|
118
|
+
* **Validates: Requirement 4.9**
|
|
119
|
+
*
|
|
120
|
+
* @param platform - The target platform
|
|
121
|
+
* @returns Instructions string for the specified platform, or a generic
|
|
122
|
+
* fallback for unrecognised platforms
|
|
123
|
+
*/
|
|
124
|
+
static getInstructions(platform: ProofPlatform | string): string;
|
|
125
|
+
/**
|
|
126
|
+
* Build the signed statement string for a given set of parameters.
|
|
127
|
+
*
|
|
128
|
+
* This is a utility method that produces the statement text without
|
|
129
|
+
* signing it. Useful for previewing the statement before creation.
|
|
130
|
+
*
|
|
131
|
+
* @param username - The member's username on the target platform
|
|
132
|
+
* @param platform - The target platform
|
|
133
|
+
* @param memberId - The member's hex-encoded ID
|
|
134
|
+
* @param timestamp - ISO 8601 timestamp string
|
|
135
|
+
* @returns The formatted statement string per Requirement 4.8
|
|
136
|
+
*/
|
|
137
|
+
static buildStatement(username: string, platform: ProofPlatform | string, memberId: string, timestamp: string): string;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=identityProofService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityProofService.d.ts","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/identityProofService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,YAAY,EAEZ,MAAM,EACN,UAAU,EAGX,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAIzE;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,QAAQ,EAAE,MAAM;CAI7B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,oBAAoB;IAC/B;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU,EAC/C,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,EACnB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,MAAM,GACf,cAAc;IA2CjB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU,EAC/C,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,UAAU,EACrB,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,GAC9B,OAAO;IAiBV;;;;;;;;;;;;OAYG;WACU,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBnE;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM;IAOhE;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,cAAc,CACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,aAAa,GAAG,MAAM,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,MAAM;CAGV"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Identity Proof Service for the BrightChain identity system.
|
|
4
|
+
*
|
|
5
|
+
* Creates, verifies, and manages cryptographic identity proofs that link
|
|
6
|
+
* a BrightChain member to external platform accounts (Twitter, GitHub,
|
|
7
|
+
* Reddit, personal websites, and blockchain addresses).
|
|
8
|
+
*
|
|
9
|
+
* Each proof contains a signed statement produced with the member's
|
|
10
|
+
* SECP256k1 private key. Anyone with the member's public key can
|
|
11
|
+
* independently verify the proof without contacting BrightChain.
|
|
12
|
+
*
|
|
13
|
+
* The signed statement format (Requirement 4.8):
|
|
14
|
+
* "I am {username} on {platform}. My BrightChain ID is {memberId}. Timestamp: {ISO8601}"
|
|
15
|
+
*
|
|
16
|
+
* Requirements: 4.1, 4.2, 4.3, 4.4, 4.6, 4.9
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.IdentityProofService = exports.ProofUrlError = exports.ProofCreationError = exports.UnsupportedPlatformError = void 0;
|
|
20
|
+
const ecies_lib_1 = require("@digitaldefiance/ecies-lib");
|
|
21
|
+
const uuid_1 = require("uuid");
|
|
22
|
+
const bufferUtils_1 = require("../../bufferUtils");
|
|
23
|
+
const proofPlatform_1 = require("../../enumerations/proofPlatform");
|
|
24
|
+
const verificationStatus_1 = require("../../enumerations/verificationStatus");
|
|
25
|
+
// ─── Error classes ──────────────────────────────────────────────────────────
|
|
26
|
+
/**
|
|
27
|
+
* Error thrown when an unsupported platform is specified.
|
|
28
|
+
*/
|
|
29
|
+
class UnsupportedPlatformError extends Error {
|
|
30
|
+
constructor(platform) {
|
|
31
|
+
super(`Unsupported proof platform: "${platform}"`);
|
|
32
|
+
this.name = 'UnsupportedPlatformError';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.UnsupportedPlatformError = UnsupportedPlatformError;
|
|
36
|
+
/**
|
|
37
|
+
* Error thrown when proof creation fails (e.g. member has no private key).
|
|
38
|
+
*/
|
|
39
|
+
class ProofCreationError extends Error {
|
|
40
|
+
constructor(message) {
|
|
41
|
+
super(message);
|
|
42
|
+
this.name = 'ProofCreationError';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.ProofCreationError = ProofCreationError;
|
|
46
|
+
/**
|
|
47
|
+
* Error thrown when proof URL validation fails.
|
|
48
|
+
*/
|
|
49
|
+
class ProofUrlError extends Error {
|
|
50
|
+
constructor(message) {
|
|
51
|
+
super(message);
|
|
52
|
+
this.name = 'ProofUrlError';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ProofUrlError = ProofUrlError;
|
|
56
|
+
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
57
|
+
/**
|
|
58
|
+
* Set of valid platform values derived from the ProofPlatform enum.
|
|
59
|
+
*/
|
|
60
|
+
const VALID_PLATFORMS = new Set(Object.values(proofPlatform_1.ProofPlatform));
|
|
61
|
+
/**
|
|
62
|
+
* Platform-specific instructions for posting identity proofs.
|
|
63
|
+
*
|
|
64
|
+
* Requirement 4.9: Return instructions for posting the signed statement.
|
|
65
|
+
*/
|
|
66
|
+
const PLATFORM_INSTRUCTIONS = {
|
|
67
|
+
[proofPlatform_1.ProofPlatform.TWITTER]: 'Post the signed statement as a tweet on Twitter/X and provide the tweet URL.',
|
|
68
|
+
[proofPlatform_1.ProofPlatform.GITHUB]: 'Create a public GitHub Gist containing the signed statement and provide the Gist URL.',
|
|
69
|
+
[proofPlatform_1.ProofPlatform.REDDIT]: 'Post the signed statement as a Reddit comment or text post and provide the permalink URL.',
|
|
70
|
+
[proofPlatform_1.ProofPlatform.WEBSITE]: 'Add the signed statement to a publicly accessible page on your website and provide the page URL.',
|
|
71
|
+
[proofPlatform_1.ProofPlatform.BITCOIN]: 'Sign a message with your Bitcoin address containing the signed statement and provide a verification URL.',
|
|
72
|
+
[proofPlatform_1.ProofPlatform.ETHEREUM]: 'Sign a message with your Ethereum address containing the signed statement and provide a verification URL.',
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Default instruction returned for unrecognised platforms.
|
|
76
|
+
*/
|
|
77
|
+
const DEFAULT_INSTRUCTION = 'Post the signed statement publicly and provide the URL where it can be verified.';
|
|
78
|
+
// ─── Service ────────────────────────────────────────────────────────────────
|
|
79
|
+
/**
|
|
80
|
+
* Service for creating and verifying cryptographic identity proofs.
|
|
81
|
+
*
|
|
82
|
+
* Identity proofs link a BrightChain member to an external platform
|
|
83
|
+
* account by signing a standardised statement with the member's
|
|
84
|
+
* SECP256k1 private key. The proof can be independently verified by
|
|
85
|
+
* anyone with the member's public key.
|
|
86
|
+
*
|
|
87
|
+
* All methods are static — the service is stateless and safe to call
|
|
88
|
+
* from any context (browser or Node.js).
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const eciesService = ServiceProvider.getInstance().eciesService;
|
|
93
|
+
* const member = PaperKeyService.recoverFromPaperKey(paperKey, eciesService);
|
|
94
|
+
*
|
|
95
|
+
* // Create a proof
|
|
96
|
+
* const proof = IdentityProofService.create(member, ProofPlatform.GITHUB, 'octocat');
|
|
97
|
+
*
|
|
98
|
+
* // Verify the proof
|
|
99
|
+
* const isValid = IdentityProofService.verify(proof, member.publicKey, eciesService);
|
|
100
|
+
*
|
|
101
|
+
* // Get posting instructions
|
|
102
|
+
* const instructions = IdentityProofService.getInstructions(ProofPlatform.GITHUB);
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
class IdentityProofService {
|
|
106
|
+
/**
|
|
107
|
+
* Create a new identity proof by signing a statement with the member's
|
|
108
|
+
* SECP256k1 private key.
|
|
109
|
+
*
|
|
110
|
+
* The signed statement follows the format defined in Requirement 4.8:
|
|
111
|
+
* "I am {username} on {platform}. My BrightChain ID is {memberId}. Timestamp: {ISO8601}"
|
|
112
|
+
*
|
|
113
|
+
* **Validates: Requirements 4.1, 4.2, 4.3**
|
|
114
|
+
*
|
|
115
|
+
* @param member - The member creating the proof (must have private key loaded)
|
|
116
|
+
* @param platform - The target platform (must be a valid {@link ProofPlatform} value)
|
|
117
|
+
* @param username - The member's username on the target platform
|
|
118
|
+
* @returns A new {@link IIdentityProof} with status {@link VerificationStatus.PENDING}
|
|
119
|
+
* @throws {UnsupportedPlatformError} If the platform is not a valid {@link ProofPlatform}
|
|
120
|
+
* @throws {ProofCreationError} If the member has no private key loaded
|
|
121
|
+
*/
|
|
122
|
+
static create(member, platform, username) {
|
|
123
|
+
// Validate platform
|
|
124
|
+
if (!VALID_PLATFORMS.has(platform)) {
|
|
125
|
+
throw new UnsupportedPlatformError(platform);
|
|
126
|
+
}
|
|
127
|
+
// Validate member has private key for signing
|
|
128
|
+
if (!member.hasPrivateKey) {
|
|
129
|
+
throw new ProofCreationError('Member must have a private key loaded to create identity proofs');
|
|
130
|
+
}
|
|
131
|
+
// Validate username is non-empty
|
|
132
|
+
if (!username || username.trim().length === 0) {
|
|
133
|
+
throw new ProofCreationError('Username must not be empty');
|
|
134
|
+
}
|
|
135
|
+
const trimmedUsername = username.trim();
|
|
136
|
+
const timestamp = new Date().toISOString();
|
|
137
|
+
const memberId = (0, ecies_lib_1.uint8ArrayToHex)(member.idBytes);
|
|
138
|
+
// Requirement 4.8: Signed statement format
|
|
139
|
+
const statement = `I am ${trimmedUsername} on ${platform}. My BrightChain ID is ${memberId}. Timestamp: ${timestamp}`;
|
|
140
|
+
// Requirement 4.3: Sign with SECP256k1 private key
|
|
141
|
+
const statementBytes = (0, bufferUtils_1.stringToUint8Array)(statement);
|
|
142
|
+
const signature = member.sign(statementBytes);
|
|
143
|
+
const signatureHex = (0, ecies_lib_1.uint8ArrayToHex)(signature);
|
|
144
|
+
return {
|
|
145
|
+
id: (0, uuid_1.v4)(),
|
|
146
|
+
memberId,
|
|
147
|
+
platform,
|
|
148
|
+
username: trimmedUsername,
|
|
149
|
+
proofUrl: '',
|
|
150
|
+
signedStatement: statement,
|
|
151
|
+
signature: signatureHex,
|
|
152
|
+
createdAt: new Date(),
|
|
153
|
+
verificationStatus: verificationStatus_1.VerificationStatus.PENDING,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Verify an identity proof's signature using a public key.
|
|
158
|
+
*
|
|
159
|
+
* Reconstructs the signature from its hex encoding and verifies it
|
|
160
|
+
* against the signed statement using the ECIESService's ECDSA
|
|
161
|
+
* verification.
|
|
162
|
+
*
|
|
163
|
+
* **Validates: Requirement 4.4**
|
|
164
|
+
*
|
|
165
|
+
* @param proof - The identity proof to verify
|
|
166
|
+
* @param publicKey - The SECP256k1 public key to verify against (raw bytes)
|
|
167
|
+
* @param eciesService - The ECIES service instance for signature verification
|
|
168
|
+
* @returns `true` if the signature is valid for the given public key
|
|
169
|
+
*/
|
|
170
|
+
static verify(proof, publicKey, eciesService) {
|
|
171
|
+
try {
|
|
172
|
+
const statementBytes = (0, bufferUtils_1.stringToUint8Array)(proof.signedStatement);
|
|
173
|
+
const signatureBytes = (0, ecies_lib_1.hexToUint8Array)(proof.signature);
|
|
174
|
+
return eciesService.verifyMessage(publicKey, statementBytes, signatureBytes);
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Check whether a proof URL contains the expected signed statement.
|
|
182
|
+
*
|
|
183
|
+
* Fetches the proof URL and checks that the response body includes
|
|
184
|
+
* the full signed statement text. This is used for initial verification
|
|
185
|
+
* and periodic re-verification (Requirement 4.10).
|
|
186
|
+
*
|
|
187
|
+
* **Validates: Requirement 4.6**
|
|
188
|
+
*
|
|
189
|
+
* @param proof - The identity proof whose URL to check
|
|
190
|
+
* @returns A promise resolving to `true` if the URL is accessible and
|
|
191
|
+
* contains the signed statement, `false` otherwise
|
|
192
|
+
*/
|
|
193
|
+
static async checkProofUrl(proof) {
|
|
194
|
+
if (!proof.proofUrl || proof.proofUrl.trim().length === 0) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
const response = await fetch(proof.proofUrl);
|
|
199
|
+
if (!response.ok) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
const content = await response.text();
|
|
203
|
+
return content.includes(proof.signedStatement);
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Get platform-specific instructions for posting an identity proof.
|
|
211
|
+
*
|
|
212
|
+
* Returns human-readable instructions explaining how to post the
|
|
213
|
+
* signed statement on the specified platform and what URL to provide
|
|
214
|
+
* for verification.
|
|
215
|
+
*
|
|
216
|
+
* **Validates: Requirement 4.9**
|
|
217
|
+
*
|
|
218
|
+
* @param platform - The target platform
|
|
219
|
+
* @returns Instructions string for the specified platform, or a generic
|
|
220
|
+
* fallback for unrecognised platforms
|
|
221
|
+
*/
|
|
222
|
+
static getInstructions(platform) {
|
|
223
|
+
if (VALID_PLATFORMS.has(platform)) {
|
|
224
|
+
return PLATFORM_INSTRUCTIONS[platform];
|
|
225
|
+
}
|
|
226
|
+
return DEFAULT_INSTRUCTION;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Build the signed statement string for a given set of parameters.
|
|
230
|
+
*
|
|
231
|
+
* This is a utility method that produces the statement text without
|
|
232
|
+
* signing it. Useful for previewing the statement before creation.
|
|
233
|
+
*
|
|
234
|
+
* @param username - The member's username on the target platform
|
|
235
|
+
* @param platform - The target platform
|
|
236
|
+
* @param memberId - The member's hex-encoded ID
|
|
237
|
+
* @param timestamp - ISO 8601 timestamp string
|
|
238
|
+
* @returns The formatted statement string per Requirement 4.8
|
|
239
|
+
*/
|
|
240
|
+
static buildStatement(username, platform, memberId, timestamp) {
|
|
241
|
+
return `I am ${username} on ${platform}. My BrightChain ID is ${memberId}. Timestamp: ${timestamp}`;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
exports.IdentityProofService = IdentityProofService;
|
|
245
|
+
//# sourceMappingURL=identityProofService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityProofService.js","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/identityProofService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,0DAOoC;AACpC,+BAAoC;AAEpC,mDAAuD;AACvD,oEAAiE;AACjE,8EAA2E;AAG3E,+EAA+E;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C7B,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,cAAc,CACnB,QAAgB,EAChB,QAAgC,EAChC,QAAgB,EAChB,SAAiB;QAEjB,OAAO,QAAQ,QAAQ,OAAO,QAAQ,0BAA0B,QAAQ,gBAAgB,SAAS,EAAE,CAAC;IACtG,CAAC;CACF;AAzKD,oDAyKC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity services for the BrightChain identity system.
|
|
3
|
+
*
|
|
4
|
+
* Provides paper key management, split paper keys, device provisioning,
|
|
5
|
+
* identity proofs, and public key directory services.
|
|
6
|
+
*/
|
|
7
|
+
export * from './deviceProvisioningService';
|
|
8
|
+
export * from './identityProofService';
|
|
9
|
+
export * from './memberIdentityProofService';
|
|
10
|
+
export * from './memberPaperKeyService';
|
|
11
|
+
export * from './paperKeyService';
|
|
12
|
+
export * from './publicKeyDirectoryService';
|
|
13
|
+
export * from './splitPaperKeyService';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Identity services for the BrightChain identity system.
|
|
4
|
+
*
|
|
5
|
+
* Provides paper key management, split paper keys, device provisioning,
|
|
6
|
+
* identity proofs, and public key directory services.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
tslib_1.__exportStar(require("./deviceProvisioningService"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./identityProofService"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./memberIdentityProofService"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./memberPaperKeyService"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./paperKeyService"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./publicKeyDirectoryService"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./splitPaperKeyService"), exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/identity/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sEAA4C;AAC5C,iEAAuC;AACvC,uEAA6C;AAC7C,kEAAwC;AACxC,4DAAkC;AAClC,sEAA4C;AAC5C,iEAAuC"}
|