@ledgerhq/live-common 34.48.0-nightly.1 → 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 (525) 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/createTransaction.d.ts +1 -1
  31. package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  32. package/lib/bridge/generic-alpaca/createTransaction.js +8 -0
  33. package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
  34. package/lib/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
  35. package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  36. package/lib/bridge/generic-alpaca/currencyBridge.js +3 -2
  37. package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  38. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  39. package/lib/bridge/generic-alpaca/getAccountShape.js +4 -4
  40. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  41. package/lib/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
  42. package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
  43. package/lib/bridge/generic-alpaca/signer/Eth.js +51 -0
  44. package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -0
  45. package/lib/bridge/generic-alpaca/signer/index.d.ts +2 -10
  46. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  47. package/lib/bridge/generic-alpaca/signer/index.js +2 -2
  48. package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
  49. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
  50. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  51. package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  52. package/lib/bridge/generic-alpaca/signer/types.d.ts +11 -0
  53. package/lib/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  54. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
  55. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
  56. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +144 -0
  57. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
  58. package/lib/bridge/generic-alpaca/utils.d.ts +2 -0
  59. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  60. package/lib/bridge/generic-alpaca/utils.js +15 -1
  61. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  62. package/lib/bridge/generic-alpaca/utils.test.js +21 -0
  63. package/lib/bridge/generic-alpaca/utils.test.js.map +1 -1
  64. package/lib/config/sharedConfig.d.ts.map +1 -1
  65. package/lib/config/sharedConfig.js +30 -26
  66. package/lib/config/sharedConfig.js.map +1 -1
  67. package/lib/e2e/enum/Account.d.ts +2 -0
  68. package/lib/e2e/enum/Account.d.ts.map +1 -1
  69. package/lib/e2e/enum/Account.js +2 -0
  70. package/lib/e2e/enum/Account.js.map +1 -1
  71. package/lib/e2e/enum/AppInfos.d.ts +1 -0
  72. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  73. package/lib/e2e/enum/AppInfos.js +1 -0
  74. package/lib/e2e/enum/AppInfos.js.map +1 -1
  75. package/lib/e2e/enum/Currency.d.ts +1 -0
  76. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  77. package/lib/e2e/enum/Currency.js +1 -0
  78. package/lib/e2e/enum/Currency.js.map +1 -1
  79. package/lib/e2e/enum/DeviceLabels.d.ts +2 -1
  80. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  81. package/lib/e2e/enum/DeviceLabels.js +1 -0
  82. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  83. package/lib/e2e/enum/Network.d.ts +2 -1
  84. package/lib/e2e/enum/Network.d.ts.map +1 -1
  85. package/lib/e2e/enum/Network.js +1 -0
  86. package/lib/e2e/enum/Network.js.map +1 -1
  87. package/lib/e2e/families/kaspa.d.ts +4 -0
  88. package/lib/e2e/families/kaspa.d.ts.map +1 -0
  89. package/lib/e2e/families/kaspa.js +23 -0
  90. package/lib/e2e/families/kaspa.js.map +1 -0
  91. package/lib/e2e/index.d.ts +3 -8
  92. package/lib/e2e/index.d.ts.map +1 -1
  93. package/lib/e2e/speculos.d.ts.map +1 -1
  94. package/lib/e2e/speculos.js +13 -0
  95. package/lib/e2e/speculos.js.map +1 -1
  96. package/lib/env.react.d.ts +1 -1
  97. package/lib/env.react.d.ts.map +1 -1
  98. package/lib/exchange/swap/transactionStrategies.d.ts +38 -11
  99. package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
  100. package/lib/exchange/swap/transactionStrategies.js +93 -47
  101. package/lib/exchange/swap/transactionStrategies.js.map +1 -1
  102. package/lib/families/canton/bridge/mock-data.d.ts +6 -0
  103. package/lib/families/canton/bridge/mock-data.d.ts.map +1 -0
  104. package/lib/families/canton/bridge/mock-data.js +120 -0
  105. package/lib/families/canton/bridge/mock-data.js.map +1 -0
  106. package/lib/families/canton/bridge/mock.d.ts +12 -0
  107. package/lib/families/canton/bridge/mock.d.ts.map +1 -0
  108. package/lib/families/canton/bridge/mock.js +154 -0
  109. package/lib/families/canton/bridge/mock.js.map +1 -0
  110. package/lib/families/canton/config.js +7 -6
  111. package/lib/families/canton/config.js.map +1 -1
  112. package/lib/families/canton/setup.d.ts.map +1 -1
  113. package/lib/families/canton/setup.js +10 -4
  114. package/lib/families/canton/setup.js.map +1 -1
  115. package/lib/families/evm/config.js +2 -2
  116. package/lib/families/evm/config.js.map +1 -1
  117. package/lib/families/kaspa/bridge.integration.test.d.ts +2 -0
  118. package/lib/families/kaspa/bridge.integration.test.d.ts.map +1 -0
  119. package/lib/families/kaspa/bridge.integration.test.js +7 -0
  120. package/lib/families/kaspa/bridge.integration.test.js.map +1 -0
  121. package/lib/families/kaspa/config.d.ts +3 -0
  122. package/lib/families/kaspa/config.d.ts.map +1 -0
  123. package/lib/families/kaspa/config.js +14 -0
  124. package/lib/families/kaspa/config.js.map +1 -0
  125. package/lib/families/kaspa/react.d.ts +4 -0
  126. package/lib/families/kaspa/react.d.ts.map +1 -0
  127. package/lib/families/kaspa/react.js +18 -0
  128. package/lib/families/kaspa/react.js.map +1 -0
  129. package/lib/families/kaspa/setup.d.ts +18 -0
  130. package/lib/families/kaspa/setup.d.ts.map +1 -0
  131. package/lib/families/kaspa/setup.js +24 -0
  132. package/lib/families/kaspa/setup.js.map +1 -0
  133. package/lib/families/kaspa/types.d.ts +2 -0
  134. package/lib/families/kaspa/types.d.ts.map +1 -0
  135. package/lib/families/kaspa/types.js +18 -0
  136. package/lib/families/kaspa/types.js.map +1 -0
  137. package/lib/families/xrp/setup.d.ts +2 -2
  138. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  139. package/lib/featureFlags/defaultFeatures.js +4 -3
  140. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  141. package/lib/featureFlags/useFeature.d.ts +1 -1
  142. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  143. package/lib/generated/bridge/js.d.ts +1 -0
  144. package/lib/generated/bridge/js.d.ts.map +1 -1
  145. package/lib/generated/bridge/js.js +24 -22
  146. package/lib/generated/bridge/js.js.map +1 -1
  147. package/lib/generated/bridge/mock.d.ts +9 -1
  148. package/lib/generated/bridge/mock.d.ts.map +1 -1
  149. package/lib/generated/bridge/mock.js +26 -24
  150. package/lib/generated/bridge/mock.js.map +1 -1
  151. package/lib/generated/cli-transaction.d.ts +13 -2
  152. package/lib/generated/cli-transaction.d.ts.map +1 -1
  153. package/lib/generated/cli-transaction.js +28 -26
  154. package/lib/generated/cli-transaction.js.map +1 -1
  155. package/lib/generated/deviceTransactionConfig.d.ts +2 -0
  156. package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
  157. package/lib/generated/deviceTransactionConfig.js +24 -22
  158. package/lib/generated/deviceTransactionConfig.js.map +1 -1
  159. package/lib/generated/hw-getAddress.d.ts +1 -0
  160. package/lib/generated/hw-getAddress.d.ts.map +1 -1
  161. package/lib/generated/hw-getAddress.js +28 -26
  162. package/lib/generated/hw-getAddress.js.map +1 -1
  163. package/lib/generated/platformAdapter.d.ts +1 -1
  164. package/lib/generated/specs.d.ts +1 -1
  165. package/lib/generated/transaction.d.ts +11 -3
  166. package/lib/generated/transaction.d.ts.map +1 -1
  167. package/lib/generated/transaction.js +28 -26
  168. package/lib/generated/transaction.js.map +1 -1
  169. package/lib/generated/types.d.ts +5 -4
  170. package/lib/generated/types.d.ts.map +1 -1
  171. package/lib/generated/walletApiAdapter.d.ts +1 -1
  172. package/lib/hw/actions/app.d.ts.map +1 -1
  173. package/lib/hw/actions/app.js.map +1 -1
  174. package/lib/hw/getDeviceNameMaxLength.d.ts.map +1 -1
  175. package/lib/hw/getDeviceNameMaxLength.js +2 -0
  176. package/lib/hw/getDeviceNameMaxLength.js.map +1 -1
  177. package/lib/hw/getDeviceNameMaxLength.test.js +12 -0
  178. package/lib/hw/getDeviceNameMaxLength.test.js.map +1 -1
  179. package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  180. package/lib/modularDrawer/data/state-manager/api.js +3 -2
  181. package/lib/modularDrawer/data/state-manager/api.js.map +1 -1
  182. package/lib/modularDrawer/data/state-manager/types.d.ts +1 -0
  183. package/lib/modularDrawer/data/state-manager/types.d.ts.map +1 -1
  184. package/lib/modularDrawer/hooks/useAssetsData.d.ts +3 -1
  185. package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  186. package/lib/modularDrawer/hooks/useAssetsData.js +6 -3
  187. package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
  188. package/lib/modularDrawer/hooks/useSearch.d.ts +16 -0
  189. package/lib/modularDrawer/hooks/useSearch.d.ts.map +1 -0
  190. package/lib/modularDrawer/hooks/useSearch.js +24 -0
  191. package/lib/modularDrawer/hooks/useSearch.js.map +1 -0
  192. package/lib/notifications/ServiceStatusProvider/index.d.ts +16 -1
  193. package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  194. package/lib/notifications/ServiceStatusProvider/index.js +31 -7
  195. package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
  196. package/lib/notifications/ServiceStatusProvider/index.test.d.ts +2 -0
  197. package/lib/notifications/ServiceStatusProvider/index.test.d.ts.map +1 -0
  198. package/lib/notifications/ServiceStatusProvider/index.test.js +88 -0
  199. package/lib/notifications/ServiceStatusProvider/index.test.js.map +1 -0
  200. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts +2 -0
  201. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts.map +1 -0
  202. package/lib/notifications/ServiceStatusProvider/ledger-components.js +16 -0
  203. package/lib/notifications/ServiceStatusProvider/ledger-components.js.map +1 -0
  204. package/lib/wallet-api/ACRE/server.d.ts +13 -6
  205. package/lib/wallet-api/ACRE/server.d.ts.map +1 -1
  206. package/lib/wallet-api/ACRE/server.js +142 -1
  207. package/lib/wallet-api/ACRE/server.js.map +1 -1
  208. package/lib/wallet-api/ACRE/server.test.d.ts +2 -0
  209. package/lib/wallet-api/ACRE/server.test.d.ts.map +1 -0
  210. package/lib/wallet-api/ACRE/server.test.js +393 -0
  211. package/lib/wallet-api/ACRE/server.test.js.map +1 -0
  212. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  213. package/lib/wallet-api/Exchange/server.js +16 -13
  214. package/lib/wallet-api/Exchange/server.js.map +1 -1
  215. package/lib-es/__tests__/test-helpers/environment.js +1 -0
  216. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  217. package/lib-es/apps/inlineAppInstall.d.ts +1 -3
  218. package/lib-es/apps/inlineAppInstall.d.ts.map +1 -1
  219. package/lib-es/apps/inlineAppInstall.js +2 -2
  220. package/lib-es/apps/inlineAppInstall.js.map +1 -1
  221. package/lib-es/apps/react.d.ts +1 -2
  222. package/lib-es/apps/react.d.ts.map +1 -1
  223. package/lib-es/apps/react.js +2 -2
  224. package/lib-es/apps/react.js.map +1 -1
  225. package/lib-es/apps/runner.d.ts +2 -4
  226. package/lib-es/apps/runner.d.ts.map +1 -1
  227. package/lib-es/apps/runner.js +3 -4
  228. package/lib-es/apps/runner.js.map +1 -1
  229. package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
  230. package/lib-es/bridge/crypto-assets/index.js +0 -4
  231. package/lib-es/bridge/crypto-assets/index.js.map +1 -1
  232. package/lib-es/bridge/crypto-assets/index.test.js +0 -36
  233. package/lib-es/bridge/crypto-assets/index.test.js.map +1 -1
  234. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +2 -1
  235. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  236. package/lib-es/bridge/generic-alpaca/accountBridge.js +2 -2
  237. package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
  238. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
  239. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  240. package/lib-es/bridge/generic-alpaca/alpaca/index.js +10 -6
  241. package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  242. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
  243. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
  244. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts +1 -1
  245. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  246. package/lib-es/bridge/generic-alpaca/createTransaction.js +8 -0
  247. package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
  248. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
  249. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  250. package/lib-es/bridge/generic-alpaca/currencyBridge.js +3 -2
  251. package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  252. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  253. package/lib-es/bridge/generic-alpaca/getAccountShape.js +4 -4
  254. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  255. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
  256. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
  257. package/lib-es/bridge/generic-alpaca/signer/Eth.js +47 -0
  258. package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -0
  259. package/lib-es/bridge/generic-alpaca/signer/index.d.ts +2 -10
  260. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  261. package/lib-es/bridge/generic-alpaca/signer/index.js +2 -2
  262. package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
  263. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
  264. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  265. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  266. package/lib-es/bridge/generic-alpaca/signer/types.d.ts +11 -0
  267. package/lib-es/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  268. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
  269. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
  270. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +139 -0
  271. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
  272. package/lib-es/bridge/generic-alpaca/utils.d.ts +2 -0
  273. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  274. package/lib-es/bridge/generic-alpaca/utils.js +13 -0
  275. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  276. package/lib-es/bridge/generic-alpaca/utils.test.js +22 -1
  277. package/lib-es/bridge/generic-alpaca/utils.test.js.map +1 -1
  278. package/lib-es/config/sharedConfig.d.ts.map +1 -1
  279. package/lib-es/config/sharedConfig.js +4 -0
  280. package/lib-es/config/sharedConfig.js.map +1 -1
  281. package/lib-es/e2e/enum/Account.d.ts +2 -0
  282. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  283. package/lib-es/e2e/enum/Account.js +2 -0
  284. package/lib-es/e2e/enum/Account.js.map +1 -1
  285. package/lib-es/e2e/enum/AppInfos.d.ts +1 -0
  286. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  287. package/lib-es/e2e/enum/AppInfos.js +1 -0
  288. package/lib-es/e2e/enum/AppInfos.js.map +1 -1
  289. package/lib-es/e2e/enum/Currency.d.ts +1 -0
  290. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  291. package/lib-es/e2e/enum/Currency.js +1 -0
  292. package/lib-es/e2e/enum/Currency.js.map +1 -1
  293. package/lib-es/e2e/enum/DeviceLabels.d.ts +2 -1
  294. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  295. package/lib-es/e2e/enum/DeviceLabels.js +1 -0
  296. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  297. package/lib-es/e2e/enum/Network.d.ts +2 -1
  298. package/lib-es/e2e/enum/Network.d.ts.map +1 -1
  299. package/lib-es/e2e/enum/Network.js +1 -0
  300. package/lib-es/e2e/enum/Network.js.map +1 -1
  301. package/lib-es/e2e/families/kaspa.d.ts +4 -0
  302. package/lib-es/e2e/families/kaspa.d.ts.map +1 -0
  303. package/lib-es/e2e/families/kaspa.js +15 -0
  304. package/lib-es/e2e/families/kaspa.js.map +1 -0
  305. package/lib-es/e2e/index.d.ts +3 -8
  306. package/lib-es/e2e/index.d.ts.map +1 -1
  307. package/lib-es/e2e/speculos.d.ts.map +1 -1
  308. package/lib-es/e2e/speculos.js +13 -0
  309. package/lib-es/e2e/speculos.js.map +1 -1
  310. package/lib-es/env.react.d.ts +1 -1
  311. package/lib-es/env.react.d.ts.map +1 -1
  312. package/lib-es/exchange/swap/transactionStrategies.d.ts +38 -11
  313. package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
  314. package/lib-es/exchange/swap/transactionStrategies.js +87 -44
  315. package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
  316. package/lib-es/families/canton/bridge/mock-data.d.ts +6 -0
  317. package/lib-es/families/canton/bridge/mock-data.d.ts.map +1 -0
  318. package/lib-es/families/canton/bridge/mock-data.js +116 -0
  319. package/lib-es/families/canton/bridge/mock-data.js.map +1 -0
  320. package/lib-es/families/canton/bridge/mock.d.ts +12 -0
  321. package/lib-es/families/canton/bridge/mock.d.ts.map +1 -0
  322. package/lib-es/families/canton/bridge/mock.js +152 -0
  323. package/lib-es/families/canton/bridge/mock.js.map +1 -0
  324. package/lib-es/families/canton/config.js +7 -6
  325. package/lib-es/families/canton/config.js.map +1 -1
  326. package/lib-es/families/canton/setup.d.ts.map +1 -1
  327. package/lib-es/families/canton/setup.js +10 -4
  328. package/lib-es/families/canton/setup.js.map +1 -1
  329. package/lib-es/families/evm/config.js +2 -2
  330. package/lib-es/families/evm/config.js.map +1 -1
  331. package/lib-es/families/kaspa/bridge.integration.test.d.ts +2 -0
  332. package/lib-es/families/kaspa/bridge.integration.test.d.ts.map +1 -0
  333. package/lib-es/families/kaspa/bridge.integration.test.js +5 -0
  334. package/lib-es/families/kaspa/bridge.integration.test.js.map +1 -0
  335. package/lib-es/families/kaspa/config.d.ts +3 -0
  336. package/lib-es/families/kaspa/config.d.ts.map +1 -0
  337. package/lib-es/families/kaspa/config.js +11 -0
  338. package/lib-es/families/kaspa/config.js.map +1 -0
  339. package/lib-es/families/kaspa/react.d.ts +4 -0
  340. package/lib-es/families/kaspa/react.d.ts.map +1 -0
  341. package/lib-es/families/kaspa/react.js +14 -0
  342. package/lib-es/families/kaspa/react.js.map +1 -0
  343. package/lib-es/families/kaspa/setup.d.ts +18 -0
  344. package/lib-es/families/kaspa/setup.d.ts.map +1 -0
  345. package/lib-es/families/kaspa/setup.js +16 -0
  346. package/lib-es/families/kaspa/setup.js.map +1 -0
  347. package/lib-es/families/kaspa/types.d.ts +2 -0
  348. package/lib-es/families/kaspa/types.d.ts.map +1 -0
  349. package/lib-es/families/kaspa/types.js +2 -0
  350. package/lib-es/families/kaspa/types.js.map +1 -0
  351. package/lib-es/families/xrp/setup.d.ts +2 -2
  352. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  353. package/lib-es/featureFlags/defaultFeatures.js +4 -3
  354. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  355. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  356. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  357. package/lib-es/generated/bridge/js.d.ts +1 -0
  358. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  359. package/lib-es/generated/bridge/js.js +2 -0
  360. package/lib-es/generated/bridge/js.js.map +1 -1
  361. package/lib-es/generated/bridge/mock.d.ts +9 -1
  362. package/lib-es/generated/bridge/mock.d.ts.map +1 -1
  363. package/lib-es/generated/bridge/mock.js +2 -0
  364. package/lib-es/generated/bridge/mock.js.map +1 -1
  365. package/lib-es/generated/cli-transaction.d.ts +13 -2
  366. package/lib-es/generated/cli-transaction.d.ts.map +1 -1
  367. package/lib-es/generated/cli-transaction.js +2 -0
  368. package/lib-es/generated/cli-transaction.js.map +1 -1
  369. package/lib-es/generated/deviceTransactionConfig.d.ts +2 -0
  370. package/lib-es/generated/deviceTransactionConfig.d.ts.map +1 -1
  371. package/lib-es/generated/deviceTransactionConfig.js +2 -0
  372. package/lib-es/generated/deviceTransactionConfig.js.map +1 -1
  373. package/lib-es/generated/hw-getAddress.d.ts +1 -0
  374. package/lib-es/generated/hw-getAddress.d.ts.map +1 -1
  375. package/lib-es/generated/hw-getAddress.js +2 -0
  376. package/lib-es/generated/hw-getAddress.js.map +1 -1
  377. package/lib-es/generated/platformAdapter.d.ts +1 -1
  378. package/lib-es/generated/specs.d.ts +1 -1
  379. package/lib-es/generated/transaction.d.ts +11 -3
  380. package/lib-es/generated/transaction.d.ts.map +1 -1
  381. package/lib-es/generated/transaction.js +2 -0
  382. package/lib-es/generated/transaction.js.map +1 -1
  383. package/lib-es/generated/types.d.ts +5 -4
  384. package/lib-es/generated/types.d.ts.map +1 -1
  385. package/lib-es/generated/walletApiAdapter.d.ts +1 -1
  386. package/lib-es/hw/actions/app.d.ts.map +1 -1
  387. package/lib-es/hw/actions/app.js.map +1 -1
  388. package/lib-es/hw/getDeviceNameMaxLength.d.ts.map +1 -1
  389. package/lib-es/hw/getDeviceNameMaxLength.js +2 -0
  390. package/lib-es/hw/getDeviceNameMaxLength.js.map +1 -1
  391. package/lib-es/hw/getDeviceNameMaxLength.test.js +12 -0
  392. package/lib-es/hw/getDeviceNameMaxLength.test.js.map +1 -1
  393. package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  394. package/lib-es/modularDrawer/data/state-manager/api.js +3 -2
  395. package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -1
  396. package/lib-es/modularDrawer/data/state-manager/types.d.ts +1 -0
  397. package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +1 -1
  398. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +3 -1
  399. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  400. package/lib-es/modularDrawer/hooks/useAssetsData.js +6 -3
  401. package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
  402. package/lib-es/modularDrawer/hooks/useSearch.d.ts +16 -0
  403. package/lib-es/modularDrawer/hooks/useSearch.d.ts.map +1 -0
  404. package/lib-es/modularDrawer/hooks/useSearch.js +20 -0
  405. package/lib-es/modularDrawer/hooks/useSearch.js.map +1 -0
  406. package/lib-es/notifications/ServiceStatusProvider/index.d.ts +16 -1
  407. package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  408. package/lib-es/notifications/ServiceStatusProvider/index.js +31 -7
  409. package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
  410. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts +2 -0
  411. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts.map +1 -0
  412. package/lib-es/notifications/ServiceStatusProvider/index.test.js +86 -0
  413. package/lib-es/notifications/ServiceStatusProvider/index.test.js.map +1 -0
  414. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts +2 -0
  415. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts.map +1 -0
  416. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js +13 -0
  417. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js.map +1 -0
  418. package/lib-es/wallet-api/ACRE/server.d.ts +13 -6
  419. package/lib-es/wallet-api/ACRE/server.d.ts.map +1 -1
  420. package/lib-es/wallet-api/ACRE/server.js +140 -2
  421. package/lib-es/wallet-api/ACRE/server.js.map +1 -1
  422. package/lib-es/wallet-api/ACRE/server.test.d.ts +2 -0
  423. package/lib-es/wallet-api/ACRE/server.test.d.ts.map +1 -0
  424. package/lib-es/wallet-api/ACRE/server.test.js +388 -0
  425. package/lib-es/wallet-api/ACRE/server.test.js.map +1 -0
  426. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  427. package/lib-es/wallet-api/Exchange/server.js +16 -13
  428. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  429. package/package.json +55 -52
  430. package/src/__tests__/test-helpers/environment.ts +1 -0
  431. package/src/apps/inlineAppInstall.ts +1 -4
  432. package/src/apps/react.ts +1 -3
  433. package/src/apps/runner.ts +1 -8
  434. package/src/bridge/crypto-assets/index.test.ts +0 -47
  435. package/src/bridge/crypto-assets/index.ts +0 -5
  436. package/src/bridge/generic-alpaca/accountBridge.ts +8 -3
  437. package/src/bridge/generic-alpaca/alpaca/index.ts +13 -18
  438. package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +38 -10
  439. package/src/bridge/generic-alpaca/createTransaction.ts +9 -1
  440. package/src/bridge/generic-alpaca/currencyBridge.ts +8 -2
  441. package/src/bridge/generic-alpaca/getAccountShape.ts +4 -5
  442. package/src/bridge/generic-alpaca/signer/Eth.ts +70 -0
  443. package/src/bridge/generic-alpaca/signer/index.ts +5 -15
  444. package/src/bridge/generic-alpaca/signer/signTransaction.ts +4 -3
  445. package/src/bridge/generic-alpaca/signer/types.ts +14 -0
  446. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +173 -0
  447. package/src/bridge/generic-alpaca/utils.test.ts +29 -1
  448. package/src/bridge/generic-alpaca/utils.ts +15 -0
  449. package/src/config/sharedConfig.ts +4 -0
  450. package/src/e2e/enum/Account.ts +14 -0
  451. package/src/e2e/enum/AppInfos.ts +2 -0
  452. package/src/e2e/enum/Currency.ts +2 -0
  453. package/src/e2e/enum/DeviceLabels.ts +1 -0
  454. package/src/e2e/enum/Network.ts +1 -0
  455. package/src/e2e/families/kaspa.ts +17 -0
  456. package/src/e2e/speculos.ts +13 -0
  457. package/src/exchange/swap/transactionStrategies.ts +121 -73
  458. package/src/families/canton/bridge/mock-data.ts +175 -0
  459. package/src/families/canton/bridge/mock.ts +180 -0
  460. package/src/families/canton/config.ts +7 -7
  461. package/src/families/canton/setup.ts +11 -7
  462. package/src/families/evm/config.ts +2 -2
  463. package/src/families/kaspa/__snapshots__/bridge.integration.test.ts.snap +66 -0
  464. package/src/families/kaspa/bridge.integration.test.ts +5 -0
  465. package/src/families/kaspa/config.ts +12 -0
  466. package/src/families/kaspa/react.ts +19 -0
  467. package/src/families/kaspa/setup.ts +27 -0
  468. package/src/families/kaspa/types.ts +1 -0
  469. package/src/featureFlags/defaultFeatures.ts +4 -3
  470. package/src/generated/bridge/js.ts +2 -0
  471. package/src/generated/bridge/mock.ts +2 -0
  472. package/src/generated/cli-transaction.ts +2 -0
  473. package/src/generated/deviceTransactionConfig.ts +2 -0
  474. package/src/generated/hw-getAddress.ts +2 -0
  475. package/src/generated/transaction.ts +2 -0
  476. package/src/generated/types.ts +10 -0
  477. package/src/hw/actions/app.ts +0 -1
  478. package/src/hw/getDeviceNameMaxLength.test.ts +16 -0
  479. package/src/hw/getDeviceNameMaxLength.ts +2 -0
  480. package/src/modularDrawer/data/state-manager/api.ts +4 -2
  481. package/src/modularDrawer/data/state-manager/types.ts +1 -0
  482. package/src/modularDrawer/hooks/useAssetsData.ts +24 -9
  483. package/src/modularDrawer/hooks/useSearch.ts +52 -0
  484. package/src/notifications/ServiceStatusProvider/index.test.ts +102 -0
  485. package/src/notifications/ServiceStatusProvider/index.tsx +37 -12
  486. package/src/notifications/ServiceStatusProvider/ledger-components.ts +12 -0
  487. package/src/wallet-api/ACRE/server.test.ts +470 -0
  488. package/src/wallet-api/ACRE/server.ts +202 -14
  489. package/src/wallet-api/Exchange/server.ts +17 -14
  490. package/lib/bridge/crypto-assets/cal-integration.d.ts +0 -4
  491. package/lib/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
  492. package/lib/bridge/crypto-assets/cal-integration.js +0 -26
  493. package/lib/bridge/crypto-assets/cal-integration.js.map +0 -1
  494. package/lib/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
  495. package/lib/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
  496. package/lib/bridge/crypto-assets/cal-integration.test.js +0 -45
  497. package/lib/bridge/crypto-assets/cal-integration.test.js.map +0 -1
  498. package/lib/bridge/crypto-assets/cal-store.d.ts +0 -14
  499. package/lib/bridge/crypto-assets/cal-store.d.ts.map +0 -1
  500. package/lib/bridge/crypto-assets/cal-store.js +0 -58
  501. package/lib/bridge/crypto-assets/cal-store.js.map +0 -1
  502. package/lib/bridge/crypto-assets/cal-store.test.d.ts +0 -2
  503. package/lib/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
  504. package/lib/bridge/crypto-assets/cal-store.test.js +0 -70
  505. package/lib/bridge/crypto-assets/cal-store.test.js.map +0 -1
  506. package/lib-es/bridge/crypto-assets/cal-integration.d.ts +0 -4
  507. package/lib-es/bridge/crypto-assets/cal-integration.d.ts.map +0 -1
  508. package/lib-es/bridge/crypto-assets/cal-integration.js +0 -21
  509. package/lib-es/bridge/crypto-assets/cal-integration.js.map +0 -1
  510. package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts +0 -2
  511. package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts.map +0 -1
  512. package/lib-es/bridge/crypto-assets/cal-integration.test.js +0 -43
  513. package/lib-es/bridge/crypto-assets/cal-integration.test.js.map +0 -1
  514. package/lib-es/bridge/crypto-assets/cal-store.d.ts +0 -14
  515. package/lib-es/bridge/crypto-assets/cal-store.d.ts.map +0 -1
  516. package/lib-es/bridge/crypto-assets/cal-store.js +0 -54
  517. package/lib-es/bridge/crypto-assets/cal-store.js.map +0 -1
  518. package/lib-es/bridge/crypto-assets/cal-store.test.d.ts +0 -2
  519. package/lib-es/bridge/crypto-assets/cal-store.test.d.ts.map +0 -1
  520. package/lib-es/bridge/crypto-assets/cal-store.test.js +0 -68
  521. package/lib-es/bridge/crypto-assets/cal-store.test.js.map +0 -1
  522. package/src/bridge/crypto-assets/cal-integration.test.ts +0 -53
  523. package/src/bridge/crypto-assets/cal-integration.ts +0 -23
  524. package/src/bridge/crypto-assets/cal-store.test.ts +0 -93
  525. package/src/bridge/crypto-assets/cal-store.ts +0 -63
