@ledgerhq/device-trusted-app-kit-ledger-keyring-protocol 0.0.0-web-ble-29-08---20250829104351 → 0.0.0-wrong-error-when-in-experimental-provider-20251021161219
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.map +2 -2
- package/lib/cjs/api/app-binder/AuthenticateDeviceActionTypes.js.map +1 -1
- 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/crypto/CryptoService.js +2 -0
- package/lib/cjs/api/crypto/CryptoService.js.map +7 -0
- package/lib/cjs/api/crypto/Key.js +2 -0
- package/lib/cjs/api/crypto/Key.js.map +7 -0
- package/lib/cjs/api/crypto/KeyPair.js +2 -0
- package/lib/cjs/api/crypto/KeyPair.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.test.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleCryptoService.test.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKey.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKey.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKey.test.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKey.test.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.js.map +7 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.test.js +2 -0
- package/lib/cjs/api/crypto/noble/NobleKeyPair.test.js.map +7 -0
- package/lib/cjs/api/index.js +1 -1
- package/lib/cjs/api/index.js.map +2 -2
- package/lib/cjs/api/model/Env.js +2 -0
- package/lib/cjs/api/model/Env.js.map +7 -0
- package/lib/cjs/api/{app-binder → model}/Errors.js.map +1 -1
- package/lib/cjs/api/model/JWT.js +2 -0
- package/lib/cjs/api/model/JWT.js.map +7 -0
- package/lib/cjs/api/model/Permissions.js +2 -0
- package/lib/cjs/api/model/Permissions.js.map +7 -0
- package/lib/cjs/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 +2 -2
- 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 +2 -2
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js.map +2 -2
- 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/AuthenticateWithDeviceDeviceAction.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js.map +2 -2
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js.map +2 -2
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.js.map +1 -1
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.js.map +1 -1
- package/lib/cjs/internal/app-binder/task/ExtractEncryptionKeyTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/ExtractEncryptionKeyTask.js.map +3 -3
- 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 +2 -2
- 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 +2 -2
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +1 -1
- package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +2 -2
- 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 +2 -2
- package/lib/cjs/internal/use-cases/authentication/DecryptDataUseCase.js +1 -1
- package/lib/cjs/internal/use-cases/authentication/DecryptDataUseCase.js.map +3 -3
- package/lib/cjs/internal/use-cases/authentication/EncryptDataUseCase.js +1 -1
- package/lib/cjs/internal/use-cases/authentication/EncryptDataUseCase.js.map +3 -3
- 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 +2 -2
- 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 +2 -2
- package/lib/cjs/internal/utils/LKRPCommand.test.js.map +3 -3
- 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 +2 -2
- package/lib/cjs/internal/utils/required.js +1 -1
- package/lib/cjs/internal/utils/required.js.map +2 -2
- package/lib/cjs/package.json +2 -2
- 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.map +2 -2
- package/lib/esm/api/app-binder/AuthenticateDeviceActionTypes.js.map +1 -1
- package/lib/esm/api/crypto/CryptoService.js +2 -0
- package/lib/esm/api/crypto/CryptoService.js.map +7 -0
- package/lib/esm/api/crypto/Key.js +2 -0
- package/lib/esm/api/crypto/Key.js.map +7 -0
- package/lib/esm/api/crypto/KeyPair.js +2 -0
- package/lib/esm/api/crypto/KeyPair.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.js +2 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.test.js +2 -0
- package/lib/esm/api/crypto/noble/NobleCryptoService.test.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKey.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKey.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKey.test.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKey.test.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.js.map +7 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.test.js +2 -0
- package/lib/esm/api/crypto/noble/NobleKeyPair.test.js.map +7 -0
- package/lib/esm/api/index.js +1 -1
- package/lib/esm/api/index.js.map +2 -2
- package/lib/esm/api/model/Env.js +2 -0
- package/lib/esm/api/model/Env.js.map +7 -0
- package/lib/esm/api/{app-binder → model}/Errors.js.map +1 -1
- package/lib/esm/api/model/JWT.js +1 -0
- package/lib/esm/api/model/Permissions.js +2 -0
- package/lib/esm/api/model/Permissions.js.map +7 -0
- 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 +2 -2
- package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js.map +2 -2
- 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/AuthenticateWithDeviceDeviceAction.js +1 -1
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.js.map +2 -2
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js +1 -1
- package/lib/esm/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.js.map +2 -2
- package/lib/esm/internal/app-binder/task/ExtractEncryptionKeyTask.js +1 -1
- package/lib/esm/internal/app-binder/task/ExtractEncryptionKeyTask.js.map +3 -3
- 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 +2 -2
- 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 +2 -2
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +1 -1
- package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +2 -2
- package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js +1 -1
- package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js.map +2 -2
- package/lib/esm/internal/use-cases/authentication/DecryptDataUseCase.js +1 -1
- package/lib/esm/internal/use-cases/authentication/DecryptDataUseCase.js.map +3 -3
- package/lib/esm/internal/use-cases/authentication/EncryptDataUseCase.js +1 -1
- package/lib/esm/internal/use-cases/authentication/EncryptDataUseCase.js.map +3 -3
- 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 +1 -1
- 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 +2 -2
- package/lib/esm/internal/utils/LKRPCommand.test.js.map +3 -3
- 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 +2 -2
- package/lib/esm/internal/utils/required.js +1 -1
- package/lib/esm/internal/utils/required.js.map +2 -2
- package/lib/esm/package.json +2 -2
- package/lib/types/api/LedgerKeyringProtocol.d.ts +2 -2
- package/lib/types/api/LedgerKeyringProtocol.d.ts.map +1 -1
- package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts +4 -1
- package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts.map +1 -1
- package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts +8 -4
- package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts +2 -2
- package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts +0 -1
- package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts.map +1 -1
- package/lib/types/api/crypto/CryptoService.d.ts +22 -0
- package/lib/types/api/crypto/CryptoService.d.ts.map +1 -0
- package/lib/types/api/crypto/Key.d.ts +7 -0
- package/lib/types/api/crypto/Key.d.ts.map +1 -0
- package/lib/types/api/crypto/KeyPair.d.ts +13 -0
- package/lib/types/api/crypto/KeyPair.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.d.ts +13 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.test.d.ts +2 -0
- package/lib/types/api/crypto/noble/NobleCryptoService.test.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKey.d.ts +11 -0
- package/lib/types/api/crypto/noble/NobleKey.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKey.test.d.ts +2 -0
- package/lib/types/api/crypto/noble/NobleKey.test.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.d.ts +18 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.d.ts.map +1 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.test.d.ts +2 -0
- package/lib/types/api/crypto/noble/NobleKeyPair.test.d.ts.map +1 -0
- package/lib/types/api/index.d.ts +10 -2
- package/lib/types/api/index.d.ts.map +1 -1
- package/lib/types/api/model/Env.d.ts +5 -0
- package/lib/types/api/model/Env.d.ts.map +1 -0
- package/lib/types/api/model/Errors.d.ts.map +1 -0
- package/lib/types/api/model/JWT.d.ts +9 -0
- package/lib/types/api/model/JWT.d.ts.map +1 -0
- package/lib/types/api/{app-binder/LKRPTypes.d.ts → model/Permissions.d.ts} +1 -19
- package/lib/types/api/model/Permissions.d.ts.map +1 -0
- package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts +6 -4
- package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts.map +1 -1
- package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts +7 -4
- package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts +4 -1
- package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts +13 -1
- package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts +2 -1
- package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/InitCommand.d.ts +4 -1
- package/lib/types/internal/app-binder/command/InitCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts +4 -1
- package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts +5 -1
- package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts +4 -1
- package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts +5 -1
- package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts +5 -1
- package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts +5 -1
- package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts +4 -1
- package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts +8 -4
- package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.d.ts +5 -2
- package/lib/types/internal/app-binder/device-action/AuthenticateWithDeviceDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.d.ts +5 -2
- package/lib/types/internal/app-binder/device-action/AuthenticateWithKeypairDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.d.ts +5 -2
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithDeviceDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.d.ts +5 -2
- package/lib/types/internal/app-binder/device-action/models/AuthenticateWithKeypairDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/ExtractEncryptionKeyTask.d.ts +4 -7
- package/lib/types/internal/app-binder/task/ExtractEncryptionKeyTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/InitTask.d.ts +5 -3
- package/lib/types/internal/app-binder/task/InitTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts +1 -1
- package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SignBlockTask.d.ts +11 -8
- package/lib/types/internal/app-binder/task/SignBlockTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts +5 -3
- package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts +1 -1
- package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts.map +1 -1
- package/lib/types/internal/di.d.ts +3 -1
- package/lib/types/internal/di.d.ts.map +1 -1
- package/lib/types/internal/externalTypes.d.ts +1 -0
- package/lib/types/internal/externalTypes.d.ts.map +1 -1
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts +2 -2
- package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts.map +1 -1
- package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts +2 -2
- package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts.map +1 -1
- package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts +3 -2
- package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts.map +1 -1
- package/lib/types/internal/use-cases/authentication/DecryptDataUseCase.d.ts +4 -1
- package/lib/types/internal/use-cases/authentication/DecryptDataUseCase.d.ts.map +1 -1
- package/lib/types/internal/use-cases/authentication/EncryptDataUseCase.d.ts +4 -1
- package/lib/types/internal/use-cases/authentication/EncryptDataUseCase.d.ts.map +1 -1
- package/lib/types/internal/utils/LKRPBlock.d.ts +1 -1
- package/lib/types/internal/utils/LKRPBlock.d.ts.map +1 -1
- package/lib/types/internal/utils/LKRPBlockStream.d.ts +4 -3
- package/lib/types/internal/utils/LKRPBlockStream.d.ts.map +1 -1
- package/lib/types/internal/utils/LKRPCommand.d.ts +1 -1
- package/lib/types/internal/utils/LKRPCommand.d.ts.map +1 -1
- package/lib/types/internal/utils/TLVParser.d.ts +1 -1
- package/lib/types/internal/utils/TLVParser.d.ts.map +1 -1
- package/lib/types/internal/utils/required.d.ts +1 -1
- package/lib/types/internal/utils/required.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/lib/cjs/api/app-binder/GetAppNameCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/GetAppNameCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/GetSeedIdCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/GetSeedIdCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/InitCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/InitCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/KeypairFromBytes.js +0 -2
- package/lib/cjs/api/app-binder/KeypairFromBytes.js.map +0 -7
- package/lib/cjs/api/app-binder/LKRPTypes.js +0 -2
- package/lib/cjs/api/app-binder/LKRPTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/ParseStreamBlockCommandCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/ParseStreamBlockCommandCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/ParseStreamBlockHeaderCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/ParseStreamBlockHeaderCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/ParseStreamBlockSignatureTypes.js +0 -2
- package/lib/cjs/api/app-binder/ParseStreamBlockSignatureTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/SetTrustedMemberTypes.js +0 -2
- package/lib/cjs/api/app-binder/SetTrustedMemberTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/SignBlockCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/SignBlockCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/SignBlockHeaderCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/SignBlockHeaderCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/SignBlockSignatureCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/SignBlockSignatureCommandTypes.js.map +0 -7
- package/lib/cjs/api/app-binder/SignBlockSingleCommandTypes.js +0 -2
- package/lib/cjs/api/app-binder/SignBlockSingleCommandTypes.js.map +0 -7
- package/lib/cjs/internal/utils/TLVBuilder.js +0 -2
- package/lib/cjs/internal/utils/TLVBuilder.js.map +0 -7
- package/lib/cjs/internal/utils/crypto.js +0 -2
- package/lib/cjs/internal/utils/crypto.js.map +0 -7
- package/lib/cjs/internal/utils/hex.js +0 -2
- package/lib/cjs/internal/utils/hex.js.map +0 -7
- package/lib/esm/api/app-binder/GetAppNameCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/GetSeedIdCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/GetSeedIdCommandTypes.js.map +0 -7
- package/lib/esm/api/app-binder/InitCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/InitCommandTypes.js.map +0 -7
- package/lib/esm/api/app-binder/KeypairFromBytes.js +0 -2
- package/lib/esm/api/app-binder/KeypairFromBytes.js.map +0 -7
- package/lib/esm/api/app-binder/LKRPTypes.js +0 -2
- package/lib/esm/api/app-binder/LKRPTypes.js.map +0 -7
- package/lib/esm/api/app-binder/ParseStreamBlockCommandCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/ParseStreamBlockCommandCommandTypes.js.map +0 -7
- package/lib/esm/api/app-binder/ParseStreamBlockHeaderCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/ParseStreamBlockHeaderCommandTypes.js.map +0 -7
- package/lib/esm/api/app-binder/ParseStreamBlockSignatureTypes.js +0 -1
- package/lib/esm/api/app-binder/ParseStreamBlockSignatureTypes.js.map +0 -7
- package/lib/esm/api/app-binder/SetTrustedMemberTypes.js +0 -1
- package/lib/esm/api/app-binder/SetTrustedMemberTypes.js.map +0 -7
- package/lib/esm/api/app-binder/SignBlockCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/SignBlockCommandTypes.js.map +0 -7
- package/lib/esm/api/app-binder/SignBlockHeaderCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/SignBlockHeaderCommandTypes.js.map +0 -7
- package/lib/esm/api/app-binder/SignBlockSignatureCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/SignBlockSignatureCommandTypes.js.map +0 -7
- package/lib/esm/api/app-binder/SignBlockSingleCommandTypes.js +0 -1
- package/lib/esm/api/app-binder/SignBlockSingleCommandTypes.js.map +0 -7
- package/lib/esm/internal/utils/TLVBuilder.js +0 -2
- package/lib/esm/internal/utils/TLVBuilder.js.map +0 -7
- package/lib/esm/internal/utils/crypto.js +0 -2
- package/lib/esm/internal/utils/crypto.js.map +0 -7
- package/lib/esm/internal/utils/hex.js +0 -2
- package/lib/esm/internal/utils/hex.js.map +0 -7
- package/lib/types/api/app-binder/Errors.d.ts.map +0 -1
- package/lib/types/api/app-binder/GetAppNameCommandTypes.d.ts +0 -5
- package/lib/types/api/app-binder/GetAppNameCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/GetSeedIdCommandTypes.d.ts +0 -14
- package/lib/types/api/app-binder/GetSeedIdCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/InitCommandTypes.d.ts +0 -5
- package/lib/types/api/app-binder/InitCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/KeypairFromBytes.d.ts +0 -11
- package/lib/types/api/app-binder/KeypairFromBytes.d.ts.map +0 -1
- package/lib/types/api/app-binder/LKRPTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/ParseStreamBlockCommandCommandTypes.d.ts +0 -6
- package/lib/types/api/app-binder/ParseStreamBlockCommandCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/ParseStreamBlockHeaderCommandTypes.d.ts +0 -5
- package/lib/types/api/app-binder/ParseStreamBlockHeaderCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/ParseStreamBlockSignatureTypes.d.ts +0 -5
- package/lib/types/api/app-binder/ParseStreamBlockSignatureTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/SetTrustedMemberTypes.d.ts +0 -6
- package/lib/types/api/app-binder/SetTrustedMemberTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/SignBlockCommandTypes.d.ts +0 -9
- package/lib/types/api/app-binder/SignBlockCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/SignBlockHeaderCommandTypes.d.ts +0 -6
- package/lib/types/api/app-binder/SignBlockHeaderCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/SignBlockSignatureCommandTypes.d.ts +0 -6
- package/lib/types/api/app-binder/SignBlockSignatureCommandTypes.d.ts.map +0 -1
- package/lib/types/api/app-binder/SignBlockSingleCommandTypes.d.ts +0 -5
- package/lib/types/api/app-binder/SignBlockSingleCommandTypes.d.ts.map +0 -1
- package/lib/types/internal/utils/TLVBuilder.d.ts +0 -15
- package/lib/types/internal/utils/TLVBuilder.d.ts.map +0 -1
- package/lib/types/internal/utils/crypto.d.ts +0 -19
- package/lib/types/internal/utils/crypto.d.ts.map +0 -1
- package/lib/types/internal/utils/hex.d.ts +0 -3
- package/lib/types/internal/utils/hex.d.ts.map +0 -1
- /package/lib/cjs/api/{app-binder → model}/Errors.js +0 -0
- /package/lib/esm/api/{app-binder → model}/Errors.js +0 -0
- /package/lib/esm/api/{app-binder/GetAppNameCommandTypes.js.map → model/JWT.js.map} +0 -0
- /package/lib/types/api/{app-binder → model}/Errors.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/device-trusted-app-kit-ledger-keyring-protocol",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-wrong-error-when-in-experimental-provider-20251021161219",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
@@ -20,20 +20,20 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@noble/ciphers": "^1.3.0",
|
|
23
|
+
"@noble/curves": "^1.9.7",
|
|
23
24
|
"@noble/hashes": "^1.8.0",
|
|
24
|
-
"@noble/secp256k1": "^2.3.0",
|
|
25
25
|
"inversify": "7.5.1",
|
|
26
26
|
"purify-ts": "2.1.0",
|
|
27
27
|
"reflect-metadata": "0.2.2",
|
|
28
28
|
"rxjs": "7.8.2",
|
|
29
29
|
"xstate": "5.19.2",
|
|
30
|
-
"@ledgerhq/device-management-kit": "0.0.0-
|
|
31
|
-
"@ledgerhq/signer-utils": "0.0.0-
|
|
30
|
+
"@ledgerhq/device-management-kit": "0.0.0-wrong-error-when-in-experimental-provider-20251021161219",
|
|
31
|
+
"@ledgerhq/signer-utils": "0.0.0-wrong-error-when-in-experimental-provider-20251021161219"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@ledgerhq/eslint-config-dsdk": "0.0.2",
|
|
35
|
-
"@ledgerhq/ldmk-tool": "0.0.1",
|
|
36
34
|
"@ledgerhq/prettier-config-dsdk": "0.0.2",
|
|
35
|
+
"@ledgerhq/ldmk-tool": "0.0.1",
|
|
36
|
+
"@ledgerhq/eslint-config-dsdk": "0.0.2",
|
|
37
37
|
"@ledgerhq/tsconfig-dsdk": "1.0.1",
|
|
38
38
|
"@ledgerhq/vitest-config-dmk": "0.0.0"
|
|
39
39
|
},
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var u=(a,r)=>{for(var e in r)p(a,e,{get:r[e],enumerable:!0})},x=(a,r,e,y)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of n(r))!c.call(a,t)&&t!==e&&p(a,t,{get:()=>r[t],enumerable:!(y=g(r,t))||y.enumerable});return a};var N=a=>x(p({},"__esModule",{value:!0}),a);var U={};u(U,{LKRPEnv:()=>A,Permissions:()=>f});module.exports=N(U);var A=(e=>(e.PROD="prod",e.STAGING="staging",e))(A||{}),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={LKRPEnv,Permissions});
|
|
2
|
-
//# sourceMappingURL=LKRPTypes.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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 enum LKRPEnv {\n PROD = \"prod\",\n STAGING = \"staging\",\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,aAAAE,EAAA,gBAAAC,IAAA,eAAAC,EAAAJ,GAOO,IAAKE,OACVA,EAAA,KAAO,OACPA,EAAA,QAAU,UAFAA,OAAA,IAiBAC,OACVA,IAAA,MAAQ,YAAR,QACAA,IAAA,YAAc,GAAd,cACAA,IAAA,WAAa,GAAb,aACAA,IAAA,cAAgB,GAAhB,gBAJUA,OAAA",
|
|
6
|
-
"names": ["LKRPTypes_exports", "__export", "LKRPEnv", "Permissions", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var p=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!i.call(n,r)&&r!==t&&o(n,r,{get:()=>e[r],enumerable:!(a=m(e,r))||a.enumerable});return n};var c=n=>p(o({},"__esModule",{value:!0}),n);var g={};module.exports=c(g);
|
|
2
|
-
//# sourceMappingURL=SignBlockHeaderCommandTypes.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/api/app-binder/SignBlockHeaderCommandTypes.ts"],
|
|
4
|
-
"sourcesContent": ["export interface SignBlockHeaderCommandArgs {\n parent: Uint8Array;\n commandCount: number;\n}\n\nexport type SignBlockHeaderCommandResponse = Uint8Array;\n"],
|
|
5
|
-
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
-
"names": ["SignBlockHeaderCommandTypes_exports", "__toCommonJS"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var y=(e,r)=>{for(var t in r)d(e,t,{get:r[t],enumerable:!0})},U=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of u(r))!h.call(e,a)&&a!==t&&d(e,a,{get:()=>r[a],enumerable:!(n=s(r,a))||n.enumerable});return e};var b=e=>U(d({},"__esModule",{value:!0}),e);var l={};y(l,{TLVBuilder:()=>A});module.exports=b(l);var i=require("../models/Tags");class A{items=[];addNull(){return this.add(i.GeneralTags.Null,[])}addInt(r,t){const n=new DataView(new ArrayBuffer(t));switch(t){case 1:n.setUint8(0,r);break;case 2:n.setUint16(0,r);break;case 4:n.setUint32(0,r);break}return this.add(i.GeneralTags.Int,new Uint8Array(n.buffer))}addHash(r){return this.add(i.GeneralTags.Hash,r)}addSignature(r){return this.add(i.GeneralTags.Signature,r)}addString(r){return this.add(i.GeneralTags.String,new TextEncoder().encode(r))}addBytes(r){return this.add(i.GeneralTags.Bytes,r)}addPublicKey(r){return this.add(i.GeneralTags.PublicKey,r)}build(){return new Uint8Array(this.items.flatMap(r=>[...r]))}with(r){return r(this),this}push(r){return this.items.push(r),this}add(r,t){return this.items.push(new Uint8Array([r,t.length,...t])),this}}0&&(module.exports={TLVBuilder});
|
|
2
|
-
//# sourceMappingURL=TLVBuilder.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/internal/utils/TLVBuilder.ts"],
|
|
4
|
-
"sourcesContent": ["import { GeneralTags } from \"@internal/models/Tags\";\n\nexport class TLVBuilder {\n private items: Uint8Array[] = [];\n\n addNull() {\n return this.add(GeneralTags.Null, []);\n }\n\n addInt(value: number, length: 1 | 2 | 4) {\n const view = new DataView(new ArrayBuffer(length));\n switch (length) {\n case 1:\n view.setUint8(0, value);\n break;\n case 2:\n view.setUint16(0, value);\n break;\n case 4:\n view.setUint32(0, value);\n break;\n }\n return this.add(GeneralTags.Int, new Uint8Array(view.buffer));\n }\n\n addHash(value: Uint8Array) {\n return this.add(GeneralTags.Hash, value);\n }\n\n addSignature(value: Uint8Array) {\n return this.add(GeneralTags.Signature, value);\n }\n\n addString(value: string) {\n return this.add(GeneralTags.String, new TextEncoder().encode(value));\n }\n\n addBytes(value: Uint8Array | number[]) {\n return this.add(GeneralTags.Bytes, value);\n }\n\n addPublicKey(value: Uint8Array) {\n return this.add(GeneralTags.PublicKey, value);\n }\n\n build(): Uint8Array {\n return new Uint8Array(this.items.flatMap((item) => [...item]));\n }\n\n with(fn: (builder: TLVBuilder) => void): TLVBuilder {\n fn(this);\n return this;\n }\n\n push(item: Uint8Array) {\n this.items.push(item);\n return this;\n }\n\n private add(type: number, value: Uint8Array | number[]) {\n this.items.push(new Uint8Array([type, value.length, ...value]));\n return this;\n }\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4B,iCAErB,MAAMF,CAAW,CACd,MAAsB,CAAC,EAE/B,SAAU,CACR,OAAO,KAAK,IAAI,cAAY,KAAM,CAAC,CAAC,CACtC,CAEA,OAAOG,EAAeC,EAAmB,CACvC,MAAMC,EAAO,IAAI,SAAS,IAAI,YAAYD,CAAM,CAAC,EACjD,OAAQA,EAAQ,CACd,IAAK,GACHC,EAAK,SAAS,EAAGF,CAAK,EACtB,MACF,IAAK,GACHE,EAAK,UAAU,EAAGF,CAAK,EACvB,MACF,IAAK,GACHE,EAAK,UAAU,EAAGF,CAAK,EACvB,KACJ,CACA,OAAO,KAAK,IAAI,cAAY,IAAK,IAAI,WAAWE,EAAK,MAAM,CAAC,CAC9D,CAEA,QAAQF,EAAmB,CACzB,OAAO,KAAK,IAAI,cAAY,KAAMA,CAAK,CACzC,CAEA,aAAaA,EAAmB,CAC9B,OAAO,KAAK,IAAI,cAAY,UAAWA,CAAK,CAC9C,CAEA,UAAUA,EAAe,CACvB,OAAO,KAAK,IAAI,cAAY,OAAQ,IAAI,YAAY,EAAE,OAAOA,CAAK,CAAC,CACrE,CAEA,SAASA,EAA8B,CACrC,OAAO,KAAK,IAAI,cAAY,MAAOA,CAAK,CAC1C,CAEA,aAAaA,EAAmB,CAC9B,OAAO,KAAK,IAAI,cAAY,UAAWA,CAAK,CAC9C,CAEA,OAAoB,CAClB,OAAO,IAAI,WAAW,KAAK,MAAM,QAASG,GAAS,CAAC,GAAGA,CAAI,CAAC,CAAC,CAC/D,CAEA,KAAKC,EAA+C,CAClD,OAAAA,EAAG,IAAI,EACA,IACT,CAEA,KAAKD,EAAkB,CACrB,YAAK,MAAM,KAAKA,CAAI,EACb,IACT,CAEQ,IAAIE,EAAcL,EAA8B,CACtD,YAAK,MAAM,KAAK,IAAI,WAAW,CAACK,EAAML,EAAM,OAAQ,GAAGA,CAAK,CAAC,CAAC,EACvD,IACT,CACF",
|
|
6
|
-
"names": ["TLVBuilder_exports", "__export", "TLVBuilder", "__toCommonJS", "import_Tags", "value", "length", "view", "item", "fn", "type"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(e,r)=>{for(var t in r)a(e,t,{get:r[t],enumerable:!0})},u=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of g(r))!d.call(e,i)&&i!==t&&a(e,i,{get:()=>r[i],enumerable:!(n=h(r,i))||n.enumerable});return e};var f=e=>u(a({},"__esModule",{value:!0}),e);var b={};l(b,{AES_BLOCK_SIZE:()=>s,CryptoUtils:()=>B});module.exports=f(b);var c=require("@noble/ciphers/aes"),m=require("@noble/ciphers/webcrypto"),p=require("@noble/hashes/hmac"),y=require("@noble/hashes/sha256"),o=require("@noble/secp256k1"),A=require("../../api/app-binder/KeypairFromBytes");const s=16;class B{static randomBytes(r){return(0,m.randomBytes)(r)}static randomKeypair(){return new A.KeypairFromBytes(o.utils.randomPrivateKey())}static encrypt(r,t,n){return(0,c.gcm)(r,t.slice(0,s)).encrypt(n)}static decrypt(r,t,n){return(0,c.gcm)(r,t.slice(0,s)).decrypt(n)}static hash(r){return(0,y.sha256)(r)}static hmac(r,t){return(0,p.hmac)(y.sha256,r,t)}static derEncode(r,t){const n=this.encodeSigComponent(r),i=this.encodeSigComponent(t),U=n.length+i.length;return Uint8Array.from([48,U,...n,...i])}static encodeSigComponent(r){const t=o.etc.numberToBytesBE(r),n=t[0]&&t[0]>=128?[0]:[],i=t.length+n.length;return Uint8Array.from([2,i,...n,...t])}}0&&(module.exports={AES_BLOCK_SIZE,CryptoUtils});
|
|
2
|
-
//# sourceMappingURL=crypto.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/internal/utils/crypto.ts"],
|
|
4
|
-
"sourcesContent": ["import { gcm } from \"@noble/ciphers/aes\";\nimport { randomBytes } from \"@noble/ciphers/webcrypto\";\nimport { hmac } from \"@noble/hashes/hmac\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { etc, utils } from \"@noble/secp256k1\";\n\nimport { KeypairFromBytes } from \"@api/app-binder/KeypairFromBytes\";\nimport { type Keypair } from \"@api/index\";\n\nexport const AES_BLOCK_SIZE = 16;\n\nexport class CryptoUtils {\n static randomBytes(len: number): Uint8Array {\n return randomBytes(len);\n }\n\n static randomKeypair(): Keypair {\n return new KeypairFromBytes(utils.randomPrivateKey());\n }\n\n static encrypt(\n key: Uint8Array,\n iv: Uint8Array,\n cleartext: Uint8Array,\n ): Uint8Array {\n const cipher = gcm(key, iv.slice(0, AES_BLOCK_SIZE));\n return cipher.encrypt(cleartext);\n }\n\n static decrypt(\n key: Uint8Array,\n iv: Uint8Array,\n ciphertext: Uint8Array,\n ): Uint8Array {\n const cipher = gcm(key, iv.slice(0, AES_BLOCK_SIZE));\n return cipher.decrypt(ciphertext);\n }\n\n static hash(bytes: Uint8Array): Uint8Array {\n return sha256(bytes);\n }\n\n static hmac(key: Uint8Array, message: Uint8Array): Uint8Array {\n return hmac(sha256, key, message);\n }\n\n /**\n * DER specification: https://ledgerhq.atlassian.net/wiki/spaces/TrustServices/pages/3843719348/LNS+Arch+Common+Fields+for+Nano+certificates+and+descriptors#DER-Encoding-spec\n * See: https://ledgerhq.atlassian.net/wiki/spaces/TrustServices/pages/3736863735/LNS+Arch+Nano+Trusted+Names+Descriptor+Format+APIs\n * signature(r,s) = 0x30 & var(L,u8(~)) & sized(8*L, sig_components(r,s)); # DER encoding of the two 32 bytes signature components r & s\n * sig_components(r,s) = 0x02 & var(Lr,u8(~)) & sized(8*Lr, r) & 0x02 & var(Ls,u8(~)) & sized(8*Ls, s);\n */\n public static derEncode(r: bigint, s: bigint): Uint8Array {\n const rBytes = this.encodeSigComponent(r);\n const sBytes = this.encodeSigComponent(s);\n const length = rBytes.length + sBytes.length;\n return Uint8Array.from([0x30, length, ...rBytes, ...sBytes]);\n }\n\n private static encodeSigComponent(number: bigint): Uint8Array {\n const bytes = etc.numberToBytesBE(number);\n const padding = bytes[0] && bytes[0] >= 0x80 ? [0x00] : []; // Add padding if the first byte is >= 0x80 to ensure positive encoding\n const length = bytes.length + padding.length;\n return Uint8Array.from([0x02, length, ...padding, ...bytes]);\n }\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,gBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAoB,8BACpBC,EAA4B,oCAC5BC,EAAqB,8BACrBC,EAAuB,gCACvBC,EAA2B,4BAE3BC,EAAiC,4CAG1B,MAAMR,EAAiB,GAEvB,MAAMC,CAAY,CACvB,OAAO,YAAYQ,EAAyB,CAC1C,SAAO,eAAYA,CAAG,CACxB,CAEA,OAAO,eAAyB,CAC9B,OAAO,IAAI,mBAAiB,QAAM,iBAAiB,CAAC,CACtD,CAEA,OAAO,QACLC,EACAC,EACAC,EACY,CAEZ,SADe,OAAIF,EAAKC,EAAG,MAAM,EAAGX,CAAc,CAAC,EACrC,QAAQY,CAAS,CACjC,CAEA,OAAO,QACLF,EACAC,EACAE,EACY,CAEZ,SADe,OAAIH,EAAKC,EAAG,MAAM,EAAGX,CAAc,CAAC,EACrC,QAAQa,CAAU,CAClC,CAEA,OAAO,KAAKC,EAA+B,CACzC,SAAO,UAAOA,CAAK,CACrB,CAEA,OAAO,KAAKJ,EAAiBK,EAAiC,CAC5D,SAAO,QAAK,SAAQL,EAAKK,CAAO,CAClC,CAQA,OAAc,UAAU,EAAWC,EAAuB,CACxD,MAAMC,EAAS,KAAK,mBAAmB,CAAC,EAClCC,EAAS,KAAK,mBAAmBF,CAAC,EAClCG,EAASF,EAAO,OAASC,EAAO,OACtC,OAAO,WAAW,KAAK,CAAC,GAAMC,EAAQ,GAAGF,EAAQ,GAAGC,CAAM,CAAC,CAC7D,CAEA,OAAe,mBAAmBE,EAA4B,CAC5D,MAAMN,EAAQ,MAAI,gBAAgBM,CAAM,EAClCC,EAAUP,EAAM,CAAC,GAAKA,EAAM,CAAC,GAAK,IAAO,CAAC,CAAI,EAAI,CAAC,EACnDK,EAASL,EAAM,OAASO,EAAQ,OACtC,OAAO,WAAW,KAAK,CAAC,EAAMF,EAAQ,GAAGE,EAAS,GAAGP,CAAK,CAAC,CAC7D,CACF",
|
|
6
|
-
"names": ["crypto_exports", "__export", "AES_BLOCK_SIZE", "CryptoUtils", "__toCommonJS", "import_aes", "import_webcrypto", "import_hmac", "import_sha256", "import_secp256k1", "import_KeypairFromBytes", "len", "key", "iv", "cleartext", "ciphertext", "bytes", "message", "s", "rBytes", "sBytes", "length", "number", "padding"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var s=(r,t)=>{for(var n in t)o(r,n,{get:t[n],enumerable:!0})},y=(r,t,n,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of x(t))!a.call(r,e)&&e!==n&&o(r,e,{get:()=>t[e],enumerable:!(f=u(t,e))||f.enumerable});return r};var g=r=>y(o({},"__esModule",{value:!0}),r);var p={};s(p,{bytesToHex:()=>c,hexToBytes:()=>T});module.exports=g(p);var i=require("@ledgerhq/device-management-kit");function T(r){return(0,i.hexaStringToBuffer)(r)??new Uint8Array}function c(r){return(0,i.bufferToHexaString)(r).slice(2)}0&&(module.exports={bytesToHex,hexToBytes});
|
|
2
|
-
//# sourceMappingURL=hex.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/internal/utils/hex.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n bufferToHexaString,\n hexaStringToBuffer,\n} from \"@ledgerhq/device-management-kit\";\n\nexport function hexToBytes(hex: string): Uint8Array {\n return hexaStringToBuffer(hex) ?? new Uint8Array();\n}\n\nexport function bytesToHex(bytes: Uint8Array): string {\n return bufferToHexaString(bytes).slice(2); // Remove the \"0x\" prefix\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,eAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAGO,2CAEA,SAASF,EAAWG,EAAyB,CAClD,SAAO,sBAAmBA,CAAG,GAAK,IAAI,UACxC,CAEO,SAASJ,EAAWK,EAA2B,CACpD,SAAO,sBAAmBA,CAAK,EAAE,MAAM,CAAC,CAC1C",
|
|
6
|
-
"names": ["hex_exports", "__export", "bytesToHex", "hexToBytes", "__toCommonJS", "import_device_management_kit", "hex", "bytes"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=GetAppNameCommandTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=GetSeedIdCommandTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=InitCommandTypes.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{getPublicKey as i,getSharedSecret as y,signAsync as a}from"@noble/secp256k1";import{CryptoUtils as n}from"../../internal/utils/crypto";import{bytesToHex as o}from"../../internal/utils/hex";class u{constructor(r,e=i(r)){this.privateKey=r;this.publicKey=e}pubKeyToU8a(){return this.publicKey}pubKeyToHex(){return o(this.publicKey)}async sign(r){const{r:e,s:t}=await a(r,this.privateKey);return n.derEncode(e,t)}ecdh(r,e=!0){return y(this.privateKey,r,e)}}export{u as KeypairFromBytes};
|
|
2
|
-
//# sourceMappingURL=KeypairFromBytes.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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": "AAAA,OAAS,gBAAAA,EAAc,mBAAAC,EAAiB,aAAAC,MAAiB,mBAGzD,OAAS,eAAAC,MAAmB,yBAC5B,OAAS,cAAAC,MAAkB,sBAEpB,MAAMC,CAAoC,CAC/C,YACmBC,EACAC,EAAYP,EAAaM,CAAU,EACpD,CAFiB,gBAAAA,EACA,eAAAC,CAChB,CAEH,aAA0B,CACxB,OAAO,KAAK,SACd,CAEA,aAAsB,CACpB,OAAOH,EAAW,KAAK,SAAS,CAClC,CAEA,MAAM,KAAKI,EAA0C,CACnD,KAAM,CAAE,EAAAC,EAAG,EAAAC,CAAE,EAAI,MAAMR,EAAUM,EAAS,KAAK,UAAU,EACzD,OAAOL,EAAY,UAAUM,EAAGC,CAAC,CACnC,CAEA,KAAKH,EAAuBI,EAAe,GAAkB,CAC3D,OAAOV,EAAgB,KAAK,WAAYM,EAAWI,CAAY,CACjE,CACF",
|
|
6
|
-
"names": ["getPublicKey", "getSharedSecret", "signAsync", "CryptoUtils", "bytesToHex", "KeypairFromBytes", "privateKey", "publicKey", "message", "r", "s", "isCompressed"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var a=(r=>(r.PROD="prod",r.STAGING="staging",r))(a||{}),e=(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))(e||{});export{a as LKRPEnv,e as Permissions};
|
|
2
|
-
//# sourceMappingURL=LKRPTypes.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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 enum LKRPEnv {\n PROD = \"prod\",\n STAGING = \"staging\",\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": "AAOO,IAAKA,OACVA,EAAA,KAAO,OACPA,EAAA,QAAU,UAFAA,OAAA,IAiBAC,OACVA,IAAA,MAAQ,YAAR,QACAA,IAAA,YAAc,GAAd,cACAA,IAAA,WAAa,GAAb,aACAA,IAAA,cAAgB,GAAhB,gBAJUA,OAAA",
|
|
6
|
-
"names": ["LKRPEnv", "Permissions"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=ParseStreamBlockCommandCommandTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=ParseStreamBlockHeaderCommandTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=ParseStreamBlockSignatureTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=SetTrustedMemberTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=SignBlockCommandTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=SignBlockHeaderCommandTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=SignBlockSignatureCommandTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=SignBlockSingleCommandTypes.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{GeneralTags as t}from"../models/Tags";class d{items=[];addNull(){return this.add(t.Null,[])}addInt(r,e){const i=new DataView(new ArrayBuffer(e));switch(e){case 1:i.setUint8(0,r);break;case 2:i.setUint16(0,r);break;case 4:i.setUint32(0,r);break}return this.add(t.Int,new Uint8Array(i.buffer))}addHash(r){return this.add(t.Hash,r)}addSignature(r){return this.add(t.Signature,r)}addString(r){return this.add(t.String,new TextEncoder().encode(r))}addBytes(r){return this.add(t.Bytes,r)}addPublicKey(r){return this.add(t.PublicKey,r)}build(){return new Uint8Array(this.items.flatMap(r=>[...r]))}with(r){return r(this),this}push(r){return this.items.push(r),this}add(r,e){return this.items.push(new Uint8Array([r,e.length,...e])),this}}export{d as TLVBuilder};
|
|
2
|
-
//# sourceMappingURL=TLVBuilder.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/internal/utils/TLVBuilder.ts"],
|
|
4
|
-
"sourcesContent": ["import { GeneralTags } from \"@internal/models/Tags\";\n\nexport class TLVBuilder {\n private items: Uint8Array[] = [];\n\n addNull() {\n return this.add(GeneralTags.Null, []);\n }\n\n addInt(value: number, length: 1 | 2 | 4) {\n const view = new DataView(new ArrayBuffer(length));\n switch (length) {\n case 1:\n view.setUint8(0, value);\n break;\n case 2:\n view.setUint16(0, value);\n break;\n case 4:\n view.setUint32(0, value);\n break;\n }\n return this.add(GeneralTags.Int, new Uint8Array(view.buffer));\n }\n\n addHash(value: Uint8Array) {\n return this.add(GeneralTags.Hash, value);\n }\n\n addSignature(value: Uint8Array) {\n return this.add(GeneralTags.Signature, value);\n }\n\n addString(value: string) {\n return this.add(GeneralTags.String, new TextEncoder().encode(value));\n }\n\n addBytes(value: Uint8Array | number[]) {\n return this.add(GeneralTags.Bytes, value);\n }\n\n addPublicKey(value: Uint8Array) {\n return this.add(GeneralTags.PublicKey, value);\n }\n\n build(): Uint8Array {\n return new Uint8Array(this.items.flatMap((item) => [...item]));\n }\n\n with(fn: (builder: TLVBuilder) => void): TLVBuilder {\n fn(this);\n return this;\n }\n\n push(item: Uint8Array) {\n this.items.push(item);\n return this;\n }\n\n private add(type: number, value: Uint8Array | number[]) {\n this.items.push(new Uint8Array([type, value.length, ...value]));\n return this;\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,eAAAA,MAAmB,wBAErB,MAAMC,CAAW,CACd,MAAsB,CAAC,EAE/B,SAAU,CACR,OAAO,KAAK,IAAID,EAAY,KAAM,CAAC,CAAC,CACtC,CAEA,OAAOE,EAAeC,EAAmB,CACvC,MAAMC,EAAO,IAAI,SAAS,IAAI,YAAYD,CAAM,CAAC,EACjD,OAAQA,EAAQ,CACd,IAAK,GACHC,EAAK,SAAS,EAAGF,CAAK,EACtB,MACF,IAAK,GACHE,EAAK,UAAU,EAAGF,CAAK,EACvB,MACF,IAAK,GACHE,EAAK,UAAU,EAAGF,CAAK,EACvB,KACJ,CACA,OAAO,KAAK,IAAIF,EAAY,IAAK,IAAI,WAAWI,EAAK,MAAM,CAAC,CAC9D,CAEA,QAAQF,EAAmB,CACzB,OAAO,KAAK,IAAIF,EAAY,KAAME,CAAK,CACzC,CAEA,aAAaA,EAAmB,CAC9B,OAAO,KAAK,IAAIF,EAAY,UAAWE,CAAK,CAC9C,CAEA,UAAUA,EAAe,CACvB,OAAO,KAAK,IAAIF,EAAY,OAAQ,IAAI,YAAY,EAAE,OAAOE,CAAK,CAAC,CACrE,CAEA,SAASA,EAA8B,CACrC,OAAO,KAAK,IAAIF,EAAY,MAAOE,CAAK,CAC1C,CAEA,aAAaA,EAAmB,CAC9B,OAAO,KAAK,IAAIF,EAAY,UAAWE,CAAK,CAC9C,CAEA,OAAoB,CAClB,OAAO,IAAI,WAAW,KAAK,MAAM,QAASG,GAAS,CAAC,GAAGA,CAAI,CAAC,CAAC,CAC/D,CAEA,KAAKC,EAA+C,CAClD,OAAAA,EAAG,IAAI,EACA,IACT,CAEA,KAAKD,EAAkB,CACrB,YAAK,MAAM,KAAKA,CAAI,EACb,IACT,CAEQ,IAAIE,EAAcL,EAA8B,CACtD,YAAK,MAAM,KAAK,IAAI,WAAW,CAACK,EAAML,EAAM,OAAQ,GAAGA,CAAK,CAAC,CAAC,EACvD,IACT,CACF",
|
|
6
|
-
"names": ["GeneralTags", "TLVBuilder", "value", "length", "view", "item", "fn", "type"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gcm as e}from"@noble/ciphers/aes";import{randomBytes as y}from"@noble/ciphers/webcrypto";import{hmac as s}from"@noble/hashes/hmac";import{sha256 as o}from"@noble/hashes/sha256";import{etc as m,utils as p}from"@noble/secp256k1";import{KeypairFromBytes as A}from"../../api/app-binder/KeypairFromBytes";const a=16;class B{static randomBytes(r){return y(r)}static randomKeypair(){return new A(p.randomPrivateKey())}static encrypt(r,t,n){return e(r,t.slice(0,a)).encrypt(n)}static decrypt(r,t,n){return e(r,t.slice(0,a)).decrypt(n)}static hash(r){return o(r)}static hmac(r,t){return s(o,r,t)}static derEncode(r,t){const n=this.encodeSigComponent(r),i=this.encodeSigComponent(t),c=n.length+i.length;return Uint8Array.from([48,c,...n,...i])}static encodeSigComponent(r){const t=m.numberToBytesBE(r),n=t[0]&&t[0]>=128?[0]:[],i=t.length+n.length;return Uint8Array.from([2,i,...n,...t])}}export{a as AES_BLOCK_SIZE,B as CryptoUtils};
|
|
2
|
-
//# sourceMappingURL=crypto.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/internal/utils/crypto.ts"],
|
|
4
|
-
"sourcesContent": ["import { gcm } from \"@noble/ciphers/aes\";\nimport { randomBytes } from \"@noble/ciphers/webcrypto\";\nimport { hmac } from \"@noble/hashes/hmac\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { etc, utils } from \"@noble/secp256k1\";\n\nimport { KeypairFromBytes } from \"@api/app-binder/KeypairFromBytes\";\nimport { type Keypair } from \"@api/index\";\n\nexport const AES_BLOCK_SIZE = 16;\n\nexport class CryptoUtils {\n static randomBytes(len: number): Uint8Array {\n return randomBytes(len);\n }\n\n static randomKeypair(): Keypair {\n return new KeypairFromBytes(utils.randomPrivateKey());\n }\n\n static encrypt(\n key: Uint8Array,\n iv: Uint8Array,\n cleartext: Uint8Array,\n ): Uint8Array {\n const cipher = gcm(key, iv.slice(0, AES_BLOCK_SIZE));\n return cipher.encrypt(cleartext);\n }\n\n static decrypt(\n key: Uint8Array,\n iv: Uint8Array,\n ciphertext: Uint8Array,\n ): Uint8Array {\n const cipher = gcm(key, iv.slice(0, AES_BLOCK_SIZE));\n return cipher.decrypt(ciphertext);\n }\n\n static hash(bytes: Uint8Array): Uint8Array {\n return sha256(bytes);\n }\n\n static hmac(key: Uint8Array, message: Uint8Array): Uint8Array {\n return hmac(sha256, key, message);\n }\n\n /**\n * DER specification: https://ledgerhq.atlassian.net/wiki/spaces/TrustServices/pages/3843719348/LNS+Arch+Common+Fields+for+Nano+certificates+and+descriptors#DER-Encoding-spec\n * See: https://ledgerhq.atlassian.net/wiki/spaces/TrustServices/pages/3736863735/LNS+Arch+Nano+Trusted+Names+Descriptor+Format+APIs\n * signature(r,s) = 0x30 & var(L,u8(~)) & sized(8*L, sig_components(r,s)); # DER encoding of the two 32 bytes signature components r & s\n * sig_components(r,s) = 0x02 & var(Lr,u8(~)) & sized(8*Lr, r) & 0x02 & var(Ls,u8(~)) & sized(8*Ls, s);\n */\n public static derEncode(r: bigint, s: bigint): Uint8Array {\n const rBytes = this.encodeSigComponent(r);\n const sBytes = this.encodeSigComponent(s);\n const length = rBytes.length + sBytes.length;\n return Uint8Array.from([0x30, length, ...rBytes, ...sBytes]);\n }\n\n private static encodeSigComponent(number: bigint): Uint8Array {\n const bytes = etc.numberToBytesBE(number);\n const padding = bytes[0] && bytes[0] >= 0x80 ? [0x00] : []; // Add padding if the first byte is >= 0x80 to ensure positive encoding\n const length = bytes.length + padding.length;\n return Uint8Array.from([0x02, length, ...padding, ...bytes]);\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,OAAAA,MAAW,qBACpB,OAAS,eAAAC,MAAmB,2BAC5B,OAAS,QAAAC,MAAY,qBACrB,OAAS,UAAAC,MAAc,uBACvB,OAAS,OAAAC,EAAK,SAAAC,MAAa,mBAE3B,OAAS,oBAAAC,MAAwB,mCAG1B,MAAMC,EAAiB,GAEvB,MAAMC,CAAY,CACvB,OAAO,YAAYC,EAAyB,CAC1C,OAAOR,EAAYQ,CAAG,CACxB,CAEA,OAAO,eAAyB,CAC9B,OAAO,IAAIH,EAAiBD,EAAM,iBAAiB,CAAC,CACtD,CAEA,OAAO,QACLK,EACAC,EACAC,EACY,CAEZ,OADeZ,EAAIU,EAAKC,EAAG,MAAM,EAAGJ,CAAc,CAAC,EACrC,QAAQK,CAAS,CACjC,CAEA,OAAO,QACLF,EACAC,EACAE,EACY,CAEZ,OADeb,EAAIU,EAAKC,EAAG,MAAM,EAAGJ,CAAc,CAAC,EACrC,QAAQM,CAAU,CAClC,CAEA,OAAO,KAAKC,EAA+B,CACzC,OAAOX,EAAOW,CAAK,CACrB,CAEA,OAAO,KAAKJ,EAAiBK,EAAiC,CAC5D,OAAOb,EAAKC,EAAQO,EAAKK,CAAO,CAClC,CAQA,OAAc,UAAU,EAAWC,EAAuB,CACxD,MAAMC,EAAS,KAAK,mBAAmB,CAAC,EAClCC,EAAS,KAAK,mBAAmBF,CAAC,EAClCG,EAASF,EAAO,OAASC,EAAO,OACtC,OAAO,WAAW,KAAK,CAAC,GAAMC,EAAQ,GAAGF,EAAQ,GAAGC,CAAM,CAAC,CAC7D,CAEA,OAAe,mBAAmBE,EAA4B,CAC5D,MAAMN,EAAQV,EAAI,gBAAgBgB,CAAM,EAClCC,EAAUP,EAAM,CAAC,GAAKA,EAAM,CAAC,GAAK,IAAO,CAAC,CAAI,EAAI,CAAC,EACnDK,EAASL,EAAM,OAASO,EAAQ,OACtC,OAAO,WAAW,KAAK,CAAC,EAAMF,EAAQ,GAAGE,EAAS,GAAGP,CAAK,CAAC,CAC7D,CACF",
|
|
6
|
-
"names": ["gcm", "randomBytes", "hmac", "sha256", "etc", "utils", "KeypairFromBytes", "AES_BLOCK_SIZE", "CryptoUtils", "len", "key", "iv", "cleartext", "ciphertext", "bytes", "message", "s", "rBytes", "sBytes", "length", "number", "padding"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/internal/utils/hex.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n bufferToHexaString,\n hexaStringToBuffer,\n} from \"@ledgerhq/device-management-kit\";\n\nexport function hexToBytes(hex: string): Uint8Array {\n return hexaStringToBuffer(hex) ?? new Uint8Array();\n}\n\nexport function bytesToHex(bytes: Uint8Array): string {\n return bufferToHexaString(bytes).slice(2); // Remove the \"0x\" prefix\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OACE,sBAAAA,EACA,sBAAAC,MACK,kCAEA,SAASC,EAAWC,EAAyB,CAClD,OAAOF,EAAmBE,CAAG,GAAK,IAAI,UACxC,CAEO,SAASC,EAAWC,EAA2B,CACpD,OAAOL,EAAmBK,CAAK,EAAE,MAAM,CAAC,CAC1C",
|
|
6
|
-
"names": ["bufferToHexaString", "hexaStringToBuffer", "hexToBytes", "hex", "bytesToHex", "bytes"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,MAAM,yBAAyB,GACjC,cAAc,GACd,aAAa,GACb,SAAS,CAAC;AAEd,qBAAa,mBAAoB,SAAQ,eAAe;IAMpD,QAAQ,CAAC,GAAG,EAAE;QACZ,MAAM,EAAE,yBAAyB,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC;KACjB;IARM,IAAI,SAAgC;IAC7C,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,MAAM,EAAE,yBAAyB,CAAC;gBAGvC,GAAG,EAAE;QACZ,MAAM,EAAE,yBAAyB,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC;KACjB;CAMJ;AAED,qBAAa,qBAAsB,SAAQ,eAAe;IAGtD,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM;IAHjB,IAAI,SAAgC;gBAElC,YAAY,GAAE,MAAM,GAAG,IAAW,EAClC,OAAO,GAAE,MAAsG;CAI3H;AAED,qBAAa,2BAA4B,SAAQ,eAAe;IAElD,QAAQ,CAAC,OAAO;IADnB,IAAI,SAAgC;gBACxB,OAAO,SAAgC;CAG7D;AAED,qBAAa,sBAAuB,SAAQ,eAAe;IAGvD,QAAQ,CAAC,OAAO;IAFlB,SAAkB,IAAI,gCAAgC;gBAE3C,OAAO,SAAuE;CAI1F;AAED,qBAAa,gBAAiB,SAAQ,eAAe;IAEvC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO;IADlC,SAAkB,IAAI,gCAAgC;gBACjC,GAAG,CAAC,EAAE,OAAO,YAAA;CAGnC;AAED,qBAAa,oBAAqB,SAAQ,eAAe;IAE3C,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO;IADlC,SAAkB,IAAI,gCAAgC;gBACjC,GAAG,CAAC,EAAE,OAAO,YAAA;CAGnC;AAED,qBAAa,2BAA4B,SAAQ,eAAe;IAGlD,QAAQ,CAAC,OAAO,EAAE,OAAO;IAFrC,SAAkB,IAAI,gCAAgC;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBACJ,OAAO,EAAE,OAAO;CActC;AAED,qBAAa,gBAAiB,SAAQ,eAAe;IAEvC,QAAQ,CAAC,OAAO,EAAE,MAAM;IADpC,SAAkB,IAAI,gCAAgC;gBACjC,OAAO,EAAE,MAAM;CAGrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetAppNameCommandTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/GetAppNameCommandTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type GetSeedIdCommandResponse = {
|
|
2
|
-
readonly credential: {
|
|
3
|
-
readonly version: number;
|
|
4
|
-
readonly curveId: number;
|
|
5
|
-
readonly signAlgorithm: number;
|
|
6
|
-
readonly publicKey: string;
|
|
7
|
-
};
|
|
8
|
-
readonly signature: string;
|
|
9
|
-
readonly attestation: string;
|
|
10
|
-
};
|
|
11
|
-
export type GetSeedIdCommandArgs = {
|
|
12
|
-
readonly challengeTLV: string;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=GetSeedIdCommandTypes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetSeedIdCommandTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/GetSeedIdCommandTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InitCommandTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/InitCommandTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,UAAU,CAAC;CACvB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Keypair } from "../index";
|
|
2
|
-
export declare class KeypairFromBytes implements Keypair {
|
|
3
|
-
private readonly privateKey;
|
|
4
|
-
private readonly publicKey;
|
|
5
|
-
constructor(privateKey: Uint8Array, publicKey?: import("@noble/secp256k1").Bytes);
|
|
6
|
-
pubKeyToU8a(): Uint8Array;
|
|
7
|
-
pubKeyToHex(): string;
|
|
8
|
-
sign(message: Uint8Array): Promise<Uint8Array>;
|
|
9
|
-
ecdh(publicKey: Uint8Array, isCompressed?: boolean): Uint8Array;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=KeypairFromBytes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeypairFromBytes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/KeypairFromBytes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,qBAAa,gBAAiB,YAAW,OAAO;IAE5C,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS;gBADT,UAAU,EAAE,UAAU,EACtB,SAAS,mCAA2B;IAGvD,WAAW,IAAI,UAAU;IAIzB,WAAW,IAAI,MAAM;IAIf,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAKpD,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,UAAO,GAAG,UAAU;CAG7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LKRPTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/LKRPTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,WAAW,IAAI,UAAU,CAAC;IAC1B,WAAW,IAAI,MAAM,CAAC;IACtB,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/C,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,CAAC;CACzC;AAED,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,GAAG,GAAG;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE;QACX,CAAC,YAAY,EAAE,MAAM,GAAG;YACtB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;SAC1B,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,oBAAY,WAAW;IACrB,KAAK,aAAa,CAAE,iDAAiD;IACrE,WAAW,IAAI,CAAE,uDAAuD;IACxE,UAAU,IAAS,CAAE,uJAAuJ;IAC5K,aAAa,IAAS;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParseStreamBlockCommandCommandTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/ParseStreamBlockCommandCommandTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,UAAU,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,UAAU,CAAC"}
|