@ledgerhq/device-trusted-app-kit-ledger-keyring-protocol 0.0.0-develop-20250904001204 → 0.0.0-e2e-speculos-20250904104129
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/lib/cjs/api/LedgerKeyringProtocol.js +1 -1
- package/lib/cjs/api/LedgerKeyringProtocol.js.map +1 -1
- package/lib/cjs/api/LedgerKeyringProtocolBuilder.js +1 -1
- package/lib/cjs/api/LedgerKeyringProtocolBuilder.js.map +3 -3
- package/lib/cjs/api/app-binder/AddToTrustchainDeviceActionTypes.js +1 -1
- package/lib/cjs/api/app-binder/AddToTrustchainDeviceActionTypes.js.map +3 -3
- package/lib/cjs/api/app-binder/AuthenticateDeviceActionTypes.js +1 -1
- package/lib/cjs/api/app-binder/AuthenticateDeviceActionTypes.js.map +3 -3
- package/lib/cjs/api/app-binder/Errors.js +2 -0
- package/lib/cjs/api/app-binder/Errors.js.map +7 -0
- package/lib/cjs/api/app-binder/GetAppNameCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetAppNameCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/GetSeedIdCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetSeedIdCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/GetVersionCommandTypes.js +1 -1
- package/lib/cjs/api/app-binder/GetVersionCommandTypes.js.map +1 -1
- package/lib/cjs/api/app-binder/InitCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/InitCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/KeypairFromBytes.js +2 -0
- package/lib/cjs/api/app-binder/KeypairFromBytes.js.map +7 -0
- package/lib/cjs/api/app-binder/LKRPTypes.js +2 -0
- package/lib/cjs/api/app-binder/LKRPTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/ParseStreamBlockCommandCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/ParseStreamBlockCommandCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/ParseStreamBlockHeaderCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/ParseStreamBlockHeaderCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/ParseStreamBlockSignatureTypes.js +2 -0
- package/lib/cjs/api/app-binder/ParseStreamBlockSignatureTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SetTrustedMemberTypes.js +2 -0
- package/lib/cjs/api/app-binder/SetTrustedMemberTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SignBlockCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/SignBlockCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SignBlockHeaderCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/SignBlockHeaderCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SignBlockSignatureCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/SignBlockSignatureCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SignBlockSingleCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/SignBlockSingleCommandTypes.js.map +7 -0
- package/lib/cjs/api/index.js +1 -1
- package/lib/cjs/api/index.js.map +2 -2
- package/lib/cjs/internal/DefaultLedgerKeyringProtocol.js +1 -1
- package/lib/cjs/internal/DefaultLedgerKeyringProtocol.js.map +3 -3
- package/lib/cjs/internal/app-binder/LedgerKeyringProtocolBinder.js +1 -1
- package/lib/cjs/internal/app-binder/LedgerKeyringProtocolBinder.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/GetAppNameCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/GetAppNameCommand.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.test.js +2 -2
- package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/GetVersionCommand.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/InitCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/InitCommand.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/InitCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/InitCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.js +1 -1
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/device-action/AddToTrustchainDeviceAction.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/AddToTrustchainDeviceAction.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/AuthenticateDeviceAction.js +2 -0
- package/lib/cjs/internal/app-binder/device-action/AuthenticateDeviceAction.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/InitTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/InitTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/ParseStreamToDeviceTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/ParseStreamToDeviceTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/SignBlockTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SignBlockTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/utils/TrustedProperties.js +1 -1
- package/lib/cjs/internal/app-binder/task/utils/TrustedProperties.js.map +3 -3
- package/lib/cjs/internal/di.js +1 -1
- package/lib/cjs/internal/di.js.map +3 -3
- package/lib/cjs/internal/externalTypes.js +1 -1
- package/lib/cjs/internal/externalTypes.js.map +2 -2
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.js +1 -1
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.js.map +3 -3
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +1 -1
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +3 -3
- package/lib/cjs/internal/lkrp-datasource/data/LKRPDataSource.js +1 -1
- package/lib/cjs/internal/lkrp-datasource/data/LKRPDataSource.js.map +1 -1
- package/lib/cjs/internal/use-cases/authentication/AuthenticateUseCase.js +1 -1
- package/lib/cjs/internal/use-cases/authentication/AuthenticateUseCase.js.map +3 -3
- package/lib/cjs/internal/use-cases/di/useCasesModule.js +1 -1
- package/lib/cjs/internal/use-cases/di/useCasesModule.js.map +3 -3
- package/lib/cjs/internal/use-cases/di/useCasesTypes.js +1 -1
- package/lib/cjs/internal/use-cases/di/useCasesTypes.js.map +2 -2
- package/lib/cjs/internal/utils/LKRPBlock.js +4 -4
- package/lib/cjs/internal/utils/LKRPBlock.js.map +3 -3
- package/lib/cjs/internal/utils/LKRPBlock.test.js +3 -3
- package/lib/cjs/internal/utils/LKRPBlock.test.js.map +3 -3
- package/lib/cjs/internal/utils/LKRPBlockStream.js +2 -2
- package/lib/cjs/internal/utils/LKRPBlockStream.js.map +3 -3
- package/lib/cjs/internal/utils/LKRPBlockStream.test.js +3 -3
- package/lib/cjs/internal/utils/LKRPBlockStream.test.js.map +3 -3
- package/lib/cjs/internal/utils/LKRPCommand.js +2 -2
- package/lib/cjs/internal/utils/LKRPCommand.js.map +3 -3
- package/lib/cjs/internal/utils/LKRPCommand.test.js +1 -1
- package/lib/cjs/internal/utils/LKRPCommand.test.js.map +3 -3
- package/lib/cjs/internal/utils/TLVBuilder.js +2 -0
- package/lib/cjs/internal/utils/TLVBuilder.js.map +7 -0
- package/lib/cjs/internal/utils/TLVParser.js +1 -1
- package/lib/cjs/internal/utils/TLVParser.js.map +3 -3
- package/lib/cjs/internal/utils/TLVParser.test.js +1 -1
- package/lib/cjs/internal/utils/TLVParser.test.js.map +3 -3
- package/lib/cjs/internal/{models/Tags.js → utils/TLVTags.js} +1 -1
- package/lib/cjs/internal/{models/Tags.js.map → utils/TLVTags.js.map} +2 -2
- package/lib/cjs/internal/utils/crypto.js +2 -0
- package/lib/cjs/internal/utils/crypto.js.map +7 -0
- package/lib/cjs/internal/utils/hex.js +2 -0
- package/lib/cjs/internal/utils/hex.js.map +7 -0
- package/lib/cjs/internal/utils/required.js +1 -1
- package/lib/cjs/internal/utils/required.js.map +2 -2
- package/lib/cjs/internal/utils/types.js +2 -0
- package/lib/cjs/internal/utils/types.js.map +7 -0
- package/lib/cjs/package.json +2 -3
- package/lib/esm/api/LedgerKeyringProtocolBuilder.js +1 -1
- package/lib/esm/api/LedgerKeyringProtocolBuilder.js.map +3 -3
- package/lib/esm/api/app-binder/AddToTrustchainDeviceActionTypes.js +0 -1
- package/lib/esm/api/app-binder/AddToTrustchainDeviceActionTypes.js.map +4 -4
- package/lib/esm/api/app-binder/AuthenticateDeviceActionTypes.js +0 -1
- package/lib/esm/api/app-binder/AuthenticateDeviceActionTypes.js.map +4 -4
- package/lib/esm/api/app-binder/Errors.js +2 -0
- package/lib/esm/api/app-binder/Errors.js.map +7 -0
- package/lib/esm/api/app-binder/GetAppNameCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/GetSeedIdCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/InitCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/KeypairFromBytes.js +2 -0
- package/lib/esm/api/app-binder/KeypairFromBytes.js.map +7 -0
- package/lib/esm/api/app-binder/LKRPTypes.js +2 -0
- package/lib/esm/api/app-binder/LKRPTypes.js.map +7 -0
- package/lib/esm/api/app-binder/ParseStreamBlockCommandCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/ParseStreamBlockHeaderCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/ParseStreamBlockSignatureTypes.js +1 -0
- package/lib/esm/api/app-binder/SetTrustedMemberTypes.js +1 -0
- package/lib/esm/api/app-binder/SetTrustedMemberTypes.js.map +7 -0
- package/lib/esm/api/app-binder/SignBlockCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/SignBlockCommandTypes.js.map +7 -0
- package/lib/esm/api/app-binder/SignBlockHeaderCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/SignBlockHeaderCommandTypes.js.map +7 -0
- package/lib/esm/api/app-binder/SignBlockSignatureCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/SignBlockSignatureCommandTypes.js.map +7 -0
- package/lib/esm/api/app-binder/SignBlockSingleCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/SignBlockSingleCommandTypes.js.map +7 -0
- package/lib/esm/api/index.js +1 -1
- package/lib/esm/api/index.js.map +2 -2
- package/lib/esm/internal/DefaultLedgerKeyringProtocol.js +1 -1
- package/lib/esm/internal/DefaultLedgerKeyringProtocol.js.map +3 -3
- package/lib/esm/internal/app-binder/LedgerKeyringProtocolBinder.js +1 -1
- package/lib/esm/internal/app-binder/LedgerKeyringProtocolBinder.js.map +3 -3
- package/lib/esm/internal/app-binder/command/GetAppNameCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/GetAppNameCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/GetSeedIdCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/GetVersionCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/InitCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/InitCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/InitCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/InitCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.js +1 -1
- package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.js.map +2 -2
- package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SignBlockHeader.js +1 -1
- package/lib/esm/internal/app-binder/command/SignBlockHeader.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/device-action/AddToTrustchainDeviceAction.js +1 -1
- package/lib/esm/internal/app-binder/device-action/AddToTrustchainDeviceAction.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/AuthenticateDeviceAction.js +2 -0
- package/lib/esm/internal/app-binder/device-action/AuthenticateDeviceAction.js.map +7 -0
- package/lib/esm/internal/app-binder/task/InitTask.js +1 -1
- package/lib/esm/internal/app-binder/task/InitTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/ParseStreamToDeviceTask.js +1 -1
- package/lib/esm/internal/app-binder/task/ParseStreamToDeviceTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SignBlockTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SignBlockTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.test.js.map +3 -3
- package/lib/esm/internal/app-binder/task/utils/TrustedProperties.js +1 -1
- package/lib/esm/internal/app-binder/task/utils/TrustedProperties.js.map +3 -3
- package/lib/esm/internal/di.js +1 -1
- package/lib/esm/internal/di.js.map +3 -3
- package/lib/esm/internal/externalTypes.js +1 -1
- package/lib/esm/internal/externalTypes.js.map +2 -2
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.js +1 -1
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.js.map +3 -3
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +1 -1
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +3 -3
- package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js +1 -1
- package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js.map +3 -3
- package/lib/esm/internal/use-cases/di/useCasesModule.js +1 -1
- package/lib/esm/internal/use-cases/di/useCasesModule.js.map +3 -3
- package/lib/esm/internal/use-cases/di/useCasesTypes.js +1 -1
- package/lib/esm/internal/use-cases/di/useCasesTypes.js.map +2 -2
- package/lib/esm/internal/utils/LKRPBlock.js +3 -3
- package/lib/esm/internal/utils/LKRPBlock.js.map +3 -3
- package/lib/esm/internal/utils/LKRPBlock.test.js +2 -2
- package/lib/esm/internal/utils/LKRPBlock.test.js.map +3 -3
- package/lib/esm/internal/utils/LKRPBlockStream.js +2 -2
- package/lib/esm/internal/utils/LKRPBlockStream.js.map +3 -3
- package/lib/esm/internal/utils/LKRPBlockStream.test.js +3 -3
- package/lib/esm/internal/utils/LKRPBlockStream.test.js.map +3 -3
- package/lib/esm/internal/utils/LKRPCommand.js +2 -2
- package/lib/esm/internal/utils/LKRPCommand.js.map +3 -3
- package/lib/esm/internal/utils/LKRPCommand.test.js +1 -1
- package/lib/esm/internal/utils/LKRPCommand.test.js.map +3 -3
- package/lib/esm/internal/utils/TLVBuilder.js +2 -0
- package/lib/esm/internal/utils/TLVBuilder.js.map +7 -0
- package/lib/esm/internal/utils/TLVParser.js +1 -1
- package/lib/esm/internal/utils/TLVParser.js.map +3 -3
- package/lib/esm/internal/utils/TLVParser.test.js +1 -1
- package/lib/esm/internal/utils/TLVParser.test.js.map +3 -3
- package/lib/esm/internal/{models/Tags.js → utils/TLVTags.js} +1 -1
- package/lib/esm/internal/{models/Tags.js.map → utils/TLVTags.js.map} +1 -1
- package/lib/esm/internal/utils/crypto.js +2 -0
- package/lib/esm/internal/utils/crypto.js.map +7 -0
- package/lib/esm/internal/utils/hex.js +2 -0
- package/lib/esm/internal/utils/hex.js.map +7 -0
- package/lib/esm/internal/utils/required.js +1 -1
- package/lib/esm/internal/utils/required.js.map +2 -2
- package/lib/esm/internal/utils/types.js +1 -0
- package/lib/esm/internal/utils/types.js.map +7 -0
- package/lib/esm/package.json +2 -3
- package/lib/types/api/LedgerKeyringProtocol.d.ts +5 -4
- package/lib/types/api/LedgerKeyringProtocol.d.ts.map +1 -1
- package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts +6 -12
- package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts.map +1 -1
- package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts +11 -25
- package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts +31 -27
- package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/Errors.d.ts +27 -0
- package/lib/types/api/app-binder/Errors.d.ts.map +1 -0
- package/lib/types/api/app-binder/GetAppNameCommandTypes.d.ts +5 -0
- package/lib/types/api/app-binder/GetAppNameCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/GetSeedIdCommandTypes.d.ts +14 -0
- package/lib/types/api/app-binder/GetSeedIdCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts +1 -0
- package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/InitCommandTypes.d.ts +5 -0
- package/lib/types/api/app-binder/InitCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/KeypairFromBytes.d.ts +11 -0
- package/lib/types/api/app-binder/KeypairFromBytes.d.ts.map +1 -0
- package/lib/types/api/{model/Permissions.d.ts → app-binder/LKRPTypes.d.ts} +15 -1
- package/lib/types/api/app-binder/LKRPTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/ParseStreamBlockCommandCommandTypes.d.ts +6 -0
- package/lib/types/api/app-binder/ParseStreamBlockCommandCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/ParseStreamBlockHeaderCommandTypes.d.ts +5 -0
- package/lib/types/api/app-binder/ParseStreamBlockHeaderCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/ParseStreamBlockSignatureTypes.d.ts +5 -0
- package/lib/types/api/app-binder/ParseStreamBlockSignatureTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SetTrustedMemberTypes.d.ts +6 -0
- package/lib/types/api/app-binder/SetTrustedMemberTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SignBlockCommandTypes.d.ts +9 -0
- package/lib/types/api/app-binder/SignBlockCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SignBlockHeaderCommandTypes.d.ts +5 -0
- package/lib/types/api/app-binder/SignBlockHeaderCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SignBlockSignatureCommandTypes.d.ts +6 -0
- package/lib/types/api/app-binder/SignBlockSignatureCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SignBlockSingleCommandTypes.d.ts +5 -0
- package/lib/types/api/app-binder/SignBlockSingleCommandTypes.d.ts.map +1 -0
- package/lib/types/api/index.d.ts +2 -10
- package/lib/types/api/index.d.ts.map +1 -1
- package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts +9 -12
- package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts.map +1 -1
- package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts +8 -14
- package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts +1 -4
- package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts +1 -13
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts +1 -2
- package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/InitCommand.d.ts +1 -4
- package/lib/types/internal/app-binder/command/InitCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts +1 -4
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts +1 -5
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts +1 -4
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts +1 -5
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts +1 -6
- package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts +1 -5
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts +1 -4
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts +6 -10
- package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/AuthenticateDeviceAction.d.ts +42 -0
- package/lib/types/internal/app-binder/device-action/AuthenticateDeviceAction.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/InitTask.d.ts +3 -5
- package/lib/types/internal/app-binder/task/InitTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts +3 -3
- package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SignBlockTask.d.ts +13 -15
- package/lib/types/internal/app-binder/task/SignBlockTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts +5 -6
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts +2 -2
- package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts.map +1 -1
- package/lib/types/internal/di.d.ts +3 -7
- package/lib/types/internal/di.d.ts.map +1 -1
- package/lib/types/internal/externalTypes.d.ts +1 -2
- package/lib/types/internal/externalTypes.d.ts.map +1 -1
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts +10 -8
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts.map +1 -1
- package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts +8 -8
- package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts.map +1 -1
- package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts +2 -15
- package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts.map +1 -1
- package/lib/types/internal/use-cases/di/useCasesModule.d.ts.map +1 -1
- package/lib/types/internal/use-cases/di/useCasesTypes.d.ts +0 -2
- package/lib/types/internal/use-cases/di/useCasesTypes.d.ts.map +1 -1
- package/lib/types/internal/utils/LKRPBlock.d.ts +2 -2
- package/lib/types/internal/utils/LKRPBlock.d.ts.map +1 -1
- package/lib/types/internal/utils/LKRPBlockStream.d.ts +8 -8
- package/lib/types/internal/utils/LKRPBlockStream.d.ts.map +1 -1
- package/lib/types/internal/utils/LKRPCommand.d.ts +3 -4
- package/lib/types/internal/utils/LKRPCommand.d.ts.map +1 -1
- package/lib/types/internal/utils/TLVBuilder.d.ts +15 -0
- package/lib/types/internal/utils/TLVBuilder.d.ts.map +1 -0
- package/lib/types/internal/utils/TLVParser.d.ts +3 -4
- package/lib/types/internal/utils/TLVParser.d.ts.map +1 -1
- package/lib/types/internal/{models/Tags.d.ts → utils/TLVTags.d.ts} +1 -1
- package/lib/types/internal/utils/TLVTags.d.ts.map +1 -0
- package/lib/types/internal/utils/crypto.d.ts +19 -0
- package/lib/types/internal/utils/crypto.d.ts.map +1 -0
- package/lib/types/internal/utils/hex.d.ts +3 -0
- package/lib/types/internal/utils/hex.d.ts.map +1 -0
- package/lib/types/internal/utils/required.d.ts +1 -1
- package/lib/types/internal/utils/required.d.ts.map +1 -1
- package/lib/types/internal/{models/LKRPCommandTypes.d.ts → utils/types.d.ts} +29 -6
- package/lib/types/internal/utils/types.d.ts.map +1 -0
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +6 -7
- package/lib/cjs/api/crypto/CryptoService.js +0 -2
- package/lib/cjs/api/crypto/CryptoService.js.map +0 -7
- package/lib/cjs/api/crypto/Key.js +0 -2
- package/lib/cjs/api/crypto/Key.js.map +0 -7
- package/lib/cjs/api/crypto/KeyPair.js +0 -2
- package/lib/cjs/api/crypto/KeyPair.js.map +0 -7
- package/lib/cjs/api/crypto/noble/NobleCryptoService.js +0 -2
- package/lib/cjs/api/crypto/noble/NobleCryptoService.js.map +0 -7
- package/lib/cjs/api/crypto/noble/NobleCryptoService.test.js +0 -2
- package/lib/cjs/api/crypto/noble/NobleCryptoService.test.js.map +0 -7
- package/lib/cjs/api/crypto/noble/NobleKey.js +0 -2
- package/lib/cjs/api/crypto/noble/NobleKey.js.map +0 -7
- package/lib/cjs/api/crypto/noble/NobleKey.test.js +0 -2
- package/lib/cjs/api/crypto/noble/NobleKey.test.js.map +0 -7
- package/lib/cjs/api/crypto/noble/NobleKeyPair.js +0 -2
- package/lib/cjs/api/crypto/noble/NobleKeyPair.js.map +0 -7
- package/lib/cjs/api/crypto/noble/NobleKeyPair.test.js +0 -2
- package/lib/cjs/api/crypto/noble/NobleKeyPair.test.js.map +0 -7
- package/lib/cjs/api/model/Env.js +0 -2
- package/lib/cjs/api/model/Env.js.map +0 -7
- package/lib/cjs/api/model/Errors.js +0 -2
- package/lib/cjs/api/model/Errors.js.map +0 -7
- package/lib/cjs/api/model/JWT.js +0 -2
- package/lib/cjs/api/model/JWT.js.map +0 -7
- package/lib/cjs/api/model/Permissions.js +0 -2
- package/lib/cjs/api/model/Permissions.js.map +0 -7
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js +0 -2
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js.map +0 -7
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js +0 -2
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js.map +0 -7
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js +0 -2
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js.map +0 -7
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js +0 -2
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js.map +0 -7
- package/lib/cjs/internal/app-binder/task/AuthenticateTask.js +0 -2
- package/lib/cjs/internal/app-binder/task/AuthenticateTask.js.map +0 -7
- package/lib/cjs/internal/app-binder/task/ExtractEncryptionKeyTask.js +0 -2
- package/lib/cjs/internal/app-binder/task/ExtractEncryptionKeyTask.js.map +0 -7
- package/lib/cjs/internal/models/LKRPBlockTypes.js +0 -2
- package/lib/cjs/internal/models/LKRPBlockTypes.js.map +0 -7
- package/lib/cjs/internal/models/LKRPCommandTypes.js +0 -2
- package/lib/cjs/internal/models/LKRPCommandTypes.js.map +0 -7
- package/lib/cjs/internal/models/Types.js +0 -2
- package/lib/cjs/internal/models/Types.js.map +0 -7
- package/lib/cjs/internal/use-cases/authentication/DecryptDataUseCase.js +0 -2
- package/lib/cjs/internal/use-cases/authentication/DecryptDataUseCase.js.map +0 -7
- package/lib/cjs/internal/use-cases/authentication/EncryptDataUseCase.js +0 -2
- package/lib/cjs/internal/use-cases/authentication/EncryptDataUseCase.js.map +0 -7
- package/lib/cjs/internal/utils/Trustchain.js +0 -2
- package/lib/cjs/internal/utils/Trustchain.js.map +0 -7
- package/lib/esm/api/crypto/CryptoService.js +0 -2
- package/lib/esm/api/crypto/CryptoService.js.map +0 -7
- package/lib/esm/api/crypto/Key.js +0 -2
- package/lib/esm/api/crypto/Key.js.map +0 -7
- package/lib/esm/api/crypto/KeyPair.js +0 -2
- package/lib/esm/api/crypto/KeyPair.js.map +0 -7
- package/lib/esm/api/crypto/noble/NobleCryptoService.js +0 -2
- package/lib/esm/api/crypto/noble/NobleCryptoService.js.map +0 -7
- package/lib/esm/api/crypto/noble/NobleCryptoService.test.js +0 -2
- package/lib/esm/api/crypto/noble/NobleCryptoService.test.js.map +0 -7
- package/lib/esm/api/crypto/noble/NobleKey.js +0 -2
- package/lib/esm/api/crypto/noble/NobleKey.js.map +0 -7
- package/lib/esm/api/crypto/noble/NobleKey.test.js +0 -2
- package/lib/esm/api/crypto/noble/NobleKey.test.js.map +0 -7
- package/lib/esm/api/crypto/noble/NobleKeyPair.js +0 -2
- package/lib/esm/api/crypto/noble/NobleKeyPair.js.map +0 -7
- package/lib/esm/api/crypto/noble/NobleKeyPair.test.js +0 -2
- package/lib/esm/api/crypto/noble/NobleKeyPair.test.js.map +0 -7
- package/lib/esm/api/model/Env.js +0 -2
- package/lib/esm/api/model/Env.js.map +0 -7
- package/lib/esm/api/model/Errors.js +0 -2
- package/lib/esm/api/model/Errors.js.map +0 -7
- package/lib/esm/api/model/JWT.js +0 -1
- package/lib/esm/api/model/Permissions.js +0 -2
- package/lib/esm/api/model/Permissions.js.map +0 -7
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js +0 -2
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js.map +0 -7
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js +0 -2
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js.map +0 -7
- package/lib/esm/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js +0 -1
- package/lib/esm/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js +0 -1
- package/lib/esm/internal/app-binder/task/AuthenticateTask.js +0 -2
- package/lib/esm/internal/app-binder/task/AuthenticateTask.js.map +0 -7
- package/lib/esm/internal/app-binder/task/ExtractEncryptionKeyTask.js +0 -2
- package/lib/esm/internal/app-binder/task/ExtractEncryptionKeyTask.js.map +0 -7
- package/lib/esm/internal/models/LKRPBlockTypes.js +0 -1
- package/lib/esm/internal/models/LKRPCommandTypes.js +0 -1
- package/lib/esm/internal/models/Types.js +0 -1
- package/lib/esm/internal/use-cases/authentication/DecryptDataUseCase.js +0 -2
- package/lib/esm/internal/use-cases/authentication/DecryptDataUseCase.js.map +0 -7
- package/lib/esm/internal/use-cases/authentication/EncryptDataUseCase.js +0 -2
- package/lib/esm/internal/use-cases/authentication/EncryptDataUseCase.js.map +0 -7
- package/lib/esm/internal/utils/Trustchain.js +0 -2
- package/lib/esm/internal/utils/Trustchain.js.map +0 -7
- package/lib/types/api/crypto/CryptoService.d.ts +0 -22
- package/lib/types/api/crypto/CryptoService.d.ts.map +0 -1
- package/lib/types/api/crypto/Key.d.ts +0 -7
- package/lib/types/api/crypto/Key.d.ts.map +0 -1
- package/lib/types/api/crypto/KeyPair.d.ts +0 -13
- package/lib/types/api/crypto/KeyPair.d.ts.map +0 -1
- package/lib/types/api/crypto/noble/NobleCryptoService.d.ts +0 -13
- package/lib/types/api/crypto/noble/NobleCryptoService.d.ts.map +0 -1
- package/lib/types/api/crypto/noble/NobleCryptoService.test.d.ts +0 -2
- package/lib/types/api/crypto/noble/NobleCryptoService.test.d.ts.map +0 -1
- package/lib/types/api/crypto/noble/NobleKey.d.ts +0 -11
- package/lib/types/api/crypto/noble/NobleKey.d.ts.map +0 -1
- package/lib/types/api/crypto/noble/NobleKey.test.d.ts +0 -2
- package/lib/types/api/crypto/noble/NobleKey.test.d.ts.map +0 -1
- package/lib/types/api/crypto/noble/NobleKeyPair.d.ts +0 -18
- package/lib/types/api/crypto/noble/NobleKeyPair.d.ts.map +0 -1
- package/lib/types/api/crypto/noble/NobleKeyPair.test.d.ts +0 -2
- package/lib/types/api/crypto/noble/NobleKeyPair.test.d.ts.map +0 -1
- package/lib/types/api/model/Env.d.ts +0 -5
- package/lib/types/api/model/Env.d.ts.map +0 -1
- package/lib/types/api/model/Errors.d.ts +0 -53
- package/lib/types/api/model/Errors.d.ts.map +0 -1
- package/lib/types/api/model/JWT.d.ts +0 -9
- package/lib/types/api/model/JWT.d.ts.map +0 -1
- package/lib/types/api/model/Permissions.d.ts.map +0 -1
- package/lib/types/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.d.ts +0 -32
- package/lib/types/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.d.ts.map +0 -1
- package/lib/types/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.d.ts +0 -33
- package/lib/types/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.d.ts.map +0 -1
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.d.ts +0 -22
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.d.ts.map +0 -1
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.d.ts +0 -19
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.d.ts.map +0 -1
- package/lib/types/internal/app-binder/task/AuthenticateTask.d.ts +0 -9
- package/lib/types/internal/app-binder/task/AuthenticateTask.d.ts.map +0 -1
- package/lib/types/internal/app-binder/task/ExtractEncryptionKeyTask.d.ts +0 -8
- package/lib/types/internal/app-binder/task/ExtractEncryptionKeyTask.d.ts.map +0 -1
- package/lib/types/internal/models/LKRPBlockTypes.d.ts +0 -11
- package/lib/types/internal/models/LKRPBlockTypes.d.ts.map +0 -1
- package/lib/types/internal/models/LKRPCommandTypes.d.ts.map +0 -1
- package/lib/types/internal/models/Tags.d.ts.map +0 -1
- package/lib/types/internal/models/Types.d.ts +0 -10
- package/lib/types/internal/models/Types.d.ts.map +0 -1
- package/lib/types/internal/use-cases/authentication/DecryptDataUseCase.d.ts +0 -7
- package/lib/types/internal/use-cases/authentication/DecryptDataUseCase.d.ts.map +0 -1
- package/lib/types/internal/use-cases/authentication/EncryptDataUseCase.d.ts +0 -7
- package/lib/types/internal/use-cases/authentication/EncryptDataUseCase.d.ts.map +0 -1
- package/lib/types/internal/utils/Trustchain.d.ts +0 -14
- package/lib/types/internal/utils/Trustchain.d.ts.map +0 -1
- /package/lib/esm/api/{model/JWT.js.map → app-binder/GetAppNameCommandTypes.js.map} +0 -0
- /package/lib/esm/{internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js.map → api/app-binder/GetSeedIdCommandTypes.js.map} +0 -0
- /package/lib/esm/{internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js.map → api/app-binder/InitCommandTypes.js.map} +0 -0
- /package/lib/esm/{internal/models/LKRPBlockTypes.js.map → api/app-binder/ParseStreamBlockCommandCommandTypes.js.map} +0 -0
- /package/lib/esm/{internal/models/LKRPCommandTypes.js.map → api/app-binder/ParseStreamBlockHeaderCommandTypes.js.map} +0 -0
- /package/lib/esm/{internal/models/Types.js.map → api/app-binder/ParseStreamBlockSignatureTypes.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var s=(r,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of y(t))!o.call(r,e)&&e!==n&&a(r,e,{get:()=>t[e],enumerable:!(i=p(t,e))||i.enumerable});return r};var m=r=>s(a({},"__esModule",{value:!0}),r);var c={};module.exports=m(c);
|
|
2
2
|
//# sourceMappingURL=LedgerKeyringProtocol.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/LedgerKeyringProtocol.ts"],
|
|
4
|
-
"sourcesContent": ["import { type
|
|
4
|
+
"sourcesContent": ["import { type Maybe } from \"purify-ts\";\n\nimport { type AuthenticateDAReturnType } from \"./app-binder/AuthenticateDeviceActionTypes\";\nimport {\n type JWT,\n type Keypair,\n type Permissions,\n} from \"./app-binder/LKRPTypes\";\n\nexport interface LedgerKeyringProtocol {\n authenticate: (\n keypair: Keypair,\n applicationId: number,\n clientName: string,\n permissions: Permissions,\n trustchainId?: string,\n JWT?: JWT,\n ) => AuthenticateDAReturnType;\n\n encryptData: (xpriv: Uint8Array, data: Uint8Array) => Uint8Array;\n\n decryptData: (xpriv: Uint8Array, data: Uint8Array) => Maybe<Uint8Array>;\n}\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["LedgerKeyringProtocol_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var m=(i,e)=>{for(var r in e)t(i,r,{get:e[r],enumerable:!0})},c=(i,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of a(e))!l.call(i,s)&&s!==r&&t(i,s,{get:()=>e[s],enumerable:!(o=d(e,s))||o.enumerable});return i};var g=i=>c(t({},"__esModule",{value:!0}),i);var y={};m(y,{LedgerKeyringProtocolBuilder:()=>p});module.exports=g(y);var n=require("../internal/DefaultLedgerKeyringProtocol");class p{dmk;sessionId;baseUrl;constructor({dmk:e,sessionId:r,baseUrl:o}){this.dmk=e,this.sessionId=r,this.baseUrl=o}build(){return new n.DefaultLedgerKeyringProtocol({dmk:this.dmk,sessionId:this.sessionId,baseUrl:this.baseUrl})}}0&&(module.exports={LedgerKeyringProtocolBuilder});
|
|
2
2
|
//# sourceMappingURL=LedgerKeyringProtocolBuilder.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/LedgerKeyringProtocolBuilder.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["LedgerKeyringProtocolBuilder_exports", "__export", "LedgerKeyringProtocolBuilder", "__toCommonJS", "
|
|
4
|
+
"sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type LedgerKeyringProtocol } from \"@api/LedgerKeyringProtocol\";\nimport { DefaultLedgerKeyringProtocol } from \"@internal/DefaultLedgerKeyringProtocol\";\n\nexport class LedgerKeyringProtocolBuilder {\n private readonly dmk: DeviceManagementKit;\n private readonly sessionId: DeviceSessionId;\n private readonly baseUrl: string;\n\n constructor({\n dmk,\n sessionId,\n baseUrl,\n }: {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n baseUrl: string;\n }) {\n this.dmk = dmk;\n this.sessionId = sessionId;\n this.baseUrl = baseUrl;\n }\n\n build(): LedgerKeyringProtocol {\n return new DefaultLedgerKeyringProtocol({\n dmk: this.dmk,\n sessionId: this.sessionId,\n baseUrl: this.baseUrl,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,IAAA,eAAAC,EAAAH,GAMA,IAAAI,EAA6C,kDAEtC,MAAMF,CAA6B,CACvB,IACA,UACA,QAEjB,YAAY,CACV,IAAAG,EACA,UAAAC,EACA,QAAAC,CACF,EAIG,CACD,KAAK,IAAMF,EACX,KAAK,UAAYC,EACjB,KAAK,QAAUC,CACjB,CAEA,OAA+B,CAC7B,OAAO,IAAI,+BAA6B,CACtC,IAAK,KAAK,IACV,UAAW,KAAK,UAChB,QAAS,KAAK,OAChB,CAAC,CACH,CACF",
|
|
6
|
+
"names": ["LedgerKeyringProtocolBuilder_exports", "__export", "LedgerKeyringProtocolBuilder", "__toCommonJS", "import_DefaultLedgerKeyringProtocol", "dmk", "sessionId", "baseUrl"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var y=(t,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of p(r))!s.call(t,e)&&e!==n&&i(t,e,{get:()=>r[e],enumerable:!(o=a(r,e))||o.enumerable});return t};var d=t=>y(i({},"__esModule",{value:!0}),t);var m={};module.exports=d(m);
|
|
2
2
|
//# sourceMappingURL=AddToTrustchainDeviceActionTypes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/api/app-binder/AddToTrustchainDeviceActionTypes.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n type OpenAppDAError,\n type
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["AddToTrustchainDeviceActionTypes_exports", "
|
|
4
|
+
"sourcesContent": ["import {\n type OpenAppDAError,\n type UnknownDAError,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Either } from \"purify-ts\";\n\nimport { type LKRPDeviceCommandError } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\nimport { type LKRPDataSource } from \"@internal/lkrp-datasource/data/LKRPDataSource\";\nimport { type LKRPBlockStream } from \"@internal/utils/LKRPBlockStream\";\nimport { type Trustchain } from \"@internal/utils/types\";\n\nimport {\n type LKRPHttpRequestError,\n type LKRPMissingDataError,\n type LKRPParsingError,\n} from \"./Errors\";\nimport { type JWT, type Keypair, type Permissions } from \"./LKRPTypes\";\n\nexport type AddToTrustchainDAOutput = undefined;\n\nexport type AddToTrustchainDAInput = Either<\n LKRPMissingDataError,\n {\n readonly lkrpDataSource: LKRPDataSource;\n readonly keypair: Keypair;\n readonly jwt: JWT;\n readonly trustchainId: string;\n readonly trustchain: Trustchain;\n readonly applicationStream: LKRPBlockStream;\n readonly clientName: string;\n readonly permissions: Permissions;\n }\n>;\n\nexport type AddToTrustchainDAError =\n | LKRPDeviceCommandError\n | LKRPHttpRequestError\n | LKRPParsingError\n | LKRPMissingDataError\n | OpenAppDAError\n | UnknownDAError;\n\nexport type AddToTrustchainDAIntermediateValue = {\n readonly requiredUserInteraction: string;\n};\n\nexport type AddToTrustchainDAInternalState = Either<\n AddToTrustchainDAError,\n {\n readonly sessionKeypair: Keypair | null;\n }\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["AddToTrustchainDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var y=(r,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!l.call(r,e)&&e!==o&&a(r,e,{get:()=>t[e],enumerable:!(n=i(t,e))||n.enumerable});return r};var u=r=>y(a({},"__esModule",{value:!0}),r);var c={};module.exports=u(c);
|
|
2
2
|
//# sourceMappingURL=AuthenticateDeviceActionTypes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/api/app-binder/AuthenticateDeviceActionTypes.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["AuthenticateDeviceActionTypes_exports", "
|
|
4
|
+
"sourcesContent": ["import {\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type UnknownDAError,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Either } from \"purify-ts\";\n\nimport { type LKRPDeviceCommandError } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\nimport { type LKRPDataSource } from \"@internal/lkrp-datasource/data/LKRPDataSource\";\nimport { type LKRPBlockStream } from \"@internal/utils/LKRPBlockStream\";\nimport { type Trustchain } from \"@internal/utils/types\";\n\nimport {\n type LKRPHttpRequestError,\n type LKRPMissingDataError,\n type LKRPParsingError,\n type LKRPUnhandledState,\n} from \"./Errors\";\nimport { type JWT, type Keypair, type Permissions } from \"./LKRPTypes\";\n\nexport type AuthenticateDAReturnType = ExecuteDeviceActionReturnType<\n AuthenticateDAOutput,\n AuthenticateDAError,\n AuthenticateDAIntermediateValue\n>;\n\nexport type AuthenticateDAInput = {\n readonly lkrpDataSource: LKRPDataSource;\n readonly applicationId: number;\n readonly keypair: Keypair;\n readonly clientName: string;\n readonly permissions: Permissions;\n readonly trustchainId: string | null;\n readonly jwt: JWT | null;\n};\n\nexport type AuthenticateDAOutput = {\n readonly jwt: JWT | null;\n readonly trustchainId: string | null;\n readonly applicationPath: string | null;\n readonly encryptionKey: Uint8Array | null;\n};\n\nexport type AuthenticateDAError =\n | LKRPDeviceCommandError\n | LKRPHttpRequestError\n | LKRPParsingError\n | LKRPMissingDataError\n | LKRPUnhandledState\n | OpenAppDAError\n | UnknownDAError;\n\nexport type AuthenticateDAIntermediateValue = {\n readonly requiredUserInteraction: string;\n};\n\nexport type AuthenticateDAInternalState = Either<\n AuthenticateDAError,\n {\n readonly trustchainId: string | null;\n readonly jwt: JWT | null;\n readonly trustchain: Trustchain | null;\n readonly applicationStream: LKRPBlockStream | null;\n readonly encryptionKey: Uint8Array | null;\n readonly wasAddedToTrustchain: boolean;\n }\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["AuthenticateDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(o,r)=>{for(var e in r)s(o,e,{get:r[e],enumerable:!0})},p=(o,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of c(r))!i.call(o,n)&&n!==e&&s(o,n,{get:()=>r[n],enumerable:!(a=u(r,n))||a.enumerable});return o};var P=o=>p(s({},"__esModule",{value:!0}),o);var g={};l(g,{LKRPHttpRequestError:()=>d,LKRPMissingDataError:()=>K,LKRPParsingError:()=>x,LKRPUnauthorizedError:()=>R,LKRPUnhandledState:()=>L});module.exports=P(g);var t=require("@ledgerhq/device-management-kit");class d extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPHttpRequestError"}class R extends d{constructor(e){super(e);this.err=e}_tag="LKRPUnauthorizedError"}class x extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPParsingError"}class K extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPMissingDataError"}class L extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPUnhandledState"}0&&(module.exports={LKRPHttpRequestError,LKRPMissingDataError,LKRPParsingError,LKRPUnauthorizedError,LKRPUnhandledState});
|
|
2
|
+
//# sourceMappingURL=Errors.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/Errors.ts"],
|
|
4
|
+
"sourcesContent": ["import { GeneralDmkError } from \"@ledgerhq/device-management-kit\";\n\nexport class LKRPHttpRequestError extends GeneralDmkError {\n override _tag = \"LKRPHttpRequestError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPUnauthorizedError extends LKRPHttpRequestError {\n override _tag = \"LKRPUnauthorizedError\";\n constructor(override err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPParsingError extends GeneralDmkError {\n override readonly _tag = \"LKRPParsingError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPMissingDataError extends GeneralDmkError {\n override readonly _tag = \"LKRPMissingDataError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPUnhandledState extends GeneralDmkError {\n override readonly _tag = \"LKRPUnhandledState\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,yBAAAC,EAAA,qBAAAC,EAAA,0BAAAC,EAAA,uBAAAC,IAAA,eAAAC,EAAAP,GAAA,IAAAQ,EAAgC,2CAEzB,MAAMN,UAA6B,iBAAgB,CAExD,YAAqBO,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHS,KAAO,sBAIlB,CAEO,MAAMJ,UAA8BH,CAAqB,CAE9D,YAAqBO,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHS,KAAO,uBAIlB,CAEO,MAAML,UAAyB,iBAAgB,CAEpD,YAAqBK,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,kBAI3B,CAEO,MAAMN,UAA6B,iBAAgB,CAExD,YAAqBM,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,sBAI3B,CAEO,MAAMH,UAA2B,iBAAgB,CAEtD,YAAqBG,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,oBAI3B",
|
|
6
|
+
"names": ["Errors_exports", "__export", "LKRPHttpRequestError", "LKRPMissingDataError", "LKRPParsingError", "LKRPUnauthorizedError", "LKRPUnhandledState", "__toCommonJS", "import_device_management_kit", "err"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var s=(p,e,a,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of d(e))!r.call(p,n)&&n!==a&&t(p,n,{get:()=>e[n],enumerable:!(m=o(e,n))||m.enumerable});return p};var y=p=>s(t({},"__esModule",{value:!0}),p);var A={};module.exports=y(A);
|
|
2
|
+
//# sourceMappingURL=GetAppNameCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/GetAppNameCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type GetAppNameCommandResponse = {\n readonly name: string;\n};\n\nexport type GetAppNameCommandArgs = undefined;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["GetAppNameCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var s=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!i.call(n,r)&&r!==o&&d(n,r,{get:()=>e[r],enumerable:!(t=a(e,r))||t.enumerable});return n};var y=n=>s(d({},"__esModule",{value:!0}),n);var g={};module.exports=y(g);
|
|
2
|
+
//# sourceMappingURL=GetSeedIdCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/GetSeedIdCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type GetSeedIdCommandResponse = {\n readonly credential: {\n readonly version: number;\n readonly curveId: number;\n readonly signAlgorithm: number;\n readonly publicKey: string;\n };\n readonly signature: string;\n readonly attestation: string;\n};\n\nexport type GetSeedIdCommandArgs = {\n readonly challengeTLV: string;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["GetSeedIdCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var m=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!p.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=d(e,o))||r.enumerable});return n};var a=n=>m(s({},"__esModule",{value:!0}),n);var y={};module.exports=a(y);
|
|
2
2
|
//# sourceMappingURL=GetVersionCommandTypes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/api/app-binder/GetVersionCommandTypes.ts"],
|
|
4
|
-
"sourcesContent": ["export type GetVersionCommandResponse = {\n readonly version: string;\n};\n"],
|
|
4
|
+
"sourcesContent": ["export type GetVersionCommandResponse = {\n readonly version: string;\n};\n\nexport type GetVersionCommandArgs = undefined;\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["GetVersionCommandTypes_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var a=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of m(e))!y.call(t,n)&&n!==i&&p(t,n,{get:()=>e[n],enumerable:!(o=r(e,n))||o.enumerable});return t};var d=t=>a(p({},"__esModule",{value:!0}),t);var s={};module.exports=d(s);
|
|
2
|
+
//# sourceMappingURL=InitCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/InitCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type InitCommandResponse = void;\n\nexport type InitCommandArgs = {\n publicKey: Uint8Array;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["InitCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(t,r)=>{for(var e in r)n(t,e,{get:r[e],enumerable:!0})},K=(t,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let y of c(r))!m.call(t,y)&&y!==e&&n(t,y,{get:()=>r[y],enumerable:!(a=s(r,y))||a.enumerable});return t};var l=t=>K(n({},"__esModule",{value:!0}),t);var b={};u(b,{KeypairFromBytes:()=>U});module.exports=l(b);var i=require("@noble/secp256k1"),o=require("../../internal/utils/crypto"),p=require("../../internal/utils/hex");class U{constructor(r,e=(0,i.getPublicKey)(r)){this.privateKey=r;this.publicKey=e}pubKeyToU8a(){return this.publicKey}pubKeyToHex(){return(0,p.bytesToHex)(this.publicKey)}async sign(r){const{r:e,s:a}=await(0,i.signAsync)(r,this.privateKey);return o.CryptoUtils.derEncode(e,a)}ecdh(r,e=!0){return(0,i.getSharedSecret)(this.privateKey,r,e)}}0&&(module.exports={KeypairFromBytes});
|
|
2
|
+
//# sourceMappingURL=KeypairFromBytes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/KeypairFromBytes.ts"],
|
|
4
|
+
"sourcesContent": ["import { getPublicKey, getSharedSecret, signAsync } from \"@noble/secp256k1\";\n\nimport { type Keypair } from \"@api/index\";\nimport { CryptoUtils } from \"@internal/utils/crypto\";\nimport { bytesToHex } from \"@internal/utils/hex\";\n\nexport class KeypairFromBytes implements Keypair {\n constructor(\n private readonly privateKey: Uint8Array,\n private readonly publicKey = getPublicKey(privateKey),\n ) {}\n\n pubKeyToU8a(): Uint8Array {\n return this.publicKey;\n }\n\n pubKeyToHex(): string {\n return bytesToHex(this.publicKey);\n }\n\n async sign(message: Uint8Array): Promise<Uint8Array> {\n const { r, s } = await signAsync(message, this.privateKey);\n return CryptoUtils.derEncode(r, s);\n }\n\n ecdh(publicKey: Uint8Array, isCompressed = true): Uint8Array {\n return getSharedSecret(this.privateKey, publicKey, isCompressed);\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAyD,4BAGzDC,EAA4B,kCAC5BC,EAA2B,+BAEpB,MAAMJ,CAAoC,CAC/C,YACmBK,EACAC,KAAY,gBAAaD,CAAU,EACpD,CAFiB,gBAAAA,EACA,eAAAC,CAChB,CAEH,aAA0B,CACxB,OAAO,KAAK,SACd,CAEA,aAAsB,CACpB,SAAO,cAAW,KAAK,SAAS,CAClC,CAEA,MAAM,KAAKC,EAA0C,CACnD,KAAM,CAAE,EAAAC,EAAG,EAAAC,CAAE,EAAI,QAAM,aAAUF,EAAS,KAAK,UAAU,EACzD,OAAO,cAAY,UAAUC,EAAGC,CAAC,CACnC,CAEA,KAAKH,EAAuBI,EAAe,GAAkB,CAC3D,SAAO,mBAAgB,KAAK,WAAYJ,EAAWI,CAAY,CACjE,CACF",
|
|
6
|
+
"names": ["KeypairFromBytes_exports", "__export", "KeypairFromBytes", "__toCommonJS", "import_secp256k1", "import_crypto", "import_hex", "privateKey", "publicKey", "message", "r", "s", "isCompressed"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(a,r)=>{for(var e in r)p(a,e,{get:r[e],enumerable:!0})},U=(a,r,e,y)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of n(r))!g.call(a,t)&&t!==e&&p(a,t,{get:()=>r[t],enumerable:!(y=A(r,t))||y.enumerable});return a};var u=a=>U(p({},"__esModule",{value:!0}),a);var x={};c(x,{Permissions:()=>f});module.exports=u(x);var f=(t=>(t[t.OWNER=4294967295]="OWNER",t[t.CAN_ENCRYPT=1]="CAN_ENCRYPT",t[t.CAN_DERIVE=2]="CAN_DERIVE",t[t.CAN_ADD_BLOCK=4]="CAN_ADD_BLOCK",t))(f||{});0&&(module.exports={Permissions});
|
|
2
|
+
//# sourceMappingURL=LKRPTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/LKRPTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export interface Keypair {\n pubKeyToU8a(): Uint8Array;\n pubKeyToHex(): string;\n sign(message: Uint8Array): Promise<Uint8Array>;\n ecdh(publicKey: Uint8Array): Uint8Array;\n}\n\nexport type JWT = {\n access_token: string;\n permissions: {\n [trustchainId: string]: {\n [path: string]: string[];\n };\n };\n};\n\n/**\n * https://ledgerhq.atlassian.net/wiki/spaces/TA/pages/5865144361/ARCH+LKRP+-+v2+specifications#Member-permissions\n */\nexport enum Permissions {\n OWNER = 0xffffffff, // Owners of the stream have access to everything\n CAN_ENCRYPT = 1, // The member can have access to the stream private key\n CAN_DERIVE = 1 << 1, // The member can have access to the stream chain code (if a member have access to the private key and the chain code it is able to derive sub-streams)\n CAN_ADD_BLOCK = 1 << 2, // The member is authorized to issue blocks in the current stream\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAmBO,IAAKE,OACVA,IAAA,MAAQ,YAAR,QACAA,IAAA,YAAc,GAAd,cACAA,IAAA,WAAa,GAAb,aACAA,IAAA,cAAgB,GAAhB,gBAJUA,OAAA",
|
|
6
|
+
"names": ["LKRPTypes_exports", "__export", "Permissions", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var d=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!s.call(r,a)&&a!==t&&o(r,a,{get:()=>e[a],enumerable:!(n=m(e,a))||n.enumerable});return r};var i=r=>d(o({},"__esModule",{value:!0}),r);var y={};module.exports=i(y);
|
|
2
|
+
//# sourceMappingURL=ParseStreamBlockCommandCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/ParseStreamBlockCommandCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type ParseSingleCommandArgs = {\n command: Uint8Array;\n outputTrustedParam?: boolean;\n};\n\nexport type ParseSingleCommandResponse = Uint8Array;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["ParseStreamBlockCommandCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var m=(r,e,d,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!s.call(r,a)&&a!==d&&t(r,a,{get:()=>e[a],enumerable:!(o=n(e,a))||o.enumerable});return r};var y=r=>m(t({},"__esModule",{value:!0}),r);var A={};module.exports=y(A);
|
|
2
|
+
//# sourceMappingURL=ParseStreamBlockHeaderCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/ParseStreamBlockHeaderCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type ParseBlockHeaderCommandResponse = Uint8Array;\n\nexport type ParseBlockHeaderCommandArgs = {\n header: Uint8Array;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["ParseStreamBlockHeaderCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of i(r))!p.call(e,a)&&a!==o&&n(e,a,{get:()=>r[a],enumerable:!(t=s(r,a))||t.enumerable});return e};var m=e=>g(n({},"__esModule",{value:!0}),e);var y={};module.exports=m(y);
|
|
2
|
+
//# sourceMappingURL=ParseStreamBlockSignatureTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/ParseStreamBlockSignatureTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type ParseBlockSignatureCommandResponse = Uint8Array;\n\nexport type ParseBlockSignatureCommandArgs = { signature: Uint8Array };\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["ParseStreamBlockSignatureTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var p=(r,e,d,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!y.call(r,t)&&t!==d&&o(r,t,{get:()=>e[t],enumerable:!(m=n(e,t))||m.enumerable});return r};var s=r=>p(o({},"__esModule",{value:!0}),r);var i={};module.exports=s(i);
|
|
2
|
+
//# sourceMappingURL=SetTrustedMemberTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/SetTrustedMemberTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type SetTrustedMemberCommandResponse = void;\n\nexport type SetTrustedMemberCommandArgs = {\n readonly iv: Uint8Array;\n readonly memberTlv: Uint8Array;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SetTrustedMemberTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var l=(e,r,y,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of d(r))!n.call(e,o)&&o!==y&&p(e,o,{get:()=>r[o],enumerable:!(t=a(r,o))||t.enumerable});return e};var m=e=>l(p({},"__esModule",{value:!0}),e);var s={};module.exports=m(s);
|
|
2
|
+
//# sourceMappingURL=SignBlockCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/SignBlockCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import { type TrustedProperty } from \"@internal/externalTypes\";\n\nexport type SignBlockCommandResponse = {\n readonly trustedProperty: Partial<TrustedProperty>;\n};\n\nexport type SignBlockCommandArgs = {\n readonly p1: 0x00 | 0x01 | 0x02;\n readonly payload: Uint8Array;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignBlockCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of i(e))!m.call(r,a)&&a!==t&&o(r,a,{get:()=>e[a],enumerable:!(n=d(e,a))||n.enumerable});return r};var c=r=>p(o({},"__esModule",{value:!0}),r);var g={};module.exports=c(g);
|
|
2
|
+
//# sourceMappingURL=SignBlockHeaderCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/SignBlockHeaderCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export interface SignBlockHeaderCommandArgs {\n header: Uint8Array;\n}\n\nexport type SignBlockHeaderCommandResponse = Uint8Array;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignBlockHeaderCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var c=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!s.call(n,r)&&r!==o&&t(n,r,{get:()=>e[r],enumerable:!(i=a(e,r))||i.enumerable});return n};var S=n=>c(t({},"__esModule",{value:!0}),n);var d={};module.exports=S(d);
|
|
2
|
+
//# sourceMappingURL=SignBlockSignatureCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/SignBlockSignatureCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export type SignBlockSignatureCommandArgs = Record<string, never>;\n\nexport interface SignBlockSignatureCommandResponse {\n signature: Uint8Array;\n deviceSessionKey: Uint8Array;\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignBlockSignatureCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(e,n,a,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of t(n))!g.call(e,o)&&o!==a&&i(e,o,{get:()=>n[o],enumerable:!(r=m(n,o))||r.enumerable});return e};var l=e=>c(i({},"__esModule",{value:!0}),e);var p={};module.exports=l(p);
|
|
2
|
+
//# sourceMappingURL=SignBlockSingleCommandTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/SignBlockSingleCommandTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export interface SignBlockSingleCommandArgs {\n command: Uint8Array;\n}\n\nexport type SignBlockSingleCommandResponse = Uint8Array;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignBlockSingleCommandTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
package/lib/cjs/api/index.js
CHANGED
|
@@ -1,2 +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("./
|
|
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("./app-binder/KeypairFromBytes"),module.exports);r(o,require("./app-binder/LKRPTypes"),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("./app-binder/KeypairFromBytes"),...require("./app-binder/LKRPTypes"),...require("./LedgerKeyringProtocol"),...require("./LedgerKeyringProtocolBuilder"),...require("../internal/externalTypes")});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/api/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from \"./app-binder/AuthenticateDeviceActionTypes\";\nexport * from \"./
|
|
5
|
-
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,sDAAd,gBACAE,EAAAF,EAAc,
|
|
4
|
+
"sourcesContent": ["export * from \"./app-binder/AuthenticateDeviceActionTypes\";\nexport * from \"./app-binder/KeypairFromBytes\";\nexport * from \"./app-binder/LKRPTypes\";\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,yCADd,gBAEAE,EAAAF,EAAc,kCAFd,gBAGAE,EAAAF,EAAc,sCAHd,gBAIAE,EAAAF,EAAc,6CAJd,gBAKAE,EAAAF,EAAc,mCALd",
|
|
6
6
|
"names": ["api_exports", "__toCommonJS", "__reExport"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var u=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var b=(o,e)=>{for(var a in e)u(o,a,{get:e[a],enumerable:!0})},L=(o,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!B.call(o,r)&&r!==a&&u(o,r,{get:()=>e[r],enumerable:!(t=U(e,r))||t.enumerable});return o};var T=o=>L(u({},"__esModule",{value:!0}),o);var C={};b(C,{DefaultLedgerKeyringProtocol:()=>x});module.exports=T(C);var m=require("@ledgerhq/device-management-kit"),i=require("purify-ts"),d=require("../api/app-binder/KeypairFromBytes"),f=require("./di"),n=require("./utils/crypto"),h=require("./use-cases/di/useCasesTypes");class x{name;_container;constructor({dmk:e,sessionId:a,baseUrl:t}){this.name="Ledger Keyring Protocol",this._container=(0,f.makeContainer)({dmk:e,sessionId:a,baseUrl:t})}authenticate(e,a,t,r,c,s){return this._container.get(h.useCasesTypes.AuthenticateUseCase).execute(e,a,t,r,c,s)}encryptData(e,a){const t=new d.KeypairFromBytes(e),r=n.CryptoUtils.randomKeypair(),c=t.ecdh(r.pubKeyToU8a()).slice(1),s=n.CryptoUtils.hmac(new Uint8Array,c),y=n.CryptoUtils.randomBytes(16),p=n.CryptoUtils.encrypt(s,y,a),g=p.subarray(0,-n.AES_BLOCK_SIZE),l=p.subarray(-n.AES_BLOCK_SIZE);return new m.ByteArrayBuilder().add8BitUIntToData(0).addBufferToData(r.pubKeyToU8a()).addBufferToData(y).addBufferToData(l).addBufferToData(g).build()}decryptData(e,a){const t=new m.ByteArrayParser(a);return t.extract8BitUInt()!==0?i.Nothing:i.Maybe.sequence([i.Maybe.fromNullable(t.extractFieldByLength(33)),i.Maybe.fromNullable(t.extractFieldByLength(16)),i.Maybe.fromNullable(t.extractFieldByLength(16)),i.Maybe.fromNullable(t.extractFieldByLength(t.getUnparsedRemainingLength()))]).map(r=>{const c=r[0],s=r[1],y=r[2],p=r[3],l=new d.KeypairFromBytes(e).ecdh(c).slice(1),A=n.CryptoUtils.hmac(new Uint8Array,l),K=new Uint8Array([...p,...y]);return n.CryptoUtils.decrypt(A,s,K)})}}0&&(module.exports={DefaultLedgerKeyringProtocol});
|
|
2
2
|
//# sourceMappingURL=DefaultLedgerKeyringProtocol.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/internal/DefaultLedgerKeyringProtocol.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["DefaultLedgerKeyringProtocol_exports", "__export", "DefaultLedgerKeyringProtocol", "__toCommonJS", "import_di", "import_useCasesTypes", "dmk", "applicationId", "
|
|
4
|
+
"sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\nimport {\n ByteArrayBuilder,\n ByteArrayParser,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Container } from \"inversify\";\nimport { Maybe, Nothing } from \"purify-ts\";\n\nimport { type AuthenticateDAReturnType } from \"@api/app-binder/AuthenticateDeviceActionTypes\";\nimport { KeypairFromBytes } from \"@api/app-binder/KeypairFromBytes\";\nimport {\n type JWT,\n type Keypair,\n type Permissions,\n} from \"@api/app-binder/LKRPTypes\";\nimport { type LedgerKeyringProtocol } from \"@api/LedgerKeyringProtocol\";\nimport { makeContainer } from \"@internal/di\";\nimport { AES_BLOCK_SIZE, CryptoUtils } from \"@internal/utils/crypto\";\n\nimport { type AuthenticateUseCase } from \"./use-cases/authentication/AuthenticateUseCase\";\nimport { useCasesTypes } from \"./use-cases/di/useCasesTypes\";\n\ntype DefaultLedgerKeyringProtocolConstructorArgs = {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n baseUrl: string;\n};\n\nexport class DefaultLedgerKeyringProtocol implements LedgerKeyringProtocol {\n name: string;\n private _container: Container;\n\n constructor({\n dmk,\n sessionId,\n baseUrl,\n }: DefaultLedgerKeyringProtocolConstructorArgs) {\n this.name = \"Ledger Keyring Protocol\";\n this._container = makeContainer({ dmk, sessionId, baseUrl });\n }\n\n authenticate(\n keypair: Keypair,\n applicationId: number,\n clientName: string,\n permissions: Permissions,\n trustchainId?: string,\n jwt?: JWT,\n ): AuthenticateDAReturnType {\n return this._container\n .get<AuthenticateUseCase>(useCasesTypes.AuthenticateUseCase)\n .execute(\n keypair,\n applicationId,\n clientName,\n permissions,\n trustchainId,\n jwt,\n );\n }\n\n // TODO Better return type for error management instead of exceptions\n encryptData(encryptionKey: Uint8Array, data: Uint8Array): Uint8Array {\n // TODO move implem in a use case\n\n // Derive the shared secret using ECDH with an ephemeral keypair\n const privateKey = new KeypairFromBytes(encryptionKey);\n const ephemeralKeypair = CryptoUtils.randomKeypair();\n const sharedSecret = privateKey\n .ecdh(ephemeralKeypair.pubKeyToU8a())\n .slice(1);\n\n // Key derivation using HMAC-SHA256\n const key = CryptoUtils.hmac(new Uint8Array(), sharedSecret);\n\n // Generate a random IV (nonce)\n const iv = CryptoUtils.randomBytes(16);\n\n // Encrypt data\n const ciphertext = CryptoUtils.encrypt(key, iv, data);\n const encryptedData = ciphertext.subarray(0, -AES_BLOCK_SIZE);\n const tag = ciphertext.subarray(-AES_BLOCK_SIZE);\n\n // Serialize the result\n return new ByteArrayBuilder()\n .add8BitUIntToData(0) // Version of the format\n .addBufferToData(ephemeralKeypair.pubKeyToU8a())\n .addBufferToData(iv)\n .addBufferToData(tag)\n .addBufferToData(encryptedData)\n .build();\n }\n\n decryptData(encryptionKey: Uint8Array, data: Uint8Array): Maybe<Uint8Array> {\n // TODO move implem in a use case\n\n const parser = new ByteArrayParser(data);\n if (parser.extract8BitUInt() !== 0) {\n // Unsupported serialization version\n return Nothing;\n }\n return Maybe.sequence([\n Maybe.fromNullable(parser.extractFieldByLength(33)),\n Maybe.fromNullable(parser.extractFieldByLength(16)),\n Maybe.fromNullable(parser.extractFieldByLength(16)),\n Maybe.fromNullable(\n parser.extractFieldByLength(parser.getUnparsedRemainingLength()),\n ),\n ]).map((parsed) => {\n const ephemeralPublicKey = parsed[0]!;\n const iv = parsed[1]!;\n const tag = parsed[2]!;\n const encryptedData = parsed[3]!;\n\n // Derive the shared secret using ECDH with an ephemeral keypair\n const privateKey = new KeypairFromBytes(encryptionKey);\n const sharedSecret = privateKey.ecdh(ephemeralPublicKey).slice(1);\n\n // Key derivation using HMAC-SHA256\n const key = CryptoUtils.hmac(new Uint8Array(), sharedSecret);\n\n // Decrypt the data\n const ciphertext = new Uint8Array([...encryptedData, ...tag]);\n const cleartext = CryptoUtils.decrypt(key, iv, ciphertext);\n return cleartext;\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,IAAA,eAAAC,EAAAH,GAIA,IAAAI,EAGO,2CAEPC,EAA+B,qBAG/BC,EAAiC,4CAOjCC,EAA8B,wBAC9BC,EAA4C,kCAG5CC,EAA8B,wCAQvB,MAAMP,CAA8D,CACzE,KACQ,WAER,YAAY,CACV,IAAAQ,EACA,UAAAC,EACA,QAAAC,CACF,EAAgD,CAC9C,KAAK,KAAO,0BACZ,KAAK,cAAa,iBAAc,CAAE,IAAAF,EAAK,UAAAC,EAAW,QAAAC,CAAQ,CAAC,CAC7D,CAEA,aACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EAC0B,CAC1B,OAAO,KAAK,WACT,IAAyB,gBAAc,mBAAmB,EAC1D,QACCL,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,CACJ,CAGA,YAAYC,EAA2BC,EAA8B,CAInE,MAAMC,EAAa,IAAI,mBAAiBF,CAAa,EAC/CG,EAAmB,cAAY,cAAc,EAC7CC,EAAeF,EAClB,KAAKC,EAAiB,YAAY,CAAC,EACnC,MAAM,CAAC,EAGJE,EAAM,cAAY,KAAK,IAAI,WAAcD,CAAY,EAGrDE,EAAK,cAAY,YAAY,EAAE,EAG/BC,EAAa,cAAY,QAAQF,EAAKC,EAAIL,CAAI,EAC9CO,EAAgBD,EAAW,SAAS,EAAG,CAAC,gBAAc,EACtDE,EAAMF,EAAW,SAAS,CAAC,gBAAc,EAG/C,OAAO,IAAI,mBAAiB,EACzB,kBAAkB,CAAC,EACnB,gBAAgBJ,EAAiB,YAAY,CAAC,EAC9C,gBAAgBG,CAAE,EAClB,gBAAgBG,CAAG,EACnB,gBAAgBD,CAAa,EAC7B,MAAM,CACX,CAEA,YAAYR,EAA2BC,EAAqC,CAG1E,MAAMS,EAAS,IAAI,kBAAgBT,CAAI,EACvC,OAAIS,EAAO,gBAAgB,IAAM,EAExB,UAEF,QAAM,SAAS,CACpB,QAAM,aAAaA,EAAO,qBAAqB,EAAE,CAAC,EAClD,QAAM,aAAaA,EAAO,qBAAqB,EAAE,CAAC,EAClD,QAAM,aAAaA,EAAO,qBAAqB,EAAE,CAAC,EAClD,QAAM,aACJA,EAAO,qBAAqBA,EAAO,2BAA2B,CAAC,CACjE,CACF,CAAC,EAAE,IAAKC,GAAW,CACjB,MAAMC,EAAqBD,EAAO,CAAC,EAC7BL,EAAKK,EAAO,CAAC,EACbF,EAAME,EAAO,CAAC,EACdH,EAAgBG,EAAO,CAAC,EAIxBP,EADa,IAAI,mBAAiBJ,CAAa,EACrB,KAAKY,CAAkB,EAAE,MAAM,CAAC,EAG1DP,EAAM,cAAY,KAAK,IAAI,WAAcD,CAAY,EAGrDG,EAAa,IAAI,WAAW,CAAC,GAAGC,EAAe,GAAGC,CAAG,CAAC,EAE5D,OADkB,cAAY,QAAQJ,EAAKC,EAAIC,CAAU,CAE3D,CAAC,CACH,CACF",
|
|
6
|
+
"names": ["DefaultLedgerKeyringProtocol_exports", "__export", "DefaultLedgerKeyringProtocol", "__toCommonJS", "import_device_management_kit", "import_purify_ts", "import_KeypairFromBytes", "import_di", "import_crypto", "import_useCasesTypes", "dmk", "sessionId", "baseUrl", "keypair", "applicationId", "clientName", "permissions", "trustchainId", "jwt", "encryptionKey", "data", "privateKey", "ephemeralKeypair", "sharedSecret", "key", "iv", "ciphertext", "encryptedData", "tag", "parser", "parsed", "ephemeralPublicKey"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var i in e)s(t,i,{get:e[i],enumerable:!0})},v=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of A(e))!I.call(t,n)&&n!==i&&s(t,n,{get:()=>e[n],enumerable:!(r=l(e,n))||r.enumerable});return t};var S=t=>v(s({},"__esModule",{value:!0}),t),w=(t,e,i,r)=>{for(var n=r>1?void 0:r?l(e,i):e,c=t.length-1,u;c>=0;c--)(u=t[c])&&(n=(r?u(e,i,n):u(n))||n);return r&&n&&s(e,i,n),n},m=(t,e)=>(i,r)=>e(i,r,t);var N={};y(N,{LedgerKeyringProtocolBinder:()=>p});module.exports=S(N);var a=require("@ledgerhq/device-management-kit"),o=require("inversify"),d=require("../externalTypes"),k=require("../lkrp-datasource/di/lkrpDatasourceTypes"),D=require("./command/GetVersionCommand"),h=require("./device-action/AuthenticateDeviceAction");let p=class{constructor(e,i,r){this.dmk=e;this.sessionId=i;this.lkrpDataSource=r}authenticate(e){return this.dmk.executeDeviceAction({sessionId:this.sessionId,deviceAction:new h.AuthenticateDeviceAction({input:{lkrpDataSource:this.lkrpDataSource,applicationId:e.applicationId,clientName:e.clientName,permissions:e.permissions,keypair:e.keypair,trustchainId:e.trustchainId??null,jwt:e.jwt??null}})})}getVersion(e){return this.dmk.executeDeviceAction({sessionId:this.sessionId,deviceAction:new a.SendCommandInAppDeviceAction({input:{command:new D.GetVersionCommand,appName:"Ledger Sync",requiredUserInteraction:a.UserInteractionRequired.None,skipOpenApp:e.skipOpenApp}})})}getAppName(){throw new Error("Not implemented")}getSeedId(){throw new Error("Not implemented")}init(){throw new Error("Not implemented")}parseStream(){throw new Error("Not implemented")}signBlock(){throw new Error("Not implemented")}setTrustedMember(){throw new Error("Not implemented")}};p=w([(0,o.injectable)(),m(0,(0,o.inject)(d.externalTypes.Dmk)),m(1,(0,o.inject)(d.externalTypes.SessionId)),m(2,(0,o.inject)(k.lkrpDatasourceTypes.LKRPDataSource))],p);0&&(module.exports={LedgerKeyringProtocolBinder});
|
|
2
2
|
//# sourceMappingURL=LedgerKeyringProtocolBinder.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/internal/app-binder/LedgerKeyringProtocolBinder.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n DeviceManagementKit,\n type DeviceSessionId,\n SendCommandInAppDeviceAction,\n UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\nimport { inject, injectable } from \"inversify\";\n\nimport { AuthenticateDAReturnType } from \"@api/app-binder/AuthenticateDeviceActionTypes\";\nimport { GetVersionDAReturnType } from \"@api/app-binder/GetVersionDeviceActionTypes\";\nimport {
|
|
5
|
-
"mappings": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAKO,2CACPC,EAAmC,
|
|
6
|
-
"names": ["LedgerKeyringProtocolBinder_exports", "__export", "LedgerKeyringProtocolBinder", "__toCommonJS", "import_device_management_kit", "import_inversify", "import_externalTypes", "import_lkrpDatasourceTypes", "import_GetVersionCommand", "
|
|
4
|
+
"sourcesContent": ["import {\n DeviceManagementKit,\n type DeviceSessionId,\n SendCommandInAppDeviceAction,\n UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\nimport { inject, injectable } from \"inversify\";\n\nimport { AuthenticateDAReturnType } from \"@api/app-binder/AuthenticateDeviceActionTypes\";\nimport { GetVersionDAReturnType } from \"@api/app-binder/GetVersionDeviceActionTypes\";\nimport { JWT, Keypair, Permissions } from \"@api/app-binder/LKRPTypes\";\nimport { externalTypes } from \"@internal/externalTypes\";\nimport { type LKRPDataSource } from \"@internal/lkrp-datasource/data/LKRPDataSource\";\nimport { lkrpDatasourceTypes } from \"@internal/lkrp-datasource/di/lkrpDatasourceTypes\";\n\nimport { GetVersionCommand } from \"./command/GetVersionCommand\";\nimport { AuthenticateDeviceAction } from \"./device-action/AuthenticateDeviceAction\";\n\n@injectable()\nexport class LedgerKeyringProtocolBinder {\n constructor(\n @inject(externalTypes.Dmk) private readonly dmk: DeviceManagementKit,\n\n @inject(externalTypes.SessionId)\n private readonly sessionId: DeviceSessionId,\n\n @inject(lkrpDatasourceTypes.LKRPDataSource)\n private readonly lkrpDataSource: LKRPDataSource,\n ) {}\n\n authenticate(args: {\n keypair: Keypair;\n applicationId: number;\n clientName: string;\n permissions: Permissions;\n trustchainId?: string;\n jwt?: JWT;\n }): AuthenticateDAReturnType {\n return this.dmk.executeDeviceAction({\n sessionId: this.sessionId,\n deviceAction: new AuthenticateDeviceAction({\n input: {\n lkrpDataSource: this.lkrpDataSource,\n applicationId: args.applicationId,\n clientName: args.clientName,\n permissions: args.permissions,\n keypair: args.keypair,\n trustchainId: args.trustchainId ?? null,\n jwt: args.jwt ?? null,\n },\n }),\n });\n }\n\n getVersion(args: { skipOpenApp: boolean }): GetVersionDAReturnType {\n return this.dmk.executeDeviceAction({\n sessionId: this.sessionId,\n deviceAction: new SendCommandInAppDeviceAction({\n input: {\n command: new GetVersionCommand(),\n appName: \"Ledger Sync\",\n requiredUserInteraction: UserInteractionRequired.None,\n skipOpenApp: args.skipOpenApp,\n },\n }),\n });\n }\n\n getAppName(): unknown {\n throw new Error(\"Not implemented\");\n }\n\n getSeedId(): unknown {\n throw new Error(\"Not implemented\");\n }\n\n init(): unknown {\n throw new Error(\"Not implemented\");\n }\n\n parseStream(): unknown {\n throw new Error(\"Not implemented\");\n }\n\n signBlock(): unknown {\n throw new Error(\"Not implemented\");\n }\n\n setTrustedMember(): unknown {\n throw new Error(\"Not implemented\");\n }\n}\n"],
|
|
5
|
+
"mappings": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAKO,2CACPC,EAAmC,qBAKnCC,EAA8B,mCAE9BC,EAAoC,4DAEpCC,EAAkC,uCAClCC,EAAyC,oDAGlC,IAAMC,EAAN,KAAkC,CACvC,YAC8CC,EAG3BC,EAGAC,EACjB,CAP4C,SAAAF,EAG3B,eAAAC,EAGA,oBAAAC,CAChB,CAEH,aAAaC,EAOgB,CAC3B,OAAO,KAAK,IAAI,oBAAoB,CAClC,UAAW,KAAK,UAChB,aAAc,IAAI,2BAAyB,CACzC,MAAO,CACL,eAAgB,KAAK,eACrB,cAAeA,EAAK,cACpB,WAAYA,EAAK,WACjB,YAAaA,EAAK,YAClB,QAASA,EAAK,QACd,aAAcA,EAAK,cAAgB,KACnC,IAAKA,EAAK,KAAO,IACnB,CACF,CAAC,CACH,CAAC,CACH,CAEA,WAAWA,EAAwD,CACjE,OAAO,KAAK,IAAI,oBAAoB,CAClC,UAAW,KAAK,UAChB,aAAc,IAAI,+BAA6B,CAC7C,MAAO,CACL,QAAS,IAAI,oBACb,QAAS,cACT,wBAAyB,0BAAwB,KACjD,YAAaA,EAAK,WACpB,CACF,CAAC,CACH,CAAC,CACH,CAEA,YAAsB,CACpB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,WAAqB,CACnB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,MAAgB,CACd,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,aAAuB,CACrB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,WAAqB,CACnB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,kBAA4B,CAC1B,MAAM,IAAI,MAAM,iBAAiB,CACnC,CACF,EAxEaJ,EAANK,EAAA,IADN,cAAW,EAGPC,EAAA,eAAO,gBAAc,GAAG,GAExBA,EAAA,eAAO,gBAAc,SAAS,GAG9BA,EAAA,eAAO,sBAAoB,cAAc,IAPjCN",
|
|
6
|
+
"names": ["LedgerKeyringProtocolBinder_exports", "__export", "LedgerKeyringProtocolBinder", "__toCommonJS", "import_device_management_kit", "import_inversify", "import_externalTypes", "import_lkrpDatasourceTypes", "import_GetVersionCommand", "import_AuthenticateDeviceAction", "LedgerKeyringProtocolBinder", "dmk", "sessionId", "lkrpDataSource", "args", "__decorateClass", "__decorateParam"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var A=(o,e)=>{for(var p in e)a(o,p,{get:e[p],enumerable:!0})},g=(o,e,p,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of l(e))!u.call(o,m)&&m!==p&&a(o,m,{get:()=>e[m],enumerable:!(t=i(e,m))||t.enumerable});return o};var y=o=>g(a({},"__esModule",{value:!0}),o);var c={};A(c,{GetAppNameCommand:()=>C});module.exports=y(c);var r=require("@ledgerhq/device-management-kit"),d=require("@ledgerhq/signer-utils"),s=require("purify-ts"),n=require("./utils/ledgerKeyringProtocolErrors");class C{errorHelper=new d.CommandErrorHelper(n.LEDGER_SYNC_ERRORS,n.LedgerKeyringProtocolErrorFactory);getApdu(){const e={cla:224,ins:3,p1:0,p2:0};return new r.ApduBuilder(e).build()}parseResponse(e){return s.Maybe.fromNullable(this.errorHelper.getError(e)).orDefaultLazy(()=>{const t=new r.ApduParser(e).encodeToString(e.data);return t?(0,r.CommandResultFactory)({data:{name:t}}):(0,r.CommandResultFactory)({error:new r.InvalidStatusWordError("Name is missing")})})}}0&&(module.exports={GetAppNameCommand});
|
|
2
2
|
//# sourceMappingURL=GetAppNameCommand.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/internal/app-binder/command/GetAppNameCommand.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n type Apdu,\n ApduBuilder,\n type ApduBuilderArgs,\n ApduParser,\n type ApduResponse,\n type Command,\n type CommandResult,\n CommandResultFactory,\n InvalidStatusWordError,\n} from \"@ledgerhq/device-management-kit\";\nimport { CommandErrorHelper } from \"@ledgerhq/signer-utils\";\nimport { Maybe } from \"purify-ts\";\n\nimport {\n
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAUO,2CACPC,EAAmC,kCACnCC,EAAsB,
|
|
4
|
+
"sourcesContent": ["import {\n type Apdu,\n ApduBuilder,\n type ApduBuilderArgs,\n ApduParser,\n type ApduResponse,\n type Command,\n type CommandResult,\n CommandResultFactory,\n InvalidStatusWordError,\n} from \"@ledgerhq/device-management-kit\";\nimport { CommandErrorHelper } from \"@ledgerhq/signer-utils\";\nimport { Maybe } from \"purify-ts\";\n\nimport {\n type GetAppNameCommandArgs,\n type GetAppNameCommandResponse,\n} from \"@api/app-binder/GetAppNameCommandTypes\";\n\nimport {\n LEDGER_SYNC_ERRORS,\n type LedgerKeyringProtocolErrorCodes,\n LedgerKeyringProtocolErrorFactory,\n} from \"./utils/ledgerKeyringProtocolErrors\";\n\nexport class GetAppNameCommand\n implements\n Command<\n GetAppNameCommandResponse,\n GetAppNameCommandArgs,\n LedgerKeyringProtocolErrorCodes\n >\n{\n private readonly errorHelper = new CommandErrorHelper<\n GetAppNameCommandResponse,\n LedgerKeyringProtocolErrorCodes\n >(LEDGER_SYNC_ERRORS, LedgerKeyringProtocolErrorFactory);\n\n getApdu(): Apdu {\n const getAppNameArgs: ApduBuilderArgs = {\n cla: 0xe0,\n ins: 0x03,\n p1: 0x00,\n p2: 0x00,\n };\n\n const builder = new ApduBuilder(getAppNameArgs);\n return builder.build();\n }\n\n parseResponse(\n apduResponse: ApduResponse,\n ): CommandResult<GetAppNameCommandResponse, LedgerKeyringProtocolErrorCodes> {\n return Maybe.fromNullable(\n this.errorHelper.getError(apduResponse),\n ).orDefaultLazy(() => {\n const parser = new ApduParser(apduResponse);\n\n const name = parser.encodeToString(apduResponse.data);\n\n if (!name) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(`Name is missing`),\n });\n }\n\n return CommandResultFactory({\n data: { name },\n });\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAUO,2CACPC,EAAmC,kCACnCC,EAAsB,qBAOtBC,EAIO,+CAEA,MAAML,CAOb,CACmB,YAAc,IAAI,qBAGjC,qBAAoB,mCAAiC,EAEvD,SAAgB,CACd,MAAMM,EAAkC,CACtC,IAAK,IACL,IAAK,EACL,GAAI,EACJ,GAAI,CACN,EAGA,OADgB,IAAI,cAAYA,CAAc,EAC/B,MAAM,CACvB,CAEA,cACEC,EAC2E,CAC3E,OAAO,QAAM,aACX,KAAK,YAAY,SAASA,CAAY,CACxC,EAAE,cAAc,IAAM,CAGpB,MAAMC,EAFS,IAAI,aAAWD,CAAY,EAEtB,eAAeA,EAAa,IAAI,EAEpD,OAAKC,KAME,wBAAqB,CAC1B,KAAM,CAAE,KAAAA,CAAK,CACf,CAAC,KAPQ,wBAAqB,CAC1B,MAAO,IAAI,yBAAuB,iBAAiB,CACrD,CAAC,CAML,CAAC,CACH,CACF",
|
|
6
6
|
"names": ["GetAppNameCommand_exports", "__export", "GetAppNameCommand", "__toCommonJS", "import_device_management_kit", "import_signer_utils", "import_purify_ts", "import_ledgerKeyringProtocolErrors", "getAppNameArgs", "apduResponse", "name"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var A=(s,i)=>{for(var t in i)a(s,t,{get:i[t],enumerable:!0})},h=(s,i,t,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let e of u(i))!y.call(s,e)&&e!==t&&a(s,e,{get:()=>i[e],enumerable:!(r=p(i,e))||r.enumerable});return s};var I=s=>h(a({},"__esModule",{value:!0}),s);var C={};A(C,{GetSeedIdCommand:()=>x});module.exports=I(C);var n=require("@ledgerhq/device-management-kit"),l=require("@ledgerhq/signer-utils"),g=require("purify-ts"),o=require("../../utils/eitherSeqRecord"),d=require("../../utils/hex"),m=require("./utils/ledgerKeyringProtocolErrors");class x{constructor(i){this.args=i}errorHelper=new l.CommandErrorHelper(m.LEDGER_SYNC_ERRORS,m.LedgerKeyringProtocolErrorFactory);getApdu(){const{challengeTLV:i}=this.args,t={cla:224,ins:5,p1:0,p2:0};return new n.ApduBuilder(t).addHexaStringToData(i).build()}parseResponse(i){return g.Maybe.fromNullable(this.errorHelper.getError(i)).orDefaultLazy(()=>{const t=new n.ApduParser(i),r=(e,c)=>g.Maybe.fromNullable(e).toEither(new n.InvalidStatusWordError(c));return(0,o.eitherSeqRecord)({credential:()=>(0,o.eitherSeqRecord)({version:()=>r(t.extract8BitUInt(),"Version is missing"),curveId:()=>r(t.extract8BitUInt(),"Curve ID is missing"),signAlgorithm:()=>r(t.extract8BitUInt(),"Sign algorithm is missing"),publicKey:()=>r(t.extract8BitUInt(),"Public key length is missing").chain(e=>r(t.extractFieldByLength(e),"Public key is missing")).map(d.bytesToHex)}),signature:()=>r(t.extract8BitUInt(),"Signature length is missing").chain(e=>r(t.extractFieldByLength(e),"Signature is missing")).map(d.bytesToHex),attestation:()=>(0,o.eitherSeqRecord)({id:()=>r(t.extractFieldByLength(1),"Attestation Id is missing"),version:()=>r(t.extract8BitUInt(),"Attestation version is missing"),curveId:()=>r(t.extract8BitUInt(),"Attestation curve ID is missing"),signAlgorithm:()=>r(t.extract8BitUInt(),"Attestation sign algorithm is missing"),publicKey:()=>r(t.extract8BitUInt(),"Attestation key length is missing").chain(e=>r(t.extractFieldByLength(e),"Attestation key is missing")),signature:()=>r(t.extract8BitUInt(),"Attestation signature length is missing").chain(e=>r(t.extractFieldByLength(e),"Attestation signature is missing"))}).map(e=>(0,d.bytesToHex)(Uint8Array.from([...e.id,e.version,e.curveId,e.signAlgorithm,e.publicKey.length,...e.publicKey,e.signature.length,...e.signature])))}).caseOf({Left:e=>(0,n.CommandResultFactory)({error:e}),Right:e=>(0,n.CommandResultFactory)({data:e})})})}}0&&(module.exports={GetSeedIdCommand});
|
|
2
2
|
//# sourceMappingURL=GetSeedIdCommand.js.map
|