@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.
Files changed (543) hide show
  1. package/README.md +162 -371
  2. package/lib/cjs/api/SignerEth.js +1 -1
  3. package/lib/cjs/api/SignerEth.js.map +1 -1
  4. package/lib/cjs/api/SignerEthBuilder.test.js +1 -1
  5. package/lib/cjs/api/SignerEthBuilder.test.js.map +1 -1
  6. package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js +1 -1
  7. package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js.map +1 -1
  8. package/lib/cjs/api/app-binder/GetConfigCommandTypes.js +2 -0
  9. package/lib/cjs/api/app-binder/GetConfigCommandTypes.js.map +7 -0
  10. package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.js +1 -1
  11. package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.js.map +1 -1
  12. package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js +1 -1
  13. package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js.map +1 -1
  14. package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.js +1 -1
  15. package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.js.map +1 -1
  16. package/lib/cjs/api/index.js +1 -1
  17. package/lib/cjs/api/index.js.map +2 -2
  18. package/lib/cjs/api/model/TransactionType.js +2 -0
  19. package/lib/cjs/api/model/TransactionType.js.map +7 -0
  20. package/lib/cjs/index.js.map +1 -1
  21. package/lib/cjs/internal/DefaultSignerEth.js +1 -1
  22. package/lib/cjs/internal/DefaultSignerEth.js.map +2 -2
  23. package/lib/cjs/internal/DefaultSignerEth.test.js +1 -1
  24. package/lib/cjs/internal/DefaultSignerEth.test.js.map +2 -2
  25. package/lib/cjs/internal/address/use-case/GetAddressUseCase.test.js +1 -1
  26. package/lib/cjs/internal/address/use-case/GetAddressUseCase.test.js.map +2 -2
  27. package/lib/cjs/internal/app-binder/EthAppBinder.js +1 -1
  28. package/lib/cjs/internal/app-binder/EthAppBinder.js.map +3 -3
  29. package/lib/cjs/internal/app-binder/EthAppBinder.test.js +1 -1
  30. package/lib/cjs/internal/app-binder/EthAppBinder.test.js.map +3 -3
  31. package/lib/cjs/internal/app-binder/command/GetAddressCommand.js +1 -1
  32. package/lib/cjs/internal/app-binder/command/GetAddressCommand.js.map +3 -3
  33. package/lib/cjs/internal/app-binder/command/GetAddressCommand.test.js +1 -1
  34. package/lib/cjs/internal/app-binder/command/GetAddressCommand.test.js.map +2 -2
  35. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.js +2 -0
  36. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.js.map +7 -0
  37. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.test.js +2 -0
  38. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.test.js.map +7 -0
  39. package/lib/cjs/internal/app-binder/command/GetChallengeCommand.js +1 -1
  40. package/lib/cjs/internal/app-binder/command/GetChallengeCommand.js.map +3 -3
  41. package/lib/cjs/internal/app-binder/command/GetChallengeCommand.test.js +1 -1
  42. package/lib/cjs/internal/app-binder/command/GetChallengeCommand.test.js.map +2 -2
  43. package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.js +1 -1
  44. package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.js.map +3 -3
  45. package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.test.js +1 -1
  46. package/lib/cjs/internal/app-binder/command/ProvideEnumCommand.test.js.map +3 -3
  47. package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.js +1 -1
  48. package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.js.map +3 -3
  49. package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.js +1 -1
  50. package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.js.map +3 -3
  51. package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js +1 -1
  52. package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js.map +3 -3
  53. package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js +1 -1
  54. package/lib/cjs/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js.map +3 -3
  55. package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.js +1 -1
  56. package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.js.map +3 -3
  57. package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.test.js +1 -1
  58. package/lib/cjs/internal/app-binder/command/ProvideTransactionInformationCommand.test.js.map +3 -3
  59. package/lib/cjs/internal/app-binder/command/ProvideTrustedNameCommand.js +1 -1
  60. package/lib/cjs/internal/app-binder/command/ProvideTrustedNameCommand.js.map +3 -3
  61. package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.js +2 -0
  62. package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.js.map +7 -0
  63. package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.test.js +2 -0
  64. package/lib/cjs/internal/app-binder/command/ProvideWeb3CheckCommand.test.js.map +7 -0
  65. package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.js +1 -1
  66. package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.js.map +3 -3
  67. package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.js +1 -1
  68. package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.js.map +3 -3
  69. package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js +1 -1
  70. package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js.map +2 -2
  71. package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.js +1 -1
  72. package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.js.map +3 -3
  73. package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.js +1 -1
  74. package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.js.map +3 -3
  75. package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.test.js +2 -2
  76. package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.test.js.map +3 -3
  77. package/lib/cjs/internal/app-binder/command/SetPluginCommand.js +1 -1
  78. package/lib/cjs/internal/app-binder/command/SetPluginCommand.js.map +3 -3
  79. package/lib/cjs/internal/app-binder/command/SetPluginCommand.test.js +2 -2
  80. package/lib/cjs/internal/app-binder/command/SetPluginCommand.test.js.map +3 -3
  81. package/lib/cjs/internal/app-binder/command/SignEIP712Command.js +1 -1
  82. package/lib/cjs/internal/app-binder/command/SignEIP712Command.js.map +3 -3
  83. package/lib/cjs/internal/app-binder/command/SignEIP712Command.test.js +1 -1
  84. package/lib/cjs/internal/app-binder/command/SignEIP712Command.test.js.map +2 -2
  85. package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.js +1 -1
  86. package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.js.map +3 -3
  87. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js +1 -1
  88. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js.map +3 -3
  89. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js +1 -1
  90. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js.map +2 -2
  91. package/lib/cjs/internal/app-binder/command/StartTransactionCommand.js +1 -1
  92. package/lib/cjs/internal/app-binder/command/StartTransactionCommand.js.map +3 -3
  93. package/lib/cjs/internal/app-binder/command/StartTransactionCommand.test.js +1 -1
  94. package/lib/cjs/internal/app-binder/command/StartTransactionCommand.test.js.map +3 -3
  95. package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.js +1 -1
  96. package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.js.map +3 -3
  97. package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.test.js +1 -1
  98. package/lib/cjs/internal/app-binder/command/StoreTransactionCommand.test.js.map +3 -3
  99. package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.js +2 -0
  100. package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.js.map +7 -0
  101. package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.test.js +2 -0
  102. package/lib/cjs/internal/app-binder/command/Web3CheckOptInCommand.test.js.map +7 -0
  103. package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.js +2 -0
  104. package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.js.map +7 -0
  105. package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.test.js +2 -0
  106. package/lib/cjs/internal/app-binder/command/utils/ethAppErrors.test.js.map +7 -0
  107. package/lib/cjs/internal/app-binder/constant/plugins.js +2 -0
  108. package/lib/cjs/internal/app-binder/constant/plugins.js.map +7 -0
  109. package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js +1 -1
  110. package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js.map +3 -3
  111. package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js +1 -1
  112. package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js.map +3 -3
  113. package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js +1 -1
  114. package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js.map +3 -3
  115. package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js +1 -1
  116. package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js.map +3 -3
  117. package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +1 -1
  118. package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  119. package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +1 -1
  120. package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +2 -2
  121. package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  122. package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  123. package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.js +1 -1
  124. package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.js.map +3 -3
  125. package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.test.js +1 -1
  126. package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.test.js.map +3 -3
  127. package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js +1 -1
  128. package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js.map +3 -3
  129. package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.test.js +1 -1
  130. package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.test.js.map +3 -3
  131. package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.js +2 -0
  132. package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.js.map +7 -0
  133. package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.test.js +2 -0
  134. package/lib/cjs/internal/app-binder/task/GetWeb3CheckTask.test.js.map +7 -0
  135. package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.js +1 -1
  136. package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.js.map +3 -3
  137. package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.test.js +1 -1
  138. package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.test.js.map +3 -3
  139. package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.js +1 -1
  140. package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.js.map +3 -3
  141. package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.test.js +1 -1
  142. package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.test.js.map +2 -2
  143. package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js +1 -1
  144. package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js.map +3 -3
  145. package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js +1 -1
  146. package/lib/cjs/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js.map +3 -3
  147. package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.js +1 -1
  148. package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.js.map +3 -3
  149. package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js +1 -1
  150. package/lib/cjs/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js.map +3 -3
  151. package/lib/cjs/internal/app-binder/task/SendCommandInChunksTask.js +1 -1
  152. package/lib/cjs/internal/app-binder/task/SendCommandInChunksTask.js.map +2 -2
  153. package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.js +1 -1
  154. package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.js.map +2 -2
  155. package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.test.js +1 -1
  156. package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.test.js.map +2 -2
  157. package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.js +1 -1
  158. package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.js.map +2 -2
  159. package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.test.js +1 -1
  160. package/lib/cjs/internal/app-binder/task/SendPayloadInChunksTask.test.js.map +2 -2
  161. package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.js +1 -1
  162. package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.js.map +2 -2
  163. package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.test.js +1 -1
  164. package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.test.js.map +2 -2
  165. package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.js +1 -1
  166. package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.js.map +3 -3
  167. package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.test.js +1 -1
  168. package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.test.js.map +3 -3
  169. package/lib/cjs/internal/message/use-case/SignMessageUseCase.test.js +1 -1
  170. package/lib/cjs/internal/message/use-case/SignMessageUseCase.test.js.map +2 -2
  171. package/lib/cjs/internal/transaction/di/transactionModule.js +1 -1
  172. package/lib/cjs/internal/transaction/di/transactionModule.js.map +3 -3
  173. package/lib/cjs/internal/transaction/di/transactionModule.test.js +1 -1
  174. package/lib/cjs/internal/transaction/di/transactionModule.test.js.map +2 -2
  175. package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.js +2 -0
  176. package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.js.map +7 -0
  177. package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js +2 -0
  178. package/lib/cjs/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js.map +7 -0
  179. package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.js +1 -1
  180. package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.js.map +1 -1
  181. package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.js +1 -1
  182. package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.js.map +2 -2
  183. package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.test.js +1 -1
  184. package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.test.js.map +2 -2
  185. package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.js +1 -1
  186. package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.js.map +1 -1
  187. package/lib/cjs/internal/transaction/service/parser/TransactionParserService.js +1 -1
  188. package/lib/cjs/internal/transaction/service/parser/TransactionParserService.js.map +3 -3
  189. package/lib/cjs/internal/transaction/service/parser/TransactionParserService.test.js +1 -1
  190. package/lib/cjs/internal/transaction/service/parser/TransactionParserService.test.js.map +3 -3
  191. package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.js +1 -1
  192. package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.js.map +2 -2
  193. package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.test.js +1 -1
  194. package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.test.js.map +3 -3
  195. package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.test.js +1 -1
  196. package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.test.js.map +2 -2
  197. package/lib/cjs/package.json +12 -12
  198. package/lib/esm/api/SignerEthBuilder.test.js +1 -1
  199. package/lib/esm/api/SignerEthBuilder.test.js.map +1 -1
  200. package/lib/esm/api/app-binder/GetConfigCommandTypes.js +1 -0
  201. package/lib/esm/api/app-binder/GetConfigCommandTypes.js.map +7 -0
  202. package/lib/esm/api/index.js +1 -1
  203. package/lib/esm/api/index.js.map +2 -2
  204. package/lib/esm/api/model/TransactionType.js +2 -0
  205. package/lib/esm/api/model/TransactionType.js.map +7 -0
  206. package/lib/esm/internal/DefaultSignerEth.js.map +2 -2
  207. package/lib/esm/internal/DefaultSignerEth.test.js +1 -1
  208. package/lib/esm/internal/DefaultSignerEth.test.js.map +2 -2
  209. package/lib/esm/internal/address/use-case/GetAddressUseCase.test.js +1 -1
  210. package/lib/esm/internal/address/use-case/GetAddressUseCase.test.js.map +2 -2
  211. package/lib/esm/internal/app-binder/EthAppBinder.js +1 -1
  212. package/lib/esm/internal/app-binder/EthAppBinder.js.map +3 -3
  213. package/lib/esm/internal/app-binder/EthAppBinder.test.js +1 -1
  214. package/lib/esm/internal/app-binder/EthAppBinder.test.js.map +3 -3
  215. package/lib/esm/internal/app-binder/command/GetAddressCommand.js +1 -1
  216. package/lib/esm/internal/app-binder/command/GetAddressCommand.js.map +3 -3
  217. package/lib/esm/internal/app-binder/command/GetAddressCommand.test.js +1 -1
  218. package/lib/esm/internal/app-binder/command/GetAddressCommand.test.js.map +2 -2
  219. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.js +2 -0
  220. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.js.map +7 -0
  221. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.test.js +2 -0
  222. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.test.js.map +7 -0
  223. package/lib/esm/internal/app-binder/command/GetChallengeCommand.js +1 -1
  224. package/lib/esm/internal/app-binder/command/GetChallengeCommand.js.map +3 -3
  225. package/lib/esm/internal/app-binder/command/GetChallengeCommand.test.js +1 -1
  226. package/lib/esm/internal/app-binder/command/GetChallengeCommand.test.js.map +2 -2
  227. package/lib/esm/internal/app-binder/command/ProvideEnumCommand.js +1 -1
  228. package/lib/esm/internal/app-binder/command/ProvideEnumCommand.js.map +3 -3
  229. package/lib/esm/internal/app-binder/command/ProvideEnumCommand.test.js +1 -1
  230. package/lib/esm/internal/app-binder/command/ProvideEnumCommand.test.js.map +3 -3
  231. package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.js +1 -1
  232. package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.js.map +3 -3
  233. package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.js +1 -1
  234. package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.js.map +3 -3
  235. package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js +1 -1
  236. package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.js.map +3 -3
  237. package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js +1 -1
  238. package/lib/esm/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.test.js.map +3 -3
  239. package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.js +1 -1
  240. package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.js.map +3 -3
  241. package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.test.js +1 -1
  242. package/lib/esm/internal/app-binder/command/ProvideTransactionInformationCommand.test.js.map +3 -3
  243. package/lib/esm/internal/app-binder/command/ProvideTrustedNameCommand.js +1 -1
  244. package/lib/esm/internal/app-binder/command/ProvideTrustedNameCommand.js.map +3 -3
  245. package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.js +2 -0
  246. package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.js.map +7 -0
  247. package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.test.js +2 -0
  248. package/lib/esm/internal/app-binder/command/ProvideWeb3CheckCommand.test.js.map +7 -0
  249. package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.js +1 -1
  250. package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.js.map +3 -3
  251. package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.js +1 -1
  252. package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.js.map +3 -3
  253. package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js +1 -1
  254. package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.test.js.map +2 -2
  255. package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.js +1 -1
  256. package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.js.map +3 -3
  257. package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.js +1 -1
  258. package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.js.map +3 -3
  259. package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.test.js +2 -2
  260. package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.test.js.map +3 -3
  261. package/lib/esm/internal/app-binder/command/SetPluginCommand.js +1 -1
  262. package/lib/esm/internal/app-binder/command/SetPluginCommand.js.map +3 -3
  263. package/lib/esm/internal/app-binder/command/SetPluginCommand.test.js +1 -1
  264. package/lib/esm/internal/app-binder/command/SetPluginCommand.test.js.map +3 -3
  265. package/lib/esm/internal/app-binder/command/SignEIP712Command.js +1 -1
  266. package/lib/esm/internal/app-binder/command/SignEIP712Command.js.map +3 -3
  267. package/lib/esm/internal/app-binder/command/SignEIP712Command.test.js +1 -1
  268. package/lib/esm/internal/app-binder/command/SignEIP712Command.test.js.map +2 -2
  269. package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.js +1 -1
  270. package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.js.map +3 -3
  271. package/lib/esm/internal/app-binder/command/SignTransactionCommand.js +1 -1
  272. package/lib/esm/internal/app-binder/command/SignTransactionCommand.js.map +3 -3
  273. package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js +1 -1
  274. package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js.map +2 -2
  275. package/lib/esm/internal/app-binder/command/StartTransactionCommand.js +1 -1
  276. package/lib/esm/internal/app-binder/command/StartTransactionCommand.js.map +3 -3
  277. package/lib/esm/internal/app-binder/command/StartTransactionCommand.test.js +1 -1
  278. package/lib/esm/internal/app-binder/command/StartTransactionCommand.test.js.map +3 -3
  279. package/lib/esm/internal/app-binder/command/StoreTransactionCommand.js +1 -1
  280. package/lib/esm/internal/app-binder/command/StoreTransactionCommand.js.map +3 -3
  281. package/lib/esm/internal/app-binder/command/StoreTransactionCommand.test.js +1 -1
  282. package/lib/esm/internal/app-binder/command/StoreTransactionCommand.test.js.map +3 -3
  283. package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.js +2 -0
  284. package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.js.map +7 -0
  285. package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.test.js +2 -0
  286. package/lib/esm/internal/app-binder/command/Web3CheckOptInCommand.test.js.map +7 -0
  287. package/lib/esm/internal/app-binder/command/utils/ethAppErrors.js +2 -0
  288. package/lib/esm/internal/app-binder/command/utils/ethAppErrors.js.map +7 -0
  289. package/lib/esm/internal/app-binder/command/utils/ethAppErrors.test.js +2 -0
  290. package/lib/esm/internal/app-binder/command/utils/ethAppErrors.test.js.map +7 -0
  291. package/lib/esm/internal/app-binder/constant/plugins.js +2 -0
  292. package/lib/esm/internal/app-binder/constant/plugins.js.map +7 -0
  293. package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js +1 -1
  294. package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js.map +3 -3
  295. package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js +1 -1
  296. package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.test.js.map +3 -3
  297. package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js +1 -1
  298. package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js.map +3 -3
  299. package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js +1 -1
  300. package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.test.js.map +3 -3
  301. package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +1 -1
  302. package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  303. package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +1 -1
  304. package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +2 -2
  305. package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  306. package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  307. package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.js +1 -1
  308. package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.js.map +3 -3
  309. package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.test.js +1 -1
  310. package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.test.js.map +3 -3
  311. package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js +1 -1
  312. package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js.map +3 -3
  313. package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.test.js +1 -1
  314. package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.test.js.map +3 -3
  315. package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.js +2 -0
  316. package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.js.map +7 -0
  317. package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.test.js +2 -0
  318. package/lib/esm/internal/app-binder/task/GetWeb3CheckTask.test.js.map +7 -0
  319. package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.js +1 -1
  320. package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.js.map +3 -3
  321. package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.test.js +1 -1
  322. package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.test.js.map +3 -3
  323. package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.js +1 -1
  324. package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.js.map +3 -3
  325. package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.test.js +1 -1
  326. package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.test.js.map +2 -2
  327. package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js +1 -1
  328. package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.js.map +3 -3
  329. package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js +1 -1
  330. package/lib/esm/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.test.js.map +3 -3
  331. package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.js +1 -1
  332. package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.js.map +3 -3
  333. package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js +1 -1
  334. package/lib/esm/internal/app-binder/task/ProvideTransactionGenericContextTask.test.js.map +3 -3
  335. package/lib/esm/internal/app-binder/task/SendCommandInChunksTask.js +1 -1
  336. package/lib/esm/internal/app-binder/task/SendCommandInChunksTask.js.map +2 -2
  337. package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.js +1 -1
  338. package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.js.map +2 -2
  339. package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.test.js +1 -1
  340. package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.test.js.map +2 -2
  341. package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.js +1 -1
  342. package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.js.map +2 -2
  343. package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.test.js +1 -1
  344. package/lib/esm/internal/app-binder/task/SendPayloadInChunksTask.test.js.map +2 -2
  345. package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.js +1 -1
  346. package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.js.map +2 -2
  347. package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.test.js +1 -1
  348. package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.test.js.map +2 -2
  349. package/lib/esm/internal/app-binder/task/SendSignTransactionTask.js +1 -1
  350. package/lib/esm/internal/app-binder/task/SendSignTransactionTask.js.map +3 -3
  351. package/lib/esm/internal/app-binder/task/SendSignTransactionTask.test.js +1 -1
  352. package/lib/esm/internal/app-binder/task/SendSignTransactionTask.test.js.map +2 -2
  353. package/lib/esm/internal/message/use-case/SignMessageUseCase.test.js +1 -1
  354. package/lib/esm/internal/message/use-case/SignMessageUseCase.test.js.map +2 -2
  355. package/lib/esm/internal/transaction/di/transactionModule.js +1 -1
  356. package/lib/esm/internal/transaction/di/transactionModule.js.map +3 -3
  357. package/lib/esm/internal/transaction/di/transactionModule.test.js +1 -1
  358. package/lib/esm/internal/transaction/di/transactionModule.test.js.map +2 -2
  359. package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.js +2 -0
  360. package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.js.map +7 -0
  361. package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js +2 -0
  362. package/lib/esm/internal/transaction/service/mapper/EthersRawTransactionMapper.test.js.map +7 -0
  363. package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.js +1 -1
  364. package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.js.map +2 -2
  365. package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.test.js +1 -1
  366. package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.test.js.map +2 -2
  367. package/lib/esm/internal/transaction/service/parser/TransactionParserService.js +1 -1
  368. package/lib/esm/internal/transaction/service/parser/TransactionParserService.js.map +2 -2
  369. package/lib/esm/internal/transaction/service/parser/TransactionParserService.test.js +1 -1
  370. package/lib/esm/internal/transaction/service/parser/TransactionParserService.test.js.map +2 -2
  371. package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.js +1 -1
  372. package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.js.map +2 -2
  373. package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.test.js +1 -1
  374. package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.test.js.map +3 -3
  375. package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.test.js +1 -1
  376. package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.test.js.map +2 -2
  377. package/lib/esm/package.json +12 -12
  378. package/lib/types/api/SignerEth.d.ts +1 -2
  379. package/lib/types/api/SignerEth.d.ts.map +1 -1
  380. package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts +3 -2
  381. package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts.map +1 -1
  382. package/lib/types/api/app-binder/GetConfigCommandTypes.d.ts +7 -0
  383. package/lib/types/api/app-binder/GetConfigCommandTypes.d.ts.map +1 -0
  384. package/lib/types/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts +3 -11
  385. package/lib/types/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts.map +1 -1
  386. package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts +6 -5
  387. package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -1
  388. package/lib/types/api/app-binder/SignTypedDataDeviceActionTypes.d.ts +3 -2
  389. package/lib/types/api/app-binder/SignTypedDataDeviceActionTypes.d.ts.map +1 -1
  390. package/lib/types/api/index.d.ts +2 -2
  391. package/lib/types/api/index.d.ts.map +1 -1
  392. package/lib/types/api/model/{Transaction.d.ts → TransactionType.d.ts} +1 -4
  393. package/lib/types/api/model/TransactionType.d.ts.map +1 -0
  394. package/lib/types/internal/DefaultSignerEth.d.ts +1 -2
  395. package/lib/types/internal/DefaultSignerEth.d.ts.map +1 -1
  396. package/lib/types/internal/app-binder/EthAppBinder.d.ts +1 -2
  397. package/lib/types/internal/app-binder/EthAppBinder.d.ts.map +1 -1
  398. package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts +5 -3
  399. package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts.map +1 -1
  400. package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts +10 -0
  401. package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts.map +1 -0
  402. package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.test.d.ts +2 -0
  403. package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.test.d.ts.map +1 -0
  404. package/lib/types/internal/app-binder/command/GetChallengeCommand.d.ts +4 -2
  405. package/lib/types/internal/app-binder/command/GetChallengeCommand.d.ts.map +1 -1
  406. package/lib/types/internal/app-binder/command/ProvideEnumCommand.d.ts +4 -2
  407. package/lib/types/internal/app-binder/command/ProvideEnumCommand.d.ts.map +1 -1
  408. package/lib/types/internal/app-binder/command/ProvideNFTInformationCommand.d.ts +4 -3
  409. package/lib/types/internal/app-binder/command/ProvideNFTInformationCommand.d.ts.map +1 -1
  410. package/lib/types/internal/app-binder/command/ProvideTokenInformationCommand.d.ts +4 -2
  411. package/lib/types/internal/app-binder/command/ProvideTokenInformationCommand.d.ts.map +1 -1
  412. package/lib/types/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.d.ts +4 -2
  413. package/lib/types/internal/app-binder/command/ProvideTransactionFieldDescriptionCommand.d.ts.map +1 -1
  414. package/lib/types/internal/app-binder/command/ProvideTransactionInformationCommand.d.ts +4 -2
  415. package/lib/types/internal/app-binder/command/ProvideTransactionInformationCommand.d.ts.map +1 -1
  416. package/lib/types/internal/app-binder/command/ProvideTrustedNameCommand.d.ts +4 -2
  417. package/lib/types/internal/app-binder/command/ProvideTrustedNameCommand.d.ts.map +1 -1
  418. package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.d.ts +17 -0
  419. package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.d.ts.map +1 -0
  420. package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.test.d.ts +2 -0
  421. package/lib/types/internal/app-binder/command/ProvideWeb3CheckCommand.test.d.ts.map +1 -0
  422. package/lib/types/internal/app-binder/command/SendEIP712FilteringCommand.d.ts +4 -2
  423. package/lib/types/internal/app-binder/command/SendEIP712FilteringCommand.d.ts.map +1 -1
  424. package/lib/types/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts +4 -2
  425. package/lib/types/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts.map +1 -1
  426. package/lib/types/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts +4 -2
  427. package/lib/types/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts.map +1 -1
  428. package/lib/types/internal/app-binder/command/SetExternalPluginCommand.d.ts +5 -7
  429. package/lib/types/internal/app-binder/command/SetExternalPluginCommand.d.ts.map +1 -1
  430. package/lib/types/internal/app-binder/command/SetPluginCommand.d.ts +5 -7
  431. package/lib/types/internal/app-binder/command/SetPluginCommand.d.ts.map +1 -1
  432. package/lib/types/internal/app-binder/command/SignEIP712Command.d.ts +5 -3
  433. package/lib/types/internal/app-binder/command/SignEIP712Command.d.ts.map +1 -1
  434. package/lib/types/internal/app-binder/command/SignPersonalMessageCommand.d.ts +5 -3
  435. package/lib/types/internal/app-binder/command/SignPersonalMessageCommand.d.ts.map +1 -1
  436. package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts +5 -3
  437. package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts.map +1 -1
  438. package/lib/types/internal/app-binder/command/StartTransactionCommand.d.ts +4 -2
  439. package/lib/types/internal/app-binder/command/StartTransactionCommand.d.ts.map +1 -1
  440. package/lib/types/internal/app-binder/command/StoreTransactionCommand.d.ts +4 -2
  441. package/lib/types/internal/app-binder/command/StoreTransactionCommand.d.ts.map +1 -1
  442. package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.d.ts +15 -0
  443. package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.d.ts.map +1 -0
  444. package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.test.d.ts +2 -0
  445. package/lib/types/internal/app-binder/command/Web3CheckOptInCommand.test.d.ts.map +1 -0
  446. package/lib/types/internal/app-binder/command/utils/ethAppErrors.d.ts +8 -0
  447. package/lib/types/internal/app-binder/command/utils/ethAppErrors.d.ts.map +1 -0
  448. package/lib/types/internal/app-binder/command/utils/ethAppErrors.test.d.ts +2 -0
  449. package/lib/types/internal/app-binder/command/utils/ethAppErrors.test.d.ts.map +1 -0
  450. package/lib/types/internal/app-binder/constant/plugins.d.ts +2 -0
  451. package/lib/types/internal/app-binder/constant/plugins.d.ts.map +1 -0
  452. package/lib/types/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts +22 -10
  453. package/lib/types/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts.map +1 -1
  454. package/lib/types/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts +12 -3
  455. package/lib/types/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts.map +1 -1
  456. package/lib/types/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts +2 -1
  457. package/lib/types/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  458. package/lib/types/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.d.ts.map +1 -1
  459. package/lib/types/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts +5 -2
  460. package/lib/types/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
  461. package/lib/types/internal/app-binder/task/BuildEIP712ContextTask.d.ts +4 -1
  462. package/lib/types/internal/app-binder/task/BuildEIP712ContextTask.d.ts.map +1 -1
  463. package/lib/types/internal/app-binder/task/BuildTransactionContextTask.d.ts +3 -3
  464. package/lib/types/internal/app-binder/task/BuildTransactionContextTask.d.ts.map +1 -1
  465. package/lib/types/internal/app-binder/task/GetWeb3CheckTask.d.ts +31 -0
  466. package/lib/types/internal/app-binder/task/GetWeb3CheckTask.d.ts.map +1 -0
  467. package/lib/types/internal/app-binder/task/GetWeb3CheckTask.test.d.ts +2 -0
  468. package/lib/types/internal/app-binder/task/GetWeb3CheckTask.test.d.ts.map +1 -0
  469. package/lib/types/internal/app-binder/task/ProvideEIP712ContextTask.d.ts +14 -5
  470. package/lib/types/internal/app-binder/task/ProvideEIP712ContextTask.d.ts.map +1 -1
  471. package/lib/types/internal/app-binder/task/ProvideTransactionContextTask.d.ts +5 -7
  472. package/lib/types/internal/app-binder/task/ProvideTransactionContextTask.d.ts.map +1 -1
  473. package/lib/types/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.d.ts +54 -12
  474. package/lib/types/internal/app-binder/task/ProvideTransactionFieldDescriptionTask.d.ts.map +1 -1
  475. package/lib/types/internal/app-binder/task/ProvideTransactionGenericContextTask.d.ts +7 -6
  476. package/lib/types/internal/app-binder/task/ProvideTransactionGenericContextTask.d.ts.map +1 -1
  477. package/lib/types/internal/app-binder/task/SendCommandInChunksTask.d.ts +3 -2
  478. package/lib/types/internal/app-binder/task/SendCommandInChunksTask.d.ts.map +1 -1
  479. package/lib/types/internal/app-binder/task/SendEIP712StructImplemTask.d.ts +2 -1
  480. package/lib/types/internal/app-binder/task/SendEIP712StructImplemTask.d.ts.map +1 -1
  481. package/lib/types/internal/app-binder/task/SendPayloadInChunksTask.d.ts +2 -1
  482. package/lib/types/internal/app-binder/task/SendPayloadInChunksTask.d.ts.map +1 -1
  483. package/lib/types/internal/app-binder/task/SendSignPersonalMessageTask.d.ts +2 -1
  484. package/lib/types/internal/app-binder/task/SendSignPersonalMessageTask.d.ts.map +1 -1
  485. package/lib/types/internal/app-binder/task/SendSignTransactionTask.d.ts +3 -2
  486. package/lib/types/internal/app-binder/task/SendSignTransactionTask.d.ts.map +1 -1
  487. package/lib/types/internal/transaction/di/transactionModule.d.ts.map +1 -1
  488. package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.d.ts +7 -0
  489. package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.d.ts.map +1 -0
  490. package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.test.d.ts +2 -0
  491. package/lib/types/internal/transaction/service/mapper/EthersRawTransactionMapper.test.d.ts.map +1 -0
  492. package/lib/types/internal/transaction/service/mapper/TransactionMapper.d.ts +1 -2
  493. package/lib/types/internal/transaction/service/mapper/TransactionMapper.d.ts.map +1 -1
  494. package/lib/types/internal/transaction/service/mapper/TransactionMapperService.d.ts +1 -2
  495. package/lib/types/internal/transaction/service/mapper/TransactionMapperService.d.ts.map +1 -1
  496. package/lib/types/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts +1 -1
  497. package/lib/types/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts.map +1 -1
  498. package/lib/types/internal/transaction/service/parser/TransactionParserService.d.ts.map +1 -1
  499. package/lib/types/internal/transaction/use-case/SignTransactionUseCase.d.ts +1 -2
  500. package/lib/types/internal/transaction/use-case/SignTransactionUseCase.d.ts.map +1 -1
  501. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  502. package/package.json +16 -16
  503. package/lib/cjs/api/model/Transaction.js +0 -2
  504. package/lib/cjs/api/model/Transaction.js.map +0 -7
  505. package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js +0 -2
  506. package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js.map +0 -7
  507. package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js +0 -2
  508. package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js.map +0 -7
  509. package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.js +0 -2
  510. package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.js.map +0 -7
  511. package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js +0 -2
  512. package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js.map +0 -7
  513. package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.js +0 -2
  514. package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.js.map +0 -7
  515. package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js +0 -2
  516. package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js.map +0 -7
  517. package/lib/esm/api/model/Transaction.js +0 -2
  518. package/lib/esm/api/model/Transaction.js.map +0 -7
  519. package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js +0 -2
  520. package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js.map +0 -7
  521. package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js +0 -2
  522. package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.js.map +0 -7
  523. package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.js +0 -2
  524. package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.js.map +0 -7
  525. package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js +0 -2
  526. package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.test.js.map +0 -7
  527. package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.js +0 -2
  528. package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.js.map +0 -7
  529. package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js +0 -2
  530. package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.test.js.map +0 -7
  531. package/lib/types/api/model/Transaction.d.ts.map +0 -1
  532. package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts +0 -17
  533. package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts.map +0 -1
  534. package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.d.ts +0 -2
  535. package/lib/types/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.test.d.ts.map +0 -1
  536. package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts +0 -10
  537. package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts.map +0 -1
  538. package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.test.d.ts +0 -2
  539. package/lib/types/internal/transaction/service/mapper/EthersV5TransactionMapper.test.d.ts.map +0 -1
  540. package/lib/types/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts +0 -9
  541. package/lib/types/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts.map +0 -1
  542. package/lib/types/internal/transaction/service/mapper/EthersV6TransactionMapper.test.d.ts +0 -2
  543. 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 Implementation
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
- ### How it works
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
- ### Installation
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
- ## Usage
27
-
28
- ### Setting up
37
+ ## 🔹 Initialisation
29
38
 