@@ -7,13 +7,12 @@ export const cantonConfig: Record<string, ConfigInfo> = {
7
7
  status: {
8
8
  type: "active",
9
9
  },
10
- // TBC
11
- nodeUrl: "https://wallet-validator-canton.ledger.com",
12
- nodeId: "figment",
13
- // TBC
10
+ nodeUrl: "https://canton-gateway.api.live.ledger.com/v1/node/ledger-mainnet-prd",
11
+ nodeId: "ledger-live-mainnet-prd",
14
12
  gatewayUrl: "https://canton-gateway.api.live.ledger.com",
15
13
  minReserve: 0,
16
14
  useGateway: true,
15
+ networkType: "mainnet",
17
16
  },
18
17
  },
19
18
  config_currency_canton_network_devnet: {
@@ -23,12 +22,12 @@ export const cantonConfig: Record<string, ConfigInfo> = {
23
22
  type: "active",
24
23
  },
25
24
  nodeUrl: "https://wallet-validator-devnet-canton.ledger-test.com",
26
- nodeId: "ledger-live-devnet-prd",
25
+ nodeId: "ledger-devnet-stg",
27
26
  gatewayUrl: "https://canton-gateway.api.live.ledger-test.com",
28
27
  minReserve: 0,
29
28
  useGateway: true,
30
- nativeInstrumentId:
31
- "6e9fc50fb94e56751b49f09ba2dc84da53a9d7cff08115ebb4f6b7a12d0c990c:Splice.Amulet:Amulet",
29
+ networkType: "devnet",
30
+ nativeInstrumentId: "Amulet",
32
31
  },
