@ledgerhq/live-common 34.48.0-nightly.0 → 34.48.0-nightly.10

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 (557) hide show
  1. package/lib/__tests__/test-helpers/environment.js +1 -0
  2. package/lib/__tests__/test-helpers/environment.js.map +1 -1
  3. package/lib/apps/inlineAppInstall.d.ts +1 -3
  4. package/lib/apps/inlineAppInstall.d.ts.map +1 -1
  5. package/lib/apps/inlineAppInstall.js +2 -2
  6. package/lib/apps/inlineAppInstall.js.map +1 -1
  7. package/lib/apps/react.d.ts +1 -2
  8. package/lib/apps/react.d.ts.map +1 -1
  9. package/lib/apps/react.js +2 -2
  10. package/lib/apps/react.js.map +1 -1
  11. package/lib/apps/runner.d.ts +2 -4
  12. package/lib/apps/runner.d.ts.map +1 -1
  13. package/lib/apps/runner.js +3 -4
  14. package/lib/apps/runner.js.map +1 -1
  15. package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
  16. package/lib/bridge/crypto-assets/index.js +0 -4
  17. package/lib/bridge/crypto-assets/index.js.map +1 -1
  18. package/lib/bridge/crypto-assets/index.test.js +0 -36
  19. package/lib/bridge/crypto-assets/index.test.js.map +1 -1
  20. package/lib/bridge/generic-alpaca/accountBridge.d.ts +2 -1
  21. package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  22. package/lib/bridge/generic-alpaca/accountBridge.js +2 -2
  23. package/lib/bridge/generic-alpaca/accountBridge.js.map +1 -1
  24. package/lib/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
  25. package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  26. package/lib/bridge/generic-alpaca/alpaca/index.js +10 -6
  27. package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  28. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
  29. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
  30. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +2 -2
  31. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
  32. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js +1 -1
  33. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  34. package/lib/bridge/generic-alpaca/createTransaction.d.ts +1 -1
  35. package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  36. package/lib/bridge/generic-alpaca/createTransaction.js +8 -0
  37. package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
  38. package/lib/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
  39. package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  40. package/lib/bridge/generic-alpaca/currencyBridge.js +3 -2
  41. package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  42. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  43. package/lib/bridge/generic-alpaca/getAccountShape.js +4 -4
  44. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  45. package/lib/bridge/generic-alpaca/signOperation.js +1 -1
  46. package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
  47. package/lib/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
  48. package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
  49. package/lib/bridge/generic-alpaca/signer/Eth.js +51 -0
  50. package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -0
  51. package/lib/bridge/generic-alpaca/signer/index.d.ts +2 -10
  52. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  53. package/lib/bridge/generic-alpaca/signer/index.js +2 -2
  54. package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
  55. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
  56. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  57. package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  58. package/lib/bridge/generic-alpaca/signer/types.d.ts +11 -0
  59. package/lib/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  60. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
  61. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
  62. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +144 -0
  63. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
  64. package/lib/bridge/generic-alpaca/utils.d.ts +2 -0
  65. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  66. package/lib/bridge/generic-alpaca/utils.js +15 -1
  67. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  68. package/lib/bridge/generic-alpaca/utils.test.js +21 -0
  69. package/lib/bridge/generic-alpaca/utils.test.js.map +1 -1
  70. package/lib/config/sharedConfig.d.ts.map +1 -1
  71. package/lib/config/sharedConfig.js +30 -26
  72. package/lib/config/sharedConfig.js.map +1 -1
  73. package/lib/e2e/enum/Account.d.ts +2 -0
  74. package/lib/e2e/enum/Account.d.ts.map +1 -1
  75. package/lib/e2e/enum/Account.js +2 -0
  76. package/lib/e2e/enum/Account.js.map +1 -1
  77. package/lib/e2e/enum/AppInfos.d.ts +1 -0
  78. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  79. package/lib/e2e/enum/AppInfos.js +1 -0
  80. package/lib/e2e/enum/AppInfos.js.map +1 -1
  81. package/lib/e2e/enum/Currency.d.ts +1 -0
  82. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  83. package/lib/e2e/enum/Currency.js +1 -0
  84. package/lib/e2e/enum/Currency.js.map +1 -1
  85. package/lib/e2e/enum/DeviceLabels.d.ts +2 -1
  86. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  87. package/lib/e2e/enum/DeviceLabels.js +1 -0
  88. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  89. package/lib/e2e/enum/Network.d.ts +2 -1
  90. package/lib/e2e/enum/Network.d.ts.map +1 -1
  91. package/lib/e2e/enum/Network.js +1 -0
  92. package/lib/e2e/enum/Network.js.map +1 -1
  93. package/lib/e2e/families/kaspa.d.ts +4 -0
  94. package/lib/e2e/families/kaspa.d.ts.map +1 -0
  95. package/lib/e2e/families/kaspa.js +23 -0
  96. package/lib/e2e/families/kaspa.js.map +1 -0
  97. package/lib/e2e/index.d.ts +4 -8
  98. package/lib/e2e/index.d.ts.map +1 -1
  99. package/lib/e2e/speculos.d.ts.map +1 -1
  100. package/lib/e2e/speculos.js +13 -0
  101. package/lib/e2e/speculos.js.map +1 -1
  102. package/lib/env.react.d.ts +1 -1
  103. package/lib/env.react.d.ts.map +1 -1
  104. package/lib/exchange/swap/transactionStrategies.d.ts +38 -11
  105. package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
  106. package/lib/exchange/swap/transactionStrategies.js +93 -47
  107. package/lib/exchange/swap/transactionStrategies.js.map +1 -1
  108. package/lib/families/canton/bridge/mock-data.d.ts +6 -0
  109. package/lib/families/canton/bridge/mock-data.d.ts.map +1 -0
  110. package/lib/families/canton/bridge/mock-data.js +120 -0
  111. package/lib/families/canton/bridge/mock-data.js.map +1 -0
  112. package/lib/families/canton/bridge/mock.d.ts +12 -0
  113. package/lib/families/canton/bridge/mock.d.ts.map +1 -0
  114. package/lib/families/canton/bridge/mock.js +154 -0
  115. package/lib/families/canton/bridge/mock.js.map +1 -0
  116. package/lib/families/canton/config.js +7 -6
  117. package/lib/families/canton/config.js.map +1 -1
  118. package/lib/families/canton/setup.d.ts.map +1 -1
  119. package/lib/families/canton/setup.js +10 -4
  120. package/lib/families/canton/setup.js.map +1 -1
  121. package/lib/families/evm/config.js +2 -2
  122. package/lib/families/evm/config.js.map +1 -1
  123. package/lib/families/kaspa/bridge.integration.test.d.ts +2 -0
  124. package/lib/families/kaspa/bridge.integration.test.d.ts.map +1 -0
  125. package/lib/families/kaspa/bridge.integration.test.js +7 -0
  126. package/lib/families/kaspa/bridge.integration.test.js.map +1 -0
  127. package/lib/families/kaspa/config.d.ts +3 -0
  128. package/lib/families/kaspa/config.d.ts.map +1 -0
  129. package/lib/families/kaspa/config.js +14 -0
  130. package/lib/families/kaspa/config.js.map +1 -0
  131. package/lib/families/kaspa/react.d.ts +4 -0
  132. package/lib/families/kaspa/react.d.ts.map +1 -0
  133. package/lib/families/kaspa/react.js +18 -0
  134. package/lib/families/kaspa/react.js.map +1 -0
  135. package/lib/families/kaspa/setup.d.ts +18 -0
  136. package/lib/families/kaspa/setup.d.ts.map +1 -0
  137. package/lib/families/kaspa/setup.js +24 -0
  138. package/lib/families/kaspa/setup.js.map +1 -0
  139. package/lib/families/kaspa/types.d.ts +2 -0
  140. package/lib/families/kaspa/types.d.ts.map +1 -0
  141. package/lib/families/kaspa/types.js +18 -0
  142. package/lib/families/kaspa/types.js.map +1 -0
  143. package/lib/families/xrp/setup.d.ts +2 -2
  144. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  145. package/lib/featureFlags/defaultFeatures.js +4 -3
  146. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  147. package/lib/featureFlags/useFeature.d.ts +1 -1
  148. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  149. package/lib/generated/bridge/js.d.ts +1 -0
  150. package/lib/generated/bridge/js.d.ts.map +1 -1
  151. package/lib/generated/bridge/js.js +24 -22
  152. package/lib/generated/bridge/js.js.map +1 -1
  153. package/lib/generated/bridge/mock.d.ts +9 -1
  154. package/lib/generated/bridge/mock.d.ts.map +1 -1
  155. package/lib/generated/bridge/mock.js +26 -24
  156. package/lib/generated/bridge/mock.js.map +1 -1
  157. package/lib/generated/cli-transaction.d.ts +13 -2
  158. package/lib/generated/cli-transaction.d.ts.map +1 -1
  159. package/lib/generated/cli-transaction.js +28 -26
  160. package/lib/generated/cli-transaction.js.map +1 -1
  161. package/lib/generated/deviceTransactionConfig.d.ts +2 -0
  162. package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
  163. package/lib/generated/deviceTransactionConfig.js +24 -22
  164. package/lib/generated/deviceTransactionConfig.js.map +1 -1
  165. package/lib/generated/hw-getAddress.d.ts +1 -0
  166. package/lib/generated/hw-getAddress.d.ts.map +1 -1
  167. package/lib/generated/hw-getAddress.js +28 -26
  168. package/lib/generated/hw-getAddress.js.map +1 -1
  169. package/lib/generated/platformAdapter.d.ts +1 -1
  170. package/lib/generated/specs.d.ts +1 -1
  171. package/lib/generated/transaction.d.ts +11 -3
  172. package/lib/generated/transaction.d.ts.map +1 -1
  173. package/lib/generated/transaction.js +28 -26
  174. package/lib/generated/transaction.js.map +1 -1
  175. package/lib/generated/types.d.ts +5 -4
  176. package/lib/generated/types.d.ts.map +1 -1
  177. package/lib/generated/walletApiAdapter.d.ts +1 -1
  178. package/lib/hw/actions/app.d.ts.map +1 -1
  179. package/lib/hw/actions/app.js.map +1 -1
  180. package/lib/hw/getDeviceNameMaxLength.d.ts.map +1 -1
  181. package/lib/hw/getDeviceNameMaxLength.js +2 -0
  182. package/lib/hw/getDeviceNameMaxLength.js.map +1 -1
  183. package/lib/hw/getDeviceNameMaxLength.test.js +12 -0
  184. package/lib/hw/getDeviceNameMaxLength.test.js.map +1 -1
  185. package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  186. package/lib/modularDrawer/data/state-manager/api.js +3 -2
  187. package/lib/modularDrawer/data/state-manager/api.js.map +1 -1
  188. package/lib/modularDrawer/data/state-manager/types.d.ts +1 -0
  189. package/lib/modularDrawer/data/state-manager/types.d.ts.map +1 -1
  190. package/lib/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.d.ts +2 -0
  191. package/lib/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.d.ts.map +1 -0
  192. package/lib/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.js +206 -0
  193. package/lib/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.js.map +1 -0
  194. package/lib/modularDrawer/hooks/useAssetsData.d.ts +3 -1
  195. package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  196. package/lib/modularDrawer/hooks/useAssetsData.js +6 -3
  197. package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
  198. package/lib/modularDrawer/hooks/useModularDrawerConfiguration.d.ts +13 -0
  199. package/lib/modularDrawer/hooks/useModularDrawerConfiguration.d.ts.map +1 -0
  200. package/lib/modularDrawer/hooks/useModularDrawerConfiguration.js +29 -0
  201. package/lib/modularDrawer/hooks/useModularDrawerConfiguration.js.map +1 -0
  202. package/lib/modularDrawer/hooks/useSearch.d.ts +16 -0
  203. package/lib/modularDrawer/hooks/useSearch.d.ts.map +1 -0
  204. package/lib/modularDrawer/hooks/useSearch.js +24 -0
  205. package/lib/modularDrawer/hooks/useSearch.js.map +1 -0
  206. package/lib/notifications/ServiceStatusProvider/index.d.ts +16 -1
  207. package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  208. package/lib/notifications/ServiceStatusProvider/index.js +31 -7
  209. package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
  210. package/lib/notifications/ServiceStatusProvider/index.test.d.ts +2 -0
  211. package/lib/notifications/ServiceStatusProvider/index.test.d.ts.map +1 -0
  212. package/lib/notifications/ServiceStatusProvider/index.test.js +88 -0
  213. package/lib/notifications/ServiceStatusProvider/index.test.js.map +1 -0
  214. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts +2 -0
  215. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts.map +1 -0
  216. package/lib/notifications/ServiceStatusProvider/ledger-components.js +16 -0
  217. package/lib/notifications/ServiceStatusProvider/ledger-components.js.map +1 -0
  218. package/lib/wallet-api/ACRE/server.d.ts +13 -6
  219. package/lib/wallet-api/ACRE/server.d.ts.map +1 -1
  220. package/lib/wallet-api/ACRE/server.js +142 -1
  221. package/lib/wallet-api/ACRE/server.js.map +1 -1
  222. package/lib/wallet-api/ACRE/server.test.d.ts +2 -0
  223. package/lib/wallet-api/ACRE/server.test.d.ts.map +1 -0
  224. package/lib/wallet-api/ACRE/server.test.js +393 -0
  225. package/lib/wallet-api/ACRE/server.test.js.map +1 -0
  226. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  227. package/lib/wallet-api/Exchange/server.js +16 -13
  228. package/lib/wallet-api/Exchange/server.js.map +1 -1
  229. package/lib-es/__tests__/test-helpers/environment.js +1 -0
  230. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  231. package/lib-es/apps/inlineAppInstall.d.ts +1 -3
  232. package/lib-es/apps/inlineAppInstall.d.ts.map +1 -1
  233. package/lib-es/apps/inlineAppInstall.js +2 -2
  234. package/lib-es/apps/inlineAppInstall.js.map +1 -1
  235. package/lib-es/apps/react.d.ts +1 -2
  236. package/lib-es/apps/react.d.ts.map +1 -1
  237. package/lib-es/apps/react.js +2 -2
  238. package/lib-es/apps/react.js.map +1 -1
  239. package/lib-es/apps/runner.d.ts +2 -4
  240. package/lib-es/apps/runner.d.ts.map +1 -1
  241. package/lib-es/apps/runner.js +3 -4
  242. package/lib-es/apps/runner.js.map +1 -1
  243. package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
  244. package/lib-es/bridge/crypto-assets/index.js +0 -4
  245. package/lib-es/bridge/crypto-assets/index.js.map +1 -1
  246. package/lib-es/bridge/crypto-assets/index.test.js +0 -36
  247. package/lib-es/bridge/crypto-assets/index.test.js.map +1 -1
  248. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +2 -1
  249. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  250. package/lib-es/bridge/generic-alpaca/accountBridge.js +2 -2
  251. package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
  252. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
  253. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  254. package/lib-es/bridge/generic-alpaca/alpaca/index.js +10 -6
  255. package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  256. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
  257. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
  258. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +2 -2
  259. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
  260. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js +1 -1
  261. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  262. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts +1 -1
  263. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  264. package/lib-es/bridge/generic-alpaca/createTransaction.js +8 -0
  265. package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
  266. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
  267. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  268. package/lib-es/bridge/generic-alpaca/currencyBridge.js +3 -2
  269. package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  270. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  271. package/lib-es/bridge/generic-alpaca/getAccountShape.js +4 -4
  272. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  273. package/lib-es/bridge/generic-alpaca/signOperation.js +1 -1
  274. package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
  275. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
  276. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
  277. package/lib-es/bridge/generic-alpaca/signer/Eth.js +47 -0
  278. package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -0
  279. package/lib-es/bridge/generic-alpaca/signer/index.d.ts +2 -10
  280. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  281. package/lib-es/bridge/generic-alpaca/signer/index.js +2 -2
  282. package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
  283. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
  284. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  285. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  286. package/lib-es/bridge/generic-alpaca/signer/types.d.ts +11 -0
  287. package/lib-es/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  288. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
  289. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
  290. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +139 -0
  291. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
  292. package/lib-es/bridge/generic-alpaca/utils.d.ts +2 -0
  293. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  294. package/lib-es/bridge/generic-alpaca/utils.js +13 -0
  295. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  296. package/lib-es/bridge/generic-alpaca/utils.test.js +22 -1
  297. package/lib-es/bridge/generic-alpaca/utils.test.js.map +1 -1
  298. package/lib-es/config/sharedConfig.d.ts.map +1 -1
  299. package/lib-es/config/sharedConfig.js +4 -0
  300. package/lib-es/config/sharedConfig.js.map +1 -1
  301. package/lib-es/e2e/enum/Account.d.ts +2 -0
  302. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  303. package/lib-es/e2e/enum/Account.js +2 -0
  304. package/lib-es/e2e/enum/Account.js.map +1 -1
  305. package/lib-es/e2e/enum/AppInfos.d.ts +1 -0
  306. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  307. package/lib-es/e2e/enum/AppInfos.js +1 -0
  308. package/lib-es/e2e/enum/AppInfos.js.map +1 -1
  309. package/lib-es/e2e/enum/Currency.d.ts +1 -0
  310. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  311. package/lib-es/e2e/enum/Currency.js +1 -0
  312. package/lib-es/e2e/enum/Currency.js.map +1 -1
  313. package/lib-es/e2e/enum/DeviceLabels.d.ts +2 -1
  314. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  315. package/lib-es/e2e/enum/DeviceLabels.js +1 -0
  316. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  317. package/lib-es/e2e/enum/Network.d.ts +2 -1
  318. package/lib-es/e2e/enum/Network.d.ts.map +1 -1
  319. package/lib-es/e2e/enum/Network.js +1 -0
  320. package/lib-es/e2e/enum/Network.js.map +1 -1
  321. package/lib-es/e2e/families/kaspa.d.ts +4 -0
  322. package/lib-es/e2e/families/kaspa.d.ts.map +1 -0
  323. package/lib-es/e2e/families/kaspa.js +15 -0
  324. package/lib-es/e2e/families/kaspa.js.map +1 -0
  325. package/lib-es/e2e/index.d.ts +4 -8
  326. package/lib-es/e2e/index.d.ts.map +1 -1
  327. package/lib-es/e2e/speculos.d.ts.map +1 -1
  328. package/lib-es/e2e/speculos.js +13 -0
  329. package/lib-es/e2e/speculos.js.map +1 -1
  330. package/lib-es/env.react.d.ts +1 -1
  331. package/lib-es/env.react.d.ts.map +1 -1
  332. package/lib-es/exchange/swap/transactionStrategies.d.ts +38 -11
  333. package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
  334. package/lib-es/exchange/swap/transactionStrategies.js +87 -44
  335. package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
  336. package/lib-es/families/canton/bridge/mock-data.d.ts +6 -0
  337. package/lib-es/families/canton/bridge/mock-data.d.ts.map +1 -0
  338. package/lib-es/families/canton/bridge/mock-data.js +116 -0
  339. package/lib-es/families/canton/bridge/mock-data.js.map +1 -0
  340. package/lib-es/families/canton/bridge/mock.d.ts +12 -0
  341. package/lib-es/families/canton/bridge/mock.d.ts.map +1 -0
  342. package/lib-es/families/canton/bridge/mock.js +152 -0
  343. package/lib-es/families/canton/bridge/mock.js.map +1 -0
  344. package/lib-es/families/canton/config.js +7 -6
  345. package/lib-es/families/canton/config.js.map +1 -1
  346. package/lib-es/families/canton/setup.d.ts.map +1 -1
  347. package/lib-es/families/canton/setup.js +10 -4
  348. package/lib-es/families/canton/setup.js.map +1 -1
  349. package/lib-es/families/evm/config.js +2 -2
  350. package/lib-es/families/evm/config.js.map +1 -1
  351. package/lib-es/families/kaspa/bridge.integration.test.d.ts +2 -0
  352. package/lib-es/families/kaspa/bridge.integration.test.d.ts.map +1 -0
  353. package/lib-es/families/kaspa/bridge.integration.test.js +5 -0
  354. package/lib-es/families/kaspa/bridge.integration.test.js.map +1 -0
  355. package/lib-es/families/kaspa/config.d.ts +3 -0
  356. package/lib-es/families/kaspa/config.d.ts.map +1 -0
  357. package/lib-es/families/kaspa/config.js +11 -0
  358. package/lib-es/families/kaspa/config.js.map +1 -0
  359. package/lib-es/families/kaspa/react.d.ts +4 -0
  360. package/lib-es/families/kaspa/react.d.ts.map +1 -0
  361. package/lib-es/families/kaspa/react.js +14 -0
  362. package/lib-es/families/kaspa/react.js.map +1 -0
  363. package/lib-es/families/kaspa/setup.d.ts +18 -0
  364. package/lib-es/families/kaspa/setup.d.ts.map +1 -0
  365. package/lib-es/families/kaspa/setup.js +16 -0
  366. package/lib-es/families/kaspa/setup.js.map +1 -0
  367. package/lib-es/families/kaspa/types.d.ts +2 -0
  368. package/lib-es/families/kaspa/types.d.ts.map +1 -0
  369. package/lib-es/families/kaspa/types.js +2 -0
  370. package/lib-es/families/kaspa/types.js.map +1 -0
  371. package/lib-es/families/xrp/setup.d.ts +2 -2
  372. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  373. package/lib-es/featureFlags/defaultFeatures.js +4 -3
  374. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  375. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  376. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  377. package/lib-es/generated/bridge/js.d.ts +1 -0
  378. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  379. package/lib-es/generated/bridge/js.js +2 -0
  380. package/lib-es/generated/bridge/js.js.map +1 -1
  381. package/lib-es/generated/bridge/mock.d.ts +9 -1
  382. package/lib-es/generated/bridge/mock.d.ts.map +1 -1
  383. package/lib-es/generated/bridge/mock.js +2 -0
  384. package/lib-es/generated/bridge/mock.js.map +1 -1
  385. package/lib-es/generated/cli-transaction.d.ts +13 -2
  386. package/lib-es/generated/cli-transaction.d.ts.map +1 -1
  387. package/lib-es/generated/cli-transaction.js +2 -0
  388. package/lib-es/generated/cli-transaction.js.map +1 -1
  389. package/lib-es/generated/deviceTransactionConfig.d.ts +2 -0
  390. package/lib-es/generated/deviceTransactionConfig.d.ts.map +1 -1
  391. package/lib-es/generated/deviceTransactionConfig.js +2 -0
  392. package/lib-es/generated/deviceTransactionConfig.js.map +1 -1
  393. package/lib-es/generated/hw-getAddress.d.ts +1 -0
  394. package/lib-es/generated/hw-getAddress.d.ts.map +1 -1
  395. package/lib-es/generated/hw-getAddress.js +2 -0
  396. package/lib-es/generated/hw-getAddress.js.map +1 -1
  397. package/lib-es/generated/platformAdapter.d.ts +1 -1
  398. package/lib-es/generated/specs.d.ts +1 -1
  399. package/lib-es/generated/transaction.d.ts +11 -3
  400. package/lib-es/generated/transaction.d.ts.map +1 -1
  401. package/lib-es/generated/transaction.js +2 -0
  402. package/lib-es/generated/transaction.js.map +1 -1
  403. package/lib-es/generated/types.d.ts +5 -4
  404. package/lib-es/generated/types.d.ts.map +1 -1
  405. package/lib-es/generated/walletApiAdapter.d.ts +1 -1
  406. package/lib-es/hw/actions/app.d.ts.map +1 -1
  407. package/lib-es/hw/actions/app.js.map +1 -1
  408. package/lib-es/hw/getDeviceNameMaxLength.d.ts.map +1 -1
  409. package/lib-es/hw/getDeviceNameMaxLength.js +2 -0
  410. package/lib-es/hw/getDeviceNameMaxLength.js.map +1 -1
  411. package/lib-es/hw/getDeviceNameMaxLength.test.js +12 -0
  412. package/lib-es/hw/getDeviceNameMaxLength.test.js.map +1 -1
  413. package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  414. package/lib-es/modularDrawer/data/state-manager/api.js +3 -2
  415. package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -1
  416. package/lib-es/modularDrawer/data/state-manager/types.d.ts +1 -0
  417. package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +1 -1
  418. package/lib-es/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.d.ts +2 -0
  419. package/lib-es/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.d.ts.map +1 -0
  420. package/lib-es/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.js +204 -0
  421. package/lib-es/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.js.map +1 -0
  422. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +3 -1
  423. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  424. package/lib-es/modularDrawer/hooks/useAssetsData.js +6 -3
  425. package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
  426. package/lib-es/modularDrawer/hooks/useModularDrawerConfiguration.d.ts +13 -0
  427. package/lib-es/modularDrawer/hooks/useModularDrawerConfiguration.d.ts.map +1 -0
  428. package/lib-es/modularDrawer/hooks/useModularDrawerConfiguration.js +25 -0
  429. package/lib-es/modularDrawer/hooks/useModularDrawerConfiguration.js.map +1 -0
  430. package/lib-es/modularDrawer/hooks/useSearch.d.ts +16 -0
  431. package/lib-es/modularDrawer/hooks/useSearch.d.ts.map +1 -0
  432. package/lib-es/modularDrawer/hooks/useSearch.js +20 -0
  433. package/lib-es/modularDrawer/hooks/useSearch.js.map +1 -0
  434. package/lib-es/notifications/ServiceStatusProvider/index.d.ts +16 -1
  435. package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  436. package/lib-es/notifications/ServiceStatusProvider/index.js +31 -7
  437. package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
  438. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts +2 -0
  439. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts.map +1 -0
  440. package/lib-es/notifications/ServiceStatusProvider/index.test.js +86 -0
  441. package/lib-es/notifications/ServiceStatusProvider/index.test.js.map +1 -0
  442. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts +2 -0
  443. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts.map +1 -0
  444. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js +13 -0
  445. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js.map +1 -0
  446. package/lib-es/wallet-api/ACRE/server.d.ts +13 -6
  447. package/lib-es/wallet-api/ACRE/server.d.ts.map +1 -1
  448. package/lib-es/wallet-api/ACRE/server.js +140 -2
  449. package/lib-es/wallet-api/ACRE/server.js.map +1 -1
  450. package/lib-es/wallet-api/ACRE/server.test.d.ts +2 -0
  451. package/lib-es/wallet-api/ACRE/server.test.d.ts.map +1 -0
  452. package/lib-es/wallet-api/ACRE/server.test.js +388 -0
  453. package/lib-es/wallet-api/ACRE/server.test.js.map +1 -0
  454. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  455. package/lib-es/wallet-api/Exchange/server.js +16 -13
  456. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  457. package/package.json +55 -52
  458. package/src/__tests__/test-helpers/environment.ts +1 -0
  459. package/src/apps/inlineAppInstall.ts +1 -4
  460. package/src/apps/react.ts +1 -3
  461. package/src/apps/runner.ts +1 -8
  462. package/src/bridge/crypto-assets/index.test.ts +0 -47
  463. package/src/bridge/crypto-assets/index.ts +0 -5
  464. package/src/bridge/generic-alpaca/accountBridge.ts +8 -3
  465. package/src/bridge/generic-alpaca/alpaca/index.ts +13 -18
  466. package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +38 -10
  467. package/src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts +4 -3
  468. package/src/bridge/generic-alpaca/createTransaction.ts +9 -1
  469. package/src/bridge/generic-alpaca/currencyBridge.ts +8 -2
  470. package/src/bridge/generic-alpaca/getAccountShape.ts +4 -5
  471. package/src/bridge/generic-alpaca/signOperation.ts +1 -1
  472. package/src/bridge/generic-alpaca/signer/Eth.ts +70 -0
  473. package/src/bridge/generic-alpaca/signer/index.ts +5 -15
  474. package/src/bridge/generic-alpaca/signer/signTransaction.ts +4 -3
  475. package/src/bridge/generic-alpaca/signer/types.ts +14 -0
  476. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +173 -0
  477. package/src/bridge/generic-alpaca/utils.test.ts +29 -1
  478. package/src/bridge/generic-alpaca/utils.ts +15 -0
  479. package/src/config/sharedConfig.ts +4 -0
  480. package/src/e2e/enum/Account.ts +14 -0
  481. package/src/e2e/enum/AppInfos.ts +2 -0
  482. package/src/e2e/enum/Currency.ts +2 -0
  483. package/src/e2e/enum/DeviceLabels.ts +1 -0
  484. package/src/e2e/enum/Network.ts +1 -0
  485. package/src/e2e/families/kaspa.ts +17 -0
  486. package/src/e2e/speculos.ts +13 -0
  487. package/src/exchange/swap/transactionStrategies.ts +121 -73
  488. package/src/families/canton/bridge/mock-data.ts +175 -0
  489. package/src/families/canton/bridge/mock.ts +180 -0
  490. package/src/families/canton/config.ts +7 -7
  491. package/src/families/canton/setup.ts +11 -7
  492. package/src/families/evm/config.ts +2 -2
  493. package/src/families/kaspa/__snapshots__/bridge.integration.test.ts.snap +66 -0
  494. package/src/families/kaspa/bridge.integration.test.ts +5 -0
  495. package/src/families/kaspa/config.ts +12 -0
  496. package/src/families/kaspa/react.ts +19 -0
  497. package/src/families/kaspa/setup.ts +27 -0
  498. package/src/families/kaspa/types.ts +1 -0
  499. package/src/featureFlags/defaultFeatures.ts +4 -3
  500. package/src/generated/bridge/js.ts +2 -0
  501. package/src/generated/bridge/mock.ts +2 -0
  502. package/src/generated/cli-transaction.ts +2 -0
  503. package/src/generated/deviceTransactionConfig.ts +2 -0
  504. package/src/generated/hw-getAddress.ts +2 -0
  505. package/src/generated/transaction.ts +2 -0
  506. package/src/generated/types.ts +10 -0
  507. package/src/hw/actions/app.ts +0 -1
  508. package/src/hw/getDeviceNameMaxLength.test.ts +16 -0
  509. package/src/hw/getDeviceNameMaxLength.ts +2 -0
  510. package/src/modularDrawer/data/state-manager/api.ts +4 -2
  511. package/src/modularDrawer/data/state-manager/types.ts +1 -0
  512. package/src/modularDrawer/hooks/__test__/useModularDrawerConfiguration.test.ts +251 -0
  513. package/src/modularDrawer/hooks/useAssetsData.ts +24 -9
  514. package/src/modularDrawer/hooks/useModularDrawerConfiguration.ts +33 -0
  515. package/src/modularDrawer/hooks/useSearch.ts +52 -0
  516. package/src/notifications/ServiceStatusProvider/index.test.ts +102 -0
  517. package/src/notifications/ServiceStatusProvider/index.tsx +37 -12
  518. package/src/notifications/ServiceStatusProvider/ledger-components.ts +12 -0
  519. package/src/wallet-api/ACRE/server.test.ts +470 -0
  520. package/src/wallet-api/ACRE/server.ts +202 -14
  521. package/src/wallet-api/Exchange/server.ts +17 -14
  522. package/lib/bridge/crypto-assets/cal-integration.d.ts +0 -4
  523. package/lib/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
  524. package/lib/bridge/crypto-assets/cal-integration.js +0 -26
  525. package/lib/bridge/crypto-assets/cal-integration.js.map +0 -1
  526. package/lib/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
  527. package/lib/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
  528. package/lib/bridge/crypto-assets/cal-integration.test.js +0 -45
  529. package/lib/bridge/crypto-assets/cal-integration.test.js.map +0 -1
  530. package/lib/bridge/crypto-assets/cal-store.d.ts +0 -14
  531. package/lib/bridge/crypto-assets/cal-store.d.ts.map +0 -1
  532. package/lib/bridge/crypto-assets/cal-store.js +0 -58
  533. package/lib/bridge/crypto-assets/cal-store.js.map +0 -1
  534. package/lib/bridge/crypto-assets/cal-store.test.d.ts +0 -2
  535. package/lib/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
  536. package/lib/bridge/crypto-assets/cal-store.test.js +0 -70
  537. package/lib/bridge/crypto-assets/cal-store.test.js.map +0 -1
  538. package/lib-es/bridge/crypto-assets/cal-integration.d.ts +0 -4
  539. package/lib-es/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
  540. package/lib-es/bridge/crypto-assets/cal-integration.js +0 -21
  541. package/lib-es/bridge/crypto-assets/cal-integration.js.map +0 -1
  542. package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
  543. package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
  544. package/lib-es/bridge/crypto-assets/cal-integration.test.js +0 -43
  545. package/lib-es/bridge/crypto-assets/cal-integration.test.js.map +0 -1
  546. package/lib-es/bridge/crypto-assets/cal-store.d.ts +0 -14
  547. package/lib-es/bridge/crypto-assets/cal-store.d.ts.map +0 -1
  548. package/lib-es/bridge/crypto-assets/cal-store.js +0 -54
  549. package/lib-es/bridge/crypto-assets/cal-store.js.map +0 -1
  550. package/lib-es/bridge/crypto-assets/cal-store.test.d.ts +0 -2
  551. package/lib-es/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
  552. package/lib-es/bridge/crypto-assets/cal-store.test.js +0 -68
  553. package/lib-es/bridge/crypto-assets/cal-store.test.js.map +0 -1
  554. package/src/bridge/crypto-assets/cal-integration.test.ts +0 -53
  555. package/src/bridge/crypto-assets/cal-integration.ts +0 -23
  556. package/src/bridge/crypto-assets/cal-store.test.ts +0 -93
  557. package/src/bridge/crypto-assets/cal-store.ts +0 -63
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-common",
3
3
  "description": "Common ground for the Ledger Live apps",
