@ledgerhq/device-signer-kit-solana 1.0.1 → 1.1.1

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 (243) hide show
  1. package/README.md +148 -356
  2. package/lib/cjs/api/SignerSolana.js +1 -1
  3. package/lib/cjs/api/SignerSolana.js.map +1 -1
  4. package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js +1 -1
  5. package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js.map +1 -1
  6. package/lib/cjs/api/app-binder/GetAppConfigurationDeviceActionTypes.js +1 -1
  7. package/lib/cjs/api/app-binder/GetAppConfigurationDeviceActionTypes.js.map +1 -1
  8. package/lib/cjs/api/app-binder/SignMessageDeviceActionTypes.js +1 -1
  9. package/lib/cjs/api/app-binder/SignMessageDeviceActionTypes.js.map +1 -1
  10. package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js +1 -1
  11. package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js.map +1 -1
  12. package/lib/cjs/api/model/AddressOption.js +1 -1
  13. package/lib/cjs/api/model/AddressOption.js.map +1 -1
  14. package/lib/cjs/api/model/MessageOptions.js +2 -0
  15. package/lib/cjs/api/model/MessageOptions.js.map +7 -0
  16. package/lib/cjs/api/model/TransactionOptions.js +1 -1
  17. package/lib/cjs/api/model/TransactionOptions.js.map +1 -1
  18. package/lib/cjs/index.js.map +1 -1
  19. package/lib/cjs/internal/DefaultSignerSolana.js +1 -1
  20. package/lib/cjs/internal/DefaultSignerSolana.js.map +2 -2
  21. package/lib/cjs/internal/DefaultSignerSolana.test.js +1 -1
  22. package/lib/cjs/internal/DefaultSignerSolana.test.js.map +2 -2
  23. package/lib/cjs/internal/app-binder/SolanaAppBinder.js +1 -1
  24. package/lib/cjs/internal/app-binder/SolanaAppBinder.js.map +3 -3
  25. package/lib/cjs/internal/app-binder/SolanaAppBinder.test.js +1 -1
  26. package/lib/cjs/internal/app-binder/SolanaAppBinder.test.js.map +3 -3
  27. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.js +1 -1
  28. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.js.map +3 -3
  29. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.test.js +1 -1
  30. package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.test.js.map +2 -2
  31. package/lib/cjs/internal/app-binder/command/GetPubKeyCommand.js +1 -1
  32. package/lib/cjs/internal/app-binder/command/GetPubKeyCommand.js.map +3 -3
  33. package/lib/cjs/internal/app-binder/command/GetPubKeyCommand.test.js +1 -1
  34. package/lib/cjs/internal/app-binder/command/GetPubKeyCommand.test.js.map +2 -2
  35. package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.js +1 -1
  36. package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.js.map +3 -3
  37. package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.test.js +1 -1
  38. package/lib/cjs/internal/app-binder/command/SignOffChainMessageCommand.test.js.map +2 -2
  39. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js +1 -1
  40. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js.map +3 -3
  41. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js +1 -1
  42. package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js.map +2 -2
  43. package/lib/cjs/internal/app-binder/command/utils/SolanaAppErrors.test.js +2 -0
  44. package/lib/cjs/internal/app-binder/command/utils/SolanaAppErrors.test.js.map +7 -0
  45. package/lib/cjs/internal/app-binder/command/utils/SolanaApplicationErrors.js +2 -0
  46. package/lib/cjs/internal/app-binder/command/utils/SolanaApplicationErrors.js.map +7 -0
  47. package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.js +1 -1
  48. package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.js.map +3 -3
  49. package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.test.js +1 -1
  50. package/lib/cjs/internal/app-binder/device-action/SignTransactionDeviceAction.test.js.map +3 -3
  51. package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +1 -1
  52. package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  53. package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +1 -1
  54. package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +2 -2
  55. package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  56. package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  57. package/lib/cjs/internal/app-binder/di/appBinderModule.js +1 -1
  58. package/lib/cjs/internal/app-binder/di/appBinderModule.js.map +3 -3
  59. package/lib/cjs/internal/app-binder/di/appBinderModule.test.js +1 -1
  60. package/lib/cjs/internal/app-binder/di/appBinderModule.test.js.map +2 -2
  61. package/lib/cjs/internal/app-binder/task/SendCommandInChunksTask.js +1 -1
  62. package/lib/cjs/internal/app-binder/task/SendCommandInChunksTask.js.map +2 -2
  63. package/lib/cjs/internal/app-binder/task/SendSignDataTask.js +1 -1
  64. package/lib/cjs/internal/app-binder/task/SendSignDataTask.js.map +2 -2
  65. package/lib/cjs/internal/app-binder/task/SendSignDataTask.test.js +1 -1
  66. package/lib/cjs/internal/app-binder/task/SendSignDataTask.test.js.map +2 -2
  67. package/lib/cjs/internal/app-binder/task/SendSignMessageTask.js +1 -1
  68. package/lib/cjs/internal/app-binder/task/SendSignMessageTask.js.map +3 -3
  69. package/lib/cjs/internal/app-binder/task/SendSignMessageTask.test.js +1 -1
  70. package/lib/cjs/internal/app-binder/task/SendSignMessageTask.test.js.map +2 -2
  71. package/lib/cjs/internal/di.js +1 -1
  72. package/lib/cjs/internal/di.js.map +2 -2
  73. package/lib/cjs/internal/use-cases/address/GetAddressUseCase.js +1 -1
  74. package/lib/cjs/internal/use-cases/address/GetAddressUseCase.js.map +2 -2
  75. package/lib/cjs/internal/use-cases/address/GetAddressUseCase.test.js +1 -1
  76. package/lib/cjs/internal/use-cases/address/GetAddressUseCase.test.js.map +2 -2
  77. package/lib/cjs/internal/use-cases/app-configuration/GetAppConfiguration.test.js +1 -1
  78. package/lib/cjs/internal/use-cases/app-configuration/GetAppConfiguration.test.js.map +2 -2
  79. package/lib/cjs/internal/use-cases/di/useCasesModule.js +1 -1
  80. package/lib/cjs/internal/use-cases/di/useCasesModule.js.map +3 -3
  81. package/lib/cjs/internal/use-cases/di/useCasesModule.test.js +1 -1
  82. package/lib/cjs/internal/use-cases/di/useCasesModule.test.js.map +2 -2
  83. package/lib/cjs/internal/use-cases/message/SignMessageUseCase.js +1 -1
  84. package/lib/cjs/internal/use-cases/message/SignMessageUseCase.js.map +3 -3
  85. package/lib/cjs/internal/use-cases/message/SignMessageUseCase.test.js +1 -1
  86. package/lib/cjs/internal/use-cases/message/SignMessageUseCase.test.js.map +2 -2
  87. package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.js +1 -1
  88. package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.js.map +2 -2
  89. package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.test.js +1 -1
  90. package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.test.js.map +2 -2
  91. package/lib/cjs/package.json +17 -17
  92. package/lib/esm/api/model/MessageOptions.js +1 -0
  93. package/lib/esm/api/model/MessageOptions.js.map +7 -0
  94. package/lib/esm/internal/DefaultSignerSolana.js +1 -1
  95. package/lib/esm/internal/DefaultSignerSolana.js.map +2 -2
  96. package/lib/esm/internal/DefaultSignerSolana.test.js +1 -1
  97. package/lib/esm/internal/DefaultSignerSolana.test.js.map +2 -2
  98. package/lib/esm/internal/app-binder/SolanaAppBinder.js +1 -1
  99. package/lib/esm/internal/app-binder/SolanaAppBinder.js.map +3 -3
  100. package/lib/esm/internal/app-binder/SolanaAppBinder.test.js +1 -1
  101. package/lib/esm/internal/app-binder/SolanaAppBinder.test.js.map +3 -3
  102. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.js +1 -1
  103. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.js.map +3 -3
  104. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.test.js +1 -1
  105. package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.test.js.map +2 -2
  106. package/lib/esm/internal/app-binder/command/GetPubKeyCommand.js +1 -1
  107. package/lib/esm/internal/app-binder/command/GetPubKeyCommand.js.map +3 -3
  108. package/lib/esm/internal/app-binder/command/GetPubKeyCommand.test.js +1 -1
  109. package/lib/esm/internal/app-binder/command/GetPubKeyCommand.test.js.map +2 -2
  110. package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.js +1 -1
  111. package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.js.map +3 -3
  112. package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.test.js +1 -1
  113. package/lib/esm/internal/app-binder/command/SignOffChainMessageCommand.test.js.map +2 -2
  114. package/lib/esm/internal/app-binder/command/SignTransactionCommand.js +1 -1
  115. package/lib/esm/internal/app-binder/command/SignTransactionCommand.js.map +3 -3
  116. package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js +1 -1
  117. package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js.map +2 -2
  118. package/lib/esm/internal/app-binder/command/utils/SolanaAppErrors.test.js +2 -0
  119. package/lib/esm/internal/app-binder/command/utils/SolanaAppErrors.test.js.map +7 -0
  120. package/lib/esm/internal/app-binder/command/utils/SolanaApplicationErrors.js +2 -0
  121. package/lib/esm/internal/app-binder/command/utils/SolanaApplicationErrors.js.map +7 -0
  122. package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.js +1 -1
  123. package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.js.map +3 -3
  124. package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.test.js +1 -1
  125. package/lib/esm/internal/app-binder/device-action/SignTransactionDeviceAction.test.js.map +3 -3
  126. package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +1 -1
  127. package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  128. package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +1 -1
  129. package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +2 -2
  130. package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  131. package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  132. package/lib/esm/internal/app-binder/di/appBinderModule.js +1 -1
  133. package/lib/esm/internal/app-binder/di/appBinderModule.js.map +3 -3
  134. package/lib/esm/internal/app-binder/di/appBinderModule.test.js +1 -1
  135. package/lib/esm/internal/app-binder/di/appBinderModule.test.js.map +2 -2
  136. package/lib/esm/internal/app-binder/task/SendCommandInChunksTask.js +1 -1
  137. package/lib/esm/internal/app-binder/task/SendCommandInChunksTask.js.map +2 -2
  138. package/lib/esm/internal/app-binder/task/SendSignDataTask.js +1 -1
  139. package/lib/esm/internal/app-binder/task/SendSignDataTask.js.map +2 -2
  140. package/lib/esm/internal/app-binder/task/SendSignDataTask.test.js +1 -1
  141. package/lib/esm/internal/app-binder/task/SendSignDataTask.test.js.map +2 -2
  142. package/lib/esm/internal/app-binder/task/SendSignMessageTask.js +1 -1
  143. package/lib/esm/internal/app-binder/task/SendSignMessageTask.js.map +3 -3
  144. package/lib/esm/internal/app-binder/task/SendSignMessageTask.test.js +1 -1
  145. package/lib/esm/internal/app-binder/task/SendSignMessageTask.test.js.map +2 -2
  146. package/lib/esm/internal/di.js +1 -1
  147. package/lib/esm/internal/di.js.map +2 -2
  148. package/lib/esm/internal/use-cases/address/GetAddressUseCase.js +1 -1
  149. package/lib/esm/internal/use-cases/address/GetAddressUseCase.js.map +2 -2
  150. package/lib/esm/internal/use-cases/address/GetAddressUseCase.test.js +1 -1
  151. package/lib/esm/internal/use-cases/address/GetAddressUseCase.test.js.map +2 -2
  152. package/lib/esm/internal/use-cases/app-configuration/GetAppConfiguration.test.js +1 -1
  153. package/lib/esm/internal/use-cases/app-configuration/GetAppConfiguration.test.js.map +2 -2
  154. package/lib/esm/internal/use-cases/di/useCasesModule.js +1 -1
  155. package/lib/esm/internal/use-cases/di/useCasesModule.js.map +3 -3
  156. package/lib/esm/internal/use-cases/di/useCasesModule.test.js +1 -1
  157. package/lib/esm/internal/use-cases/di/useCasesModule.test.js.map +2 -2
  158. package/lib/esm/internal/use-cases/message/SignMessageUseCase.js +1 -1
  159. package/lib/esm/internal/use-cases/message/SignMessageUseCase.js.map +3 -3
  160. package/lib/esm/internal/use-cases/message/SignMessageUseCase.test.js +1 -1
  161. package/lib/esm/internal/use-cases/message/SignMessageUseCase.test.js.map +2 -2
  162. package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.js +1 -1
  163. package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.js.map +2 -2
  164. package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.test.js +1 -1
  165. package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.test.js.map +2 -2
  166. package/lib/esm/package.json +17 -17
  167. package/lib/types/api/SignerSolana.d.ts +2 -1
  168. package/lib/types/api/SignerSolana.d.ts.map +1 -1
  169. package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts +2 -1
  170. package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts.map +1 -1
  171. package/lib/types/api/app-binder/GetAppConfigurationDeviceActionTypes.d.ts +2 -1
  172. package/lib/types/api/app-binder/GetAppConfigurationDeviceActionTypes.d.ts.map +1 -1
  173. package/lib/types/api/app-binder/SignMessageDeviceActionTypes.d.ts +3 -11
  174. package/lib/types/api/app-binder/SignMessageDeviceActionTypes.d.ts.map +1 -1
  175. package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts +4 -4
  176. package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -1
  177. package/lib/types/api/model/AddressOption.d.ts +1 -0
  178. package/lib/types/api/model/AddressOption.d.ts.map +1 -1
  179. package/lib/types/api/model/MessageOptions.d.ts +4 -0
  180. package/lib/types/api/model/MessageOptions.d.ts.map +1 -0
  181. package/lib/types/api/model/TransactionOptions.d.ts +3 -1
  182. package/lib/types/api/model/TransactionOptions.d.ts.map +1 -1
  183. package/lib/types/internal/DefaultSignerSolana.d.ts +2 -1
  184. package/lib/types/internal/DefaultSignerSolana.d.ts.map +1 -1
  185. package/lib/types/internal/app-binder/SolanaAppBinder.d.ts +3 -2
  186. package/lib/types/internal/app-binder/SolanaAppBinder.d.ts.map +1 -1
  187. package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts +4 -2
  188. package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts.map +1 -1
  189. package/lib/types/internal/app-binder/command/GetPubKeyCommand.d.ts +4 -2
  190. package/lib/types/internal/app-binder/command/GetPubKeyCommand.d.ts.map +1 -1
  191. package/lib/types/internal/app-binder/command/SignOffChainMessageCommand.d.ts +4 -3
  192. package/lib/types/internal/app-binder/command/SignOffChainMessageCommand.d.ts.map +1 -1
  193. package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts +5 -3
  194. package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts.map +1 -1
  195. package/lib/types/internal/app-binder/command/utils/SolanaAppErrors.test.d.ts +2 -0
  196. package/lib/types/internal/app-binder/command/utils/SolanaAppErrors.test.d.ts.map +1 -0
  197. package/lib/types/internal/app-binder/command/utils/SolanaApplicationErrors.d.ts +8 -0
  198. package/lib/types/internal/app-binder/command/utils/SolanaApplicationErrors.d.ts.map +1 -0
  199. package/lib/types/internal/app-binder/device-action/SignTransactionDeviceAction.d.ts +2 -1
  200. package/lib/types/internal/app-binder/device-action/SignTransactionDeviceAction.d.ts.map +1 -1
  201. package/lib/types/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts +2 -1
  202. package/lib/types/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  203. package/lib/types/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.d.ts.map +1 -1
  204. package/lib/types/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts +5 -2
  205. package/lib/types/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
  206. package/lib/types/internal/app-binder/di/appBinderModule.d.ts.map +1 -1
  207. package/lib/types/internal/app-binder/task/SendCommandInChunksTask.d.ts +3 -2
  208. package/lib/types/internal/app-binder/task/SendCommandInChunksTask.d.ts.map +1 -1
  209. package/lib/types/internal/app-binder/task/SendSignDataTask.d.ts +3 -2
  210. package/lib/types/internal/app-binder/task/SendSignDataTask.d.ts.map +1 -1
  211. package/lib/types/internal/app-binder/task/SendSignMessageTask.d.ts +3 -1
  212. package/lib/types/internal/app-binder/task/SendSignMessageTask.d.ts.map +1 -1
  213. package/lib/types/internal/di.d.ts.map +1 -1
  214. package/lib/types/internal/use-cases/address/GetAddressUseCase.d.ts.map +1 -1
  215. package/lib/types/internal/use-cases/di/useCasesModule.d.ts.map +1 -1
  216. package/lib/types/internal/use-cases/message/SignMessageUseCase.d.ts +2 -1
  217. package/lib/types/internal/use-cases/message/SignMessageUseCase.d.ts.map +1 -1
  218. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  219. package/package.json +19 -19
  220. package/lib/cjs/internal/app-binder/command/utils/solanaAppError.test.js +0 -2
  221. package/lib/cjs/internal/app-binder/command/utils/solanaAppError.test.js.map +0 -7
  222. package/lib/cjs/internal/app-binder/command/utils/solanaAppErrors.js +0 -2
  223. package/lib/cjs/internal/app-binder/command/utils/solanaAppErrors.js.map +0 -7
  224. package/lib/cjs/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.js +0 -2
  225. package/lib/cjs/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.js.map +0 -7
  226. package/lib/cjs/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.test.js +0 -2
  227. package/lib/cjs/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.test.js.map +0 -7
  228. package/lib/esm/internal/app-binder/command/utils/solanaAppError.test.js +0 -2
  229. package/lib/esm/internal/app-binder/command/utils/solanaAppError.test.js.map +0 -7
  230. package/lib/esm/internal/app-binder/command/utils/solanaAppErrors.js +0 -2
  231. package/lib/esm/internal/app-binder/command/utils/solanaAppErrors.js.map +0 -7
  232. package/lib/esm/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.js +0 -2
  233. package/lib/esm/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.js.map +0 -7
  234. package/lib/esm/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.test.js +0 -2
  235. package/lib/esm/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.test.js.map +0 -7
  236. package/lib/types/internal/app-binder/command/utils/solanaAppError.test.d.ts +0 -2
  237. package/lib/types/internal/app-binder/command/utils/solanaAppError.test.d.ts.map +0 -1
  238. package/lib/types/internal/app-binder/command/utils/solanaAppErrors.d.ts +0 -8
  239. package/lib/types/internal/app-binder/command/utils/solanaAppErrors.d.ts.map +0 -1
  240. package/lib/types/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.d.ts +0 -15
  241. package/lib/types/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.d.ts.map +0 -1
  242. package/lib/types/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.test.d.ts +0 -2
  243. package/lib/types/internal/app-binder/device-action/SignMessage/SignMessageDeviceAction.test.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,19 +1,30 @@