33
32
  },
34
33
  config_currency_canton_network_localnet: {
@@ -42,6 +41,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
42
41
  gatewayUrl: undefined,
43
42
  minReserve: 0,
44
43
  useGateway: false,
44
+ networkType: "localnet",
45
45
  },
46
46
  },
47
47
  };
@@ -1,6 +1,7 @@
1
1
  // Goal of this file is to inject all necessary device/signer dependency to coin-modules
2
2
 
3
3
  import { createBridges } from "@ledgerhq/coin-canton/bridge/index";
4
+ import { getEnv } from "@ledgerhq/live-env";
4
5
  import Transport from "@ledgerhq/hw-transport";
5
6
  import { CantonSigner } from "@ledgerhq/coin-canton";
6
7
  import cantonResolver from "@ledgerhq/coin-canton/signer";
@@ -10,22 +11,25 @@ import { CantonCoinConfig } from "@ledgerhq/coin-canton/config";
10
11
  import { TransactionStatus, Transaction } from "@ledgerhq/coin-canton/types";
11
12
  import { LegacySignerCanton } from "@ledgerhq/live-signer-canton";
12
13
  import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup";
14
+ import cantonBridgeMock from "./bridge/mock";
13
15
  import { Resolver } from "../../hw/getAddress/types";
14
16
  import { getCurrencyConfiguration } from "../../config";