4
- "version": "34.48.0-nightly.0",
4
+ "version": "34.48.0-nightly.10",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/LedgerHQ/ledger-live.git"
@@ -106,7 +106,7 @@
106
106
  "@dfinity/agent": "^0.21.0",
107
107
  "@dfinity/candid": "^0.21.0",
108
108
  "@dfinity/principal": "^0.15.6",
109
- "@ledgerhq/device-management-kit": "0.0.0-fix-lns-20250901094837",
109
+ "@ledgerhq/device-management-kit": "0.9.0",
110
110
  "@ledgerhq/live-app-sdk": "^0.8.1",
111
111
  "@ledgerhq/wallet-api-client": "^1.10.0",
112
112
  "@ledgerhq/wallet-api-core": "^1.22.0",
@@ -138,6 +138,7 @@
138
138
  "bip39": "^3.0.4",
139
139
  "bs58": "^4.0.1",
140
140
  "date-fns": "^2.23.0",
141
+ "ethers": "6.15.0",
141
142
  "expect": "^27.4.6",
142
143
  "fuse.js": "^6.6.2",
143
144
  "i18next": "20.6.1",
@@ -165,47 +166,49 @@
165
166
  "xstate": "^5.19.2",
166
167
  "yargs": "^17.0.0",
167
168
  "zod": "^3.22.4",
