@ledgerhq/device-trusted-app-kit-ledger-keyring-protocol 0.0.0-add-logs-in-send-apdu-20251021123609
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.MD +202 -0
- package/README.md +32 -0
- package/lib/cjs/api/LedgerKeyringProtocol.js +2 -0
- package/lib/cjs/api/LedgerKeyringProtocol.js.map +7 -0
- package/lib/cjs/api/LedgerKeyringProtocolBuilder.js +2 -0
- package/lib/cjs/api/LedgerKeyringProtocolBuilder.js.map +7 -0
- package/lib/cjs/api/app-binder/AddToTrustchainDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/AddToTrustchainDeviceActionTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/AuthenticateDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/AuthenticateDeviceActionTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/GetVersionCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetVersionCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/GetVersionDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetVersionDeviceActionTypes.js.map +7 -0
- package/lib/cjs/api/crypto/CryptoService.js +2 -0
- package/lib/cjs/api/crypto/CryptoService.js.map +7 -0
- package/lib/cjs/api/crypto/Key.js +2 -0
- package/lib/cjs/api/crypto/Key.js.map +7 -0
- package/lib/cjs/api/crypto/KeyPair.js +2 -0
- package/lib/cjs/api/crypto/KeyPair.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.test.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.test.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKey.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKey.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKey.test.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKey.test.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.test.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.test.js.map +7 -0
- package/lib/cjs/api/index.js +2 -0
- package/lib/cjs/api/index.js.map +7 -0
- package/lib/cjs/api/model/Env.js +2 -0
- package/lib/cjs/api/model/Env.js.map +7 -0
- package/lib/cjs/api/model/Errors.js +2 -0
- package/lib/cjs/api/model/Errors.js.map +7 -0
- package/lib/cjs/api/model/JWT.js +2 -0
- package/lib/cjs/api/model/JWT.js.map +7 -0
- package/lib/cjs/api/model/Permissions.js +2 -0
- package/lib/cjs/api/model/Permissions.js.map +7 -0
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/index.js.map +7 -0
- package/lib/cjs/internal/DefaultLedgerKeyringProtocol.js +2 -0
- package/lib/cjs/internal/DefaultLedgerKeyringProtocol.js.map +7 -0
- package/lib/cjs/internal/app-binder/LedgerKeyringProtocolBinder.js +2 -0
- package/lib/cjs/internal/app-binder/LedgerKeyringProtocolBinder.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetAppNameCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAppNameCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.test.js +27 -0
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetVersionCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetVersionCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/InitCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/InitCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/InitCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/InitCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.js +2 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/extractTrustedProperty.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/extractTrustedProperty.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js.map +7 -0
- package/lib/cjs/internal/app-binder/device-action/AddToTrustchainDeviceAction.js +2 -0
- package/lib/cjs/internal/app-binder/device-action/AddToTrustchainDeviceAction.js.map +7 -0
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js +2 -0
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js.map +7 -0
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js +2 -0
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js.map +7 -0
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js +2 -0
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js.map +7 -0
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js +2 -0
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js.map +7 -0
- package/lib/cjs/internal/app-binder/device-action/utils/raiseAndAssign.js +2 -0
- package/lib/cjs/internal/app-binder/device-action/utils/raiseAndAssign.js.map +7 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.js +2 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.js.map +7 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.js +2 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/AuthenticateTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/AuthenticateTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/ExtractEncryptionKeyTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/ExtractEncryptionKeyTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/InitTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/InitTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/ParseStreamToDeviceTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/ParseStreamToDeviceTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/SignBlockTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/SignBlockTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/SignChallengeWithDeviceTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/SignChallengeWithDeviceTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.test.js +2 -0
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/utils/TrustedProperties.js +2 -0
- package/lib/cjs/internal/app-binder/task/utils/TrustedProperties.js.map +7 -0
- package/lib/cjs/internal/di.js +2 -0
- package/lib/cjs/internal/di.js.map +7 -0
- package/lib/cjs/internal/externalTypes.js +2 -0
- package/lib/cjs/internal/externalTypes.js.map +7 -0
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.js +2 -0
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.js.map +7 -0
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +2 -0
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +7 -0
- package/lib/cjs/internal/lkrp-datasource/data/LKRPDataSource.js +2 -0
- package/lib/cjs/internal/lkrp-datasource/data/LKRPDataSource.js.map +7 -0
- package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js +2 -0
- package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js.map +7 -0
- package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceTypes.js +2 -0
- package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceTypes.js.map +7 -0
- package/lib/cjs/internal/models/LKRPBlockTypes.js +2 -0
- package/lib/cjs/internal/models/LKRPBlockTypes.js.map +7 -0
- package/lib/cjs/internal/models/LKRPCommandTypes.js +2 -0
- package/lib/cjs/internal/models/LKRPCommandTypes.js.map +7 -0
- package/lib/cjs/internal/models/Tags.js +2 -0
- package/lib/cjs/internal/models/Tags.js.map +7 -0
- package/lib/cjs/internal/models/Types.js +2 -0
- package/lib/cjs/internal/models/Types.js.map +7 -0
- package/lib/cjs/internal/use-cases/authentication/AuthenticateUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/authentication/AuthenticateUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/authentication/DecryptDataUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/authentication/DecryptDataUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/authentication/EncryptDataUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/authentication/EncryptDataUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/di/useCasesModule.js +2 -0
- package/lib/cjs/internal/use-cases/di/useCasesModule.js.map +7 -0
- package/lib/cjs/internal/use-cases/di/useCasesTypes.js +2 -0
- package/lib/cjs/internal/use-cases/di/useCasesTypes.js.map +7 -0
- package/lib/cjs/internal/utils/LKRPBlock.js +5 -0
- package/lib/cjs/internal/utils/LKRPBlock.js.map +7 -0
- package/lib/cjs/internal/utils/LKRPBlock.test.js +24 -0
- package/lib/cjs/internal/utils/LKRPBlock.test.js.map +7 -0
- package/lib/cjs/internal/utils/LKRPBlockStream.js +4 -0
- package/lib/cjs/internal/utils/LKRPBlockStream.js.map +7 -0
- package/lib/cjs/internal/utils/LKRPBlockStream.test.js +39 -0
- package/lib/cjs/internal/utils/LKRPBlockStream.test.js.map +7 -0
- package/lib/cjs/internal/utils/LKRPCommand.js +3 -0
- package/lib/cjs/internal/utils/LKRPCommand.js.map +7 -0
- package/lib/cjs/internal/utils/LKRPCommand.test.js +3 -0
- package/lib/cjs/internal/utils/LKRPCommand.test.js.map +7 -0
- package/lib/cjs/internal/utils/TLVParser.js +2 -0
- package/lib/cjs/internal/utils/TLVParser.js.map +7 -0
- package/lib/cjs/internal/utils/TLVParser.test.js +2 -0
- package/lib/cjs/internal/utils/TLVParser.test.js.map +7 -0
- package/lib/cjs/internal/utils/Trustchain.js +2 -0
- package/lib/cjs/internal/utils/Trustchain.js.map +7 -0
- package/lib/cjs/internal/utils/derivationPath.js +2 -0
- package/lib/cjs/internal/utils/derivationPath.js.map +7 -0
- package/lib/cjs/internal/utils/eitherSeqRecord.js +2 -0
- package/lib/cjs/internal/utils/eitherSeqRecord.js.map +7 -0
- package/lib/cjs/internal/utils/required.js +2 -0
- package/lib/cjs/internal/utils/required.js.map +7 -0
- package/lib/cjs/package.json +56 -0
- package/lib/esm/api/LedgerKeyringProtocol.js +1 -0
- package/lib/esm/api/LedgerKeyringProtocol.js.map +7 -0
- package/lib/esm/api/LedgerKeyringProtocolBuilder.js +2 -0
- package/lib/esm/api/LedgerKeyringProtocolBuilder.js.map +7 -0
- package/lib/esm/api/app-binder/AddToTrustchainDeviceActionTypes.js +2 -0
- package/lib/esm/api/app-binder/AddToTrustchainDeviceActionTypes.js.map +7 -0
- package/lib/esm/api/app-binder/AuthenticateDeviceActionTypes.js +2 -0
- package/lib/esm/api/app-binder/AuthenticateDeviceActionTypes.js.map +7 -0
- package/lib/esm/api/app-binder/GetVersionCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/GetVersionCommandTypes.js.map +7 -0
- package/lib/esm/api/app-binder/GetVersionDeviceActionTypes.js +1 -0
- package/lib/esm/api/app-binder/GetVersionDeviceActionTypes.js.map +7 -0
- package/lib/esm/api/crypto/CryptoService.js +2 -0
- package/lib/esm/api/crypto/CryptoService.js.map +7 -0
- package/lib/esm/api/crypto/Key.js +2 -0
- package/lib/esm/api/crypto/Key.js.map +7 -0
- package/lib/esm/api/crypto/KeyPair.js +2 -0
- package/lib/esm/api/crypto/KeyPair.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.js +2 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.test.js +2 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.test.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKey.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKey.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKey.test.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKey.test.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.test.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.test.js.map +7 -0
- package/lib/esm/api/index.js +2 -0
- package/lib/esm/api/index.js.map +7 -0
- package/lib/esm/api/model/Env.js +2 -0
- package/lib/esm/api/model/Env.js.map +7 -0
- package/lib/esm/api/model/Errors.js +2 -0
- package/lib/esm/api/model/Errors.js.map +7 -0
- package/lib/esm/api/model/JWT.js +1 -0
- package/lib/esm/api/model/JWT.js.map +7 -0
- package/lib/esm/api/model/Permissions.js +2 -0
- package/lib/esm/api/model/Permissions.js.map +7 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +7 -0
- package/lib/esm/internal/DefaultLedgerKeyringProtocol.js +2 -0
- package/lib/esm/internal/DefaultLedgerKeyringProtocol.js.map +7 -0
- package/lib/esm/internal/app-binder/LedgerKeyringProtocolBinder.js +2 -0
- package/lib/esm/internal/app-binder/LedgerKeyringProtocolBinder.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetAppNameCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAppNameCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.test.js +27 -0
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetVersionCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/GetVersionCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/InitCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/InitCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/InitCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/InitCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.js +2 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.js.map +7 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.test.js +2 -0
- package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignBlockHeader.js +2 -0
- package/lib/esm/internal/app-binder/command/SignBlockHeader.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js +2 -0
- package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/extractTrustedProperty.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/extractTrustedProperty.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js.map +7 -0
- package/lib/esm/internal/app-binder/device-action/AddToTrustchainDeviceAction.js +2 -0
- package/lib/esm/internal/app-binder/device-action/AddToTrustchainDeviceAction.js.map +7 -0
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js +2 -0
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js.map +7 -0
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js +2 -0
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js.map +7 -0
- package/lib/esm/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js +1 -0
- package/lib/esm/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js.map +7 -0
- package/lib/esm/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js +1 -0
- package/lib/esm/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js.map +7 -0
- package/lib/esm/internal/app-binder/device-action/utils/raiseAndAssign.js +2 -0
- package/lib/esm/internal/app-binder/device-action/utils/raiseAndAssign.js.map +7 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.js +2 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.js.map +7 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.js +2 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.js.map +7 -0
- package/lib/esm/internal/app-binder/task/AuthenticateTask.js +2 -0
- package/lib/esm/internal/app-binder/task/AuthenticateTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/ExtractEncryptionKeyTask.js +2 -0
- package/lib/esm/internal/app-binder/task/ExtractEncryptionKeyTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/InitTask.js +2 -0
- package/lib/esm/internal/app-binder/task/InitTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/ParseStreamToDeviceTask.js +2 -0
- package/lib/esm/internal/app-binder/task/ParseStreamToDeviceTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/SignBlockTask.js +2 -0
- package/lib/esm/internal/app-binder/task/SignBlockTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/SignChallengeWithDeviceTask.js +2 -0
- package/lib/esm/internal/app-binder/task/SignChallengeWithDeviceTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.js +2 -0
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.test.js +2 -0
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.test.js.map +7 -0
- package/lib/esm/internal/app-binder/task/utils/TrustedProperties.js +2 -0
- package/lib/esm/internal/app-binder/task/utils/TrustedProperties.js.map +7 -0
- package/lib/esm/internal/di.js +2 -0
- package/lib/esm/internal/di.js.map +7 -0
- package/lib/esm/internal/externalTypes.js +2 -0
- package/lib/esm/internal/externalTypes.js.map +7 -0
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.js +2 -0
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.js.map +7 -0
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +2 -0
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +7 -0
- package/lib/esm/internal/lkrp-datasource/data/LKRPDataSource.js +1 -0
- package/lib/esm/internal/lkrp-datasource/data/LKRPDataSource.js.map +7 -0
- package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js +2 -0
- package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js.map +7 -0
- package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceTypes.js +2 -0
- package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceTypes.js.map +7 -0
- package/lib/esm/internal/models/LKRPBlockTypes.js +1 -0
- package/lib/esm/internal/models/LKRPBlockTypes.js.map +7 -0
- package/lib/esm/internal/models/LKRPCommandTypes.js +1 -0
- package/lib/esm/internal/models/LKRPCommandTypes.js.map +7 -0
- package/lib/esm/internal/models/Tags.js +2 -0
- package/lib/esm/internal/models/Tags.js.map +7 -0
- package/lib/esm/internal/models/Types.js +1 -0
- package/lib/esm/internal/models/Types.js.map +7 -0
- package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js +2 -0
- package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/authentication/DecryptDataUseCase.js +2 -0
- package/lib/esm/internal/use-cases/authentication/DecryptDataUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/authentication/EncryptDataUseCase.js +2 -0
- package/lib/esm/internal/use-cases/authentication/EncryptDataUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/di/useCasesModule.js +2 -0
- package/lib/esm/internal/use-cases/di/useCasesModule.js.map +7 -0
- package/lib/esm/internal/use-cases/di/useCasesTypes.js +2 -0
- package/lib/esm/internal/use-cases/di/useCasesTypes.js.map +7 -0
- package/lib/esm/internal/utils/LKRPBlock.js +5 -0
- package/lib/esm/internal/utils/LKRPBlock.js.map +7 -0
- package/lib/esm/internal/utils/LKRPBlock.test.js +24 -0
- package/lib/esm/internal/utils/LKRPBlock.test.js.map +7 -0
- package/lib/esm/internal/utils/LKRPBlockStream.js +4 -0
- package/lib/esm/internal/utils/LKRPBlockStream.js.map +7 -0
- package/lib/esm/internal/utils/LKRPBlockStream.test.js +39 -0
- package/lib/esm/internal/utils/LKRPBlockStream.test.js.map +7 -0
- package/lib/esm/internal/utils/LKRPCommand.js +3 -0
- package/lib/esm/internal/utils/LKRPCommand.js.map +7 -0
- package/lib/esm/internal/utils/LKRPCommand.test.js +3 -0
- package/lib/esm/internal/utils/LKRPCommand.test.js.map +7 -0
- package/lib/esm/internal/utils/TLVParser.js +2 -0
- package/lib/esm/internal/utils/TLVParser.js.map +7 -0
- package/lib/esm/internal/utils/TLVParser.test.js +2 -0
- package/lib/esm/internal/utils/TLVParser.test.js.map +7 -0
- package/lib/esm/internal/utils/Trustchain.js +2 -0
- package/lib/esm/internal/utils/Trustchain.js.map +7 -0
- package/lib/esm/internal/utils/derivationPath.js +2 -0
- package/lib/esm/internal/utils/derivationPath.js.map +7 -0
- package/lib/esm/internal/utils/eitherSeqRecord.js +2 -0
- package/lib/esm/internal/utils/eitherSeqRecord.js.map +7 -0
- package/lib/esm/internal/utils/required.js +2 -0
- package/lib/esm/internal/utils/required.js.map +7 -0
- package/lib/esm/package.json +56 -0
- package/lib/types/api/LedgerKeyringProtocol.d.ts +8 -0
- package/lib/types/api/LedgerKeyringProtocol.d.ts.map +1 -0
- package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts +20 -0
- package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts.map +1 -0
- package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts +41 -0
- package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts +33 -0
- package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts +4 -0
- package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/GetVersionDeviceActionTypes.d.ts +10 -0
- package/lib/types/api/app-binder/GetVersionDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/api/crypto/CryptoService.d.ts +22 -0
- package/lib/types/api/crypto/CryptoService.d.ts.map +1 -0
- package/lib/types/api/crypto/Key.d.ts +7 -0
- package/lib/types/api/crypto/Key.d.ts.map +1 -0
- package/lib/types/api/crypto/KeyPair.d.ts +13 -0
- package/lib/types/api/crypto/KeyPair.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.d.ts +13 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.test.d.ts +2 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.test.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKey.d.ts +11 -0
- package/lib/types/api/crypto/noble/NobleKey.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKey.test.d.ts +2 -0
- package/lib/types/api/crypto/noble/NobleKey.test.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.d.ts +18 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.test.d.ts +2 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.test.d.ts.map +1 -0
- package/lib/types/api/index.d.ts +15 -0
- package/lib/types/api/index.d.ts.map +1 -0
- package/lib/types/api/model/Env.d.ts +5 -0
- package/lib/types/api/model/Env.d.ts.map +1 -0
- package/lib/types/api/model/Errors.d.ts +53 -0
- package/lib/types/api/model/Errors.d.ts.map +1 -0
- package/lib/types/api/model/JWT.d.ts +9 -0
- package/lib/types/api/model/JWT.d.ts.map +1 -0
- package/lib/types/api/model/Permissions.d.ts +10 -0
- package/lib/types/api/model/Permissions.d.ts.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts +23 -0
- package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts.map +1 -0
- package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts +35 -0
- package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts +12 -0
- package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts +23 -0
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts +10 -0
- package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/InitCommand.d.ts +14 -0
- package/lib/types/internal/app-binder/command/InitCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/InitCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/InitCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts +14 -0
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts +15 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts +14 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts +15 -0
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts +16 -0
- package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignBlockHeader.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/SignBlockHeader.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts +14 -0
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts +14 -0
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/extractTrustedProperty.d.ts +4 -0
- package/lib/types/internal/app-binder/command/utils/extractTrustedProperty.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.d.ts +9 -0
- package/lib/types/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.d.ts.map +1 -0
- package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts +24 -0
- package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts.map +1 -0
- package/lib/types/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.d.ts +32 -0
- package/lib/types/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.d.ts.map +1 -0
- package/lib/types/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.d.ts +33 -0
- package/lib/types/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.d.ts.map +1 -0
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.d.ts +22 -0
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.d.ts +19 -0
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/internal/app-binder/device-action/utils/raiseAndAssign.d.ts +41 -0
- package/lib/types/internal/app-binder/device-action/utils/raiseAndAssign.d.ts.map +1 -0
- package/lib/types/internal/app-binder/di/appBinderModule.d.ts +3 -0
- package/lib/types/internal/app-binder/di/appBinderModule.d.ts.map +1 -0
- package/lib/types/internal/app-binder/di/appBinderTypes.d.ts +4 -0
- package/lib/types/internal/app-binder/di/appBinderTypes.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/AuthenticateTask.d.ts +9 -0
- package/lib/types/internal/app-binder/task/AuthenticateTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/ExtractEncryptionKeyTask.d.ts +8 -0
- package/lib/types/internal/app-binder/task/ExtractEncryptionKeyTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/InitTask.d.ts +12 -0
- package/lib/types/internal/app-binder/task/InitTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts +26 -0
- package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/SignBlockTask.d.ts +70 -0
- package/lib/types/internal/app-binder/task/SignBlockTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/SignChallengeWithDeviceTask.d.ts +10 -0
- package/lib/types/internal/app-binder/task/SignChallengeWithDeviceTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts +16 -0
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.test.d.ts +2 -0
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts +26 -0
- package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts.map +1 -0
- package/lib/types/internal/di.d.ts +14 -0
- package/lib/types/internal/di.d.ts.map +1 -0
- package/lib/types/internal/externalTypes.d.ts +15 -0
- package/lib/types/internal/externalTypes.d.ts.map +1 -0
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts +20 -0
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts.map +1 -0
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.test.d.ts +2 -0
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.test.d.ts.map +1 -0
- package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts +54 -0
- package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts.map +1 -0
- package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.d.ts +4 -0
- package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.d.ts.map +1 -0
- package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceTypes.d.ts +5 -0
- package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceTypes.d.ts.map +1 -0
- package/lib/types/internal/models/LKRPBlockTypes.d.ts +11 -0
- package/lib/types/internal/models/LKRPBlockTypes.d.ts.map +1 -0
- package/lib/types/internal/models/LKRPCommandTypes.d.ts +50 -0
- package/lib/types/internal/models/LKRPCommandTypes.d.ts.map +1 -0
- package/lib/types/internal/models/Tags.d.ts +27 -0
- package/lib/types/internal/models/Tags.d.ts.map +1 -0
- package/lib/types/internal/models/Types.d.ts +10 -0
- package/lib/types/internal/models/Types.d.ts.map +1 -0
- package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts +22 -0
- package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/authentication/DecryptDataUseCase.d.ts +7 -0
- package/lib/types/internal/use-cases/authentication/DecryptDataUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/authentication/EncryptDataUseCase.d.ts +7 -0
- package/lib/types/internal/use-cases/authentication/EncryptDataUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/di/useCasesModule.d.ts +3 -0
- package/lib/types/internal/use-cases/di/useCasesModule.d.ts.map +1 -0
- package/lib/types/internal/use-cases/di/useCasesTypes.d.ts +6 -0
- package/lib/types/internal/use-cases/di/useCasesTypes.d.ts.map +1 -0
- package/lib/types/internal/utils/LKRPBlock.d.ts +17 -0
- package/lib/types/internal/utils/LKRPBlock.d.ts.map +1 -0
- package/lib/types/internal/utils/LKRPBlock.test.d.ts +2 -0
- package/lib/types/internal/utils/LKRPBlock.test.d.ts.map +1 -0
- package/lib/types/internal/utils/LKRPBlockStream.d.ts +26 -0
- package/lib/types/internal/utils/LKRPBlockStream.d.ts.map +1 -0
- package/lib/types/internal/utils/LKRPBlockStream.test.d.ts +2 -0
- package/lib/types/internal/utils/LKRPBlockStream.test.d.ts.map +1 -0
- package/lib/types/internal/utils/LKRPCommand.d.ts +19 -0
- package/lib/types/internal/utils/LKRPCommand.d.ts.map +1 -0
- package/lib/types/internal/utils/LKRPCommand.test.d.ts +2 -0
- package/lib/types/internal/utils/LKRPCommand.test.d.ts.map +1 -0
- package/lib/types/internal/utils/TLVParser.d.ts +60 -0
- package/lib/types/internal/utils/TLVParser.d.ts.map +1 -0
- package/lib/types/internal/utils/TLVParser.test.d.ts +2 -0
- package/lib/types/internal/utils/TLVParser.test.d.ts.map +1 -0
- package/lib/types/internal/utils/Trustchain.d.ts +14 -0
- package/lib/types/internal/utils/Trustchain.d.ts.map +1 -0
- package/lib/types/internal/utils/derivationPath.d.ts +3 -0
- package/lib/types/internal/utils/derivationPath.d.ts.map +1 -0
- package/lib/types/internal/utils/eitherSeqRecord.d.ts +29 -0
- package/lib/types/internal/utils/eitherSeqRecord.d.ts.map +1 -0
- package/lib/types/internal/utils/required.d.ts +3 -0
- package/lib/types/internal/utils/required.d.ts.map +1 -0
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -0
- package/package.json +55 -0
package/LICENSE.MD
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2024-present Ledger
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Ledger Keyring Protocol
|
|
2
|
+
|
|
3
|
+
...
|
|
4
|
+
|
|
5
|
+
## 🔹 Index
|
|
6
|
+
|
|
7
|
+
1. [How it works](#-how-it-works)
|
|
8
|
+
2. [Installation](#-installation)
|
|
9
|
+
3. [Initialisation](#-initialisation)
|
|
10
|
+
4. [Use Cases](#-use-cases)
|
|
11
|
+
5. [Observable Behavior](#-observable-behavior)
|
|
12
|
+
6. [Example](#-example)
|
|
13
|
+
|
|
14
|
+
## 🔹 How it works
|
|
15
|
+
|
|
16
|
+
## 🔹 Installation
|
|
17
|
+
|
|
18
|
+
> **Note:** This module is not standalone; it depends on the [@ledgerhq/device-management-kit](https://github.com/LedgerHQ/device-sdk-ts/tree/develop/packages/device-management-kit) package, so you need to install it first.
|
|
19
|
+
|
|
20
|
+
To install the `ledger-keyring-protocol` package, run the following command:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install @ledgerhq/device-trusted-app-kit-ledger-keyring-protocol
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 🔹 Initialisation
|
|
27
|
+
|
|
28
|
+
## 🔹 Use Cases
|
|
29
|
+
|
|
30
|
+
## 🔹 Observable Behavior
|
|
31
|
+
|
|
32
|
+
## 🔹 Example
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var o=(e,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!c.call(e,r)&&r!==i&&n(e,r,{get:()=>t[r],enumerable:!(a=y(t,r))||a.enumerable});return e};var A=e=>o(n({},"__esModule",{value:!0}),e);var u={};module.exports=A(u);
|
|
2
|
+
//# sourceMappingURL=LedgerKeyringProtocol.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/LedgerKeyringProtocol.ts"],
|
|
4
|
+
"sourcesContent": ["import { type AuthenticateUsecaseInput } from \"@internal/use-cases/authentication/AuthenticateUseCase\";\n\nimport { type AuthenticateDAReturnType } from \"./app-binder/AuthenticateDeviceActionTypes\";\n\nexport interface LedgerKeyringProtocol {\n authenticate: (input: AuthenticateUsecaseInput) => AuthenticateDAReturnType;\n\n encryptData: (\n encryptionKey: Uint8Array,\n data: Uint8Array,\n ) => Promise<Uint8Array>;\n\n decryptData: (\n encryptionKey: Uint8Array,\n data: Uint8Array,\n ) => Promise<Uint8Array>;\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["LedgerKeyringProtocol_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var d=(r,e)=>{for(var i in e)o(r,i,{get:e[i],enumerable:!0})},m=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!v.call(r,t)&&t!==i&&o(r,t,{get:()=>e[t],enumerable:!(n=c(e,t))||n.enumerable});return r};var y=r=>m(o({},"__esModule",{value:!0}),r);var g={};d(g,{LedgerKeyringProtocolBuilder:()=>s});module.exports=y(g);var p=require("./crypto/noble/NobleCryptoService"),a=require("../internal/DefaultLedgerKeyringProtocol");class s{dmk;applicationId;env;baseUrl;cryptoService=new p.NobleCryptoService;constructor(e){this.dmk=e.dmk,this.applicationId=e.applicationId,this.env=e.env,this.baseUrl=e.baseUrl}withCryptoService(e){return this.cryptoService=e,this}build(){return new a.DefaultLedgerKeyringProtocol({dmk:this.dmk,applicationId:this.applicationId,cryptoService:this.cryptoService,env:this.env,baseUrl:this.baseUrl})}}0&&(module.exports={LedgerKeyringProtocolBuilder});
|
|
2
|
+
//# sourceMappingURL=LedgerKeyringProtocolBuilder.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/LedgerKeyringProtocolBuilder.ts"],
|
|
4
|
+
"sourcesContent": ["import { type DeviceManagementKit } from \"@ledgerhq/device-management-kit\";\n\nimport { type CryptoService } from \"@api/crypto/CryptoService\";\nimport { NobleCryptoService } from \"@api/crypto/noble/NobleCryptoService\";\nimport { type LedgerKeyringProtocol } from \"@api/LedgerKeyringProtocol\";\nimport { type LKRPEnv } from \"@api/model/Env\";\nimport { DefaultLedgerKeyringProtocol } from \"@internal/DefaultLedgerKeyringProtocol\";\n\nexport class LedgerKeyringProtocolBuilder {\n private readonly dmk: DeviceManagementKit;\n private readonly applicationId: number;\n private readonly env?: LKRPEnv;\n private readonly baseUrl?: string;\n private cryptoService: CryptoService = new NobleCryptoService();\n\n constructor(args: {\n dmk: DeviceManagementKit;\n applicationId: number;\n env?: LKRPEnv;\n baseUrl?: string;\n }) {\n this.dmk = args.dmk;\n this.applicationId = args.applicationId;\n this.env = args.env;\n this.baseUrl = args.baseUrl;\n }\n\n withCryptoService(service: CryptoService): LedgerKeyringProtocolBuilder {\n this.cryptoService = service;\n return this;\n }\n\n build(): LedgerKeyringProtocol {\n return new DefaultLedgerKeyringProtocol({\n dmk: this.dmk,\n applicationId: this.applicationId,\n cryptoService: this.cryptoService,\n env: this.env,\n baseUrl: this.baseUrl,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,IAAA,eAAAC,EAAAH,GAGA,IAAAI,EAAmC,gDAGnCC,EAA6C,kDAEtC,MAAMH,CAA6B,CACvB,IACA,cACA,IACA,QACT,cAA+B,IAAI,qBAE3C,YAAYI,EAKT,CACD,KAAK,IAAMA,EAAK,IAChB,KAAK,cAAgBA,EAAK,cAC1B,KAAK,IAAMA,EAAK,IAChB,KAAK,QAAUA,EAAK,OACtB,CAEA,kBAAkBC,EAAsD,CACtE,YAAK,cAAgBA,EACd,IACT,CAEA,OAA+B,CAC7B,OAAO,IAAI,+BAA6B,CACtC,IAAK,KAAK,IACV,cAAe,KAAK,cACpB,cAAe,KAAK,cACpB,IAAK,KAAK,IACV,QAAS,KAAK,OAChB,CAAC,CACH,CACF",
|
|
6
|
+
"names": ["LedgerKeyringProtocolBuilder_exports", "__export", "LedgerKeyringProtocolBuilder", "__toCommonJS", "import_NobleCryptoService", "import_DefaultLedgerKeyringProtocol", "args", "service"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var y=(e,r)=>{for(var a in r)i(e,a,{get:r[a],enumerable:!0})},u=(e,r,a,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of s(r))!m.call(e,o)&&o!==a&&i(e,o,{get:()=>r[o],enumerable:!(t=d(r,o))||t.enumerable});return e};var c=e=>u(i({},"__esModule",{value:!0}),e);var P={};y(P,{AddToTrustchainDAState:()=>n,AddToTrustchaineDAStep:()=>p});module.exports=c(P);var n=(r=>(r.AddMember="lkrp-add-member",r))(n||{}),p=(t=>(t.Initialize="lkrp-init-transaction",t.ParseStream="lkrp-parse-stream",t.AddMember="lkrp-add-member",t))(p||{});0&&(module.exports={AddToTrustchainDAState,AddToTrustchaineDAStep});
|
|
2
|
+
//# sourceMappingURL=AddToTrustchainDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/AddToTrustchainDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type OpenAppDAError,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Either } from \"purify-ts\";\n\nimport { type CryptoService } from \"@api/crypto/CryptoService\";\nimport { type KeyPair } from \"@api/crypto/KeyPair\";\nimport {\n type LKRPDataSourceError,\n type LKRPMissingDataError,\n type LKRPOutdatedTrustchainError,\n type LKRPParsingError,\n type LKRPTrustchainNotReady,\n type LKRPUnknownError,\n} from \"@api/model/Errors\";\nimport { type JWT } from \"@api/model/JWT\";\nimport { type Permissions } from \"@api/model/Permissions\";\nimport { type LKRPDeviceCommandError } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\nimport { type LKRPDataSource } from \"@internal/lkrp-datasource/data/LKRPDataSource\";\nimport { type Trustchain } from \"@internal/utils/Trustchain\";\n\nexport type AddToTrustchainDAOutput = undefined;\n\nexport type AddToTrustchainDAInput = Either<\n LKRPMissingDataError,\n {\n readonly lkrpDataSource: LKRPDataSource;\n readonly cryptoService: CryptoService;\n readonly keypair: KeyPair;\n readonly jwt: JWT;\n readonly appId: number;\n readonly trustchain: Trustchain;\n readonly clientName: string;\n readonly permissions: Permissions;\n }\n>;\n\nexport type AddToTrustchainDAError =\n | LKRPDeviceCommandError\n | LKRPDataSourceError\n | LKRPParsingError\n | LKRPMissingDataError\n | LKRPOutdatedTrustchainError\n | LKRPTrustchainNotReady\n | OpenAppDAError\n | LKRPUnknownError;\n\nexport type AddToTrustchainDAIntermediateValue =\n | {\n requiredUserInteraction: UserInteractionRequired.None;\n step?:\n | AddToTrustchaineDAStep.Initialize\n | AddToTrustchaineDAStep.ParseStream;\n }\n | {\n requiredUserInteraction: AddToTrustchainDAState.AddMember;\n step: AddToTrustchaineDAStep.AddMember;\n };\n\nexport enum AddToTrustchainDAState {\n AddMember = \"lkrp-add-member\",\n}\n\nexport enum AddToTrustchaineDAStep {\n Initialize = \"lkrp-init-transaction\",\n ParseStream = \"lkrp-parse-stream\",\n AddMember = \"lkrp-add-member\",\n}\n\nexport type AddToTrustchainDAInternalState = Either<\n AddToTrustchainDAError,\n {\n readonly sessionKeypair: KeyPair | null;\n }\n>;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,EAAA,2BAAAC,IAAA,eAAAC,EAAAJ,GA4DO,IAAKE,OACVA,EAAA,UAAY,kBADFA,OAAA,IAIAC,OACVA,EAAA,WAAa,wBACbA,EAAA,YAAc,oBACdA,EAAA,UAAY,kBAHFA,OAAA",
|
|
6
|
+
"names": ["AddToTrustchainDeviceActionTypes_exports", "__export", "AddToTrustchainDAState", "AddToTrustchaineDAStep", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var y=(r,t)=>{for(var n in t)p(r,n,{get:t[n],enumerable:!0})},s=(r,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of c(t))!A.call(r,e)&&e!==n&&p(r,e,{get:()=>t[e],enumerable:!(i=u(t,e))||i.enumerable});return r};var d=r=>s(p({},"__esModule",{value:!0}),r);var h={};y(h,{AuthenticateDAState:()=>a,AuthenticateDAStep:()=>o});module.exports=d(h);var a=(t=>(t.Authenticate="lkrp-authenticate",t))(a||{}),o=(e=>(e.OpenApp="lkrp.steps.openApp",e.Authenticate="lkrp.steps.authenticate",e.GetTrustchain="lkrp.steps.getTrustchain",e.ExtractEncryptionKey="lkrp.steps.extractEncryptionKey",e))(o||{});0&&(module.exports={AuthenticateDAState,AuthenticateDAStep});
|
|
2
|
+
//# sourceMappingURL=AuthenticateDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/AuthenticateDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type OpenAppDARequiredInteraction,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport {\n type LKRPDataSourceError,\n type LKRPMissingDataError,\n type LKRPParsingError,\n type LKRPTrustchainNotReady,\n type LKRPUnauthorizedError,\n type LKRPUnknownError,\n} from \"@api/model/Errors\";\nimport { type JWT } from \"@api/model/JWT\";\nimport { type LKRPDeviceCommandError } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\n\nimport {\n type AddToTrustchainDAError,\n type AddToTrustchainDAIntermediateValue,\n} from \"./AddToTrustchainDeviceActionTypes\";\n\nexport type AuthenticateDAReturnType = ExecuteDeviceActionReturnType<\n AuthenticateDAOutput,\n AuthenticateDAError,\n AuthenticateDAIntermediateValue\n>;\n\nexport type AuthenticateDAOutput = {\n readonly jwt: JWT;\n readonly trustchainId: string;\n readonly applicationPath: string;\n readonly encryptionKey: Uint8Array;\n};\n\nexport type AuthenticateDAError =\n | LKRPUnauthorizedError\n | AddToTrustchainDAError\n | LKRPDeviceCommandError\n | LKRPDataSourceError\n | LKRPParsingError\n | LKRPMissingDataError\n | LKRPTrustchainNotReady\n | OpenAppDAError\n | LKRPUnknownError;\n\nexport type AuthenticateDAIntermediateValue =\n | {\n requiredUserInteraction: OpenAppDARequiredInteraction;\n step: AuthenticateDAStep.OpenApp;\n }\n | {\n requiredUserInteraction: AuthenticateDAState.Authenticate;\n step: AuthenticateDAStep.Authenticate;\n }\n | {\n requiredUserInteraction: UserInteractionRequired.None;\n step?:\n | AuthenticateDAStep.Authenticate\n | AuthenticateDAStep.GetTrustchain\n | AuthenticateDAStep.ExtractEncryptionKey;\n }\n | AddToTrustchainDAIntermediateValue;\n\nexport enum AuthenticateDAState {\n Authenticate = \"lkrp-authenticate\",\n}\nexport enum AuthenticateDAStep {\n OpenApp = \"lkrp.steps.openApp\",\n Authenticate = \"lkrp.steps.authenticate\",\n GetTrustchain = \"lkrp.steps.getTrustchain\",\n ExtractEncryptionKey = \"lkrp.steps.extractEncryptionKey\",\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,EAAA,uBAAAC,IAAA,eAAAC,EAAAJ,GAiEO,IAAKE,OACVA,EAAA,aAAe,oBADLA,OAAA,IAGAC,OACVA,EAAA,QAAU,qBACVA,EAAA,aAAe,0BACfA,EAAA,cAAgB,2BAChBA,EAAA,qBAAuB,kCAJbA,OAAA",
|
|
6
|
+
"names": ["AuthenticateDeviceActionTypes_exports", "__export", "AuthenticateDAState", "AuthenticateDAStep", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var d=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of p(e))!a.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=i(e,o))||r.enumerable});return n};var m=n=>d(s({},"__esModule",{value:!0}),n);var y={};module.exports=m(y);
|
|
2
|
+
//# sourceMappingURL=GetVersionCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/GetVersionCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type GetVersionCommandResponse = {\n readonly version: string;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["GetVersionCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var s=(r,e,p,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!d.call(r,t)&&t!==p&&n(r,t,{get:()=>e[t],enumerable:!(o=i(e,t))||o.enumerable});return r};var u=r=>s(n({},"__esModule",{value:!0}),r);var A={};module.exports=u(A);
|
|
2
|
+
//# sourceMappingURL=GetVersionDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/GetVersionDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type CommandErrorResult,\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type GetVersionCommandResponse } from \"@api/app-binder/GetVersionCommandTypes\";\nimport { type LedgerKeyringProtocolErrorCodes } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\n\ntype GetVersionDAUserInteractionRequired = UserInteractionRequired.None;\n\nexport type GetVersionDAOutput =\n SendCommandInAppDAOutput<GetVersionCommandResponse>;\n\nexport type GetVersionDAError =\n | OpenAppDAError\n | CommandErrorResult<LedgerKeyringProtocolErrorCodes>[\"error\"];\n\nexport type GetVersionDAIntermediateValue =\n SendCommandInAppDAIntermediateValue<GetVersionDAUserInteractionRequired>;\n\nexport type GetVersionDAReturnType = ExecuteDeviceActionReturnType<\n GetVersionDAOutput,\n GetVersionDAError,\n GetVersionDAIntermediateValue\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["GetVersionDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var c=(t,r)=>{for(var e in r)a(t,e,{get:r[e],enumerable:!0})},P=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let y of K(r))!A.call(t,y)&&y!==e&&a(t,y,{get:()=>r[y],enumerable:!(i=p(r,y))||i.enumerable});return t};var U=t=>P(a({},"__esModule",{value:!0}),t);var s={};c(s,{Curve:()=>m,EncryptionAlgo:()=>o,HashAlgo:()=>n});module.exports=U(s);var m=(e=>(e[e.K256=0]="K256",e[e.P256=1]="P256",e))(m||{}),o=(r=>(r[r.AES256_GCM=0]="AES256_GCM",r))(o||{}),n=(r=>(r[r.SHA256=0]="SHA256",r))(n||{});0&&(module.exports={Curve,EncryptionAlgo,HashAlgo});
|
|
2
|
+
//# sourceMappingURL=CryptoService.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/crypto/CryptoService.ts"],
|
|
4
|
+
"sourcesContent": ["import { type Key } from \"./Key\";\nimport { type KeyPair } from \"./KeyPair\";\n\nexport enum Curve {\n K256, // secp256k1\n P256, // P-256\n}\n\nexport enum EncryptionAlgo {\n AES256_GCM,\n}\n\nexport enum HashAlgo {\n SHA256,\n}\n\nexport interface CryptoService {\n // Generate a random buffer\n randomBytes(len: number): Uint8Array;\n\n // Compute a hash\n hash(bytes: Uint8Array, algo: HashAlgo): Uint8Array;\n\n // Compute a HMAC\n hmac(key: Uint8Array, message: Uint8Array, algo: HashAlgo): Uint8Array;\n\n // Generate a new random keypair\n createKeyPair(curve: Curve): Promise<KeyPair>;\n\n // Import a keypair\n importKeyPair(privateKey: Uint8Array, curve: Curve): KeyPair;\n\n // Generate a new random symmetric key\n createSymmetricKey(algo: EncryptionAlgo): Promise<Key>;\n\n // Import a symmetric key\n importSymmetricKey(keyMaterial: Uint8Array, algo: EncryptionAlgo): Key;\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,mBAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAL,GAGO,IAAKE,OACVA,IAAA,eACAA,IAAA,eAFUA,OAAA,IAKAC,OACVA,IAAA,2BADUA,OAAA,IAIAC,OACVA,IAAA,mBADUA,OAAA",
|
|
6
|
+
"names": ["CryptoService_exports", "__export", "Curve", "EncryptionAlgo", "HashAlgo", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var c=(t,r)=>{for(var a in r)i(t,a,{get:r[a],enumerable:!0})},p=(t,r,a,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of A(r))!o.call(t,e)&&e!==a&&i(t,e,{get:()=>r[e],enumerable:!(n=y(r,e))||n.enumerable});return t};var U=t=>p(i({},"__esModule",{value:!0}),t);var S={};c(S,{AES256_BLOCK_SIZE:()=>s,AES256_KEY_SIZE:()=>E});module.exports=U(S);const E=32,s=16;0&&(module.exports={AES256_BLOCK_SIZE,AES256_KEY_SIZE});
|
|
2
|
+
//# sourceMappingURL=Key.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/crypto/Key.ts"],
|
|
4
|
+
"sourcesContent": ["export const AES256_KEY_SIZE = 32;\nexport const AES256_BLOCK_SIZE = 16;\n\nexport interface Key {\n encrypt(iv: Uint8Array, data: Uint8Array): Promise<Uint8Array>;\n decrypt(iv: Uint8Array, encryptedData: Uint8Array): Promise<Uint8Array>;\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,EAAA,oBAAAC,IAAA,eAAAC,EAAAJ,GAAO,MAAMG,EAAkB,GAClBD,EAAoB",
|
|
6
|
+
"names": ["Key_exports", "__export", "AES256_BLOCK_SIZE", "AES256_KEY_SIZE", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var s=(i,r)=>{for(var e in r)a(i,e,{get:r[e],enumerable:!0})},U=(i,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of A(r))!P.call(i,t)&&t!==e&&a(i,t,{get:()=>r[t],enumerable:!(n=o(r,t))||n.enumerable});return i};var c=i=>U(a({},"__esModule",{value:!0}),i);var d={};s(d,{SigFormat:()=>y});module.exports=c(d);var y=(e=>(e[e.COMPACT=0]="COMPACT",e[e.DER=1]="DER",e))(y||{});0&&(module.exports={SigFormat});
|
|
2
|
+
//# sourceMappingURL=KeyPair.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/crypto/KeyPair.ts"],
|
|
4
|
+
"sourcesContent": ["export enum SigFormat {\n COMPACT,\n DER,\n}\n\nexport interface KeyPair {\n id: string;\n sign(data: Uint8Array, format?: SigFormat): Promise<Uint8Array>;\n verify(\n data: Uint8Array,\n signature: Uint8Array,\n format?: SigFormat,\n ): Promise<boolean>;\n deriveSharedSecret(peerPublicKey: Uint8Array): Promise<Uint8Array>;\n getPublicKey(): Uint8Array;\n getPublicKeyToHex(): string;\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAAO,IAAKE,OACVA,IAAA,qBACAA,IAAA,aAFUA,OAAA",
|
|
6
|
+
"names": ["KeyPair_exports", "__export", "SigFormat", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var l=(t,r)=>{for(var e in r)a(t,e,{get:r[e],enumerable:!0})},f=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of A(r))!u.call(t,i)&&i!==e&&a(t,i,{get:()=>r[i],enumerable:!(o=h(r,i))||o.enumerable});return t};var K=t=>f(a({},"__esModule",{value:!0}),t);var g={};l(g,{NobleCryptoService:()=>U});module.exports=K(g);var s=require("@noble/ciphers/webcrypto"),c=require("@noble/hashes/hmac"),y=require("@noble/hashes/sha256"),m=require("../../crypto/CryptoService"),n=require("./NobleKey"),p=require("./NobleKeyPair");class U{randomBytes(r){return(0,s.randomBytes)(r)}hash(r,e){switch(e){case m.HashAlgo.SHA256:return(0,y.sha256)(r);default:throw new Error("Unsupported hash algorithm",e)}}hmac(r,e,o){switch(o){case m.HashAlgo.SHA256:return(0,c.hmac)(y.sha256,r,e);default:throw new Error("Unsupported hash algorithm",o)}}async createKeyPair(r){return await p.NobleKeyPair.generate(r)}importKeyPair(r,e){return p.NobleKeyPair.from(r,e)}async createSymmetricKey(r){return await n.NobleKey.generate(r)}importSymmetricKey(r,e){return n.NobleKey.from(r,e)}}0&&(module.exports={NobleCryptoService});
|
|
2
|
+
//# sourceMappingURL=NobleCryptoService.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/api/crypto/noble/NobleCryptoService.ts"],
|
|
4
|
+
"sourcesContent": ["import { randomBytes } from \"@noble/ciphers/webcrypto\";\nimport { hmac } from \"@noble/hashes/hmac\";\nimport { sha256 } from \"@noble/hashes/sha256\";\n\nimport {\n type CryptoService,\n type Curve,\n type EncryptionAlgo,\n HashAlgo,\n} from \"@api/crypto/CryptoService\";\nimport { type Key } from \"@api/crypto/Key\";\nimport { type KeyPair } from \"@api/crypto/KeyPair\";\n\nimport { NobleKey } from \"./NobleKey\";\nimport { NobleKeyPair } from \"./NobleKeyPair\";\n\nexport class NobleCryptoService implements CryptoService {\n randomBytes(len: number): Uint8Array {\n return randomBytes(len);\n }\n\n hash(bytes: Uint8Array, algo: HashAlgo): Uint8Array {\n switch (algo) {\n case HashAlgo.SHA256:\n return sha256(bytes);\n default:\n throw new Error(\"Unsupported hash algorithm\", algo);\n }\n }\n\n hmac(key: Uint8Array, message: Uint8Array, algo: HashAlgo): Uint8Array {\n switch (algo) {\n case HashAlgo.SHA256:\n return hmac(sha256, key, message);\n default:\n throw new Error(\"Unsupported hash algorithm\", algo);\n }\n }\n\n async createKeyPair(curve: Curve): Promise<KeyPair> {\n return await NobleKeyPair.generate(curve);\n }\n\n importKeyPair(privateKey: Uint8Array, curve: Curve): KeyPair {\n return NobleKeyPair.from(privateKey, curve);\n }\n\n async createSymmetricKey(algo: EncryptionAlgo): Promise<Key> {\n return await NobleKey.generate(algo);\n }\n\n importSymmetricKey(keyMaterial: Uint8Array, algo: EncryptionAlgo): Key {\n return NobleKey.from(keyMaterial, algo);\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4B,oCAC5BC,EAAqB,8BACrBC,EAAuB,gCAEvBC,EAKO,qCAIPC,EAAyB,sBACzBC,EAA6B,0BAEtB,MAAMP,CAA4C,CACvD,YAAYQ,EAAyB,CACnC,SAAO,eAAYA,CAAG,CACxB,CAEA,KAAKC,EAAmBC,EAA4B,CAClD,OAAQA,EAAM,CACZ,KAAK,WAAS,OACZ,SAAO,UAAOD,CAAK,EACrB,QACE,MAAM,IAAI,MAAM,6BAA8BC,CAAI,CACtD,CACF,CAEA,KAAKC,EAAiBC,EAAqBF,EAA4B,CACrE,OAAQA,EAAM,CACZ,KAAK,WAAS,OACZ,SAAO,QAAK,SAAQC,EAAKC,CAAO,EAClC,QACE,MAAM,IAAI,MAAM,6BAA8BF,CAAI,CACtD,CACF,CAEA,MAAM,cAAcG,EAAgC,CAClD,OAAO,MAAM,eAAa,SAASA,CAAK,CAC1C,CAEA,cAAcC,EAAwBD,EAAuB,CAC3D,OAAO,eAAa,KAAKC,EAAYD,CAAK,CAC5C,CAEA,MAAM,mBAAmBH,EAAoC,CAC3D,OAAO,MAAM,WAAS,SAASA,CAAI,CACrC,CAEA,mBAAmBK,EAAyBL,EAA2B,CACrE,OAAO,WAAS,KAAKK,EAAaL,CAAI,CACxC,CACF",
|
|
6
|
+
"names": ["NobleCryptoService_exports", "__export", "NobleCryptoService", "__toCommonJS", "import_webcrypto", "import_hmac", "import_sha256", "import_CryptoService", "import_NobleKey", "import_NobleKeyPair", "len", "bytes", "algo", "key", "message", "curve", "privateKey", "keyMaterial"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var c=require("@ledgerhq/device-management-kit"),o=require("../../crypto/CryptoService"),n=require("./NobleCryptoService"),a=require("./NobleKey"),i=require("./NobleKeyPair");describe("NobleCryptoService",()=>{let r;beforeEach(()=>{r=new n.NobleCryptoService}),it("should generate random bytes of correct length",()=>{const t=r.randomBytes(32);expect(t.length).toBe(32)}),it("should hash data correctly with SHA256",()=>{const e=new TextEncoder().encode("test"),t=r.hash(e,o.HashAlgo.SHA256);expect(t).toEqual((0,c.hexaStringToBuffer)("9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"))}),it("should compute HMAC correctly with SHA256",()=>{const e=new Uint8Array(32).fill(97),t=new TextEncoder().encode("test message"),s=r.hmac(e,t,o.HashAlgo.SHA256);expect(s).toEqual((0,c.hexaStringToBuffer)("0b19ad8fef1660f7a191465effeea922079633ada962f52cb60103d9935cc460"))}),it("should create a key pair",async()=>{const e=await r.createKeyPair(o.Curve.K256);expect(e instanceof i.NobleKeyPair).toBeTruthy()}),it("should import a key pair",()=>{const e=new Uint8Array(32).fill(1),t=r.importKeyPair(e,o.Curve.K256);expect(t instanceof i.NobleKeyPair).toBeTruthy()}),it("should create a symmetric key",async()=>{const e=await r.createSymmetricKey(o.EncryptionAlgo.AES256_GCM);expect(e instanceof a.NobleKey).toBeTruthy()}),it("should import a symmetric key",()=>{const e=new Uint8Array(32).fill(1),t=r.importSymmetricKey(e,o.EncryptionAlgo.AES256_GCM);expect(t instanceof a.NobleKey).toBeTruthy()})});
|
|
2
|
+
//# sourceMappingURL=NobleCryptoService.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/api/crypto/noble/NobleCryptoService.test.ts"],
|
|
4
|
+
"sourcesContent": ["import { hexaStringToBuffer } from \"@ledgerhq/device-management-kit\";\n\nimport { Curve, EncryptionAlgo, HashAlgo } from \"@api/crypto/CryptoService\";\n\nimport { NobleCryptoService } from \"./NobleCryptoService\";\nimport { NobleKey } from \"./NobleKey\";\nimport { NobleKeyPair } from \"./NobleKeyPair\";\n\ndescribe(\"NobleCryptoService\", () => {\n let cryptoService: NobleCryptoService;\n\n beforeEach(() => {\n cryptoService = new NobleCryptoService();\n });\n\n it(\"should generate random bytes of correct length\", () => {\n const length = 32;\n const bytes = cryptoService.randomBytes(length);\n expect(bytes.length).toBe(length);\n });\n\n it(\"should hash data correctly with SHA256\", () => {\n const data = new TextEncoder().encode(\"test\");\n const hashResult = cryptoService.hash(data, HashAlgo.SHA256);\n expect(hashResult).toEqual(\n hexaStringToBuffer(\n \"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\",\n )!,\n );\n });\n\n it(\"should compute HMAC correctly with SHA256\", () => {\n const key = new Uint8Array(32).fill(0x61);\n const message = new TextEncoder().encode(\"test message\");\n const hmacResult = cryptoService.hmac(key, message, HashAlgo.SHA256);\n expect(hmacResult).toEqual(\n hexaStringToBuffer(\n \"0b19ad8fef1660f7a191465effeea922079633ada962f52cb60103d9935cc460\",\n )!,\n );\n });\n\n it(\"should create a key pair\", async () => {\n const keyPair = await cryptoService.createKeyPair(Curve.K256);\n expect(keyPair instanceof NobleKeyPair).toBeTruthy();\n });\n\n it(\"should import a key pair\", () => {\n const privateKey = new Uint8Array(32).fill(1);\n const keyPair = cryptoService.importKeyPair(privateKey, Curve.K256);\n expect(keyPair instanceof NobleKeyPair).toBeTruthy();\n });\n\n it(\"should create a symmetric key\", async () => {\n const symmetricKey = await cryptoService.createSymmetricKey(\n EncryptionAlgo.AES256_GCM,\n );\n expect(symmetricKey instanceof NobleKey).toBeTruthy();\n });\n\n it(\"should import a symmetric key\", () => {\n const keyMaterial = new Uint8Array(32).fill(1);\n const symmetricKey = cryptoService.importSymmetricKey(\n keyMaterial,\n EncryptionAlgo.AES256_GCM,\n );\n expect(symmetricKey instanceof NobleKey).toBeTruthy();\n });\n});\n"],
|
|
5
|
+
"mappings": "aAAA,IAAAA,EAAmC,2CAEnCC,EAAgD,qCAEhDC,EAAmC,gCACnCC,EAAyB,sBACzBC,EAA6B,0BAE7B,SAAS,qBAAsB,IAAM,CACnC,IAAIC,EAEJ,WAAW,IAAM,CACfA,EAAgB,IAAI,oBACtB,CAAC,EAED,GAAG,iDAAkD,IAAM,CAEzD,MAAMC,EAAQD,EAAc,YAAY,EAAM,EAC9C,OAAOC,EAAM,MAAM,EAAE,KAAK,EAAM,CAClC,CAAC,EAED,GAAG,yCAA0C,IAAM,CACjD,MAAMC,EAAO,IAAI,YAAY,EAAE,OAAO,MAAM,EACtCC,EAAaH,EAAc,KAAKE,EAAM,WAAS,MAAM,EAC3D,OAAOC,CAAU,EAAE,WACjB,sBACE,kEACF,CACF,CACF,CAAC,EAED,GAAG,4CAA6C,IAAM,CACpD,MAAMC,EAAM,IAAI,WAAW,EAAE,EAAE,KAAK,EAAI,EAClCC,EAAU,IAAI,YAAY,EAAE,OAAO,cAAc,EACjDC,EAAaN,EAAc,KAAKI,EAAKC,EAAS,WAAS,MAAM,EACnE,OAAOC,CAAU,EAAE,WACjB,sBACE,kEACF,CACF,CACF,CAAC,EAED,GAAG,2BAA4B,SAAY,CACzC,MAAMC,EAAU,MAAMP,EAAc,cAAc,QAAM,IAAI,EAC5D,OAAOO,aAAmB,cAAY,EAAE,WAAW,CACrD,CAAC,EAED,GAAG,2BAA4B,IAAM,CACnC,MAAMC,EAAa,IAAI,WAAW,EAAE,EAAE,KAAK,CAAC,EACtCD,EAAUP,EAAc,cAAcQ,EAAY,QAAM,IAAI,EAClE,OAAOD,aAAmB,cAAY,EAAE,WAAW,CACrD,CAAC,EAED,GAAG,gCAAiC,SAAY,CAC9C,MAAME,EAAe,MAAMT,EAAc,mBACvC,iBAAe,UACjB,EACA,OAAOS,aAAwB,UAAQ,EAAE,WAAW,CACtD,CAAC,EAED,GAAG,gCAAiC,IAAM,CACxC,MAAMC,EAAc,IAAI,WAAW,EAAE,EAAE,KAAK,CAAC,EACvCD,EAAeT,EAAc,mBACjCU,EACA,iBAAe,UACjB,EACA,OAAOD,aAAwB,UAAQ,EAAE,WAAW,CACtD,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["import_device_management_kit", "import_CryptoService", "import_NobleCryptoService", "import_NobleKey", "import_NobleKeyPair", "cryptoService", "bytes", "data", "hashResult", "key", "message", "hmacResult", "keyPair", "privateKey", "symmetricKey", "keyMaterial"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var h=(e,r)=>{for(var t in r)p(e,t,{get:r[t],enumerable:!0})},U=(e,r,t,y)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of A(r))!E.call(e,n)&&n!==t&&p(e,n,{get:()=>r[n],enumerable:!(y=m(r,n))||y.enumerable});return e};var l=e=>U(p({},"__esModule",{value:!0}),e);var S={};h(S,{NobleKey:()=>c});module.exports=l(S);var s=require("@noble/ciphers/aes"),a=require("@noble/ciphers/webcrypto"),i=require("../../crypto/CryptoService"),o=require("../../crypto/Key");class c{constructor(r){this.key=r}static async generate(r=i.EncryptionAlgo.AES256_GCM){if(r!==i.EncryptionAlgo.AES256_GCM)throw new Error(`Unsupported encryption algorithm ${r}`);return new c((0,a.randomBytes)(o.AES256_KEY_SIZE))}static from(r,t=i.EncryptionAlgo.AES256_GCM){if(t!==i.EncryptionAlgo.AES256_GCM)throw new Error(`Unsupported encryption algorithm ${t}`);return new c(r)}async encrypt(r,t){return(0,s.gcm)(this.key,r.slice(0,o.AES256_BLOCK_SIZE)).encrypt(t)}async decrypt(r,t){return(0,s.gcm)(this.key,r.slice(0,o.AES256_BLOCK_SIZE)).decrypt(t)}}0&&(module.exports={NobleKey});
|
|
2
|
+
//# sourceMappingURL=NobleKey.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/api/crypto/noble/NobleKey.ts"],
|
|
4
|
+
"sourcesContent": ["import { gcm } from \"@noble/ciphers/aes\";\nimport { randomBytes } from \"@noble/ciphers/webcrypto\";\n\nimport { EncryptionAlgo } from \"@api/crypto/CryptoService\";\nimport { AES256_BLOCK_SIZE, AES256_KEY_SIZE, type Key } from \"@api/crypto/Key\";\n\nexport class NobleKey implements Key {\n static async generate(\n algo: EncryptionAlgo = EncryptionAlgo.AES256_GCM,\n ): Promise<NobleKey> {\n if (algo !== EncryptionAlgo.AES256_GCM) {\n throw new Error(`Unsupported encryption algorithm ${algo}`);\n }\n return new NobleKey(randomBytes(AES256_KEY_SIZE));\n }\n\n static from(\n keyMaterial: Uint8Array,\n algo: EncryptionAlgo = EncryptionAlgo.AES256_GCM,\n ): NobleKey {\n if (algo !== EncryptionAlgo.AES256_GCM) {\n throw new Error(`Unsupported encryption algorithm ${algo}`);\n }\n return new NobleKey(keyMaterial);\n }\n\n private constructor(private key: Uint8Array) {}\n\n async encrypt(iv: Uint8Array, data: Uint8Array): Promise<Uint8Array> {\n const cipher = gcm(this.key, iv.slice(0, AES256_BLOCK_SIZE));\n return cipher.encrypt(data);\n }\n\n async decrypt(\n iv: Uint8Array,\n encryptedData: Uint8Array,\n ): Promise<Uint8Array> {\n const cipher = gcm(this.key, iv.slice(0, AES256_BLOCK_SIZE));\n return cipher.decrypt(encryptedData);\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAoB,8BACpBC,EAA4B,oCAE5BC,EAA+B,qCAC/BC,EAA6D,2BAEtD,MAAML,CAAwB,CAoB3B,YAAoBM,EAAiB,CAAjB,SAAAA,CAAkB,CAnB9C,aAAa,SACXC,EAAuB,iBAAe,WACnB,CACnB,GAAIA,IAAS,iBAAe,WAC1B,MAAM,IAAI,MAAM,oCAAoCA,CAAI,EAAE,EAE5D,OAAO,IAAIP,KAAS,eAAY,iBAAe,CAAC,CAClD,CAEA,OAAO,KACLQ,EACAD,EAAuB,iBAAe,WAC5B,CACV,GAAIA,IAAS,iBAAe,WAC1B,MAAM,IAAI,MAAM,oCAAoCA,CAAI,EAAE,EAE5D,OAAO,IAAIP,EAASQ,CAAW,CACjC,CAIA,MAAM,QAAQC,EAAgBC,EAAuC,CAEnE,SADe,OAAI,KAAK,IAAKD,EAAG,MAAM,EAAG,mBAAiB,CAAC,EAC7C,QAAQC,CAAI,CAC5B,CAEA,MAAM,QACJD,EACAE,EACqB,CAErB,SADe,OAAI,KAAK,IAAKF,EAAG,MAAM,EAAG,mBAAiB,CAAC,EAC7C,QAAQE,CAAa,CACrC,CACF",
|
|
6
|
+
"names": ["NobleKey_exports", "__export", "NobleKey", "__toCommonJS", "import_aes", "import_webcrypto", "import_CryptoService", "import_Key", "key", "algo", "keyMaterial", "iv", "data", "encryptedData"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var c=require("../../crypto/Key"),o=require("./NobleKey");describe("NobleKey",()=>{const t=new TextEncoder().encode("Test Data");it("should encrypt and decrypt data correctly",async()=>{const n=await o.NobleKey.generate(),e=new Uint8Array(c.AES256_BLOCK_SIZE).fill(2),a=await n.encrypt(e,t),r=await n.decrypt(e,a);expect(a).not.toEqual(t),expect(r).toEqual(t)}),it("should encrypt and decrypt data from key material",async()=>{const n=new Uint8Array(c.AES256_KEY_SIZE).fill(1),e=o.NobleKey.from(n),a=new Uint8Array(c.AES256_BLOCK_SIZE).fill(2),r=await e.encrypt(a,t),y=await e.decrypt(a,r);expect(r).not.toEqual(t),expect(y).toEqual(t)})});
|
|
2
|
+
//# sourceMappingURL=NobleKey.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/api/crypto/noble/NobleKey.test.ts"],
|
|
4
|
+
"sourcesContent": ["import { AES256_BLOCK_SIZE, AES256_KEY_SIZE } from \"@api/crypto/Key\";\n\nimport { NobleKey } from \"./NobleKey\";\n\ndescribe(\"NobleKey\", () => {\n const testData = new TextEncoder().encode(\"Test Data\");\n\n it(\"should encrypt and decrypt data correctly\", async () => {\n const key = await NobleKey.generate();\n const iv = new Uint8Array(AES256_BLOCK_SIZE).fill(0x02);\n const encryptedData = await key.encrypt(iv, testData);\n const decryptedData = await key.decrypt(iv, encryptedData);\n\n expect(encryptedData).not.toEqual(testData);\n expect(decryptedData).toEqual(testData);\n });\n\n it(\"should encrypt and decrypt data from key material\", async () => {\n const keyMaterial = new Uint8Array(AES256_KEY_SIZE).fill(0x01);\n const key = NobleKey.from(keyMaterial);\n const iv = new Uint8Array(AES256_BLOCK_SIZE).fill(0x02);\n const encryptedData = await key.encrypt(iv, testData);\n const decryptedData = await key.decrypt(iv, encryptedData);\n\n expect(encryptedData).not.toEqual(testData);\n expect(decryptedData).toEqual(testData);\n });\n});\n"],
|
|
5
|
+
"mappings": "aAAA,IAAAA,EAAmD,2BAEnDC,EAAyB,sBAEzB,SAAS,WAAY,IAAM,CACzB,MAAMC,EAAW,IAAI,YAAY,EAAE,OAAO,WAAW,EAErD,GAAG,4CAA6C,SAAY,CAC1D,MAAMC,EAAM,MAAM,WAAS,SAAS,EAC9BC,EAAK,IAAI,WAAW,mBAAiB,EAAE,KAAK,CAAI,EAChDC,EAAgB,MAAMF,EAAI,QAAQC,EAAIF,CAAQ,EAC9CI,EAAgB,MAAMH,EAAI,QAAQC,EAAIC,CAAa,EAEzD,OAAOA,CAAa,EAAE,IAAI,QAAQH,CAAQ,EAC1C,OAAOI,CAAa,EAAE,QAAQJ,CAAQ,CACxC,CAAC,EAED,GAAG,oDAAqD,SAAY,CAClE,MAAMK,EAAc,IAAI,WAAW,iBAAe,EAAE,KAAK,CAAI,EACvDJ,EAAM,WAAS,KAAKI,CAAW,EAC/BH,EAAK,IAAI,WAAW,mBAAiB,EAAE,KAAK,CAAI,EAChDC,EAAgB,MAAMF,EAAI,QAAQC,EAAIF,CAAQ,EAC9CI,EAAgB,MAAMH,EAAI,QAAQC,EAAIC,CAAa,EAEzD,OAAOA,CAAa,EAAE,IAAI,QAAQH,CAAQ,EAC1C,OAAOI,CAAa,EAAE,QAAQJ,CAAQ,CACxC,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["import_Key", "import_NobleKey", "testData", "key", "iv", "encryptedData", "decryptedData", "keyMaterial"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(a,r)=>{for(var e in r)s(a,e,{get:r[e],enumerable:!0})},K=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of m(r))!g.call(a,i)&&i!==e&&s(a,i,{get:()=>r[i],enumerable:!(t=v(r,i))||t.enumerable});return a};var f=a=>K(s({},"__esModule",{value:!0}),a);var b={};l(b,{NobleKeyPair:()=>n});module.exports=f(b);var c=require("@ledgerhq/device-management-kit"),y=require("@noble/curves/nist.js"),p=require("@noble/curves/secp256k1.js"),u=require("../../crypto/CryptoService"),o=require("../../crypto/KeyPair");class n{constructor(r,e,t){this.curve=r;this.privateKey=e;this.publicKey=t}static async generate(r){const e=n.getCurve(r),{secretKey:t,publicKey:i}=e.keygen();return new n(e,t,i)}static from(r,e){const t=n.getCurve(e),i=t.getPublicKey(r);return new n(t,r,i)}static getCurve(r){switch(r){case u.Curve.K256:return p.secp256k1;case u.Curve.P256:return y.p256;default:throw new Error(`Unsupported curve ${r}`)}}get id(){return(0,c.bufferToHexaString)(this.privateKey)}async sign(r,e){return this.curve.sign(r,this.privateKey).toBytes(e===o.SigFormat.DER?"der":"compact")}async verify(r,e,t){return this.curve.verify(e,r,this.publicKey,{format:t===o.SigFormat.DER?"der":"compact"})}async deriveSharedSecret(r,e=!0){return this.curve.getSharedSecret(this.privateKey,r,e)}getPublicKey(){return this.publicKey}getPublicKeyToHex(){return(0,c.bufferToHexaString)(this.publicKey,!1)}}0&&(module.exports={NobleKeyPair});
|
|
2
|
+
//# sourceMappingURL=NobleKeyPair.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/api/crypto/noble/NobleKeyPair.ts"],
|
|
4
|
+
"sourcesContent": ["import { bufferToHexaString } from \"@ledgerhq/device-management-kit\";\nimport type { CurveFn } from \"@noble/curves/abstract/weierstrass.js\";\nimport { p256 } from \"@noble/curves/nist.js\";\nimport { secp256k1 } from \"@noble/curves/secp256k1.js\";\n\nimport { Curve } from \"@api/crypto/CryptoService\";\nimport { type KeyPair, SigFormat } from \"@api/crypto/KeyPair\";\n\nexport class NobleKeyPair implements KeyPair {\n static async generate(curve: Curve): Promise<NobleKeyPair> {\n const curveImpl = NobleKeyPair.getCurve(curve);\n const { secretKey, publicKey } = curveImpl.keygen();\n return new NobleKeyPair(curveImpl, secretKey, publicKey);\n }\n\n static from(privateKey: Uint8Array, curve: Curve): NobleKeyPair {\n const curveImpl = NobleKeyPair.getCurve(curve);\n const publicKey = curveImpl.getPublicKey(privateKey);\n return new NobleKeyPair(curveImpl, privateKey, publicKey);\n }\n\n private static getCurve(curve: Curve): CurveFn {\n switch (curve) {\n case Curve.K256:\n return secp256k1;\n case Curve.P256:\n return p256;\n default:\n throw new Error(`Unsupported curve ${curve}`);\n }\n }\n\n private constructor(\n private curve: CurveFn,\n private privateKey: Uint8Array,\n private publicKey: Uint8Array,\n ) {}\n\n get id() {\n return bufferToHexaString(this.privateKey);\n }\n\n async sign(data: Uint8Array, format?: SigFormat): Promise<Uint8Array> {\n return this.curve\n .sign(data, this.privateKey)\n .toBytes(format === SigFormat.DER ? \"der\" : \"compact\");\n }\n\n async verify(\n data: Uint8Array,\n signature: Uint8Array,\n format?: SigFormat,\n ): Promise<boolean> {\n return this.curve.verify(signature, data, this.publicKey, {\n format: format === SigFormat.DER ? \"der\" : \"compact\",\n });\n }\n\n async deriveSharedSecret(\n peerPublicKey: Uint8Array,\n isCompressed: boolean = true,\n ): Promise<Uint8Array> {\n return this.curve.getSharedSecret(\n this.privateKey,\n peerPublicKey,\n isCompressed,\n );\n }\n\n getPublicKey(): Uint8Array {\n return this.publicKey;\n }\n\n getPublicKeyToHex(): string {\n return bufferToHexaString(this.publicKey, false);\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmC,2CAEnCC,EAAqB,iCACrBC,EAA0B,sCAE1BC,EAAsB,qCACtBC,EAAwC,+BAEjC,MAAMN,CAAgC,CAwBnC,YACEO,EACAC,EACAC,EACR,CAHQ,WAAAF,EACA,gBAAAC,EACA,eAAAC,CACP,CA3BH,aAAa,SAASF,EAAqC,CACzD,MAAMG,EAAYV,EAAa,SAASO,CAAK,EACvC,CAAE,UAAAI,EAAW,UAAAF,CAAU,EAAIC,EAAU,OAAO,EAClD,OAAO,IAAIV,EAAaU,EAAWC,EAAWF,CAAS,CACzD,CAEA,OAAO,KAAKD,EAAwBD,EAA4B,CAC9D,MAAMG,EAAYV,EAAa,SAASO,CAAK,EACvCE,EAAYC,EAAU,aAAaF,CAAU,EACnD,OAAO,IAAIR,EAAaU,EAAWF,EAAYC,CAAS,CAC1D,CAEA,OAAe,SAASF,EAAuB,CAC7C,OAAQA,EAAO,CACb,KAAK,QAAM,KACT,OAAO,YACT,KAAK,QAAM,KACT,OAAO,OACT,QACE,MAAM,IAAI,MAAM,qBAAqBA,CAAK,EAAE,CAChD,CACF,CAQA,IAAI,IAAK,CACP,SAAO,sBAAmB,KAAK,UAAU,CAC3C,CAEA,MAAM,KAAKK,EAAkBC,EAAyC,CACpE,OAAO,KAAK,MACT,KAAKD,EAAM,KAAK,UAAU,EAC1B,QAAQC,IAAW,YAAU,IAAM,MAAQ,SAAS,CACzD,CAEA,MAAM,OACJD,EACAE,EACAD,EACkB,CAClB,OAAO,KAAK,MAAM,OAAOC,EAAWF,EAAM,KAAK,UAAW,CACxD,OAAQC,IAAW,YAAU,IAAM,MAAQ,SAC7C,CAAC,CACH,CAEA,MAAM,mBACJE,EACAC,EAAwB,GACH,CACrB,OAAO,KAAK,MAAM,gBAChB,KAAK,WACLD,EACAC,CACF,CACF,CAEA,cAA2B,CACzB,OAAO,KAAK,SACd,CAEA,mBAA4B,CAC1B,SAAO,sBAAmB,KAAK,UAAW,EAAK,CACjD,CACF",
|
|
6
|
+
"names": ["NobleKeyPair_exports", "__export", "NobleKeyPair", "__toCommonJS", "import_device_management_kit", "import_nist", "import_secp256k1", "import_CryptoService", "import_KeyPair", "curve", "privateKey", "publicKey", "curveImpl", "secretKey", "data", "format", "signature", "peerPublicKey", "isCompressed"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=require("../../crypto/CryptoService"),n=require("../../crypto/KeyPair"),r=require("./NobleKeyPair");describe("NobleKeyPair",()=>{const c=new TextEncoder().encode("Test Data");it("should generate a key pair with correct public key",async()=>{const e=(await r.NobleKeyPair.generate(a.Curve.K256)).getPublicKey();expect(e).toBeDefined(),expect(e.byteLength).toBeGreaterThan(0)}),it("should create a key pair from a private key",()=>{const t=new Uint8Array(32).fill(1),e=r.NobleKeyPair.from(t,a.Curve.K256);expect(e.getPublicKey()).toBeDefined()}),it("should sign and verify data correctly",async()=>{const t=await r.NobleKeyPair.generate(a.Curve.K256),e=await t.sign(c),i=await t.verify(c,e);expect(i).toBeTruthy()}),it("should sign and verify data correctly, in DER format",async()=>{const t=await r.NobleKeyPair.generate(a.Curve.K256),e=await t.sign(c,n.SigFormat.DER),i=await t.verify(c,e,n.SigFormat.DER);expect(i).toBeTruthy()}),it("should derive a shared secret with another public key",async()=>{const t=await r.NobleKeyPair.generate(a.Curve.K256),e=await r.NobleKeyPair.generate(a.Curve.K256),i=await t.deriveSharedSecret(e.getPublicKey()),o=await e.deriveSharedSecret(t.getPublicKey());expect(i).toBeDefined(),expect(i.byteLength).toBeGreaterThan(0),expect(i).toStrictEqual(o)}),it("should convert public key to hex string",async()=>{const e=(await r.NobleKeyPair.generate(a.Curve.K256)).getPublicKeyToHex();expect(typeof e).toBe("string"),expect(e.length).toBeGreaterThan(0)})});
|
|
2
|
+
//# sourceMappingURL=NobleKeyPair.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/api/crypto/noble/NobleKeyPair.test.ts"],
|
|
4
|
+
"sourcesContent": ["import { Curve } from \"@api/crypto/CryptoService\";\nimport { SigFormat } from \"@api/crypto/KeyPair\";\n\nimport { NobleKeyPair } from \"./NobleKeyPair\";\n\ndescribe(\"NobleKeyPair\", () => {\n const testData = new TextEncoder().encode(\"Test Data\");\n\n it(\"should generate a key pair with correct public key\", async () => {\n const keyPair = await NobleKeyPair.generate(Curve.K256);\n const publicKey = keyPair.getPublicKey();\n expect(publicKey).toBeDefined();\n expect(publicKey.byteLength).toBeGreaterThan(0);\n });\n\n it(\"should create a key pair from a private key\", () => {\n const privateKey = new Uint8Array(32).fill(1);\n const keyPair = NobleKeyPair.from(privateKey, Curve.K256);\n expect(keyPair.getPublicKey()).toBeDefined();\n });\n\n it(\"should sign and verify data correctly\", async () => {\n const keyPair = await NobleKeyPair.generate(Curve.K256);\n const signature = await keyPair.sign(testData);\n const isVerified = await keyPair.verify(testData, signature);\n expect(isVerified).toBeTruthy();\n });\n\n it(\"should sign and verify data correctly, in DER format\", async () => {\n const keyPair = await NobleKeyPair.generate(Curve.K256);\n const signature = await keyPair.sign(testData, SigFormat.DER);\n const isVerified = await keyPair.verify(testData, signature, SigFormat.DER);\n expect(isVerified).toBeTruthy();\n });\n\n it(\"should derive a shared secret with another public key\", async () => {\n const keyPair = await NobleKeyPair.generate(Curve.K256);\n const otherKeyPair = await NobleKeyPair.generate(Curve.K256);\n const sharedSecret1 = await keyPair.deriveSharedSecret(\n otherKeyPair.getPublicKey(),\n );\n const sharedSecret2 = await otherKeyPair.deriveSharedSecret(\n keyPair.getPublicKey(),\n );\n\n expect(sharedSecret1).toBeDefined();\n expect(sharedSecret1.byteLength).toBeGreaterThan(0);\n expect(sharedSecret1).toStrictEqual(sharedSecret2);\n });\n\n it(\"should convert public key to hex string\", async () => {\n const keyPair = await NobleKeyPair.generate(Curve.K256);\n const hexPublicKey = keyPair.getPublicKeyToHex();\n expect(typeof hexPublicKey).toBe(\"string\");\n expect(hexPublicKey.length).toBeGreaterThan(0);\n });\n});\n"],
|
|
5
|
+
"mappings": "aAAA,IAAAA,EAAsB,qCACtBC,EAA0B,+BAE1BC,EAA6B,0BAE7B,SAAS,eAAgB,IAAM,CAC7B,MAAMC,EAAW,IAAI,YAAY,EAAE,OAAO,WAAW,EAErD,GAAG,qDAAsD,SAAY,CAEnE,MAAMC,GADU,MAAM,eAAa,SAAS,QAAM,IAAI,GAC5B,aAAa,EACvC,OAAOA,CAAS,EAAE,YAAY,EAC9B,OAAOA,EAAU,UAAU,EAAE,gBAAgB,CAAC,CAChD,CAAC,EAED,GAAG,8CAA+C,IAAM,CACtD,MAAMC,EAAa,IAAI,WAAW,EAAE,EAAE,KAAK,CAAC,EACtCC,EAAU,eAAa,KAAKD,EAAY,QAAM,IAAI,EACxD,OAAOC,EAAQ,aAAa,CAAC,EAAE,YAAY,CAC7C,CAAC,EAED,GAAG,wCAAyC,SAAY,CACtD,MAAMA,EAAU,MAAM,eAAa,SAAS,QAAM,IAAI,EAChDC,EAAY,MAAMD,EAAQ,KAAKH,CAAQ,EACvCK,EAAa,MAAMF,EAAQ,OAAOH,EAAUI,CAAS,EAC3D,OAAOC,CAAU,EAAE,WAAW,CAChC,CAAC,EAED,GAAG,uDAAwD,SAAY,CACrE,MAAMF,EAAU,MAAM,eAAa,SAAS,QAAM,IAAI,EAChDC,EAAY,MAAMD,EAAQ,KAAKH,EAAU,YAAU,GAAG,EACtDK,EAAa,MAAMF,EAAQ,OAAOH,EAAUI,EAAW,YAAU,GAAG,EAC1E,OAAOC,CAAU,EAAE,WAAW,CAChC,CAAC,EAED,GAAG,wDAAyD,SAAY,CACtE,MAAMF,EAAU,MAAM,eAAa,SAAS,QAAM,IAAI,EAChDG,EAAe,MAAM,eAAa,SAAS,QAAM,IAAI,EACrDC,EAAgB,MAAMJ,EAAQ,mBAClCG,EAAa,aAAa,CAC5B,EACME,EAAgB,MAAMF,EAAa,mBACvCH,EAAQ,aAAa,CACvB,EAEA,OAAOI,CAAa,EAAE,YAAY,EAClC,OAAOA,EAAc,UAAU,EAAE,gBAAgB,CAAC,EAClD,OAAOA,CAAa,EAAE,cAAcC,CAAa,CACnD,CAAC,EAED,GAAG,0CAA2C,SAAY,CAExD,MAAMC,GADU,MAAM,eAAa,SAAS,QAAM,IAAI,GACzB,kBAAkB,EAC/C,OAAO,OAAOA,CAAY,EAAE,KAAK,QAAQ,EACzC,OAAOA,EAAa,MAAM,EAAE,gBAAgB,CAAC,CAC/C,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["import_CryptoService", "import_KeyPair", "import_NobleKeyPair", "testData", "publicKey", "privateKey", "keyPair", "signature", "isVerified", "otherKeyPair", "sharedSecret1", "sharedSecret2", "hexPublicKey"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,e,p,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of c(e))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>e[m],enumerable:!(x=b(e,m))||x.enumerable});return f},r=(f,e,p)=>(t(f,e,"default"),p&&t(p,e,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);r(o,require("./app-binder/AuthenticateDeviceActionTypes"),module.exports);r(o,require("./crypto/CryptoService"),module.exports);r(o,require("./crypto/Key"),module.exports);r(o,require("./crypto/KeyPair"),module.exports);r(o,require("./crypto/noble/NobleCryptoService"),module.exports);r(o,require("./crypto/noble/NobleKey"),module.exports);r(o,require("./crypto/noble/NobleKeyPair"),module.exports);r(o,require("./model/Env"),module.exports);r(o,require("./model/Errors"),module.exports);r(o,require("./model/JWT"),module.exports);r(o,require("./model/Permissions"),module.exports);r(o,require("./LedgerKeyringProtocol"),module.exports);r(o,require("./LedgerKeyringProtocolBuilder"),module.exports);r(o,require("../internal/externalTypes"),module.exports);0&&(module.exports={...require("./app-binder/AuthenticateDeviceActionTypes"),...require("./crypto/CryptoService"),...require("./crypto/Key"),...require("./crypto/KeyPair"),...require("./crypto/noble/NobleCryptoService"),...require("./crypto/noble/NobleKey"),...require("./crypto/noble/NobleKeyPair"),...require("./model/Env"),...require("./model/Errors"),...require("./model/JWT"),...require("./model/Permissions"),...require("./LedgerKeyringProtocol"),...require("./LedgerKeyringProtocolBuilder"),...require("../internal/externalTypes")});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from \"./app-binder/AuthenticateDeviceActionTypes\";\nexport * from \"./crypto/CryptoService\";\nexport * from \"./crypto/Key\";\nexport * from \"./crypto/KeyPair\";\nexport * from \"./crypto/noble/NobleCryptoService\";\nexport * from \"./crypto/noble/NobleKey\";\nexport * from \"./crypto/noble/NobleKeyPair\";\nexport * from \"./model/Env\";\nexport * from \"./model/Errors\";\nexport * from \"./model/JWT\";\nexport * from \"./model/Permissions\";\nexport * from \"@api/LedgerKeyringProtocol\";\nexport * from \"@api/LedgerKeyringProtocolBuilder\";\nexport * from \"@internal/externalTypes\";\n"],
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,sDAAd,gBACAE,EAAAF,EAAc,kCADd,gBAEAE,EAAAF,EAAc,wBAFd,gBAGAE,EAAAF,EAAc,4BAHd,gBAIAE,EAAAF,EAAc,6CAJd,gBAKAE,EAAAF,EAAc,mCALd,gBAMAE,EAAAF,EAAc,uCANd,gBAOAE,EAAAF,EAAc,uBAPd,gBAQAE,EAAAF,EAAc,0BARd,gBASAE,EAAAF,EAAc,uBATd,gBAUAE,EAAAF,EAAc,+BAVd,gBAWAE,EAAAF,EAAc,sCAXd,gBAYAE,EAAAF,EAAc,6CAZd,gBAaAE,EAAAF,EAAc,mCAbd",
|
|
6
|
+
"names": ["api_exports", "__toCommonJS", "__reExport"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var m=(g,e)=>{for(var o in e)r(g,o,{get:e[o],enumerable:!0})},s=(g,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of d(e))!i.call(g,p)&&p!==o&&r(g,p,{get:()=>e[p],enumerable:!(t=a(e,p))||t.enumerable});return g};var u=g=>s(r({},"__esModule",{value:!0}),g);var x={};m(x,{LKRPEnv:()=>G});module.exports=u(x);var G=(o=>(o.PROD="prod",o.STAGING="staging",o))(G||{});0&&(module.exports={LKRPEnv});
|
|
2
|
+
//# sourceMappingURL=Env.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/Env.ts"],
|
|
4
|
+
"sourcesContent": ["export enum LKRPEnv {\n PROD = \"prod\",\n STAGING = \"staging\",\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAO,IAAKE,OACVA,EAAA,KAAO,OACPA,EAAA,QAAU,UAFAA,OAAA",
|
|
6
|
+
"names": ["Env_exports", "__export", "LKRPEnv", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var r in e)a(o,r,{get:e[r],enumerable:!0})},g=(o,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of i(e))!u.call(o,t)&&t!==r&&a(o,t,{get:()=>e[t],enumerable:!(n=d(e,t))||n.enumerable});return o};var l=o=>g(a({},"__esModule",{value:!0}),o);var R={};c(R,{LKRPDataSourceError:()=>y,LKRPMissingDataError:()=>P,LKRPOutdatedTrustchainError:()=>E,LKRPParsingError:()=>K,LKRPTrustchainNotReady:()=>L,LKRPUnauthorizedError:()=>p,LKRPUnknownError:()=>m,LKRPUnsupportedCommandError:()=>x});module.exports=l(R);var s=require("@ledgerhq/device-management-kit");class y extends s.GeneralDmkError{constructor(r){super(r.message);this.err=r;this.status=r.status,this.message=r.message}_tag="LedgerKeyringProtocolError";message;status}class p extends s.GeneralDmkError{constructor(r=null,n=`Current keypair is not a member of the trustchain${r?` ${r}`:""}.`){super(n);this.trustchainId=r;this.message=n}_tag="LedgerKeyringProtocolError"}class E extends s.GeneralDmkError{constructor(r="The trustchain is outdated."){super(r);this.message=r}_tag="LedgerKeyringProtocolError"}class L extends s.GeneralDmkError{constructor(r="Ledger Sync must be initialized from Ledger Live with this device."){super(r);this.message=r}_tag="LedgerKeyringProtocolError"}class K extends s.GeneralDmkError{constructor(r){super(r);this.err=r}_tag="LedgerKeyringProtocolError"}class P extends s.GeneralDmkError{constructor(r){super(r);this.err=r}_tag="LedgerKeyringProtocolError"}class x extends s.GeneralDmkError{constructor(r){const n=r&&typeof r=="object"&&"type"in r&&typeof r.type=="number"&&`0x${r.type.toString(16).padStart(2,"0")}`;let t="Unsupported command";n&&(t+=`: ${n}`);super(t);this.command=r;this.message=t}_tag="LedgerKeyringProtocolError";message}class m extends s.GeneralDmkError{constructor(r){super(r);this.message=r}_tag="LedgerKeyringProtocolError"}0&&(module.exports={LKRPDataSourceError,LKRPMissingDataError,LKRPOutdatedTrustchainError,LKRPParsingError,LKRPTrustchainNotReady,LKRPUnauthorizedError,LKRPUnknownError,LKRPUnsupportedCommandError});
|
|
2
|
+
//# sourceMappingURL=Errors.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/Errors.ts"],
|
|
4
|
+
"sourcesContent": ["import { GeneralDmkError } from \"@ledgerhq/device-management-kit\";\n\nexport type LKRPDataSourceErrorStatus =\n | \"UNAUTHORIZED\"\n | \"BAD_REQUEST\"\n | \"UNKNOWN\";\n\nexport class LKRPDataSourceError extends GeneralDmkError {\n override _tag = \"LedgerKeyringProtocolError\";\n public readonly message: string;\n public readonly status: LKRPDataSourceErrorStatus;\n\n constructor(\n readonly err: {\n status: LKRPDataSourceErrorStatus;\n message: string;\n },\n ) {\n super(err.message);\n this.status = err.status;\n this.message = err.message;\n }\n}\n\nexport class LKRPUnauthorizedError extends GeneralDmkError {\n override _tag = \"LedgerKeyringProtocolError\";\n constructor(\n readonly trustchainId: string | null = null,\n readonly message: string = `Current keypair is not a member of the trustchain${trustchainId ? ` ${trustchainId}` : \"\"}.`,\n ) {\n super(message);\n }\n}\n\nexport class LKRPOutdatedTrustchainError extends GeneralDmkError {\n override _tag = \"LedgerKeyringProtocolError\";\n constructor(readonly message = \"The trustchain is outdated.\") {\n super(message);\n }\n}\n\nexport class LKRPTrustchainNotReady extends GeneralDmkError {\n override readonly _tag = \"LedgerKeyringProtocolError\";\n constructor(\n readonly message = \"Ledger Sync must be initialized from Ledger Live with this device.\",\n ) {\n super(message);\n }\n}\n\nexport class LKRPParsingError extends GeneralDmkError {\n override readonly _tag = \"LedgerKeyringProtocolError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPMissingDataError extends GeneralDmkError {\n override readonly _tag = \"LedgerKeyringProtocolError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPUnsupportedCommandError extends GeneralDmkError {\n override readonly _tag = \"LedgerKeyringProtocolError\";\n readonly message: string;\n constructor(readonly command: unknown) {\n const commandType =\n command &&\n typeof command === \"object\" &&\n \"type\" in command &&\n typeof command.type === \"number\" &&\n `0x${command.type.toString(16).padStart(2, \"0\")}`;\n let message = `Unsupported command`;\n if (commandType) message += `: ${commandType}`;\n\n super(message);\n\n this.message = message;\n }\n}\n\nexport class LKRPUnknownError extends GeneralDmkError {\n override readonly _tag = \"LedgerKeyringProtocolError\";\n constructor(readonly message: string) {\n super(message);\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,EAAA,yBAAAC,EAAA,gCAAAC,EAAA,qBAAAC,EAAA,2BAAAC,EAAA,0BAAAC,EAAA,qBAAAC,EAAA,gCAAAC,IAAA,eAAAC,EAAAV,GAAA,IAAAW,EAAgC,2CAOzB,MAAMT,UAA4B,iBAAgB,CAKvD,YACWU,EAIT,CACA,MAAMA,EAAI,OAAO,EALR,SAAAA,EAMT,KAAK,OAASA,EAAI,OAClB,KAAK,QAAUA,EAAI,OACrB,CAbS,KAAO,6BACA,QACA,MAYlB,CAEO,MAAML,UAA8B,iBAAgB,CAEzD,YACWM,EAA8B,KAC9BC,EAAkB,oDAAoDD,EAAe,IAAIA,CAAY,GAAK,EAAE,IACrH,CACA,MAAMC,CAAO,EAHJ,kBAAAD,EACA,aAAAC,CAGX,CANS,KAAO,4BAOlB,CAEO,MAAMV,UAAoC,iBAAgB,CAE/D,YAAqBU,EAAU,8BAA+B,CAC5D,MAAMA,CAAO,EADM,aAAAA,CAErB,CAHS,KAAO,4BAIlB,CAEO,MAAMR,UAA+B,iBAAgB,CAE1D,YACWQ,EAAU,qEACnB,CACA,MAAMA,CAAO,EAFJ,aAAAA,CAGX,CALkB,KAAO,4BAM3B,CAEO,MAAMT,UAAyB,iBAAgB,CAEpD,YAAqBO,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,4BAI3B,CAEO,MAAMT,UAA6B,iBAAgB,CAExD,YAAqBS,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,4BAI3B,CAEO,MAAMH,UAAoC,iBAAgB,CAG/D,YAAqBM,EAAkB,CACrC,MAAMC,EACJD,GACA,OAAOA,GAAY,UACnB,SAAUA,GACV,OAAOA,EAAQ,MAAS,UACxB,KAAKA,EAAQ,KAAK,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CAAC,GACjD,IAAID,EAAU,sBACVE,IAAaF,GAAW,KAAKE,CAAW,IAE5C,MAAMF,CAAO,EAVM,aAAAC,EAYnB,KAAK,QAAUD,CACjB,CAfkB,KAAO,6BAChB,OAeX,CAEO,MAAMN,UAAyB,iBAAgB,CAEpD,YAAqBM,EAAiB,CACpC,MAAMA,CAAO,EADM,aAAAA,CAErB,CAHkB,KAAO,4BAI3B",
|
|
6
|
+
"names": ["Errors_exports", "__export", "LKRPDataSourceError", "LKRPMissingDataError", "LKRPOutdatedTrustchainError", "LKRPParsingError", "LKRPTrustchainNotReady", "LKRPUnauthorizedError", "LKRPUnknownError", "LKRPUnsupportedCommandError", "__toCommonJS", "import_device_management_kit", "err", "trustchainId", "message", "command", "commandType"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(t,s,e,n)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of p(s))!a.call(t,i)&&i!==e&&r(t,i,{get:()=>s[i],enumerable:!(n=g(s,i))||n.enumerable});return t};var o=t=>c(r({},"__esModule",{value:!0}),t);var h={};module.exports=o(h);
|
|
2
|
+
//# sourceMappingURL=JWT.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/JWT.ts"],
|
|
4
|
+
"sourcesContent": ["export type JWT = {\n access_token: string;\n permissions: {\n [trustchainId: string]: {\n [path: string]: string[];\n };\n };\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["JWT_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var E=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var p=(N,C)=>{for(var A in C)E(N,A,{get:C[A],enumerable:!0})},t=(N,C,A,_)=>{if(C&&typeof C=="object"||typeof C=="function")for(let f of x(C))!O.call(N,f)&&f!==A&&E(N,f,{get:()=>C[f],enumerable:!(_=R(C,f))||_.enumerable});return N};var u=N=>t(E({},"__esModule",{value:!0}),N);var B={};p(B,{Permissions:()=>D});module.exports=u(B);var D=(f=>(f[f.OWNER=4294967295]="OWNER",f[f.CAN_ENCRYPT=1]="CAN_ENCRYPT",f[f.CAN_DERIVE=2]="CAN_DERIVE",f[f.CAN_ADD_BLOCK=4]="CAN_ADD_BLOCK",f))(D||{});0&&(module.exports={Permissions});
|
|
2
|
+
//# sourceMappingURL=Permissions.js.map
|