15
- import { getCryptoCurrencyById } from "../../currencies";
17
+ import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
16
18
 
17
19
  const createSigner: CreateSigner<CantonSigner> = (transport: Transport) => {
18
20
  return new LegacySignerCanton(transport);
19
21
  };
20
22
 
21
- const getCurrencyConfig = () => {
22
- return getCurrencyConfiguration<CantonCoinConfig>(getCryptoCurrencyById("canton_network"));
23
+ const getCurrencyConfig = (currency?: CryptoCurrency) => {
24
+ if (!currency) {
25
+ throw new Error("currency not defined");
26
+ }
27
+ return getCurrencyConfiguration<CantonCoinConfig>(currency);
23
28
  };
24
29
 
25
- const bridge: Bridge<Transaction, Account, TransactionStatus> = createBridges(
26
- executeWithSigner(createSigner),
27
- getCurrencyConfig,
28
- );
30
+ const bridge: Bridge<Transaction, Account, TransactionStatus> = getEnv("MOCK")
31
+ ? cantonBridgeMock
32
+ : createBridges(executeWithSigner(createSigner), getCurrencyConfig);
29
33
 
30
34
  const resolver: Resolver = createResolver(createSigner, cantonResolver);
31
35
 
@@ -674,8 +674,8 @@ const evmConfig: CurrencyLiveConfigDefinition = {
674
674
  uri: "https://zkevm-rpc.com",
675
675
  },
676
676
  explorer: {
677
- type: "blockscout",
678
- uri: "https://explorer-ui.cardona.zkevm-rpc.com/api",
677
+ type: "etherscan",
678
+ uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1101",
679
679
  },
680
680
  showNfts: false,
681
681
  },