168
- "@ledgerhq/coin-algorand": "^0.10.1-nightly.0",
169
- "@ledgerhq/coin-aptos": "^3.2.1-nightly.0",
170
- "@ledgerhq/coin-bitcoin": "^0.21.1-nightly.0",
171
- "@ledgerhq/coin-canton": "^0.4.1-nightly.0",
172
- "@ledgerhq/coin-cardano": "^0.12.1-nightly.0",
173
- "@ledgerhq/coin-casper": "^2.1.1-nightly.0",
174
- "@ledgerhq/coin-celo": "^1.3.1-nightly.0",
175
- "@ledgerhq/coin-cosmos": "^0.17.1-nightly.0",
176
- "@ledgerhq/coin-evm": "^2.29.1-nightly.0",
177
- "@ledgerhq/coin-framework": "^6.4.0-nightly.0",
178
- "@ledgerhq/coin-filecoin": "^1.11.1-nightly.0",
179
- "@ledgerhq/coin-hedera": "^1.11.1-nightly.0",
180
- "@ledgerhq/coin-icon": "^0.12.1-nightly.0",
181
- "@ledgerhq/coin-internet_computer": "^1.8.1-nightly.0",
182
- "@ledgerhq/coin-mina": "^1.2.1-nightly.0",
183
- "@ledgerhq/coin-multiversx": "^0.5.1-nightly.0",
184
- "@ledgerhq/coin-near": "^0.13.1-nightly.0",
185
- "@ledgerhq/coin-polkadot": "^6.9.1-nightly.0",
186
- "@ledgerhq/coin-solana": "^0.32.1-nightly.0",
187
- "@ledgerhq/coin-stacks": "^0.9.1-nightly.0",
188
- "@ledgerhq/coin-stellar": "^6.3.1-nightly.0",
189
- "@ledgerhq/coin-sui": "^0.12.1-nightly.0",
190
- "@ledgerhq/coin-tezos": "^6.3.1-nightly.0",
191
- "@ledgerhq/coin-ton": "^0.14.1-nightly.0",
192
- "@ledgerhq/coin-vechain": "^2.9.1-nightly.0",
193
- "@ledgerhq/coin-xrp": "^7.3.1-nightly.0",
194
- "@ledgerhq/crypto-icons-ui": "^1.18.0",
195
- "@ledgerhq/cryptoassets": "^13.27.0",
196
- "@ledgerhq/coin-tron": "^5.3.1-nightly.0",
197
- "@ledgerhq/device-core": "^0.6.2",
169
+ "@ledgerhq/coin-algorand": "^0.10.1-nightly.5",
170
+ "@ledgerhq/coin-aptos": "^3.3.0-nightly.5",
171
+ "@ledgerhq/coin-bitcoin": "^0.21.1-nightly.5",
172
+ "@ledgerhq/coin-canton": "^0.5.0-nightly.6",
173
+ "@ledgerhq/coin-cardano": "^0.12.1-nightly.5",
174
+ "@ledgerhq/coin-casper": "^2.1.1-nightly.5",
175
+ "@ledgerhq/coin-celo": "^1.4.0-nightly.6",
176
+ "@ledgerhq/coin-cosmos": "^0.17.1-nightly.5",
177
+ "@ledgerhq/coin-evm": "^2.30.0-nightly.6",
178
+ "@ledgerhq/coin-filecoin": "^1.11.1-nightly.5",
179
+ "@ledgerhq/coin-framework": "^6.4.0-nightly.5",
180
+ "@ledgerhq/coin-hedera": "^1.11.1-nightly.5",
181
+ "@ledgerhq/coin-icon": "^0.12.1-nightly.5",
182
+ "@ledgerhq/coin-internet_computer": "^1.8.1-nightly.5",
183
+ "@ledgerhq/coin-kaspa": "^1.1.0-nightly.6",
184
+ "@ledgerhq/coin-mina": "^1.2.1-nightly.5",
185
+ "@ledgerhq/coin-multiversx": "^0.5.1-nightly.5",
186
+ "@ledgerhq/coin-near": "^0.13.1-nightly.5",
187
+ "@ledgerhq/coin-polkadot": "^6.10.0-nightly.5",
188
+ "@ledgerhq/coin-solana": "^0.32.1-nightly.5",
189
+ "@ledgerhq/coin-stacks": "^0.9.1-nightly.5",
190
+ "@ledgerhq/coin-stellar": "^6.4.0-nightly.5",
191
+ "@ledgerhq/coin-sui": "^0.13.0-nightly.7",
192
+ "@ledgerhq/coin-tezos": "^6.4.0-nightly.5",
193
+ "@ledgerhq/coin-ton": "^0.14.1-nightly.5",
194
+ "@ledgerhq/coin-tron": "^5.4.0-nightly.5",
195
+ "@ledgerhq/coin-vechain": "^2.10.0-nightly.5",
196
+ "@ledgerhq/coin-xrp": "^7.4.0-nightly.6",
197
+ "@ledgerhq/crypto-icons-ui": "^1.19.0-nightly.1",
198
+ "@ledgerhq/cryptoassets": "^13.28.0-nightly.3",
199
+ "@ledgerhq/device-core": "^0.6.3-nightly.2",
198
200
  "@ledgerhq/devices": "8.5.1",