30
- To initialize 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:
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
- // Initialize an Ethereum signer instance using default context module
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
- // Initialize an Ethereum signer instance using customized context module
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
- ### Use Cases
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
- #### Use Case 1: Get Address
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
- switch (requiredUserInteraction) {
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
- - When the action status is `DeviceActionStatus.Completed`, the execution result can be accessed through the `output` property in the state. The `output` property is of type `GetAddressCommandResponse`, which has the following structure:
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
- ```typescript
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
- - `cancel`
176
- - The function without a return value to cancel the action on the Ledger device.
106
+ ---
177
107
 
178
- #### Use Case 2: Sign Transaction
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:**`Transaction` (compatible with [ethers v5](https://docs.ethers.org/v5/) or [ethers v6](https://docs.ethers.org/v6/))
202
- - The transaction object that needs to be signed.
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
- - 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:
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
- switch (requiredUserInteraction) {
269
- case UserInteractionRequired.SignTransaction: {
270
- // User needs to sign the transaction displayed on the device
271
- console.log(
272
- "User needs to sign the transaction displayed on the device.",
273
- );
274
- break;
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
- ```typescript
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
- - `cancel`
312
- - The function without a return value to cancel the action on the Ledger device.
161
+ ---
313
162
 
314
- #### Use Case 3: Sign Message
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
- - 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:
341
-
342
- ```typescript
343
- observable.subscribe({
344
- next: (state: SignPersonalMessageDAState) => {
345
- switch (state.status) {
346
- case DeviceActionStatus.NotStarted: {
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
- ```typescript
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
- - `cancel`
429
- - The function without a return value to cancel the action on the Ledger device.
199
+ ---
430
200
 
431
- #### Use Case 4: Sign TypedData
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
- - 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:
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
- ```typescript
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
- - When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
263
+ ## 🔹 Observable Behavior
524
264
 
525
- ```typescript
526
- const { requiredUserInteraction } = intermediateValue;
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
- switch (requiredUserInteraction) {
529
- case UserInteractionRequired.SignTypedData: {
530
- // User needs to sign the typed data displayed on the device
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
- "User needs to sign the typed data displayed on the device.",
289
+ "The action is pending and the intermediate value is: ",
290
+ intermediateValue,
533
291
  );
534
292
  break;
535
293
  }
536
- case UserInteractionRequired.None: {
537
- // No user action required
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 UserInteractionRequired.UnlockDevice: {
542
- // User needs to unlock the device
543
- console.log("The user needs to unlock the device.");
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 UserInteractionRequired.ConfirmOpenApp: {
547
- // User needs to confirm on the device to open the app
548
- console.log("The user needs to confirm on the device to open the app.");
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
- - 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:
315
+ **Intermediate Values in Pending Status:**
562
316
 
563
- ```typescript
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
- - `cancel`
572
- - The function without a return value to cancel the action on the Ledger device.
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.
@@ -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,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of o(t))!p.call(e,n)&&n!==a&&i(e,n,{get:()=>t[n],enumerable:!(r=s(t,n))||r.enumerable});return e};var d=e=>y(i({},"__esModule",{value:!0}),e);var g={};module.exports=d(g);
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