@@ -0,0 +1,66 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`kaspa currency bridge scanAccounts kaspa seed 1 1`] = `
4
+ [
5
+ {
6
+ "balance": "13370000",
7
+ "currencyId": "kaspa",
8
+ "derivationMode": "",
9
+ "freshAddress": "kaspa:qz49rpg0q6ywewxkwl76757ya79v6j556hcmrcy7mk9d36ewgp80cdrwlct2h",
10
+ "freshAddressPath": "44'/111111'/0'/0/1",
11
+ "id": "js:2:kaspa:41049d8002c08041d975ab58491c09cf8ced7b388a114ab2f5df73f2534d4d74d17ab8913b3cb3056bad63141cb63fb92e44401b691dee069dbdb2119861c18cc01b204340fcc305ab72e752cd347f4b6271ffe21da098d4f2a4749826857dda7a5576:",
12
+ "index": 0,
13
+ "operationsCount": 1,
14
+ "pendingOperations": [],
15
+ "seedIdentifier": "41049d8002c08041d975ab58491c09cf8ced7b388a114ab2f5df73f2534d4d74d17ab8913b3cb3056bad63141cb63fb92e44401b691dee069dbdb2119861c18cc01b204340fcc305ab72e752cd347f4b6271ffe21da098d4f2a4749826857dda7a5576",
16
+ "spendableBalance": "13370000",
17
+ "swapHistory": [],
18
+ "syncHash": undefined,
19
+ "used": true,
20
+ "xpub": "41049d8002c08041d975ab58491c09cf8ced7b388a114ab2f5df73f2534d4d74d17ab8913b3cb3056bad63141cb63fb92e44401b691dee069dbdb2119861c18cc01b204340fcc305ab72e752cd347f4b6271ffe21da098d4f2a4749826857dda7a5576",
21
+ },
22
+ {
23
+ "balance": "0",
24
+ "currencyId": "kaspa",
25
+ "derivationMode": "",
26
+ "freshAddress": "kaspa:qpncmme6ues25uk9umkqju4rtwtt33ud9lcrp7qn8jwv62m53m26jpjhar48j",
27
+ "freshAddressPath": "44'/111111'/1'/0/0",
28
+ "id": "js:2:kaspa:4104751b5ebd4a9d2a0a25d5c37cab4814a95335b8945cfcaa6a4138de418f581bb1d0d02f22081b3cda223a51e18a63ebdffd64803e0988b68a91802738a5a9f901206d4a2b989a82b5fb160f0151ea5d046451a291a0748f3038ecdc63d637cce00b:",
29
+ "index": 1,
30
+ "operationsCount": 0,
31
+ "pendingOperations": [],
32
+ "seedIdentifier": "41049d8002c08041d975ab58491c09cf8ced7b388a114ab2f5df73f2534d4d74d17ab8913b3cb3056bad63141cb63fb92e44401b691dee069dbdb2119861c18cc01b204340fcc305ab72e752cd347f4b6271ffe21da098d4f2a4749826857dda7a5576",
33
+ "spendableBalance": "0",
34
+ "swapHistory": [],
35
+ "syncHash": undefined,
36
+ "used": false,
37
+ "xpub": "4104751b5ebd4a9d2a0a25d5c37cab4814a95335b8945cfcaa6a4138de418f581bb1d0d02f22081b3cda223a51e18a63ebdffd64803e0988b68a91802738a5a9f901206d4a2b989a82b5fb160f0151ea5d046451a291a0748f3038ecdc63d637cce00b",
38
+ },
39
+ ]
40
+ `;
41
+
42
+ exports[`kaspa currency bridge scanAccounts kaspa seed 1 2`] = `
43
+ [
44
+ [
45
+ {
46
+ "accountId": "js:2:kaspa:41049d8002c08041d975ab58491c09cf8ced7b388a114ab2f5df73f2534d4d74d17ab8913b3cb3056bad63141cb63fb92e44401b691dee069dbdb2119861c18cc01b204340fcc305ab72e752cd347f4b6271ffe21da098d4f2a4749826857dda7a5576:",
47
+ "blockHash": "12166d40313b71447d4dd837f2e91e749407b0a1c8844e9e9d010390a67d6b52",
48
+ "blockHeight": 194187672,
49
+ "extra": {},
50
+ "fee": "2069",
51
+ "hash": "ed6dc5422558c3480e6a7809bf166e6ba1f2931ef39f24fe9b3bcf48253e4752",
52
+ "id": "ed6dc5422558c3480e6a7809bf166e6ba1f2931ef39f24fe9b3bcf48253e4752",
53
+ "recipients": [
54
+ "kaspa:qzavrhr9eg0k7pgr8mysfej34alfy8uj6vc9r84kgqfkqd8rtgxm5t0jvah73",
55
+ "kaspa:qqt874j85r5ga5av0q6tthj2tu89dfpchjmvjuvx5tyn2vpjjrhk7tcpsx2vu",
56
+ ],
57
+ "senders": [
58
+ "kaspa:qqt874j85r5ga5av0q6tthj2tu89dfpchjmvjuvx5tyn2vpjjrhk7tcpsx2vu",
59
+ ],
60
+ "type": "IN",
61
+ "value": "13370000",
62
+ },
63
+ ],
64
+ [],
65
+ ]
66
+ `;
@@ -0,0 +1,5 @@
1
+ import "../../__tests__/test-helpers/setup";
2
+ import { testBridge } from "../../__tests__/test-helpers/bridge";
3
+ import { dataset } from "@ledgerhq/coin-kaspa/test/index";
4
+
5
+ testBridge(dataset);
@@ -0,0 +1,12 @@
1
+ import { ConfigInfo } from "@ledgerhq/live-config/LiveConfig";
2
+
3
+ export const kaspaConfig: Record<string, ConfigInfo> = {
4
+ config_currency_kaspa: {
5
+ type: "object",
6
+ default: {
7
+ status: {
8
+ type: "active",
9
+ },
10
+ },
11
+ },
12
+ };
@@ -0,0 +1,19 @@
1
+ import type { Account, FeeStrategy } from "@ledgerhq/types-live";
2
+ import type { Transaction } from "@ledgerhq/coin-kaspa/types/index";
3
+ import { BigNumber } from "bignumber.js";
4
+
5
+ export const useFeesStrategy = (a: Account, t: Transaction): FeeStrategy[] => {
6
+ const allSameEstimatedSeconds: boolean = t.networkInfo.every(
7
+ ni => ni.estimatedSeconds === t.networkInfo[0].estimatedSeconds,
8
+ );
9
+
10
+ return t.networkInfo.map(ni => ({
11
+ label: ni.label,
12
+ amount: ni.amount,
13
+ disabled: (ni.label === "slow" || ni.label === "medium") && allSameEstimatedSeconds,
14
+ extra: {
15
+ estimatedMs: BigNumber(ni.estimatedSeconds * 1000),
16
+ },
17
+ unit: a.currency.units[a.currency.units.length - 1], // Should be sat
18
+ }));
19
+ };
@@ -0,0 +1,27 @@
1
+ // Goal of this file is to inject all necessary device/signer dependency to coin-modules
2
+
3
+ import kaspaResolver from "@ledgerhq/coin-kaspa/hw-getAddress";
4
+ import Kaspa from "@ledgerhq/hw-app-kaspa";
5
+ import Transport from "@ledgerhq/hw-transport";
6
+ import { createResolver, CreateSigner, executeWithSigner } from "../../bridge/setup";
7
+ import type { Resolver } from "../../hw/getAddress/types";
8
+ import { KaspaSigner } from "@ledgerhq/coin-kaspa/types/signer";
9
+ import { KaspaAccount, Transaction, TransactionStatus } from "@ledgerhq/coin-kaspa/types/bridge";
10
+ import { createBridges } from "@ledgerhq/coin-kaspa/bridge";
11
+ import type { Bridge } from "@ledgerhq/types-live";
12
+ import makeCliTools from "@ledgerhq/coin-kaspa/test/cli";
13
+
14
+ const createSigner: CreateSigner<KaspaSigner> = (transport: Transport) => {
15
+ return new Kaspa(transport);
16
+ };
17
+
18
+ // const kaspaCoin = getCryptoCurrencyById("kaspa");
19
+ const resolver: Resolver = createResolver(createSigner, kaspaResolver);
20
+ // const getCurrencyConfig = (): KaspaCoinConfig => getCurrencyConfiguration(kaspaCoin);
21
+
22
+ const bridge: Bridge<Transaction, KaspaAccount, TransactionStatus> = createBridges(
23
+ executeWithSigner(createSigner),
24
+ );
25
+ const cliTools = makeCliTools;
26
+
27
+ export { bridge, cliTools, resolver };
@@ -0,0 +1 @@
1
+ export * from "@ledgerhq/coin-kaspa/types/index";
@@ -103,12 +103,10 @@ export const CURRENCY_DEFAULT_FEATURES = {
103
103
  */
104
104
  export const DEFAULT_FEATURES: Features = {
105
105
  ...CURRENCY_DEFAULT_FEATURES,
106
- brazeLearn: DEFAULT_FEATURE,
107
106
  portfolioExchangeBanner: DEFAULT_FEATURE,
108
107
  postOnboardingAssetsTransfer: DEFAULT_FEATURE,
109
108
  counterValue: DEFAULT_FEATURE,
110
109
  mockFeature: DEFAULT_FEATURE,
111
- calLedgerService: DEFAULT_FEATURE,
112
110
  ptxServiceCtaExchangeDrawer: DEFAULT_FEATURE,
113
111
  ptxServiceCtaScreens: DEFAULT_FEATURE,
114
112
  ptxSwapReceiveTRC20WithoutTrx: DEFAULT_FEATURE,
@@ -523,7 +521,6 @@ export const DEFAULT_FEATURES: Features = {
523
521
  llmMarketQuickActions: DEFAULT_FEATURE,
524
522
  spamFilteringTx: DEFAULT_FEATURE,
525
523
  lldSpamFilteringTx: DEFAULT_FEATURE,
526
- llmSpamFilteringTx: DEFAULT_FEATURE,
527
524
  llmMemoTag: DEFAULT_FEATURE,
528
525
  lldMemoTag: DEFAULT_FEATURE,
529
526
  ldmkTransport: {
@@ -623,6 +620,8 @@ export const DEFAULT_FEATURES: Features = {
623
620
  receive_flow: true,
624
621
  send_flow: true,
625
622
  enableModularization: false,
623
+ searchDebounceTime: 500,
624
+ backendEnvironment: "PROD",
626
625
  },
627
626
  },
628
627
  llmModularDrawer: {
@@ -635,6 +634,8 @@ export const DEFAULT_FEATURES: Features = {
635
634
  receive_flow: true,
636
635
  send_flow: true,
637
636
  enableModularization: false,
637
+ searchDebounceTime: 500,
638
+ backendEnvironment: "PROD",
638
639
  },
639
640
  },
640
641
  llNftSupport: DEFAULT_FEATURE,
@@ -11,6 +11,7 @@ import { bridge as hedera } from "../../families/hedera/setup";
11
11
  import { bridge as filecoin } from "../../families/filecoin/setup";
12
12
  import { bridge as internet_computer } from "../../families/internet_computer/setup";
13
13
  import { bridge as icon } from "../../families/icon/setup";
14
+ import { bridge as kaspa } from "../../families/kaspa/setup";
14
15
  import { bridge as multiversx } from "../../families/multiversx/setup";
15
16
  import { bridge as near } from "../../families/near/setup";
16
17
  import { bridge as polkadot } from "../../families/polkadot/setup";
@@ -37,6 +38,7 @@ export default {
37
38
  filecoin,
38
39
  internet_computer,
39
40
  icon,
41
+ kaspa,
40
42
  multiversx,
41
43
  near,
42
44
  polkadot,
@@ -1,5 +1,6 @@
1
1
  import algorand from "../../families/algorand/bridge/mock";
2
2
  import bitcoin from "../../families/bitcoin/bridge/mock";
3
+ import canton from "../../families/canton/bridge/mock";
3
4
  import cardano from "../../families/cardano/bridge/mock";
4
5
  import casper from "../../families/casper/bridge/mock";
5
6
  import cosmos from "../../families/cosmos/bridge/mock";
@@ -16,6 +17,7 @@ import xrp from "../../families/xrp/bridge/mock";
16
17
  export default {
17
18
  algorand,
18
19
  bitcoin,
20
+ canton,
19
21
  cardano,
20
22
  casper,
21
23
  cosmos,
@@ -11,6 +11,7 @@ import { cliTools as hedera } from "../families/hedera/setup";
11
11
  import { cliTools as filecoin } from "../families/filecoin/setup";
12
12
  import { cliTools as internet_computer } from "../families/internet_computer/setup";
13
13
  import { cliTools as icon } from "../families/icon/setup";
14
+ import { cliTools as kaspa } from "../families/kaspa/setup";
14
15
  import { cliTools as multiversx } from "../families/multiversx/setup";
15
16
  import { cliTools as near } from "../families/near/setup";
16
17
  import { cliTools as polkadot } from "../families/polkadot/setup";
@@ -39,6 +40,7 @@ export default {
39
40
  filecoin,
40
41
  internet_computer,
41
42
  icon,
43
+ kaspa,
42
44
  multiversx,
43
45
  near,
44
46
  polkadot,
@@ -11,6 +11,7 @@ import hedera from "@ledgerhq/coin-hedera/deviceTransactionConfig";
11
11
  import filecoin from "@ledgerhq/coin-filecoin/deviceTransactionConfig";
12
12
  import internet_computer from "@ledgerhq/coin-internet_computer/deviceTransactionConfig";
13
13
  import icon from "@ledgerhq/coin-icon/deviceTransactionConfig";
14
+ import kaspa from "@ledgerhq/coin-kaspa/deviceTransactionConfig";
14
15
  import multiversx from "@ledgerhq/coin-multiversx/deviceTransactionConfig";
15
16
  import near from "@ledgerhq/coin-near/deviceTransactionConfig";
16
17
  import polkadot from "@ledgerhq/coin-polkadot/deviceTransactionConfig";
@@ -37,6 +38,7 @@ export default {
37
38
  filecoin,
38
39
  internet_computer,
39
40
  icon,
41
+ kaspa,
40
42
  multiversx,
41
43
  near,
42
44
  polkadot,
@@ -11,6 +11,7 @@ import { resolver as hedera } from "../families/hedera/setup";
11
11
  import { resolver as filecoin } from "../families/filecoin/setup";
12
12
  import { resolver as internet_computer } from "../families/internet_computer/setup";
13
13
  import { resolver as icon } from "../families/icon/setup";
14
+ import { resolver as kaspa } from "../families/kaspa/setup";
14
15
  import { resolver as multiversx } from "../families/multiversx/setup";
15
16
  import { resolver as near } from "../families/near/setup";
16
17
  import { resolver as polkadot } from "../families/polkadot/setup";
@@ -39,6 +40,7 @@ export default {
39
40
  filecoin,
40
41
  internet_computer,
41
42
  icon,
43
+ kaspa,
42
44
  multiversx,
43
45
  near,
44
46
  polkadot,
@@ -11,6 +11,7 @@ import hedera from "@ledgerhq/coin-hedera/transaction";
11
11
  import filecoin from "@ledgerhq/coin-filecoin/transaction";
12
12
  import internet_computer from "@ledgerhq/coin-internet_computer/transaction";
13
13
  import icon from "@ledgerhq/coin-icon/transaction";
14
+ import kaspa from "@ledgerhq/coin-kaspa/transaction";
14
15
  import multiversx from "@ledgerhq/coin-multiversx/transaction";
15
16
  import near from "@ledgerhq/coin-near/transaction";
16
17
  import polkadot from "@ledgerhq/coin-polkadot/transaction";
@@ -39,6 +40,7 @@ export default {
39
40
  filecoin,
40
41
  internet_computer,
41
42
  icon,
43
+ kaspa,
42
44
  multiversx,
43
45
  near,
44
46
  polkadot,
@@ -76,6 +76,12 @@ import type {
76
76
  TransactionStatus as internet_computerTransactionStatus,
77
77
  TransactionStatusRaw as internet_computerTransactionStatusRaw,
78
78
  } from "@ledgerhq/coin-internet_computer/types/index";
79
+ import type {
80
+ Transaction as kaspaTransaction,
81
+ TransactionRaw as kaspaTransactionRaw,
82
+ TransactionStatus as kaspaTransactionStatus,
83
+ TransactionStatusRaw as kaspaTransactionStatusRaw,
84
+ } from "@ledgerhq/coin-kaspa/types/index";
79
85
  import type {
80
86
  Transaction as minaTransaction,
81
87
  TransactionRaw as minaTransactionRaw,
@@ -169,6 +175,7 @@ export type Transaction =
169
175
  | hederaTransaction
170
176
  | iconTransaction
171
177
  | internet_computerTransaction
178
+ | kaspaTransaction
172
179
  | minaTransaction
173
180
  | multiversxTransaction
174
181
  | nearTransaction
@@ -197,6 +204,7 @@ export type TransactionRaw =
197
204
  | hederaTransactionRaw
198
205
  | iconTransactionRaw
199
206
  | internet_computerTransactionRaw
207
+ | kaspaTransactionRaw
200
208
  | minaTransactionRaw
201
209
  | multiversxTransactionRaw
202
210
  | nearTransactionRaw
@@ -225,6 +233,7 @@ export type TransactionStatus =
225
233
  | hederaTransactionStatus
226
234
  | iconTransactionStatus
227
235
  | internet_computerTransactionStatus
236
+ | kaspaTransactionStatus
228
237
  | minaTransactionStatus
229
238
  | multiversxTransactionStatus
230
239
  | nearTransactionStatus
@@ -253,6 +262,7 @@ export type TransactionStatusRaw =
253
262
  | hederaTransactionStatusRaw
254
263
  | iconTransactionStatusRaw
255
264
  | internet_computerTransactionStatusRaw
265
+ | kaspaTransactionStatusRaw
256
266
  | minaTransactionStatusRaw
257
267
  | multiversxTransactionStatusRaw
258
268
  | nearTransactionStatusRaw
@@ -540,7 +540,6 @@ export const createAction = (
540
540
  displayUpgradeWarning: false,
541
541
  }));
542
542
  }, []);
543
-
544
543
  return {
545
544
  ...state,
546
545
  inWrongDeviceForAccount:
@@ -62,6 +62,22 @@ describe("getDeviceNameMaxLength", () => {
62
62
  }),
63
63
  ).toBe(20);
64
64
  });
65
+ test("Europa of any version should max at 20", async () => {
66
+ expect(
67
+ getDeviceNameMaxLength({
68
+ deviceModelId: DeviceModelId.europa,
69
+ version: "0.0.1",
70
+ }),
71
+ ).toBe(20);
72
+ });
73
+ test("Apex of any version should max at 20", async () => {
74
+ expect(
75
+ getDeviceNameMaxLength({
76
+ deviceModelId: DeviceModelId.apex,
77
+ version: "0.0.1",
78
+ }),
79
+ ).toBe(20);
80
+ });
65
81
  test("Other models should just return 17 as a fallback", async () => {
66
82
  expect(
67
83
  getDeviceNameMaxLength({
@@ -31,6 +31,8 @@ const getDeviceNameMaxLength = (props: Props): number => {
31
31
  }
32
32
 
33
33
  case DeviceModelId.stax:
34
+ case DeviceModelId.europa:
35
+ case DeviceModelId.apex:
34
36
  maxLength = 20;
35
37
  break;
36
38
  }
@@ -30,7 +30,7 @@ function transformAssetsResponse(
30
30
  export const assetsDataApi = createApi({
31
31
  reducerPath: "assetsDataApi",
32
32
  baseQuery: fetchBaseQuery({
33
- baseUrl: __DEV__ ? getEnv("DADA_API_STAGING") : getEnv("DADA_API_PROD"),
33
+ baseUrl: "", // Will be overridden in query
34
34
  }),
35
35
  tagTypes: [AssetsDataTags.Assets],
36
36
  endpoints: build => ({
@@ -49,8 +49,10 @@ export const assetsDataApi = createApi({
49
49
  additionalData: [AssetsAdditionalData.Apy, AssetsAdditionalData.MarketTrend],
50
50
  };
51
51
 
52
+ const baseUrl = queryArg.isStaging ? getEnv("DADA_API_STAGING") : getEnv("DADA_API_PROD");
53
+
52
54
  return {
53
- url: "assets",
55
+ url: `${baseUrl}assets`,
54
56
  params,
55
57
  };
56
58
  },
@@ -15,6 +15,7 @@ export interface GetAssetsDataParams {
15
15
  useCase?: string;
16
16
  product: "llm" | "lld";
17
17
  version: string;
18
+ isStaging?: boolean;
18
19
  }
19
20
 
20
21
  export interface PageParam {
@@ -24,6 +24,7 @@ export function useAssetsData({
24
24
  areCurrenciesFiltered,
25
25
  product,
26
26
  version,
27
+ isStaging,
27
28
  }: {
28
29
  search?: string;
29
30
  currencyIds?: string[];
@@ -31,15 +32,26 @@ export function useAssetsData({
31
32
  areCurrenciesFiltered?: boolean;
32
33
  product: "llm" | "lld";
33
34
  version: string;
35
+ isStaging?: boolean;
34
36
  }) {
35
- const { data, isLoading, error, fetchNextPage, isSuccess, refetch } =
36
- useGetAssetsDataInfiniteQuery({
37
- search,
38
- useCase,
39
- currencyIds: areCurrenciesFiltered ? currencyIds : undefined,
40
- product,
41
- version,
42
- });
37
+ const {
38
+ data,
39
+ isLoading,
40
+ error,
41
+ fetchNextPage,
42
+ isSuccess,
43
+ refetch,
44
+ isFetching,
45
+ isError,
46
+ isFetchingNextPage,
47
+ } = useGetAssetsDataInfiniteQuery({
48
+ search,
49
+ useCase,
50
+ currencyIds: areCurrenciesFiltered ? currencyIds : undefined,
51
+ product,
52
+ version,
53
+ isStaging,
54
+ });
43
55
 
44
56
  const joinedPages = useMemo(() => {
45
57
  return data?.pages.reduce<AssetsDataWithPagination>((acc, page) => {
@@ -62,12 +74,15 @@ export function useAssetsData({
62
74
 
63
75
  const hasMore = Boolean(joinedPages?.pagination.nextCursor);
64
76
 
77
+ const isInitialLoading = isLoading || (isFetching && !isFetchingNextPage);
78
+
65
79
  return {
66
80
  data: joinedPages,
67
- isLoading,
81
+ isLoading: isInitialLoading,
68
82
  error,
69
83
  loadNext: hasMore ? fetchNextPage : undefined,
70
84
  isSuccess,
85
+ isError,
71
86
  refetch,
72
87
  };
73
88
  }
@@ -0,0 +1,52 @@
1
+ import { ChangeEvent, useCallback, useState } from "react";
2
+
3
+ export type UseSearchParams = {
4
+ /** Initial value to display in the search input */
5
+ initialValue?: string;
6
+ /** Persist the search value to the host app state (e.g., Redux) */
7
+ onPersistSearchValue?: (value: string) => void;
8
+ /** Track analytics when the debounced value changes and should be emitted */
9
+ onTrackSearch?: (query: string) => void;
10
+ };
11
+
12
+ export type UseSearchResult = {
13
+ handleSearch: (queryOrEvent: string | ChangeEvent<HTMLInputElement>) => void;
14
+ handleDebouncedChange: (current: string, previous: string) => void;
15
+ displayedValue: string | undefined;
16
+ };
17
+
18
+ const normalize = (value: string) => value.trim();
19
+
20
+ export function useSearchCommon({
21
+ initialValue,
22
+ onPersistSearchValue,
23
+ onTrackSearch,
24
+ }: UseSearchParams): UseSearchResult {
25
+ const [displayedValue, setDisplayedValue] = useState<string | undefined>(initialValue);
26
+
27
+ const handleSearch = useCallback((queryOrEvent: string | ChangeEvent<HTMLInputElement>) => {
28
+ const nextValue = typeof queryOrEvent === "string" ? queryOrEvent : queryOrEvent.target.value;
29
+ setDisplayedValue(nextValue);
30
+ }, []);
31
+
32
+ const shouldEmitEvent = useCallback(
33
+ (currentQuery: string, previousQuery: string) =>
34
+ currentQuery !== "" && currentQuery !== previousQuery,
35
+ [],
36
+ );
37
+ const handleDebouncedChange = useCallback(
38
+ (current: string, previous: string) => {
39
+ const currentQuery = normalize(current);
40
+ const previousQuery = normalize(previous);
41
+
42
+ onPersistSearchValue?.(currentQuery);
43
+
44
+ if (!shouldEmitEvent(currentQuery, previousQuery)) return;
45
+
46
+ onTrackSearch?.(currentQuery);
47
+ },
48
+ [onPersistSearchValue, onTrackSearch, shouldEmitEvent],
49
+ );
50
+
51
+ return { handleSearch, handleDebouncedChange, displayedValue };
52
+ }