199
201
  "@ledgerhq/errors": "^6.25.0",
200
202
  "@ledgerhq/hw-app-algorand": "^6.31.6",
201
203
  "@ledgerhq/hw-app-aptos": "^6.34.6",
202
204
  "@ledgerhq/hw-app-btc": "^10.10.2",
203
- "@ledgerhq/hw-app-celo": "^6.34.2",
205
+ "@ledgerhq/hw-app-celo": "^6.34.3-nightly.2",
204
206
  "@ledgerhq/hw-app-cosmos": "^6.32.6",
205
- "@ledgerhq/hw-app-eth": "^6.45.17",
206
- "@ledgerhq/hw-app-exchange": "^0.13.2",
207
+ "@ledgerhq/hw-app-eth": "^6.45.18-nightly.2",
208
+ "@ledgerhq/hw-app-exchange": "^0.13.3-nightly.0",
207
209
  "@ledgerhq/hw-app-hedera": "^1.2.6",
208
210
  "@ledgerhq/hw-app-icon": "^1.3.6",
211
+ "@ledgerhq/hw-app-kaspa": "^1.3.0-nightly.0",
209
212
  "@ledgerhq/hw-app-multiversx": "^6.25.1",
210
213
  "@ledgerhq/hw-app-near": "^6.31.6",