1
1
  # Ledger Solana Signer Implementation
2
2
 
3
- ## Introduction
4
-
5
3
  This module provides the implementation of the Ledger Solana signer of the Device Management Kit. It enables interaction with the Solana application on a Ledger device including:
6
4
 
7
5
  - Retrieving the Solana address using a given derivation path;
8
6
  - Signing a Solana transaction;
9
7
  - Signing an offchain message displayed on a Ledger device;
10
- - Retreiving the app configuration;
8
+ - Retrieving the app configuration;
9
+
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
+ - [Get App Configuration](#use-case-4-get-app-configuration)
20
+ 5. [Observable Behavior](#-observable-behavior)
21
+ 6. [Example](#-example)
11
22
 
12
- ### How it works
23
+ ## 🔹 How it works
13
24
 
14
25
  The Ledger Solana 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. 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,30 +34,29 @@ To install the `device-signer-kit-solana` package, run the following command:
23
34
  npm install @ledgerhq/device-signer-kit-solana
24
35
  ```
25
36
 
26
- ## Usage
37
+ ## 🔹 Initialisation
27
38
 
28
- ### Setting up
29
-
30
- To initialize a Sonala signer instance, you need a Ledger Device Management Kit instance and the ID of the session of the connected device. Use the `SignerSolanaBuilder` 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 a Solana signer instance, you need a Ledger Device Management Kit instance and the ID of the session of the connected device. Use the `SignerSolanaBuilder` 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 a Solana signer instance
34
42
  const signerSolana = new SignerSolanaBuilder({ sdk, sessionId }).build();
35
43
  ```
36
44
 
37
- ### Use Cases
45
+ ## 🔹 Use Cases
38
46
 
39
47
  The `SignerSolanaBuilder.build()` method will return a `SignerSolana` 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`.
40
48
 
41
- #### Use Case 1: Get Address
49
+ ---
50
+
51
+ ### Use Case 1: Get Address
42
52
 
43
- This method allows users to retrieve the Solana address according to given `derivationPath`.
53
+ This method allows users to retrieve the Solana address based on a given `derivationPath`.
44
54
 
45
55
  ```typescript
46
56
  const { observable, cancel } = signerSolana.getAddress(derivationPath, options);
47
57
  ```
48
58
 
49
- **Parameters**
59
+ #### **Parameters**
50
60
 
51
61
  - `derivationPath`
52
62
 
@@ -67,100 +77,21 @@ const { observable, cancel } = signerSolana.getAddress(derivationPath, options);
67
77
 
68
78
  - `checkOnDevice`: An optional boolean indicating whether user confirmation on the device is required (`true`) or not (`false`).
69
79
 
70
- **Returns**
71
-
72
- - `observable`
80
+ #### **Returns**
73
81
 
74
- - 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:
75
-
76
- ```typescript
77
- observable.subscribe({
78
- next: (state: DeviceActionState) => {
79
- switch (state.status) {
80
- case DeviceActionStatus.NotStarted: {
81
- console.log("The action is not started yet.");
82
- break;
83
- }
84
- case DeviceActionStatus.Pending: {
85
- const {
86
- intermediateValue: { requiredUserInteraction },
87
- } = state;
88
- // Access the intermediate value here, explained below
89
- console.log(
90
- "The action is pending and the intermediate value is: ",
91
- intermediateValue,
92
- );
93
- break;
94
- }
95
- case DeviceActionStatus.Stopped: {
96
- console.log("The action has been stopped.");
97
- break;
98
- }
99
- case DeviceActionStatus.Completed: {
100
- const { output } = state;
101
- // Access the output of the completed action here
102
- console.log("The action has been completed: ", output);
103
- break;
104
- }
105
- case DeviceActionStatus.Error: {
106
- const { error } = state;
107
- // Access the error here if occured
108
- console.log("An error occured during the action: ", error);
109
- break;
110
- }
111
- }
112
- },
113
- });
114
- ```
115
-
116
- - When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
117
-
118
- ```typescript
119
- const { requiredUserInteraction } = intermediateValue;
82
+ - `observable` Emits DeviceActionState updates, including the following details:
120
83
 
121
- switch (requiredUserInteraction) {
122
- case UserInteractionRequired.VerifyAddress: {
123
- // User needs to verify the address displayed on the device
124
- console.log(
125
- "User needs to verify the address displayed on the device.",
126
- );
127
- break;
128
- }
129
- case UserInteractionRequired.None: {
130
- // No user action required
131
- console.log("No user action needed.");
132
- break;
133
- }
134
- case UserInteractionRequired.UnlockDevice: {
135
- // User needs to unlock the device
136
- console.log("The user needs to unlock the device.");
137
- break;
138
- }
139
- case UserInteractionRequired.ConfirmOpenApp: {
140
- // User needs to confirm on the device to open the app
141
- console.log("The user needs to confirm on the device to open the app.");
142
- break;
143
- }
144
- default:
145
- // Type guard to ensure all cases are handled
146
- const uncaughtUserInteraction: never = requiredUserInteraction;
147
- console.error(
148
- "Unhandled user interaction case:",
149
- uncaughtUserInteraction,
150
- );
151
- }
152
- ```
153
-
154
- - 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 `PublicKey` in `base58`.
84
+ ```typescript
85
+ type GetAddressCommandResponse = {
86
+ publicKey: string; // Address in base58 format
87
+ };
88
+ ```
155
89
 
156
- ```typescript
157
- type PublicKey = string; // address in base58 format
158
- ```
90
+ - `cancel` A function to cancel the action on the Ledger device.
159
91
 
160
- - `cancel`
161
- - The function without a return value to cancel the action on the Ledger device.
92
+ ---
162
93
 
163
- #### Use Case 2: Sign Transaction
94
+ ### Use Case 2: Sign Transaction
164
95
 
165
96
  This method enables users to securely sign transactions using clear signing on Ledger devices.
166
97
 
@@ -172,7 +103,7 @@ const { observable, cancel } = signerSolana.signTransaction(
172
103
  );
173
104
  ```
174
105
 
175
- **Parameters**
106
+ #### **Parameters**
176
107
 
177
108
  - `derivationPath`
178
109
 
@@ -196,100 +127,19 @@ const { observable, cancel } = signerSolana.signTransaction(
196
127
  type TransactionOptions = {};
197
128
  ```
198
129
 
199
- **Returns**
200
-
201
- - `observable`
202
-
203
- - 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:
204
-
205
- ```typescript
206
- observable.subscribe({
207
- next: (state: SignTransactionDAState) => {
208
- switch (state.status) {
209
- case DeviceActionStatus.NotStarted: {
210
- console.log("The action is not started yet.");
211
- break;
212
- }
213
- case DeviceActionStatus.Pending: {
214
- const {
215
- intermediateValue: { requiredUserInteraction },
216
- } = state;
217
- // Access the intermediate value here, explained below
218
- console.log(
219
- "The action is pending and the intermediate value is: ",
220
- intermediateValue,
221
- );
222
- break;
223
- }
224
- case DeviceActionStatus.Stopped: {
225
- console.log("The action has been stopped.");
226
- break;
227
- }
228
- case DeviceActionStatus.Completed: {
229
- const { output } = state;
230
- // Access the output of the completed action here
231
- console.log("The action has been completed: ", output);
232
- break;
233
- }
234
- case DeviceActionStatus.Error: {
235
- const { error } = state;
236
- // Access the error here if occured
237
- console.log("An error occured during the action: ", error);
238
- break;
239
- }
240
- }
241
- },
242
- });
243
- ```
244
-
245
- - When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
130
+ #### **Returns**
246
131
 
247
- ```typescript
248
- const { requiredUserInteraction } = intermediateValue;
249
-
250
- switch (requiredUserInteraction) {
251
- case UserInteractionRequired.SignTransaction: {
252
- // User needs to sign the transaction displayed on the device
253
- console.log(
254
- "User needs to sign the transaction displayed on the device.",
255
- );
256
- break;
257
- }
258
- case UserInteractionRequired.None: {
259
- // No user action required
260
- console.log("No user action needed.");
261
- break;
262
- }
263
- case UserInteractionRequired.UnlockDevice: {
264
- // User needs to unlock the device
265
- console.log("The user needs to unlock the device.");
266
- break;
267
- }
268
- case UserInteractionRequired.ConfirmOpenApp: {
269
- // User needs to confirm on the device to open the app
270
- console.log("The user needs to confirm on the device to open the app.");
271
- break;
272
- }
273
- default:
274
- // Type guard to ensure all cases are handled
275
- const uncaughtUserInteraction: never = requiredUserInteraction;
276
- console.error(
277
- "Unhandled user interaction case:",
278
- uncaughtUserInteraction,
279
- );
280
- }
281
- ```
132
+ - `observable` Emits DeviceActionState updates, including the following details:
282
133
 
283
- - 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:
134
+ ```typescript
135
+ type Signature = Uint8Array; // Signed transaction bytes
136
+ ```
284
137
 
285
- ```typescript
286
- type Signature = Uint8Array;
287
- ```
138
+ - `cancel` A function to cancel the action on the Ledger device.
288
139
 
289
- - `cancel`
290
- - The function without a return value to cancel the action on the Ledger device.
140
+ ---
291
141
 
292
- #### Use Case 3: Sign Message
142
+ ### Use Case 3: Sign Message
293
143
 
294
144
  This method allows users to sign a text string that is displayed on Ledger devices.
295
145
 
@@ -300,7 +150,7 @@ const { observable, cancel } = signerSolana.signMessage(
300
150
  );
301
151
  ```
302
152
 
303
- **Parameters**
153
+ #### **Parameters**
304
154
 
305
155
  - `derivationPath`
306
156
 
@@ -314,200 +164,142 @@ const { observable, cancel } = signerSolana.signMessage(
314
164
  - **Type:** `string`
315
165
  - The message to be signed, which will be displayed on the Ledger device.
316
166
 
317
- **Returns**
167
+ #### **Returns**
318
168
 
319
- - `observable`
169
+ - `observable` Emits DeviceActionState updates, including the following details:
320
170
 
321
- - 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:
171
+ ```typescript
172
+ type Signature = Uint8Array; // Signed message bytes
173
+ ```
322
174
 
323
- ```typescript
324
- observable.subscribe({
325
- next: (state: SignPersonalMessageDAState) => {
326
- switch (state.status) {
327
- case DeviceActionStatus.NotStarted: {
328
- console.log("The action is not started yet.");
329
- break;
330
- }
331
- case DeviceActionStatus.Pending: {
332
- const {
333
- intermediateValue: { requiredUserInteraction },
334
- } = state;
335
- // Access the intermediate value here, explained below
336
- console.log(
337
- "The action is pending and the intermediate value is: ",
338
- intermediateValue,
339
- );
340
- break;
341
- }
342
- case DeviceActionStatus.Stopped: {
343
- console.log("The action has been stopped.");
344
- break;
345
- }
346
- case DeviceActionStatus.Completed: {
347
- const { output } = state;
348
- // Access the output of the completed action here
349
- console.log("The action has been completed: ", output);
350
- break;
351
- }
352
- case DeviceActionStatus.Error: {
353
- const { error } = state;
354
- // Access the error here if occured
355
- console.log("An error occured during the action: ", error);
356
- break;
357
- }
358
- }
359
- },
360
- });
361
- ```
175
+ - `cancel` A function to cancel the action on the Ledger device.
362
176
 
363
- - When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
177
+ ---
364
178
 
365
- ```typescript
366
- const { requiredUserInteraction } = intermediateValue;
179
+ ### Use Case 4: Get App Configuration
367
180
 
368
- switch (requiredUserInteraction) {
369
- case UserInteractionRequired.SignPersonalMessage: {
370
- // User needs to sign the message displayed on the device
371
- console.log("User needs to sign the message displayed on the device.");
372
- break;
373
- }
374
- case UserInteractionRequired.None: {
375
- // No user action required
376
- console.log("No user action needed.");
377
- break;
378
- }
379
- case UserInteractionRequired.UnlockDevice: {
380
- // User needs to unlock the device
381
- console.log("The user needs to unlock the device.");
382
- break;
383
- }
384
- case UserInteractionRequired.ConfirmOpenApp: {
385
- // User needs to confirm on the device to open the app
386
- console.log("The user needs to confirm on the device to open the app.");
387
- break;
388
- }
389
- default:
390
- // Type guard to ensure all cases are handled
391
- const uncaughtUserInteraction: never = requiredUserInteraction;
392
- console.error(
393
- "Unhandled user interaction case:",
394
- uncaughtUserInteraction,
395
- );
396
- }
397
- ```
181
+ This method allows the user to fetch the current app configuration.
398
182
 
399
- - 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:
400
-
401
- ```typescript
402
- type Signature = Uint8Array;
403
- ```
404
-
405
- - `cancel`
406
- - The function without a return value to cancel the action on the Ledger device.
183
+ ```typescript
184
+ const { observable, cancel } = signerSolana.getAppConfiguration();
185
+ ```
407
186
 
408
- #### Use Case 4: Get App Configuration
187
+ #### **Returns**
409
188
 
410
- This method allow the user to fetch the current app configuration.
189
+ - `observable` Emits DeviceActionState updates, including the following details:
411
190
 
412
191
  ```typescript
413
- const { observable, cancel } = signerSolana.getAppConfiguration();
192
+ type AppConfiguration = {
193
+ blindSigningEnabled: boolean;
194
+ pubKeyDisplayMode: PublicKeyDisplayMode;
195
+ version: string;
196
+ };
414
197
  ```
415
198
 
416
- **Returns**
417
-
418
- - `observable`
199
+ - `cancel` A function to cancel the action on the Ledger device.
419
200
 
420
- - 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:
201
+ ## 🔹 Observable Behavior
421
202
 
422
- ```typescript
423
- observable.subscribe({
424
- next: (state: SignTypedDataDAState) => {
425
- switch (state.status) {
426
- case DeviceActionStatus.NotStarted: {
427
- console.log("The action is not started yet.");
428
- break;
429
- }
430
- case DeviceActionStatus.Pending: {
431
- const { intermediateValue } = state;
432
- // Access the intermediate value here, explained below
433
- console.log(
434
- "The action is pending and the intermediate value is: ",
435
- requiredUserInteraction,
436
- );
437
- break;
438
- }
439
- case DeviceActionStatus.Stopped: {
440
- console.log("The action has been stopped.");
441
- break;
442
- }
443
- case DeviceActionStatus.Completed: {
444
- const { output } = state;
445
- // Access the output of the completed action here, explained below
446
- console.log("The action has been completed: ", output);
447
- break;
448
- }
449
- case DeviceActionStatus.Error: {
450
- const { error } = state;
451
- // Access the error here if occured
452
- console.log("An error occured during the action: ", error);
453
- break;
454
- }
455
- }
456
- },
457
- });
458
- ```
203
+ 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:
459
204
 
460
- - When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
205
+ - **NotStarted**: The operation hasn’t started.
206
+ - **Pending**: The operation is in progress and may require user interaction.
207
+ - **Stopped**: The operation was canceled or stopped.
208
+ - **Completed**: The operation completed successfully, with results available.
209
+ - **Error**: An error occurred.
461
210
 
462
- ```typescript
463
- const { requiredUserInteraction } = intermediateValue;
211
+ **Example Observable Subscription:**
464
212
 
465
- switch (requiredUserInteraction) {
466
- case UserInteractionRequired.SignTypedData: {
467
- // User needs to sign the typed data displayed on the device
213
+ ```typescript
214
+ observable.subscribe({
215
+ next: (state: DeviceActionState) => {
216
+ switch (state.status) {
217
+ case DeviceActionStatus.NotStarted: {
218
+ console.log("The action is not started yet.");
219
+ break;
220
+ }
221
+ case DeviceActionStatus.Pending: {
222
+ const {
223
+ intermediateValue: { requiredUserInteraction },
224
+ } = state;
225
+ // Access the intermediate value here, explained below
468
226
  console.log(
469
- "User needs to sign the typed data displayed on the device.",
227
+ "The action is pending and the intermediate value is: ",
228
+ intermediateValue,
470
229
  );
471
230
  break;
472
231
  }
473
- case UserInteractionRequired.None: {
474
- // No user action required
475
- console.log("No user action needed.");
232
+ case DeviceActionStatus.Stopped: {
233
+ console.log("The action has been stopped.");
476
234
  break;
477
235
  }
478
- case UserInteractionRequired.UnlockDevice: {
479
- // User needs to unlock the device
480
- console.log("The user needs to unlock the device.");
236
+ case DeviceActionStatus.Completed: {
237
+ const { output } = state;
238
+ // Access the output of the completed action here
239
+ console.log("The action has been completed: ", output);
481
240
  break;
482
241
  }
483
- case UserInteractionRequired.ConfirmOpenApp: {
484
- // User needs to confirm on the device to open the app
485
- console.log("The user needs to confirm on the device to open the app.");
242
+ case DeviceActionStatus.Error: {
243
+ const { error } = state;
244
+ // Access the error here if occurred
245
+ console.log("An error occurred during the action: ", error);
486
246
  break;
487
247
  }
488
- default:
489
- // Type guard to ensure all cases are handled
490
- const uncaughtUserInteraction: never = requiredUserInteraction;
491
- console.error(
492
- "Unhandled user interaction case:",
493
- uncaughtUserInteraction,
494
- );
495
248
  }
496
- ```
249
+ },
250
+ });
251
+ ```
497
252
 
498
- - 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:
253
+ **Intermediate Values in Pending Status:**
499
254
 
500
- ```typescript
501
- type AppConfiguration = {
502
- blindSigningEnabled: boolean;
503
- pubKeyDisplayMode: PublicKeyDisplayMode;
504
- version: string;
505
- };
506
- ```
255
+ When the status is DeviceActionStatus.Pending, the state will include an `intermediateValue` object that provides useful information for interaction:
507
256
 
508
- - `cancel`
509
- - The function without a return value to cancel the action on the Ledger device.
257
+ ```typescript
258
+ const { requiredUserInteraction } = intermediateValue;
259
+
260
+ switch (requiredUserInteraction) {
261
+ case UserInteractionRequired.VerifyAddress: {
262
+ // User needs to verify the address displayed on the device
263
+ console.log("User needs to verify the address displayed on the device.");
264
+ break;
265
+ }
266
+ case UserInteractionRequired.SignTransaction: {
267
+ // User needs to sign the transaction displayed on the device
268
+ console.log("User needs to sign the transaction displayed on the device.");
269
+ break;
270
+ }
271
+ case UserInteractionRequired.SignTypedData: {
272
+ // User needs to sign the typed data displayed on the device
273
+ console.log("User needs to sign the typed data displayed on the device.");
274
+ break;
275
+ }
276
+ case UserInteractionRequired.SignPersonalMessage: {
277
+ // User needs to sign the message displayed on the device
278
+ console.log("User needs to sign the message displayed on the device.");
279
+ break;
280
+ }
281
+ case UserInteractionRequired.None: {
282
+ // No user action required
283
+ console.log("No user action needed.");
284
+ break;
285
+ }
286
+ case UserInteractionRequired.UnlockDevice: {
287
+ // User needs to unlock the device
288
+ console.log("The user needs to unlock the device.");
289
+ break;
290
+ }
291
+ case UserInteractionRequired.ConfirmOpenApp: {
292
+ // User needs to confirm on the device to open the app
293
+ console.log("The user needs to confirm on the device to open the app.");
294
+ break;
295
+ }
296
+ default:
297
+ // Type guard to ensure all cases are handled
298
+ const uncaughtUserInteraction: never = requiredUserInteraction;
299
+ console.error("Unhandled user interaction case:", uncaughtUserInteraction);
300
+ }
301
+ ```
510
302
 
511
- ## Example
303
+ ## 🔹 Example
512
304
 
513
305
  We encourage you to explore the Solana 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 p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var g=(n,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!a.call(n,e)&&e!==o&&i(n,e,{get:()=>t[e],enumerable:!(r=s(t,e))||r.enumerable});return n};var A=n=>g(i({},"__esModule",{value:!0}),n);var m={};module.exports=A(m);
1
+ "use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var g=(n,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!a.call(n,e)&&e!==o&&i(n,e,{get:()=>t[e],enumerable:!(r=s(t,e))||r.enumerable});return n};var m=n=>g(i({},"__esModule",{value:!0}),n);var y={};module.exports=m(y);
2
2
  //# sourceMappingURL=SignerSolana.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/SignerSolana.ts"],
4
- "sourcesContent": ["import { type GetAddressDAReturnType } from \"@api/app-binder/GetAddressDeviceActionTypes\";\nimport { type GetAppConfigurationDAReturnType } from \"@api/app-binder/GetAppConfigurationDeviceActionTypes\";\nimport { type SignMessageDAReturnType } from \"@api/app-binder/SignMessageDeviceActionTypes\";\nimport { type SignTransactionDAReturnType } from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nimport { type AddressOptions } from \"@api/model/AddressOption\";\nimport { type Transaction } from \"@api/model/Transaction\";\nimport { type TransactionOptions } from \"@api/model/TransactionOptions\";\n\nexport interface SignerSolana {\n signTransaction: (\n derivationPath: string,\n transaction: Transaction,\n options?: TransactionOptions,\n ) => SignTransactionDAReturnType;\n signMessage: (\n derivationPath: string,\n message: string,\n ) => SignMessageDAReturnType;\n getAddress: (\n derivationPath: string,\n options?: AddressOptions,\n ) => GetAddressDAReturnType;\n getAppConfiguration: () => GetAppConfigurationDAReturnType;\n}\n"],
4
+ "sourcesContent": ["import { type GetAddressDAReturnType } from \"@api/app-binder/GetAddressDeviceActionTypes\";\nimport { type GetAppConfigurationDAReturnType } from \"@api/app-binder/GetAppConfigurationDeviceActionTypes\";\nimport { type SignMessageDAReturnType } from \"@api/app-binder/SignMessageDeviceActionTypes\";\nimport { type SignTransactionDAReturnType } from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nimport { type AddressOptions } from \"@api/model/AddressOption\";\nimport { type MessageOptions } from \"@api/model/MessageOptions\";\nimport { type Transaction } from \"@api/model/Transaction\";\nimport { type TransactionOptions } from \"@api/model/TransactionOptions\";\n\nexport interface SignerSolana {\n signTransaction: (\n derivationPath: string,\n transaction: Transaction,\n options?: TransactionOptions,\n ) => SignTransactionDAReturnType;\n signMessage: (\n derivationPath: string,\n message: string,\n options?: MessageOptions,\n ) => SignMessageDAReturnType;\n getAddress: (\n derivationPath: string,\n options?: AddressOptions,\n ) => GetAddressDAReturnType;\n getAppConfiguration: () => GetAppConfigurationDAReturnType;\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["SignerSolana_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var u=(t,e,p,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of o(e))!s.call(t,r)&&r!==p&&n(t,r,{get:()=>e[r],enumerable:!(d=A(e,r))||d.enumerable});return t};var i=t=>u(n({},"__esModule",{value:!0}),t);var m={};module.exports=i(m);
1
+ "use strict";var p=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var i=(r,e,n,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of o(e))!s.call(r,t)&&t!==n&&p(r,t,{get:()=>e[t],enumerable:!(d=A(e,t))||d.enumerable});return r};var u=r=>i(p({},"__esModule",{value:!0}),r);var a={};module.exports=u(a);
2
2
  //# sourceMappingURL=GetAddressDeviceActionTypes.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/app-binder/GetAddressDeviceActionTypes.ts"],
4
- "sourcesContent": ["import {\n type ExecuteDeviceActionReturnType,\n type SendCommandInAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type PublicKey } from \"@api/model/PublicKey\";\n\ntype GetAddressDAUserInteractionRequired =\n | UserInteractionRequired.None\n | UserInteractionRequired.VerifyAddress;\n\nexport type GetAddressDAOutput = SendCommandInAppDAOutput<PublicKey>;\nexport type GetAddressDAError = SendCommandInAppDAError<never>;\nexport type GetAddressDAIntermediateValue =\n SendCommandInAppDAIntermediateValue<GetAddressDAUserInteractionRequired>;\n\nexport type GetAddressDAReturnType = ExecuteDeviceActionReturnType<\n GetAddressDAOutput,\n GetAddressDAError,\n GetAddressDAIntermediateValue\n>;\n"],
4
+ "sourcesContent": ["import {\n type ExecuteDeviceActionReturnType,\n type SendCommandInAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type PublicKey } from \"@api/model/PublicKey\";\nimport { type SolanaAppErrorCodes } from \"@internal/app-binder/command/utils/SolanaApplicationErrors\";\n\ntype GetAddressDAUserInteractionRequired =\n | UserInteractionRequired.None\n | UserInteractionRequired.VerifyAddress;\n\nexport type GetAddressDAOutput = SendCommandInAppDAOutput<PublicKey>;\nexport type GetAddressDAError = SendCommandInAppDAError<SolanaAppErrorCodes>;\nexport type GetAddressDAIntermediateValue =\n SendCommandInAppDAIntermediateValue<GetAddressDAUserInteractionRequired>;\n\nexport type GetAddressDAReturnType = ExecuteDeviceActionReturnType<\n GetAddressDAOutput,\n GetAddressDAError,\n GetAddressDAIntermediateValue\n>;\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["GetAddressDeviceActionTypes_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of A(e))!u.call(t,p)&&p!==o&&r(t,p,{get:()=>e[p],enumerable:!(n=i(e,p))||n.enumerable});return t};var m=t=>a(r({},"__esModule",{value:!0}),t);var d={};module.exports=m(d);
1
+ "use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var u=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of A(e))!a.call(t,p)&&p!==o&&r(t,p,{get:()=>e[p],enumerable:!(n=i(e,p))||n.enumerable});return t};var m=t=>u(r({},"__esModule",{value:!0}),t);var d={};module.exports=m(d);
2
2
  //# sourceMappingURL=GetAppConfigurationDeviceActionTypes.js.map