@ledgerhq/device-signer-kit-ethereum 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +162 -371
- package/lib/cjs/api/SignerEth.js +1 -1
- package/lib/cjs/api/SignerEth.js.map +1 -1
- package/lib/cjs/api/SignerEthBuilder.test.js +1 -1
- package/lib/cjs/api/SignerEthBuilder.test.js.map +1 -1
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js +1 -1
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js.map +1 -1
- package/lib/cjs/api/app-binder/GetConfigCommandTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetConfigCommandTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.js +1 -1
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.js.map +1 -1
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js +1 -1
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js.map +1 -1
- package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.js +1 -1
- package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.js.map +1 -1
- package/lib/cjs/api/index.js +1 -1
- package/lib/cjs/api/index.js.map +2 -2
- package/lib/cjs/api/model/TransactionType.js +2 -0
- package/lib/cjs/api/model/TransactionType.js.map +7 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/internal/DefaultSignerEth.js +1 -1
- package/lib/cjs/internal/DefaultSignerEth.js.map +2 -2
- package/lib/cjs/internal/DefaultSignerEth.test.js +1 -1
- package/lib/cjs/internal/DefaultSignerEth.test.js.map +2 -2
- package/lib/cjs/internal/address/use-case/GetAddressUseCase.test.js +1 -1
- package/lib/cjs/internal/address/use-case/GetAddressUseCase.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/EthAppBinder.js +1 -1
- package/lib/cjs/internal/app-binder/EthAppBinder.js.map +3 -3
- package/lib/cjs/internal/app-binder/EthAppBinder.test.js +1 -1
- package/lib/cjs/internal/app-binder/EthAppBinder.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideTrustedNameCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/ProvideTrustedNameCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.test.js +2 -2
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.test.js +2 -2
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/command/StartTransactionCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/StartTransactionCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/StartTransactionCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/StartTransactionCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.js +1 -1
- package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.test.js +1 -1
- package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/constant/plugins.js +2 -0
- package/lib/cjs/internal/app-binder/constant/plugins.js.map +7 -0
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +3 -3
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +2 -2
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +1 -1
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.test.js +2 -0
- package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/SendCommandInChunksTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendCommandInChunksTask.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.test.js.map +2 -2
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.js.map +3 -3
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.test.js +1 -1
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.test.js.map +3 -3
- package/lib/cjs/internal/message/use-case/SignMessageUseCase.test.js +1 -1
- package/lib/cjs/internal/message/use-case/SignMessageUseCase.test.js.map +2 -2
- package/lib/cjs/internal/transaction/di/transactionModule.js +1 -1
- package/lib/cjs/internal/transaction/di/transactionModule.js.map +3 -3
- package/lib/cjs/internal/transaction/di/transactionModule.test.js +1 -1
- package/lib/cjs/internal/transaction/di/transactionModule.test.js.map +2 -2
- package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.js +2 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.js.map +7 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js +2 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js.map +7 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.js +1 -1
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.js.map +1 -1
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.js +1 -1
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.js.map +2 -2
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.test.js +1 -1
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.test.js.map +2 -2
- package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.js +1 -1
- package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.js.map +1 -1
- package/lib/cjs/internal/transaction/service/parser/TransactionParserService.js +1 -1
- package/lib/cjs/internal/transaction/service/parser/TransactionParserService.js.map +3 -3
- package/lib/cjs/internal/transaction/service/parser/TransactionParserService.test.js +1 -1
- package/lib/cjs/internal/transaction/service/parser/TransactionParserService.test.js.map +3 -3
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.js +1 -1
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.js.map +2 -2
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.test.js +1 -1
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.test.js.map +3 -3
- package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.test.js +1 -1
- package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.test.js.map +2 -2
- package/lib/cjs/package.json +12 -12
- package/lib/esm/api/SignerEthBuilder.test.js +1 -1
- package/lib/esm/api/SignerEthBuilder.test.js.map +1 -1
- package/lib/esm/api/app-binder/GetConfigCommandTypes.js +1 -0
- package/lib/esm/api/app-binder/GetConfigCommandTypes.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/TransactionType.js +2 -0
- package/lib/esm/api/model/TransactionType.js.map +7 -0
- package/lib/esm/internal/DefaultSignerEth.js.map +2 -2
- package/lib/esm/internal/DefaultSignerEth.test.js +1 -1
- package/lib/esm/internal/DefaultSignerEth.test.js.map +2 -2
- package/lib/esm/internal/address/use-case/GetAddressUseCase.test.js +1 -1
- package/lib/esm/internal/address/use-case/GetAddressUseCase.test.js.map +2 -2
- package/lib/esm/internal/app-binder/EthAppBinder.js +1 -1
- package/lib/esm/internal/app-binder/EthAppBinder.js.map +3 -3
- package/lib/esm/internal/app-binder/EthAppBinder.test.js +1 -1
- package/lib/esm/internal/app-binder/EthAppBinder.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/GetAddressCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/GetAddressCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/GetAddressCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/GetAddressCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/ProvideEnumCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideEnumCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideEnumCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideEnumCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideTrustedNameCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/ProvideTrustedNameCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.test.js +2 -2
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SetPluginCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SetPluginCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SetPluginCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SetPluginCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignEIP712Command.js +1 -1
- package/lib/esm/internal/app-binder/command/SignEIP712Command.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignEIP712Command.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SignEIP712Command.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js.map +2 -2
- package/lib/esm/internal/app-binder/command/StartTransactionCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/StartTransactionCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/StartTransactionCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/StartTransactionCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/StoreTransactionCommand.js +1 -1
- package/lib/esm/internal/app-binder/command/StoreTransactionCommand.js.map +3 -3
- package/lib/esm/internal/app-binder/command/StoreTransactionCommand.test.js +1 -1
- package/lib/esm/internal/app-binder/command/StoreTransactionCommand.test.js.map +3 -3
- package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/ethAppErrors.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/ethAppErrors.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/ethAppErrors.test.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/ethAppErrors.test.js.map +7 -0
- package/lib/esm/internal/app-binder/constant/plugins.js +2 -0
- package/lib/esm/internal/app-binder/constant/plugins.js.map +7 -0
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js +1 -1
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js +1 -1
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js +1 -1
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js +1 -1
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +1 -1
- package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +3 -3
- package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +1 -1
- package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +2 -2
- package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +1 -1
- package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.js +1 -1
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.test.js.map +3 -3
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js +1 -1
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.test.js.map +3 -3
- package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.js +2 -0
- package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.test.js +2 -0
- package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.test.js.map +7 -0
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.test.js.map +3 -3
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.test.js.map +2 -2
- package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js.map +3 -3
- package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SendCommandInChunksTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SendCommandInChunksTask.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.test.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.test.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.test.js.map +2 -2
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.js +1 -1
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.js.map +3 -3
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.test.js +1 -1
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.test.js.map +2 -2
- package/lib/esm/internal/message/use-case/SignMessageUseCase.test.js +1 -1
- package/lib/esm/internal/message/use-case/SignMessageUseCase.test.js.map +2 -2
- package/lib/esm/internal/transaction/di/transactionModule.js +1 -1
- package/lib/esm/internal/transaction/di/transactionModule.js.map +3 -3
- package/lib/esm/internal/transaction/di/transactionModule.test.js +1 -1
- package/lib/esm/internal/transaction/di/transactionModule.test.js.map +2 -2
- package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.js +2 -0
- package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.js.map +7 -0
- package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js +2 -0
- package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js.map +7 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.js +1 -1
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.js.map +2 -2
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.test.js +1 -1
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.test.js.map +2 -2
- package/lib/esm/internal/transaction/service/parser/TransactionParserService.js +1 -1
- package/lib/esm/internal/transaction/service/parser/TransactionParserService.js.map +2 -2
- package/lib/esm/internal/transaction/service/parser/TransactionParserService.test.js +1 -1
- package/lib/esm/internal/transaction/service/parser/TransactionParserService.test.js.map +2 -2
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.js +1 -1
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.js.map +2 -2
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.test.js +1 -1
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.test.js.map +3 -3
- package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.test.js +1 -1
- package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.test.js.map +2 -2
- package/lib/esm/package.json +12 -12
- package/lib/types/api/SignerEth.d.ts +1 -2
- package/lib/types/api/SignerEth.d.ts.map +1 -1
- package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts +3 -2
- package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/GetConfigCommandTypes.d.ts +7 -0
- package/lib/types/api/app-binder/GetConfigCommandTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts +3 -11
- package/lib/types/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts +6 -5
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/app-binder/SignTypedDataDeviceActionTypes.d.ts +3 -2
- package/lib/types/api/app-binder/SignTypedDataDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/api/index.d.ts +2 -2
- package/lib/types/api/index.d.ts.map +1 -1
- package/lib/types/api/model/{Transaction.d.ts → TransactionType.d.ts} +1 -4
- package/lib/types/api/model/TransactionType.d.ts.map +1 -0
- package/lib/types/internal/DefaultSignerEth.d.ts +1 -2
- package/lib/types/internal/DefaultSignerEth.d.ts.map +1 -1
- package/lib/types/internal/app-binder/EthAppBinder.d.ts +1 -2
- package/lib/types/internal/app-binder/EthAppBinder.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts +5 -3
- package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts +10 -0
- package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetChallengeCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/GetChallengeCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideEnumCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/ProvideEnumCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideNFTInformationCommand.d.ts +4 -3
- package/lib/types/internal/app-binder/command/ProvideNFTInformationCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideTokenInformationCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/ProvideTokenInformationCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideTransactionInformationCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/ProvideTransactionInformationCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideTrustedNameCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/ProvideTrustedNameCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.d.ts +17 -0
- package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SendEIP712FilteringCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/SendEIP712FilteringCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SetExternalPluginCommand.d.ts +5 -7
- package/lib/types/internal/app-binder/command/SetExternalPluginCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SetPluginCommand.d.ts +5 -7
- package/lib/types/internal/app-binder/command/SetPluginCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignEIP712Command.d.ts +5 -3
- package/lib/types/internal/app-binder/command/SignEIP712Command.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignPersonalMessageCommand.d.ts +5 -3
- package/lib/types/internal/app-binder/command/SignPersonalMessageCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts +5 -3
- package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/StartTransactionCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/StartTransactionCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/StoreTransactionCommand.d.ts +4 -2
- package/lib/types/internal/app-binder/command/StoreTransactionCommand.d.ts.map +1 -1
- package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.d.ts +15 -0
- package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/ethAppErrors.d.ts +8 -0
- package/lib/types/internal/app-binder/command/utils/ethAppErrors.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/ethAppErrors.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/utils/ethAppErrors.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/constant/plugins.d.ts +2 -0
- package/lib/types/internal/app-binder/constant/plugins.d.ts.map +1 -0
- package/lib/types/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts +22 -10
- package/lib/types/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts +12 -3
- package/lib/types/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts +2 -1
- package/lib/types/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.d.ts.map +1 -1
- package/lib/types/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts +5 -2
- package/lib/types/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/BuildEIP712ContextTask.d.ts +4 -1
- package/lib/types/internal/app-binder/task/BuildEIP712ContextTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/BuildTransactionContextTask.d.ts +3 -3
- package/lib/types/internal/app-binder/task/BuildTransactionContextTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/GetWeb3CheckTask.d.ts +31 -0
- package/lib/types/internal/app-binder/task/GetWeb3CheckTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/GetWeb3CheckTask.test.d.ts +2 -0
- package/lib/types/internal/app-binder/task/GetWeb3CheckTask.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/ProvideEIP712ContextTask.d.ts +14 -5
- package/lib/types/internal/app-binder/task/ProvideEIP712ContextTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/ProvideTransactionContextTask.d.ts +5 -7
- package/lib/types/internal/app-binder/task/ProvideTransactionContextTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.d.ts +54 -12
- package/lib/types/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/ProvideTransactionGenericContextTask.d.ts +7 -6
- package/lib/types/internal/app-binder/task/ProvideTransactionGenericContextTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SendCommandInChunksTask.d.ts +3 -2
- package/lib/types/internal/app-binder/task/SendCommandInChunksTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SendEIP712StructImplemTask.d.ts +2 -1
- package/lib/types/internal/app-binder/task/SendEIP712StructImplemTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SendPayloadInChunksTask.d.ts +2 -1
- package/lib/types/internal/app-binder/task/SendPayloadInChunksTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SendSignPersonalMessageTask.d.ts +2 -1
- package/lib/types/internal/app-binder/task/SendSignPersonalMessageTask.d.ts.map +1 -1
- package/lib/types/internal/app-binder/task/SendSignTransactionTask.d.ts +3 -2
- package/lib/types/internal/app-binder/task/SendSignTransactionTask.d.ts.map +1 -1
- package/lib/types/internal/transaction/di/transactionModule.d.ts.map +1 -1
- package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.d.ts +7 -0
- package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.d.ts.map +1 -0
- package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.test.d.ts +2 -0
- package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.test.d.ts.map +1 -0
- package/lib/types/internal/transaction/service/mapper/TransactionMapper.d.ts +1 -2
- package/lib/types/internal/transaction/service/mapper/TransactionMapper.d.ts.map +1 -1
- package/lib/types/internal/transaction/service/mapper/TransactionMapperService.d.ts +1 -2
- package/lib/types/internal/transaction/service/mapper/TransactionMapperService.d.ts.map +1 -1
- package/lib/types/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts +1 -1
- package/lib/types/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts.map +1 -1
- package/lib/types/internal/transaction/service/parser/TransactionParserService.d.ts.map +1 -1
- package/lib/types/internal/transaction/use-case/SignTransactionUseCase.d.ts +1 -2
- package/lib/types/internal/transaction/use-case/SignTransactionUseCase.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/lib/cjs/api/model/Transaction.js +0 -2
- package/lib/cjs/api/model/Transaction.js.map +0 -7
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js +0 -2
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js.map +0 -7
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js +0 -2
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js.map +0 -7
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.js +0 -2
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.js.map +0 -7
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js +0 -2
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js.map +0 -7
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.js +0 -2
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.js.map +0 -7
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js +0 -2
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js.map +0 -7
- package/lib/esm/api/model/Transaction.js +0 -2
- package/lib/esm/api/model/Transaction.js.map +0 -7
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js +0 -2
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js.map +0 -7
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js +0 -2
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js.map +0 -7
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.js +0 -2
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.js.map +0 -7
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js +0 -2
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js.map +0 -7
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.js +0 -2
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.js.map +0 -7
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js +0 -2
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js.map +0 -7
- package/lib/types/api/model/Transaction.d.ts.map +0 -1
- package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts +0 -17
- package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts.map +0 -1
- package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.d.ts +0 -2
- package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.d.ts.map +0 -1
- package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts +0 -10
- package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts.map +0 -1
- package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.test.d.ts +0 -2
- package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.test.d.ts.map +0 -1
- package/lib/types/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts +0 -9
- package/lib/types/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts.map +0 -1
- package/lib/types/internal/transaction/service/mapper/EthersV6TransactionMapper.test.d.ts +0 -2
- package/lib/types/internal/transaction/service/mapper/EthersV6TransactionMapper.test.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
# Ledger Ethereum Signer
|
|
2
|
-
|
|
3
|
-
## Introduction
|
|
1
|
+
# Ledger Ethereum Signer
|
|
4
2
|
|
|
5
3
|
This module provides the implementation of the Ledger Ethereum signer of the Device Management Kit. It enables interaction with the Ethereum application on a Ledger device including:
|
|
6
4
|
|
|
@@ -9,11 +7,24 @@ This module provides the implementation of the Ledger Ethereum signer of the Dev
|
|
|
9
7
|
- Signing a message displayed on a Ledger device;
|
|
10
8
|
- Signing an [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specified message.
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
## 🔹 Index
|
|
11
|
+
|
|
12
|
+
1. [How it works](#-how-it-works)
|
|
13
|
+
2. [Installation](#-installation)
|
|
14
|
+
3. [Initialisation](#-initialisation)
|
|
15
|
+
4. [Use Cases](#-use-cases)
|
|
16
|
+
- [Get Address](#use-case-1-get-address)
|
|
17
|
+
- [Sign Transaction](#use-case-2-sign-transaction)
|
|
18
|
+
- [Sign Message](#use-case-3-sign-message)
|
|
19
|
+
- [Sign Typed Data](#use-case-4-sign-typed-data)
|
|
20
|
+
5. [Observable Behavior](#-observable-behavior)
|
|
21
|
+
6. [Example](#-example)
|
|
22
|
+
|
|
23
|
+
## 🔹 How it works
|
|
13
24
|
|
|
14
25
|
The Ledger Ethereum Signer utilizes the advanced capabilities of the Ledger device to provide secure operations for end users. It takes advantage of the interface provided by the Device Management Kit to establish communication with the Ledger device and execute various operations, including signing transactions. The communication with the Ledger device is performed using [APDU](https://en.wikipedia.org/wiki/Smart_card_application_protocol_data_unit)s (Application Protocol Data Units), which are encapsulated within the `Command` object. These commands are then organized into tasks, allowing for the execution of complex operations with one or more APDUs. The tasks are further encapsulated within `DeviceAction` objects to handle different real-world scenarios. Finally, the Signer exposes dedicated and independent use cases that can be directly utilized by end users.
|
|
15
26
|
|
|
16
|
-
|
|
27
|
+
## 🔹 Installation
|
|
17
28
|
|
|
18
29
|
> **Note:** This module is not standalone; it depends on the [@ledgerhq/device-management-kit](https://github.com/LedgerHQ/device-sdk-ts/tree/develop/packages/device-management-kit) package, so you need to install it first.
|
|
19
30
|
|
|
@@ -23,31 +34,31 @@ To install the `device-signer-kit-ethereum` package, run the following command:
|
|
|
23
34
|
npm install @ledgerhq/device-signer-kit-ethereum
|
|
24
35
|
```
|
|
25
36
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
### Setting up
|
|
37
|
+
## 🔹 Initialisation
|
|
29
38
|
|
|
30
|
-
To
|
|
39
|
+
To initialise an Ethereum signer instance, you need a Ledger Device Management Kit instance and the ID of the session of the connected device. Use the `SignerEthBuilder` along with the [Context Module](https://github.com/LedgerHQ/device-sdk-ts/tree/develop/packages/signer/context-module) by default developed by Ledger:
|
|
31
40
|
|
|
32
41
|
```typescript
|
|
33
|
-
//
|
|
42
|
+
// Initialise an Ethereum signer instance using default context module
|
|
34
43
|
const signerEth = new SignerEthBuilder({ sdk, sessionId }).build();
|
|
35
44
|
```
|
|
36
45
|
|
|
37
46
|
You can also configure the context module yourself:
|
|
38
47
|
|
|
39
48
|
```typescript
|
|
40
|
-
//
|
|
49
|
+
// Initialise an Ethereum signer instance using customized context module
|
|
41
50
|
const signerEth = new SignerEthBuilder({ sdk, sessionId })
|
|
42
51
|
.withContextModule(customContextModule)
|
|
43
52
|
.build();
|
|
44
53
|
```
|
|
45
54
|
|
|
46
|
-
|
|
55
|
+
## 🔹 Use Cases
|
|
47
56
|
|
|
48
57
|
The `SignerEthBuilder.build()` method will return a `SignerEth` instance that exposes 4 dedicated methods, each of which calls an independent use case. Each use case will return an object that contains an observable and a method called `cancel`.
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### Use Case 1: Get Address
|
|
51
62
|
|
|
52
63
|
This method allows users to retrieve the Ethereum address according to given `derivationPath`.
|
|
53
64
|
|
|
@@ -55,7 +66,7 @@ This method allows users to retrieve the Ethereum address according to given `de
|
|
|
55
66
|
const { observable, cancel } = signerEth.getAddress(derivationPath, options);
|
|
56
67
|
```
|
|
57
68
|
|
|
58
|
-
**Parameters**
|
|
69
|
+
#### **Parameters**
|
|
59
70
|
|
|
60
71
|
- `derivationPath`
|
|
61
72
|
|
|
@@ -78,104 +89,23 @@ const { observable, cancel } = signerEth.getAddress(derivationPath, options);
|
|
|
78
89
|
- `checkOnDevice`: An optional boolean indicating whether user confirmation on the device is required (`true`) or not (`false`).
|
|
79
90
|
- `returnChainCode`: An optional boolean indicating whether the chain code should be returned (`true`) or not (`false`).
|
|
80
91
|
|
|
81
|
-
**Returns**
|
|
82
|
-
|
|
83
|
-
- `observable`
|
|
84
|
-
|
|
85
|
-
- An [Observable](https://rxjs.dev/guide/observable) object that contains the [`DeviceActionState`](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/packages/device-management-kit/src/api/device-action/model/DeviceActionState.ts) derived instance, which reprensents the operation's state. For example:
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
observable.subscribe({
|
|
89
|
-
next: (state: DeviceActionState) => {
|
|
90
|
-
switch (state.status) {
|
|
91
|
-
case DeviceActionStatus.NotStarted: {
|
|
92
|
-
console.log("The action is not started yet.");
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
case DeviceActionStatus.Pending: {
|
|
96
|
-
const {
|
|
97
|
-
intermediateValue: { requiredUserInteraction },
|
|
98
|
-
} = state;
|
|
99
|
-
// Access the intermediate value here, explained below
|
|
100
|
-
console.log(
|
|
101
|
-
"The action is pending and the intermediate value is: ",
|
|
102
|
-
intermediateValue,
|
|
103
|
-
);
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
case DeviceActionStatus.Stopped: {
|
|
107
|
-
console.log("The action has been stopped.");
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
case DeviceActionStatus.Completed: {
|
|
111
|
-
const { output } = state;
|
|
112
|
-
// Access the output of the completed action here
|
|
113
|
-
console.log("The action has been completed: ", output);
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
case DeviceActionStatus.Error: {
|
|
117
|
-
const { error } = state;
|
|
118
|
-
// Access the error here if occured
|
|
119
|
-
console.log("An error occured during the action: ", error);
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
- When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
128
|
-
|
|
129
|
-
```typescript
|
|
130
|
-
const { requiredUserInteraction } = intermediateValue;
|
|
92
|
+
#### **Returns**
|
|
131
93
|
|
|
132
|
-
|
|
133
|
-
case UserInteractionRequired.VerifyAddress: {
|
|
134
|
-
// User needs to verify the address displayed on the device
|
|
135
|
-
console.log(
|
|
136
|
-
"User needs to verify the address displayed on the device.",
|
|
137
|
-
);
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
case UserInteractionRequired.None: {
|
|
141
|
-
// No user action required
|
|
142
|
-
console.log("No user action needed.");
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
case UserInteractionRequired.UnlockDevice: {
|
|
146
|
-
// User needs to unlock the device
|
|
147
|
-
console.log("The user needs to unlock the device.");
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
case UserInteractionRequired.ConfirmOpenApp: {
|
|
151
|
-
// User needs to confirm on the device to open the app
|
|
152
|
-
console.log("The user needs to confirm on the device to open the app.");
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
default:
|
|
156
|
-
// Type guard to ensure all cases are handled
|
|
157
|
-
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
158
|
-
console.error(
|
|
159
|
-
"Unhandled user interaction case:",
|
|
160
|
-
uncaughtUserInteraction,
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
```
|
|
94
|
+
- `observable` Emits DeviceActionState updates, including the following details:
|
|
164
95
|
|
|
165
|
-
|
|
96
|
+
```typescript
|
|
97
|
+
type GetAddressCommandResponse = {
|
|
98
|
+
publicKey: string; // Public key derived from the given path
|
|
99
|
+
address: `0x${string}`; // Ethereum address in hex format
|
|
100
|
+
chainCode?: string; // Optional chain code
|
|
101
|
+
};
|
|
102
|
+
```
|
|
166
103
|
|
|
167
|
-
|
|
168
|
-
type GetAddressCommandResponse = {
|
|
169
|
-
publicKey: string;
|
|
170
|
-
address: `0x${string}`;
|
|
171
|
-
chainCode?: string;
|
|
172
|
-
};
|
|
173
|
-
```
|
|
104
|
+
- `cancel` A function to cancel the action on the Ledger device.
|
|
174
105
|
|
|
175
|
-
|
|
176
|
-
- The function without a return value to cancel the action on the Ledger device.
|
|
106
|
+
---
|
|
177
107
|
|
|
178
|
-
|
|
108
|
+
### Use Case 2: Sign Transaction
|
|
179
109
|
|
|
180
110
|
This method enables users to securely sign transactions using clear signing on Ledger devices.
|
|
181
111
|
|
|
@@ -187,7 +117,7 @@ const { observable, cancel } = signerEth.signTransaction(
|
|
|
187
117
|
);
|
|
188
118
|
```
|
|
189
119
|
|
|
190
|
-
**Parameters**
|
|
120
|
+
#### **Parameters**
|
|
191
121
|
|
|
192
122
|
- `derivationPath`
|
|
193
123
|
|
|
@@ -198,8 +128,8 @@ const { observable, cancel } = signerEth.signTransaction(
|
|
|
198
128
|
- `transaction`
|
|
199
129
|
|
|
200
130
|
- **Required**
|
|
201
|
-
- **Type:**`
|
|
202
|
-
- The transaction
|
|
131
|
+
- **Type:**`Uint8Array`
|
|
132
|
+
- The transaction buffer that needs to be signed.
|
|
203
133
|
|
|
204
134
|
- `options`
|
|
205
135
|
|
|
@@ -214,104 +144,23 @@ const { observable, cancel } = signerEth.signTransaction(
|
|
|
214
144
|
|
|
215
145
|
- `domain` An optional string representing the domain present in the transaction. Currently, only ENS domains are supported.
|
|
216
146
|
|
|
217
|
-
**Returns**
|
|
218
|
-
|
|
219
|
-
- `observable`
|
|
147
|
+
#### **Returns**
|
|
220
148
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
```typescript
|
|
224
|
-
observable.subscribe({
|
|
225
|
-
next: (state: SignTransactionDAState) => {
|
|
226
|
-
switch (state.status) {
|
|
227
|
-
case DeviceActionStatus.NotStarted: {
|
|
228
|
-
console.log("The action is not started yet.");
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
case DeviceActionStatus.Pending: {
|
|
232
|
-
const {
|
|
233
|
-
intermediateValue: { requiredUserInteraction },
|
|
234
|
-
} = state;
|
|
235
|
-
// Access the intermediate value here, explained below
|
|
236
|
-
console.log(
|
|
237
|
-
"The action is pending and the intermediate value is: ",
|
|
238
|
-
intermediateValue,
|
|
239
|
-
);
|
|
240
|
-
break;
|
|
241
|
-
}
|
|
242
|
-
case DeviceActionStatus.Stopped: {
|
|
243
|
-
console.log("The action has been stopped.");
|
|
244
|
-
break;
|
|
245
|
-
}
|
|
246
|
-
case DeviceActionStatus.Completed: {
|
|
247
|
-
const { output } = state;
|
|
248
|
-
// Access the output of the completed action here
|
|
249
|
-
console.log("The action has been completed: ", output);
|
|
250
|
-
break;
|
|
251
|
-
}
|
|
252
|
-
case DeviceActionStatus.Error: {
|
|
253
|
-
const { error } = state;
|
|
254
|
-
// Access the error here if occured
|
|
255
|
-
console.log("An error occured during the action: ", error);
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
});
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
- When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
264
|
-
|
|
265
|
-
```typescript
|
|
266
|
-
const { requiredUserInteraction } = intermediateValue;
|
|
149
|
+
- `observable` Emits DeviceActionState updates, including the following details:
|
|
267
150
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
case UserInteractionRequired.None: {
|
|
277
|
-
// No user action required
|
|
278
|
-
console.log("No user action needed.");
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
case UserInteractionRequired.UnlockDevice: {
|
|
282
|
-
// User needs to unlock the device
|
|
283
|
-
console.log("The user needs to unlock the device.");
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
case UserInteractionRequired.ConfirmOpenApp: {
|
|
287
|
-
// User needs to confirm on the device to open the app
|
|
288
|
-
console.log("The user needs to confirm on the device to open the app.");
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
default:
|
|
292
|
-
// Type guard to ensure all cases are handled
|
|
293
|
-
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
294
|
-
console.error(
|
|
295
|
-
"Unhandled user interaction case:",
|
|
296
|
-
uncaughtUserInteraction,
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
- When the action status is `DeviceActionStatus.Completed`, the execution result can be accessed through the `output` property in the state. This property is a `Signature` object with the following structure:
|
|
151
|
+
```typescript
|
|
152
|
+
type Signature = {
|
|
153
|
+
r: `0x${string}`; // R component of the signature
|
|
154
|
+
s: `0x${string}`; // S component of the signature
|
|
155
|
+
v: number; // Recovery parameter
|
|
156
|
+
};
|
|
157
|
+
```
|
|
302
158
|
|
|
303
|
-
|
|
304
|
-
type Signature = {
|
|
305
|
-
r: `0x${string}`;
|
|
306
|
-
s: `0x${string}`;
|
|
307
|
-
v: number;
|
|
308
|
-
};
|
|
309
|
-
```
|
|
159
|
+
- `cancel` A function to cancel the action on the Ledger device.
|
|
310
160
|
|
|
311
|
-
|
|
312
|
-
- The function without a return value to cancel the action on the Ledger device.
|
|
161
|
+
---
|
|
313
162
|
|
|
314
|
-
|
|
163
|
+
### Use Case 3: Sign Message
|
|
315
164
|
|
|
316
165
|
This method allows users to sign a text string that is displayed on Ledger devices.
|
|
317
166
|
|
|
@@ -319,7 +168,7 @@ This method allows users to sign a text string that is displayed on Ledger devic
|
|
|
319
168
|
const { observable, cancel } = signerEth.signMessage(derivationPath, message);
|
|
320
169
|
```
|
|
321
170
|
|
|
322
|
-
**Parameters**
|
|
171
|
+
#### **Parameters**
|
|
323
172
|
|
|
324
173
|
- `derivationPath`
|
|
325
174
|
|
|
@@ -333,102 +182,23 @@ const { observable, cancel } = signerEth.signMessage(derivationPath, message);
|
|
|
333
182
|
- **Type:** `string`
|
|
334
183
|
- The message to be signed, which will be displayed on the Ledger device.
|
|
335
184
|
|
|
336
|
-
**Returns**
|
|
185
|
+
#### **Returns**
|
|
337
186
|
|
|
338
|
-
- `observable`
|
|
187
|
+
- `observable` Emits DeviceActionState updates, including the following details:
|
|
339
188
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
console.log("The action is not started yet.");
|
|
348
|
-
break;
|
|
349
|
-
}
|
|
350
|
-
case DeviceActionStatus.Pending: {
|
|
351
|
-
const {
|
|
352
|
-
intermediateValue: { requiredUserInteraction },
|
|
353
|
-
} = state;
|
|
354
|
-
// Access the intermediate value here, explained below
|
|
355
|
-
console.log(
|
|
356
|
-
"The action is pending and the intermediate value is: ",
|
|
357
|
-
intermediateValue,
|
|
358
|
-
);
|
|
359
|
-
break;
|
|
360
|
-
}
|
|
361
|
-
case DeviceActionStatus.Stopped: {
|
|
362
|
-
console.log("The action has been stopped.");
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
case DeviceActionStatus.Completed: {
|
|
366
|
-
const { output } = state;
|
|
367
|
-
// Access the output of the completed action here
|
|
368
|
-
console.log("The action has been completed: ", output);
|
|
369
|
-
break;
|
|
370
|
-
}
|
|
371
|
-
case DeviceActionStatus.Error: {
|
|
372
|
-
const { error } = state;
|
|
373
|
-
// Access the error here if occured
|
|
374
|
-
console.log("An error occured during the action: ", error);
|
|
375
|
-
break;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
});
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
- When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
383
|
-
|
|
384
|
-
```typescript
|
|
385
|
-
const { requiredUserInteraction } = intermediateValue;
|
|
386
|
-
|
|
387
|
-
switch (requiredUserInteraction) {
|
|
388
|
-
case UserInteractionRequired.SignPersonalMessage: {
|
|
389
|
-
// User needs to sign the message displayed on the device
|
|
390
|
-
console.log("User needs to sign the message displayed on the device.");
|
|
391
|
-
break;
|
|
392
|
-
}
|
|
393
|
-
case UserInteractionRequired.None: {
|
|
394
|
-
// No user action required
|
|
395
|
-
console.log("No user action needed.");
|
|
396
|
-
break;
|
|
397
|
-
}
|
|
398
|
-
case UserInteractionRequired.UnlockDevice: {
|
|
399
|
-
// User needs to unlock the device
|
|
400
|
-
console.log("The user needs to unlock the device.");
|
|
401
|
-
break;
|
|
402
|
-
}
|
|
403
|
-
case UserInteractionRequired.ConfirmOpenApp: {
|
|
404
|
-
// User needs to confirm on the device to open the app
|
|
405
|
-
console.log("The user needs to confirm on the device to open the app.");
|
|
406
|
-
break;
|
|
407
|
-
}
|
|
408
|
-
default:
|
|
409
|
-
// Type guard to ensure all cases are handled
|
|
410
|
-
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
411
|
-
console.error(
|
|
412
|
-
"Unhandled user interaction case:",
|
|
413
|
-
uncaughtUserInteraction,
|
|
414
|
-
);
|
|
415
|
-
}
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
- When the action status is `DeviceActionStatus.Completed`, the execution result can be accessed through the `output` property in the state. This property is a `Signature` object with the following structure:
|
|
189
|
+
```typescript
|
|
190
|
+
type Signature = {
|
|
191
|
+
r: `0x${string}`; // R component of the signature
|
|
192
|
+
s: `0x${string}`; // S component of the signature
|
|
193
|
+
v: number; // Recovery parameter
|
|
194
|
+
};
|
|
195
|
+
```
|
|
419
196
|
|
|
420
|
-
|
|
421
|
-
type Signature = {
|
|
422
|
-
r: `0x${string}`;
|
|
423
|
-
s: `0x${string}`;
|
|
424
|
-
v: number;
|
|
425
|
-
};
|
|
426
|
-
```
|
|
197
|
+
- `cancel` A function to cancel the action on the Ledger device.
|
|
427
198
|
|
|
428
|
-
|
|
429
|
-
- The function without a return value to cancel the action on the Ledger device.
|
|
199
|
+
---
|
|
430
200
|
|
|
431
|
-
|
|
201
|
+
### Use Case 4: Sign Typed Data
|
|
432
202
|
|
|
433
203
|
This method enables users to sign an Ethereum message following the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specification.
|
|
434
204
|
|
|
@@ -439,7 +209,7 @@ const { observable, cancel } = signerEth.signTypedData(
|
|
|
439
209
|
);
|
|
440
210
|
```
|
|
441
211
|
|
|
442
|
-
**Parameters**
|
|
212
|
+
#### **Parameters**
|
|
443
213
|
|
|
444
214
|
- `derivationPath`
|
|
445
215
|
|
|
@@ -476,101 +246,122 @@ const { observable, cancel } = signerEth.signTypedData(
|
|
|
476
246
|
|
|
477
247
|
- The typed data as defined at [EIP-712](https://eips.ethereum.org/EIPS/eip-712).
|
|
478
248
|
|
|
479
|
-
**Returns**
|
|
249
|
+
#### **Returns**
|
|
480
250
|
|
|
481
|
-
- `observable`
|
|
251
|
+
- `observable` Emits DeviceActionState updates, including the following details:
|
|
482
252
|
|
|
483
|
-
|
|
253
|
+
```typescript
|
|
254
|
+
type Signature = {
|
|
255
|
+
r: `0x${string}`; // R component of the signature
|
|
256
|
+
s: `0x${string}`; // S component of the signature
|
|
257
|
+
v: number; // Recovery parameter
|
|
258
|
+
};
|
|
259
|
+
```
|
|
484
260
|
|
|
485
|
-
|
|
486
|
-
observable.subscribe({
|
|
487
|
-
next: (state: SignTypedDataDAState) => {
|
|
488
|
-
switch (state.status) {
|
|
489
|
-
case DeviceActionStatus.NotStarted: {
|
|
490
|
-
console.log("The action is not started yet.");
|
|
491
|
-
break;
|
|
492
|
-
}
|
|
493
|
-
case DeviceActionStatus.Pending: {
|
|
494
|
-
const { intermediateValue } = state;
|
|
495
|
-
// Access the intermediate value here, explained below
|
|
496
|
-
console.log(
|
|
497
|
-
"The action is pending and the intermediate value is: ",
|
|
498
|
-
requiredUserInteraction,
|
|
499
|
-
);
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
case DeviceActionStatus.Stopped: {
|
|
503
|
-
console.log("The action has been stopped.");
|
|
504
|
-
break;
|
|
505
|
-
}
|
|
506
|
-
case DeviceActionStatus.Completed: {
|
|
507
|
-
const { output } = state;
|
|
508
|
-
// Access the output of the completed action here, explained below
|
|
509
|
-
console.log("The action has been completed: ", output);
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
|
-
case DeviceActionStatus.Error: {
|
|
513
|
-
const { error } = state;
|
|
514
|
-
// Access the error here if occured
|
|
515
|
-
console.log("An error occured during the action: ", error);
|
|
516
|
-
break;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
},
|
|
520
|
-
});
|
|
521
|
-
```
|
|
261
|
+
- `cancel` A function to cancel the action on the Ledger device.
|
|
522
262
|
|
|
523
|
-
|
|
263
|
+
## 🔹 Observable Behavior
|
|
524
264
|
|
|
525
|
-
|
|
526
|
-
|
|
265
|
+
Each method returns an [Observable](https://rxjs.dev/guide/observable) emitting updates structured as [`DeviceActionState`](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/packages/device-management-kit/src/api/device-action/model/DeviceActionState.ts). These updates reflect the operation’s progress and status:
|
|
266
|
+
|
|
267
|
+
- **NotStarted**: The operation hasn’t started.
|
|
268
|
+
- **Pending**: The operation is in progress and may require user interaction.
|
|
269
|
+
- **Stopped**: The operation was canceled or stopped.
|
|
270
|
+
- **Completed**: The operation completed successfully, with results available.
|
|
271
|
+
- **Error**: An error occurred.
|
|
527
272
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
273
|
+
**Example Observable Subscription:**
|
|
274
|
+
|
|
275
|
+
```typescript
|
|
276
|
+
observable.subscribe({
|
|
277
|
+
next: (state: DeviceActionState) => {
|
|
278
|
+
switch (state.status) {
|
|
279
|
+
case DeviceActionStatus.NotStarted: {
|
|
280
|
+
console.log("The action is not started yet.");
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
case DeviceActionStatus.Pending: {
|
|
284
|
+
const {
|
|
285
|
+
intermediateValue: { requiredUserInteraction },
|
|
286
|
+
} = state;
|
|
287
|
+
// Access the intermediate value here, explained below
|
|
531
288
|
console.log(
|
|
532
|
-
"
|
|
289
|
+
"The action is pending and the intermediate value is: ",
|
|
290
|
+
intermediateValue,
|
|
533
291
|
);
|
|
534
292
|
break;
|
|
535
293
|
}
|
|
536
|
-
case
|
|
537
|
-
|
|
538
|
-
console.log("No user action needed.");
|
|
294
|
+
case DeviceActionStatus.Stopped: {
|
|
295
|
+
console.log("The action has been stopped.");
|
|
539
296
|
break;
|
|
540
297
|
}
|
|
541
|
-
case
|
|
542
|
-
|
|
543
|
-
|
|
298
|
+
case DeviceActionStatus.Completed: {
|
|
299
|
+
const { output } = state;
|
|
300
|
+
// Access the output of the completed action here
|
|
301
|
+
console.log("The action has been completed: ", output);
|
|
544
302
|
break;
|
|
545
303
|
}
|
|
546
|
-
case
|
|
547
|
-
|
|
548
|
-
|
|
304
|
+
case DeviceActionStatus.Error: {
|
|
305
|
+
const { error } = state;
|
|
306
|
+
// Access the error here if occurred
|
|
307
|
+
console.log("An error occurred during the action: ", error);
|
|
549
308
|
break;
|
|
550
309
|
}
|
|
551
|
-
default:
|
|
552
|
-
// Type guard to ensure all cases are handled
|
|
553
|
-
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
554
|
-
console.error(
|
|
555
|
-
"Unhandled user interaction case:",
|
|
556
|
-
uncaughtUserInteraction,
|
|
557
|
-
);
|
|
558
310
|
}
|
|
559
|
-
|
|
311
|
+
},
|
|
312
|
+
});
|
|
313
|
+
```
|
|
560
314
|
|
|
561
|
-
|
|
315
|
+
**Intermediate Values in Pending Status:**
|
|
562
316
|
|
|
563
|
-
|
|
564
|
-
type Signature = {
|
|
565
|
-
r: `0x${string}`;
|
|
566
|
-
s: `0x${string}`;
|
|
567
|
-
v: number;
|
|
568
|
-
};
|
|
569
|
-
```
|
|
317
|
+
When the status is DeviceActionStatus.Pending, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
570
318
|
|
|
571
|
-
|
|
572
|
-
|
|
319
|
+
```typescript
|
|
320
|
+
const { requiredUserInteraction } = intermediateValue;
|
|
321
|
+
|
|
322
|
+
switch (requiredUserInteraction) {
|
|
323
|
+
case UserInteractionRequired.SignPersonalMessage: {
|
|
324
|
+
// User needs to sign the message displayed on the device
|
|
325
|
+
console.log("User needs to sign the message displayed on the device.");
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
case UserInteractionRequired.SignTypedData: {
|
|
329
|
+
// User needs to sign the typed data displayed on the device
|
|
330
|
+
console.log("User needs to sign the typed data displayed on the device.");
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
case UserInteractionRequired.SignTransaction: {
|
|
334
|
+
// User needs to sign the transaction displayed on the device
|
|
335
|
+
console.log("User needs to sign the transaction displayed on the device.");
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
case UserInteractionRequired.VerifyAddress: {
|
|
339
|
+
// User needs to verify the address displayed on the device
|
|
340
|
+
console.log("User needs to verify the address displayed on the device.");
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
case UserInteractionRequired.None: {
|
|
344
|
+
// No user action required
|
|
345
|
+
console.log("No user action needed.");
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
case UserInteractionRequired.UnlockDevice: {
|
|
349
|
+
// User needs to unlock the device
|
|
350
|
+
console.log("The user needs to unlock the device.");
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
case UserInteractionRequired.ConfirmOpenApp: {
|
|
354
|
+
// User needs to confirm on the device to open the app
|
|
355
|
+
console.log("The user needs to confirm on the device to open the app.");
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
default:
|
|
359
|
+
// Type guard to ensure all cases are handled
|
|
360
|
+
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
361
|
+
console.error("Unhandled user interaction case:", uncaughtUserInteraction);
|
|
362
|
+
}
|
|
363
|
+
```
|
|
573
364
|
|
|
574
|
-
## Example
|
|
365
|
+
## 🔹 Example
|
|
575
366
|
|
|
576
367
|
We encourage you to explore the Ethereum Signer by trying it out in our online [sample application](https://app.devicesdk.ledger-test.com/). Experience how it works and see its capabilities in action. Of course, you will need a Ledger device connected.
|
package/lib/cjs/api/SignerEth.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var y=(e,t,a,
|
|
1
|
+
"use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var y=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of o(t))!p.call(e,r)&&r!==a&&i(e,r,{get:()=>t[r],enumerable:!(n=s(t,r))||n.enumerable});return e};var d=e=>y(i({},"__esModule",{value:!0}),e);var g={};module.exports=d(g);
|
|
2
2
|
//# sourceMappingURL=SignerEth.js.map
|