211
214
  "@ledgerhq/hw-app-polkadot": "^6.34.6",
@@ -213,27 +216,27 @@
213
216
  "@ledgerhq/hw-app-sui": "^1.4.0",
214
217
  "@ledgerhq/hw-app-tezos": "^6.31.6",
215
218
  "@ledgerhq/hw-app-trx": "^6.31.6",
216
- "@ledgerhq/hw-app-vet": "^0.5.15",
219
+ "@ledgerhq/hw-app-vet": "^0.6.0-nightly.3",
217
220
  "@ledgerhq/hw-app-xrp": "^6.32.4",
218
221
  "@ledgerhq/hw-transport": "^6.31.10",
219
222
  "@ledgerhq/hw-transport-mocker": "^6.29.10",
220
- "@ledgerhq/ledger-cal-service": "^1.3.1",
223
+ "@ledgerhq/ledger-cal-service": "^1.3.2-nightly.1",
221
224
  "@ledgerhq/live-config": "^3.2.0",
222
- "@ledgerhq/live-countervalues": "^0.7.1-nightly.0",
223
- "@ledgerhq/live-countervalues-react": "^0.5.2-nightly.0",
224
- "@ledgerhq/live-dmk-shared": "^0.12.3",
225
- "@ledgerhq/live-env": "^2.15.0",
225
+ "@ledgerhq/live-countervalues": "^0.7.1-nightly.5",
226
+ "@ledgerhq/live-countervalues-react": "^0.5.2-nightly.5",
227
+ "@ledgerhq/live-dmk-shared": "^0.12.4-nightly.0",
228
+ "@ledgerhq/live-env": "^2.16.0-nightly.1",
226
229
  "@ledgerhq/live-hooks": "0.1.0",
227
- "@ledgerhq/live-network": "^2.0.16",
228
- "@ledgerhq/live-nft": "^0.8.20-nightly.0",
230
+ "@ledgerhq/live-network": "^2.0.17-nightly.1",
231
+ "@ledgerhq/live-nft": "^0.8.20-nightly.5",
229
232
  "@ledgerhq/live-promise": "^0.1.1",
230
- "@ledgerhq/live-signer-canton": "^0.2.4-nightly.0",
231
- "@ledgerhq/live-signer-evm": "^0.7.5-nightly.0",
232
- "@ledgerhq/live-signer-solana": "^0.5.5-nightly.0",
233
- "@ledgerhq/live-wallet": "^0.13.1-nightly.0",
233
+ "@ledgerhq/live-signer-canton": "^0.2.4-nightly.6",
234
+ "@ledgerhq/live-signer-evm": "^0.7.5-nightly.7",
235
+ "@ledgerhq/live-signer-solana": "^0.5.5-nightly.5",
236
+ "@ledgerhq/live-wallet": "^0.13.1-nightly.6",
234
237
  "@ledgerhq/logs": "^6.13.0",
235
- "@ledgerhq/speculos-transport": "^0.2.9",
236
- "@ledgerhq/wallet-api-acre-module": "^0.6.0",
238
+ "@ledgerhq/speculos-transport": "^0.2.10-nightly.1",
239
+ "@ledgerhq/wallet-api-acre-module": "^0.7.0-nightly.0",
237
240
  "@ledgerhq/wallet-api-exchange-module": "^0.16.0"
238
241
  },
239
242
  "devDependencies": {
@@ -282,10 +285,10 @@
282
285
  "undici": "6.19.2",
283
286
  "uuid": "^8.3.2",
284
287
  "ws": "7",
285
- "@ledgerhq/device-react": "^0.2.43",
286
- "@ledgerhq/types-cryptoassets": "^7.26.0",
288
+ "@ledgerhq/device-react": "^0.2.44-nightly.2",
289
+ "@ledgerhq/types-cryptoassets": "^7.27.0-nightly.0",
287
290
  "@ledgerhq/types-devices": "^6.27.0",
288
- "@ledgerhq/types-live": "^6.83.0"
291
+ "@ledgerhq/types-live": "^6.84.0-nightly.1"
289
292
  },
290
293
  "scripts": {
291
294
  "build": "zx ./scripts/build-ts.mjs",
@@ -119,6 +119,7 @@ setSupportedCurrencies([
119
119
  "canton_network",
120
120
  "canton_network_devnet",
121
121
  "canton_network_localnet",
122
+ "kaspa",
122
123
  ]);
123
124
  LiveConfig.setConfig(liveConfig);
124
125
 
@@ -9,7 +9,6 @@ import { runAllWithProgress } from "./runner";
9
9
  import { InlineAppInstallEvent } from "./types";
10
10
  import { mergeMap, map, throttleTime } from "rxjs/operators";
11
11
  import { LocalTracer } from "@ledgerhq/logs";
12
- import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
13
12
 
14
13
  /**
15
14
  * Tries to install a list of apps
@@ -26,13 +25,11 @@ const inlineAppInstall = ({
26
25
  appNames,
27
26
  onSuccessObs,
28
27
  allowPartialDependencies = false,
29
- storage,
30
28
  }: {
31
29
  transport: Transport;
32
30
  appNames: string[];
33
31
  onSuccessObs?: () => Observable<any>;
34
32
  allowPartialDependencies?: boolean;
35
- storage?: StorageProvider<AppStorageType>;
36
33
  }): Observable<InlineAppInstallEvent | ConnectAppEvent> => {
37
34
  const tracer = new LocalTracer("hw", {
38
35
  ...transport.getTraceContext(),
@@ -105,7 +102,7 @@ const inlineAppInstall = ({
105
102
  installQueue: state.installQueue,
106
103
  }),
107
104
  maybeSkippedEvent,
108
- runAllWithProgress(state, exec, storage).pipe(
105
+ runAllWithProgress(state, exec).pipe(
109
106
  throttleTime(100),
110
107
  map(({ globalProgress, itemProgress, installQueue, currentAppOp }) => ({
111
108
  type: "inline-install",
package/src/apps/react.ts CHANGED
@@ -12,14 +12,12 @@ import {
12
12
  import { runAppOp } from "./runner";
13
13
  import { App } from "@ledgerhq/types-live";
14
14
  import { useFeatureFlags } from "../featureFlags";
15
- import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
16
15
 
17
16
  type UseAppsRunnerResult = [State, (arg0: Action) => void];
18
17
  // use for React apps. support dynamic change of the state.
19
18
  export const useAppsRunner = (
20
19
  listResult: ListAppsResult,
21
20
  exec: Exec,
22
- storage: StorageProvider<AppStorageType>,
23
21
  appsToRestore?: string[],
24
22
  ): UseAppsRunnerResult => {
25
23
  // $FlowFixMe for ledger-live-mobile older react/flow version
@@ -36,7 +34,7 @@ export const useAppsRunner = (
36
34
 
37
35
  useEffect(() => {
38
36
  if (appOp) {
39
- const sub = runAppOp({ state, appOp, exec, storage }).subscribe(event => {
37
+ const sub = runAppOp({ state, appOp, exec }).subscribe(event => {
40
38
  dispatch({
41
39
  type: "onRunnerEvent",
42
40
  event,
@@ -13,18 +13,15 @@ import type { Exec, State, AppOp, RunnerEvent, Action } from "./types";
13
13
  import { reducer, getActionPlan, getNextAppOp } from "./logic";
14
14
  import { delay } from "../promise";
15
15
  import { getEnv } from "@ledgerhq/live-env";
16
- import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
17
16
 
18
17
  export const runAppOp = ({
19
18
  state,
20
19
  appOp,
21
20
  exec,
22
- storage,
23
21
  }: {
24
22
  state: State;
25
23
  appOp: AppOp;
26
24
  exec: Exec;
27
- storage?: StorageProvider<AppStorageType>;
28
25
  }): Observable<RunnerEvent> => {
29
26
  const { appByName, deviceInfo, deviceModel } = state;
30
27
  const app = appByName[appOp.name];
@@ -56,7 +53,6 @@ export const runAppOp = ({
56
53
  targetId: deviceInfo.targetId,
57
54
  app,
58
55
  modelId: deviceModel.id,
59
- ...(storage ? { storage } : {}),
60
56
  ...(state.skipAppDataBackup ? { skipAppDataBackup: true } : {}),
61
57
  }),
62
58
  ).pipe(
@@ -99,7 +95,6 @@ type InlineInstallProgress = {
99
95
  export const runAllWithProgress = (
100
96
  state: State,
101
97
  exec: Exec,
102
- storage?: StorageProvider<AppStorageType>,
103
98
  precision = 100,
104
99
  ): Observable<InlineInstallProgress> => {
105
100
  const total = state.uninstallQueue.length + state.installQueue.length;
@@ -110,9 +105,7 @@ export const runAllWithProgress = (
110
105
  return p;
111
106
  }
112
107
 
113
- return concat(
114
- ...getActionPlan(state).map(appOp => runAppOp({ state, appOp, exec, storage })),
115
- ).pipe(
108
+ return concat(...getActionPlan(state).map(appOp => runAppOp({ state, appOp, exec }))).pipe(
116
109
  map(event => {
117
110
  if (event.type === "runError") {
118
111
  throw event.error;
@@ -2,22 +2,8 @@ import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
2
2
  import { getCryptoAssetsStore, setCryptoAssetsStore } from ".";
3
3
  import * as legacy from "@ledgerhq/cryptoassets/tokens";
4
4
  import type { CryptoAssetsStore } from "@ledgerhq/types-live";
5
- import * as calIntegration from "./cal-integration";
6
5
 
7
6
  describe("Testing CryptoAssetStore", () => {
8
- let isCALIntegrationEnabledSpy: jest.SpyInstance;
9
- let getCALStoreSpy: jest.SpyInstance;
10
-
11
- beforeEach(() => {
12
- isCALIntegrationEnabledSpy = jest
13
- .spyOn(calIntegration, "isCALIntegrationEnabled")
14
- .mockReturnValue(false);
15
- getCALStoreSpy = jest.spyOn(calIntegration, "getCALStore");
16
- });
17
-
18
- afterEach(() => {
19
- jest.restoreAllMocks();
20
- });
21
7
  it("should return the default methods from cryptoassets libs when feature flag does not exists", () => {
22
8
  LiveConfig.setConfig({
23
9
  some_other_feature: {
@@ -82,37 +68,4 @@ describe("Testing CryptoAssetStore", () => {
82
68
  const store = getCryptoAssetsStore();
83
69
  expect(store).toBe(newStore);
84
70
  });
85
-
86
- it("should return CAL store when CAL integration is enabled", () => {
87
- isCALIntegrationEnabledSpy.mockReturnValue(true);
88
-
89
- const mockCALStore = {} as unknown as CryptoAssetsStore;
90
- getCALStoreSpy.mockReturnValue(mockCALStore);
91
-
92
- const store = getCryptoAssetsStore();
93
-
94
- expect(isCALIntegrationEnabledSpy).toHaveBeenCalled();
95
- expect(getCALStoreSpy).toHaveBeenCalled();
96
- expect(store).toBe(mockCALStore);
97
- });
98
-
99
- it("should prioritize CAL integration over feature flags", () => {
100
- isCALIntegrationEnabledSpy.mockReturnValue(true);
101
-
102
- LiveConfig.setConfig({
103
- feature_cal_lazy_loading: {
104
- type: "boolean",
105
- default: true,
106
- },
107
- });
108
-
109
- const mockCALStore = {} as unknown as CryptoAssetsStore;
110
- getCALStoreSpy.mockReturnValue(mockCALStore);
111
-
112
- const store = getCryptoAssetsStore();
113
-
114
- expect(store).toBe(mockCALStore);
115
- expect(isCALIntegrationEnabledSpy).toHaveBeenCalled();
116
- expect(getCALStoreSpy).toHaveBeenCalled();
117
- });
118
71
  });
@@ -1,7 +1,6 @@
1
1
  import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
2
2
  import * as legacy from "@ledgerhq/cryptoassets/tokens";
3
3
  import type { CryptoAssetsStore } from "@ledgerhq/types-live";
4
- import { isCALIntegrationEnabled, getCALStore } from "./cal-integration";
5
4
 
6
5
  const legacyStore: CryptoAssetsStore = {
7
6
  findTokenByAddress: legacy.findTokenByAddress,
@@ -18,10 +17,6 @@ export function setCryptoAssetsStore(store: CryptoAssetsStore) {
18
17
  }
19
18
 
20
19
  export function getCryptoAssetsStore(): CryptoAssetsStore {
21
- if (isCALIntegrationEnabled()) {
22
- return getCALStore();
23
- }
24
-
25
20
  const featureEnabled =
26
21
  LiveConfig.isConfigSet() && LiveConfig.getValueByKey("feature_cal_lazy_loading");
27
22
  if (!featureEnabled) {
@@ -14,9 +14,14 @@ import { genericEstimateMaxSpendable } from "./estimateMaxSpendable";
14
14
  import { createTransaction } from "./createTransaction";
15
15
  import { genericBroadcast } from "./broadcast";
16
16
  import { genericSignOperation } from "./signOperation";
17
+ import type { AlpacaSigner } from "./signer/types";
17
18
 
18
- export function getAlpacaAccountBridge(network: string, kind: string): AccountBridge<any> {
19
- const signer = getSigner(network);
19
+ export function getAlpacaAccountBridge(
20
+ network: string,
21
+ kind: string,
22
+ customSigner?: AlpacaSigner,
23
+ ): AccountBridge<any> {
24
+ const signer = customSigner ?? getSigner(network);
20
25
  return {
21
26
  sync: makeSync({ getAccountShape: genericGetAccountShape(network, kind) }),
22
27
  receive: makeAccountBridgeReceive(getAddressWrapper(signer.getAddress)),
@@ -28,5 +33,5 @@ export function getAlpacaAccountBridge(network: string, kind: string): AccountBr
28
33
  broadcast: genericBroadcast(network, kind),
29
34
  signOperation: genericSignOperation(network, kind)(signer.context),
30
35
  getSerializedAddressParameters, // NOTE: check wether it should be exposed by coin-module's api instead?
31
- } satisfies Partial<AccountBridge<any>> as AccountBridge<any>;
36
+ } satisfies Partial<AccountBridge<any>>;
32
37
  }
@@ -2,37 +2,32 @@ import { createApi as createXrpApi } from "@ledgerhq/coin-xrp/api/index";
2
2
  import { createApi as createStellarApi } from "@ledgerhq/coin-stellar/api/index";
3
3
  import { createApi as createCantonApi } from "@ledgerhq/coin-canton/api/index";
4
4
  import { createApi as createTronApi } from "@ledgerhq/coin-tron/api/index";
5
+ import { createApi as createEvmApi } from "@ledgerhq/coin-evm/api/index";
5
6
  import { getCurrencyConfiguration } from "../../../config";
6
- import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
7
7
  import { getNetworkAlpacaApi } from "./network/network-alpaca";
8
8
  import { Api } from "@ledgerhq/coin-framework/api/types";
9
9
  import { XrpCoinConfig } from "@ledgerhq/coin-xrp/config";
10
10
  import { StellarCoinConfig } from "@ledgerhq/coin-stellar/config";
11
11
  import { CantonCoinConfig } from "@ledgerhq/coin-canton/config";
12
12
  import { TronCoinConfig } from "@ledgerhq/coin-tron/config";
13
+ import { EvmConfigInfo } from "@ledgerhq/coin-evm/config";
14
+ import { findCryptoCurrencyByNetwork } from "../utils";
13
15
 
14
- export function getAlpacaApi(network, kind): Api<any> {
16
+ export function getAlpacaApi(network: string, kind: string): Api<any> {
15
17
  if (kind === "local") {
16
- switch (network) {
18
+ const currency = findCryptoCurrencyByNetwork(network);
19
+ switch (currency?.family) {
17
20
  case "xrp":
18
- return createXrpApi(
19
- getCurrencyConfiguration<XrpCoinConfig>(getCryptoCurrencyById("ripple")),
20
- ) as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
21
+ return createXrpApi(getCurrencyConfiguration<XrpCoinConfig>(currency)) as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
21
22
  case "stellar":
22
- return createStellarApi(
23
- getCurrencyConfiguration<StellarCoinConfig>(getCryptoCurrencyById("stellar")),
24
- ) as Api<any>;
23
+ return createStellarApi(getCurrencyConfiguration<StellarCoinConfig>(currency)) as Api<any>;
25
24
  case "canton":
26
- return createCantonApi(
27
- getCurrencyConfiguration<CantonCoinConfig>(
28
- getCryptoCurrencyById("canton_network_devnet"),
29
- ),
30
- ) as Api<any>;
25
+ return createCantonApi(getCurrencyConfiguration<CantonCoinConfig>(currency)) as Api<any>;
31
26
  case "tron":
32
- return createTronApi(
33
- getCurrencyConfiguration<TronCoinConfig>(getCryptoCurrencyById("tron")),
34
- ) as Api<any>;
27
+ return createTronApi(getCurrencyConfiguration<TronCoinConfig>(currency)) as Api<any>;
28
+ case "evm":
29
+ return createEvmApi(getCurrencyConfiguration<EvmConfigInfo>(currency), network) as Api<any>;
35
30
  }
36
31
  }
37
- return getNetworkAlpacaApi(network) satisfies Partial<Api<any>> as Api<any>;
32
+ return getNetworkAlpacaApi(network) satisfies Partial<Api<any>>;
38
33
  }
@@ -3,6 +3,7 @@ import * as xrpModule from "@ledgerhq/coin-xrp/api/index";
3
3
  import * as stellarModule from "@ledgerhq/coin-stellar/api/index";
4
4
  import * as cantonModule from "@ledgerhq/coin-canton/api/index";
5
5
  import * as tronModule from "@ledgerhq/coin-tron/api/index";
6
+ import * as evmModule from "@ledgerhq/coin-evm/api/index";
6
7
  import * as config from "../../../config";
7
8
  import * as networkApi from "./network/network-alpaca";
8
9
  import * as cryptoAssets from "@ledgerhq/cryptoassets/currencies";
@@ -10,7 +11,7 @@ import * as cryptoAssets from "@ledgerhq/cryptoassets/currencies";
10
11
  const mockApiInstance = { mock: "api" };
11
12
 
12
13
  jest.mock("@ledgerhq/cryptoassets/currencies", () => ({
13
- getCryptoCurrencyById: jest.fn(),
14
+ findCryptoCurrencyById: jest.fn(),
14
15
  }));
15
16
 
16
17
  jest.mock("../../../config", () => ({
@@ -33,18 +34,37 @@ jest.mock("@ledgerhq/coin-tron/api/index", () => ({
33
34
  createApi: jest.fn(),
34
35
  }));
35
36
 
37
+ jest.mock("@ledgerhq/coin-evm/api/index", () => ({
38
+ createApi: jest.fn(),
39
+ }));
40
+
36
41
  jest.mock("./network/network-alpaca", () => ({
37
42
  getNetworkAlpacaApi: jest.fn(),
38
43
  }));
39
44
 
40
45
  describe("getAlpacaApi", () => {
41
- const mockCurrency = { id: "mock-currency" };
42
-
43
46
  beforeEach(() => {
44
47
  jest.clearAllMocks();
45
48
 
46
49
  // Common mocks
47
- (cryptoAssets.getCryptoCurrencyById as jest.Mock).mockReturnValue(mockCurrency);
50
+ (cryptoAssets.findCryptoCurrencyById as jest.Mock).mockImplementation(id => {
51
+ switch (id) {
52
+ case "ripple":
53
+ return { family: "xrp" };
54
+ case "stellar":
55
+ return { family: "stellar" };
56
+ case "canton":
57
+ return { family: "canton" };
58
+ case "tron":
59
+ return { family: "tron" };
60
+ case "ethereum":
61
+ return { family: "evm" };
62
+ case "sonic":
63
+ return { family: "evm" };
64
+ default:
65
+ return undefined;
66
+ }
67
+ });
48
68
  (config.getCurrencyConfiguration as jest.Mock).mockReturnValue({ config: true });
49
69
 
50
70
  // API mocks
@@ -52,21 +72,29 @@ describe("getAlpacaApi", () => {
52
72
  jest.spyOn(stellarModule, "createApi").mockReturnValue(mockApiInstance as any);
53
73
  jest.spyOn(cantonModule, "createApi").mockReturnValue(mockApiInstance as any);
54
74
  jest.spyOn(tronModule, "createApi").mockReturnValue(mockApiInstance as any);
75
+ jest.spyOn(evmModule, "createApi").mockReturnValue(mockApiInstance as any);
55
76
  jest.spyOn(networkApi, "getNetworkAlpacaApi").mockReturnValue(mockApiInstance as any);
56
77
  });
57
78
 
58
79
  const testCases = [
59
- { network: "xrp", module: xrpModule, label: "XRP" },
60
- { network: "stellar", module: stellarModule, label: "Stellar" },
61
- { network: "tron", module: tronModule, label: "Tron" },
62
- { network: "canton", module: cantonModule, label: "Canton" },
80
+ { network: "xrp", module: xrpModule, label: "XRP", params: [{ config: true }] },
81
+ { network: "stellar", module: stellarModule, label: "Stellar", params: [{ config: true }] },
82
+ { network: "tron", module: tronModule, label: "Tron", params: [{ config: true }] },
83
+ { network: "canton", module: cantonModule, label: "Canton", params: [{ config: true }] },
84
+ {
85
+ network: "ethereum",
86
+ module: evmModule,
87
+ label: "Ethereum",
88
+ params: [{ config: true }, "ethereum"],
89
+ },
90
+ { network: "sonic", module: evmModule, label: "Sonic", params: [{ config: true }, "sonic"] },
63
91
  ];
64
92
 
65
- testCases.forEach(({ network, module, label }) => {
93
+ testCases.forEach(({ network, module, label, params }) => {
66
94
  it(`should return ${label} API for network "${network}" and kind "local"`, () => {
67
95
  const result = getAlpacaApi(network, "local");
68
96
  expect(result).toEqual(mockApiInstance);
69
- expect(module.createApi).toHaveBeenCalledWith({ config: true });
97
+ expect(module.createApi).toHaveBeenCalledWith(...params);
70
98
  });
71
99
  });
72
100
 
@@ -13,6 +13,7 @@ import type {
13
13
  Page,
14
14
  Stake,
15
15
  Reward,
16
+ CraftedTransaction,
16
17
  } from "@ledgerhq/coin-framework/api/index";
17
18
  import network from "@ledgerhq/live-network";
18
19
 
@@ -160,8 +161,8 @@ const buildLastBlock = networkFamily =>
160
161
  };
161
162
 
162
163
  const buildCraftTransaction = networkFamily =>
163
- async function craftTransaction(intent: TransactionIntent<any>): Promise<string> {
164
- const { data } = await network<any, unknown>({
164
+ async function craftTransaction(intent: TransactionIntent<any>): Promise<CraftedTransaction> {
165
+ const { data } = await network<CraftedTransaction, unknown>({
165
166
  method: "POST",
166
167
  url: `${ALPACA_URL}/${networkFamily}/transaction/encode`,
167
168
  data: {
@@ -171,7 +172,7 @@ const buildCraftTransaction = networkFamily =>
171
172
  },
172
173
  },
173
174
  });
174
- return data.rawTransaction;
175
+ return data;
175
176
  };
176
177
 
177
178
  export const getNetworkAlpacaApi = (networkFamily: string) =>
@@ -19,7 +19,7 @@ export function createTransaction(account: Account | TokenAccount): TransactionC
19
19
  feeCustomUnit?: Unit | null | undefined;
20
20
  memoType?: string | null;
21
21
  memoValue?: string | null;
22
- mode?: "send" | "changeTrust";
22
+ mode?: "send" | "changeTrust" | "send-legacy" | "send-eip1559";
23
23
  assetReference?: string;
24
24
  assetOwner?: string;
25
25
  networkInfo?: NetworkInfo | null;
@@ -51,6 +51,14 @@ export function createTransaction(account: Account | TokenAccount): TransactionC
51
51
  assetOwner: "",
52
52
  networkInfo: null,
53
53
  };
54
+ case "evm": {
55
+ return {
56
+ mode: "send-eip1559",
57
+ family: currency.family,
58
+ amount: new BigNumber(0),
59
+ recipient: "",
60
+ };
61
+ }
54
62
  default:
55
63
  throw new Error(`Unsupported currency family: ${currency.family}`);
56
64
  }
@@ -2,8 +2,14 @@ import { makeScanAccounts } from "@ledgerhq/coin-framework/bridge/jsHelpers";
2
2
  import { CurrencyBridge } from "@ledgerhq/types-live";
3
3
  import { genericGetAccountShape } from "./getAccountShape";
4
4
  import { getSigner } from "./signer";
5
+ import type { AlpacaSigner } from "./signer/types";
5
6
 
6
- export function getAlpacaCurrencyBridge(network: string, kind: string): CurrencyBridge {
7
+ export function getAlpacaCurrencyBridge(
8
+ network: string,
9
+ kind: string,
10
+ customSigner?: AlpacaSigner,
11
+ ): CurrencyBridge {
12
+ const signer = customSigner ?? getSigner(network);
7
13
  return {
8
14
  preload: () => Promise.resolve({}),
9
15
  hydrate: () => {
@@ -11,7 +17,7 @@ export function getAlpacaCurrencyBridge(network: string, kind: string): Currency
11
17
  },
12
18
  scanAccounts: makeScanAccounts({
13
19
  getAccountShape: genericGetAccountShape(network, kind),
14
- getAddressFn: getSigner(network).getAddress,
20
+ getAddressFn: signer.getAddress.bind(signer),
15
21
  }),
16
22
  };
17
23
  }
@@ -73,7 +73,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
73
73
  getTokenFromAsset: alpacaApi.getTokenFromAsset,
74
74
  }) || [];
75
75
 
76
- const operationsWithSubs = mergedOps.map(op => {
76
+ const operations = mergedOps.map(op => {
77
77
  const subOperations = inferSubOperations(op.hash, subAccounts);
78
78
 
79
79
  return {
@@ -85,13 +85,12 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
85
85
  const res = {
86
86
  id: accountId,
87
87
  xpub: address,
88
- blockHeight:
89
- operationsWithSubs.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
88
+ blockHeight: operations.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
90
89
  balance: new BigNumber(nativeBalance.toString()),
91
90
  spendableBalance: new BigNumber(spendableBalance.toString()),
92
- operations: operationsWithSubs,
91
+ operations,
93
92
  subAccounts,
94
- operationsCount: operationsWithSubs.length,
93
+ operationsCount: operations.length,
95
94
  };
96
95
  return res;
97
96
  };
@@ -123,7 +123,7 @@ export const genericSignOperation =
123
123
  transactionIntent.sequence = sequenceNumber;
124
124
 
125
125
  /* Craft unsigned blob via Alpaca */
126
- const unsigned: string = await getAlpacaApi(network, kind).craftTransaction(
126
+ const { transaction: unsigned } = await getAlpacaApi(network, kind).craftTransaction(
127
127
  transactionIntent,
128
128
  { value: fees },
129
129
  );