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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (683) 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/generic-alpaca/accountBridge.d.ts +2 -1
  16. package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  17. package/lib/bridge/generic-alpaca/accountBridge.js +2 -2
  18. package/lib/bridge/generic-alpaca/accountBridge.js.map +1 -1
  19. package/lib/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
  20. package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  21. package/lib/bridge/generic-alpaca/alpaca/index.js +10 -6
  22. package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  23. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
  24. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
  25. package/lib/bridge/generic-alpaca/broadcast.js +2 -2
  26. package/lib/bridge/generic-alpaca/broadcast.js.map +1 -1
  27. package/lib/bridge/generic-alpaca/createTransaction.d.ts +3 -23
  28. package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  29. package/lib/bridge/generic-alpaca/createTransaction.js +11 -7
  30. package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
  31. package/lib/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
  32. package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  33. package/lib/bridge/generic-alpaca/currencyBridge.js +3 -2
  34. package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  35. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  36. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +4 -2
  37. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  38. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  39. package/lib/bridge/generic-alpaca/getAccountShape.js +5 -5
  40. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  41. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  42. package/lib/bridge/generic-alpaca/getTransactionStatus.js +2 -1
  43. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  44. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts +5 -13
  45. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  46. package/lib/bridge/generic-alpaca/prepareTransaction.js +2 -2
  47. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  48. package/lib/bridge/generic-alpaca/signOperation.d.ts +3 -2
  49. package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  50. package/lib/bridge/generic-alpaca/signOperation.js +19 -15
  51. package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
  52. package/lib/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
  53. package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
  54. package/lib/bridge/generic-alpaca/signer/Eth.js +51 -0
  55. package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -0
  56. package/lib/bridge/generic-alpaca/signer/index.d.ts +2 -10
  57. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  58. package/lib/bridge/generic-alpaca/signer/index.js +2 -2
  59. package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
  60. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
  61. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  62. package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  63. package/lib/bridge/generic-alpaca/signer/types.d.ts +11 -0
  64. package/lib/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  65. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
  66. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
  67. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +144 -0
  68. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
  69. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +2 -0
  70. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  71. package/lib/bridge/generic-alpaca/tests/signOperation.test.js +5 -4
  72. package/lib/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
  73. package/lib/bridge/generic-alpaca/types.d.ts +25 -0
  74. package/lib/bridge/generic-alpaca/types.d.ts.map +1 -0
  75. package/lib/bridge/generic-alpaca/types.js +3 -0
  76. package/lib/bridge/generic-alpaca/types.js.map +1 -0
  77. package/lib/bridge/generic-alpaca/utils.d.ts +4 -8
  78. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  79. package/lib/bridge/generic-alpaca/utils.js +15 -1
  80. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  81. package/lib/bridge/generic-alpaca/utils.test.js +21 -0
  82. package/lib/bridge/generic-alpaca/utils.test.js.map +1 -1
  83. package/lib/config/sharedConfig.d.ts.map +1 -1
  84. package/lib/config/sharedConfig.js +30 -28
  85. package/lib/config/sharedConfig.js.map +1 -1
  86. package/lib/e2e/data/deviceLabelsData.d.ts +27 -0
  87. package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -0
  88. package/lib/e2e/data/deviceLabelsData.js +78 -0
  89. package/lib/e2e/data/deviceLabelsData.js.map +1 -0
  90. package/lib/e2e/enum/Account.d.ts +2 -0
  91. package/lib/e2e/enum/Account.d.ts.map +1 -1
  92. package/lib/e2e/enum/Account.js +2 -0
  93. package/lib/e2e/enum/Account.js.map +1 -1
  94. package/lib/e2e/enum/AppInfos.d.ts +1 -0
  95. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  96. package/lib/e2e/enum/AppInfos.js +1 -0
  97. package/lib/e2e/enum/AppInfos.js.map +1 -1
  98. package/lib/e2e/enum/Currency.d.ts +1 -0
  99. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  100. package/lib/e2e/enum/Currency.js +1 -0
  101. package/lib/e2e/enum/Currency.js.map +1 -1
  102. package/lib/e2e/enum/DeviceLabels.d.ts +51 -44
  103. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  104. package/lib/e2e/enum/DeviceLabels.js +51 -44
  105. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  106. package/lib/e2e/enum/Network.d.ts +2 -1
  107. package/lib/e2e/enum/Network.d.ts.map +1 -1
  108. package/lib/e2e/enum/Network.js +1 -0
  109. package/lib/e2e/enum/Network.js.map +1 -1
  110. package/lib/e2e/families/cardano.d.ts.map +1 -1
  111. package/lib/e2e/families/cardano.js +1 -0
  112. package/lib/e2e/families/cardano.js.map +1 -1
  113. package/lib/e2e/families/celo.d.ts +1 -1
  114. package/lib/e2e/families/celo.d.ts.map +1 -1
  115. package/lib/e2e/families/celo.js +3 -5
  116. package/lib/e2e/families/celo.js.map +1 -1
  117. package/lib/e2e/families/cosmos.d.ts.map +1 -1
  118. package/lib/e2e/families/cosmos.js +1 -2
  119. package/lib/e2e/families/cosmos.js.map +1 -1
  120. package/lib/e2e/families/evm.d.ts.map +1 -1
  121. package/lib/e2e/families/evm.js +4 -1
  122. package/lib/e2e/families/evm.js.map +1 -1
  123. package/lib/e2e/families/kaspa.d.ts +4 -0
  124. package/lib/e2e/families/kaspa.d.ts.map +1 -0
  125. package/lib/e2e/families/kaspa.js +23 -0
  126. package/lib/e2e/families/kaspa.js.map +1 -0
  127. package/lib/e2e/families/multiversX.d.ts +2 -1
  128. package/lib/e2e/families/multiversX.d.ts.map +1 -1
  129. package/lib/e2e/families/multiversX.js +2 -4
  130. package/lib/e2e/families/multiversX.js.map +1 -1
  131. package/lib/e2e/families/near.d.ts.map +1 -1
  132. package/lib/e2e/families/near.js +1 -2
  133. package/lib/e2e/families/near.js.map +1 -1
  134. package/lib/e2e/families/osmosis.d.ts.map +1 -1
  135. package/lib/e2e/families/osmosis.js +1 -3
  136. package/lib/e2e/families/osmosis.js.map +1 -1
  137. package/lib/e2e/families/solana.d.ts +2 -1
  138. package/lib/e2e/families/solana.d.ts.map +1 -1
  139. package/lib/e2e/families/solana.js +6 -4
  140. package/lib/e2e/families/solana.js.map +1 -1
  141. package/lib/e2e/families/tezos.d.ts +2 -1
  142. package/lib/e2e/families/tezos.d.ts.map +1 -1
  143. package/lib/e2e/families/tezos.js +7 -5
  144. package/lib/e2e/families/tezos.js.map +1 -1
  145. package/lib/e2e/index.d.ts +5 -7
  146. package/lib/e2e/index.d.ts.map +1 -1
  147. package/lib/e2e/speculos.d.ts +2 -1
  148. package/lib/e2e/speculos.d.ts.map +1 -1
  149. package/lib/e2e/speculos.js +48 -28
  150. package/lib/e2e/speculos.js.map +1 -1
  151. package/lib/env.react.d.ts +1 -1
  152. package/lib/env.react.d.ts.map +1 -1
  153. package/lib/exchange/providers/swap.d.ts.map +1 -1
  154. package/lib/exchange/providers/swap.js +15 -0
  155. package/lib/exchange/providers/swap.js.map +1 -1
  156. package/lib/exchange/swap/transactionStrategies.d.ts +38 -11
  157. package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
  158. package/lib/exchange/swap/transactionStrategies.js +93 -47
  159. package/lib/exchange/swap/transactionStrategies.js.map +1 -1
  160. package/lib/families/canton/config.d.ts.map +1 -1
  161. package/lib/families/canton/config.js +3 -5
  162. package/lib/families/canton/config.js.map +1 -1
  163. package/lib/families/canton/setup.d.ts.map +1 -1
  164. package/lib/families/canton/setup.js +5 -5
  165. package/lib/families/canton/setup.js.map +1 -1
  166. package/lib/families/evm/config.js +2 -2
  167. package/lib/families/evm/config.js.map +1 -1
  168. package/lib/families/kaspa/bridge.integration.test.d.ts +2 -0
  169. package/lib/families/kaspa/bridge.integration.test.d.ts.map +1 -0
  170. package/lib/families/kaspa/bridge.integration.test.js +7 -0
  171. package/lib/families/kaspa/bridge.integration.test.js.map +1 -0
  172. package/lib/families/kaspa/config.d.ts +3 -0
  173. package/lib/families/kaspa/config.d.ts.map +1 -0
  174. package/lib/families/kaspa/config.js +14 -0
  175. package/lib/families/kaspa/config.js.map +1 -0
  176. package/lib/families/kaspa/react.d.ts +4 -0
  177. package/lib/families/kaspa/react.d.ts.map +1 -0
  178. package/lib/families/kaspa/react.js +18 -0
  179. package/lib/families/kaspa/react.js.map +1 -0
  180. package/lib/families/kaspa/setup.d.ts +18 -0
  181. package/lib/families/kaspa/setup.d.ts.map +1 -0
  182. package/lib/families/kaspa/setup.js +24 -0
  183. package/lib/families/kaspa/setup.js.map +1 -0
  184. package/lib/families/kaspa/types.d.ts +2 -0
  185. package/lib/families/kaspa/types.d.ts.map +1 -0
  186. package/lib/families/kaspa/types.js +18 -0
  187. package/lib/families/kaspa/types.js.map +1 -0
  188. package/lib/families/solana/bridge/mock-data.d.ts.map +1 -1
  189. package/lib/families/solana/bridge/mock-data.js +7 -0
  190. package/lib/families/solana/bridge/mock-data.js.map +1 -1
  191. package/lib/families/xrp/setup.d.ts +2 -2
  192. package/lib/featureFlags/defaultFeatures.d.ts +1 -0
  193. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  194. package/lib/featureFlags/defaultFeatures.js +6 -2
  195. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  196. package/lib/featureFlags/useFeature.d.ts +1 -1
  197. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  198. package/lib/generated/bridge/js.d.ts +1 -0
  199. package/lib/generated/bridge/js.d.ts.map +1 -1
  200. package/lib/generated/bridge/js.js +24 -22
  201. package/lib/generated/bridge/js.js.map +1 -1
  202. package/lib/generated/bridge/mock.d.ts +1 -1
  203. package/lib/generated/cli-transaction.d.ts +13 -2
  204. package/lib/generated/cli-transaction.d.ts.map +1 -1
  205. package/lib/generated/cli-transaction.js +28 -26
  206. package/lib/generated/cli-transaction.js.map +1 -1
  207. package/lib/generated/deviceTransactionConfig.d.ts +2 -0
  208. package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
  209. package/lib/generated/deviceTransactionConfig.js +24 -22
  210. package/lib/generated/deviceTransactionConfig.js.map +1 -1
  211. package/lib/generated/hw-getAddress.d.ts +1 -0
  212. package/lib/generated/hw-getAddress.d.ts.map +1 -1
  213. package/lib/generated/hw-getAddress.js +28 -26
  214. package/lib/generated/hw-getAddress.js.map +1 -1
  215. package/lib/generated/platformAdapter.d.ts +1 -1
  216. package/lib/generated/specs.d.ts +1 -1
  217. package/lib/generated/transaction.d.ts +11 -3
  218. package/lib/generated/transaction.d.ts.map +1 -1
  219. package/lib/generated/transaction.js +28 -26
  220. package/lib/generated/transaction.js.map +1 -1
  221. package/lib/generated/types.d.ts +5 -4
  222. package/lib/generated/types.d.ts.map +1 -1
  223. package/lib/generated/walletApiAdapter.d.ts +1 -1
  224. package/lib/hw/actions/app.d.ts.map +1 -1
  225. package/lib/hw/actions/app.js.map +1 -1
  226. package/lib/hw/getDeviceNameMaxLength.d.ts.map +1 -1
  227. package/lib/hw/getDeviceNameMaxLength.js +2 -0
  228. package/lib/hw/getDeviceNameMaxLength.js.map +1 -1
  229. package/lib/hw/getDeviceNameMaxLength.test.js +12 -0
  230. package/lib/hw/getDeviceNameMaxLength.test.js.map +1 -1
  231. package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts +1 -13
  232. package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts.map +1 -1
  233. package/lib/modularDrawer/data/entities/interestRateSelectors.js +2 -17
  234. package/lib/modularDrawer/data/entities/interestRateSelectors.js.map +1 -1
  235. package/lib/modularDrawer/data/entities/marketSelectors.d.ts +4 -0
  236. package/lib/modularDrawer/data/entities/marketSelectors.d.ts.map +1 -0
  237. package/lib/modularDrawer/data/entities/marketSelectors.js +6 -0
  238. package/lib/modularDrawer/data/entities/marketSelectors.js.map +1 -0
  239. package/lib/modularDrawer/data/entities/selectorUtils.d.ts +18 -0
  240. package/lib/modularDrawer/data/entities/selectorUtils.d.ts.map +1 -0
  241. package/lib/modularDrawer/data/entities/selectorUtils.js +29 -0
  242. package/lib/modularDrawer/data/entities/selectorUtils.js.map +1 -0
  243. package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  244. package/lib/modularDrawer/data/state-manager/api.js +3 -2
  245. package/lib/modularDrawer/data/state-manager/api.js.map +1 -1
  246. package/lib/modularDrawer/data/state-manager/types.d.ts +1 -0
  247. package/lib/modularDrawer/data/state-manager/types.d.ts.map +1 -1
  248. package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +50 -0
  249. package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -0
  250. package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.js +49 -0
  251. package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.js.map +1 -0
  252. package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +56 -0
  253. package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -0
  254. package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.js +59 -0
  255. package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.js.map +1 -0
  256. package/lib/modularDrawer/hooks/useAssetsData.d.ts +3 -1
  257. package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  258. package/lib/modularDrawer/hooks/useAssetsData.js +6 -3
  259. package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
  260. package/lib/modularDrawer/hooks/useMarketByCurrencies.d.ts +3 -0
  261. package/lib/modularDrawer/hooks/useMarketByCurrencies.d.ts.map +1 -0
  262. package/lib/modularDrawer/hooks/useMarketByCurrencies.js +26 -0
  263. package/lib/modularDrawer/hooks/useMarketByCurrencies.js.map +1 -0
  264. package/lib/modularDrawer/hooks/useSearch.d.ts +16 -0
  265. package/lib/modularDrawer/hooks/useSearch.d.ts.map +1 -0
  266. package/lib/modularDrawer/hooks/useSearch.js +24 -0
  267. package/lib/modularDrawer/hooks/useSearch.js.map +1 -0
  268. package/lib/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
  269. package/lib/modularDrawer/modules/createAssetConfiguration.js +8 -0
  270. package/lib/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
  271. package/lib/modularDrawer/utils/type.d.ts +7 -0
  272. package/lib/modularDrawer/utils/type.d.ts.map +1 -1
  273. package/lib/notifications/ServiceStatusProvider/index.d.ts +1 -16
  274. package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  275. package/lib/notifications/ServiceStatusProvider/index.js +7 -31
  276. package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
  277. package/lib/wallet-api/ACRE/server.d.ts +13 -6
  278. package/lib/wallet-api/ACRE/server.d.ts.map +1 -1
  279. package/lib/wallet-api/ACRE/server.js +142 -1
  280. package/lib/wallet-api/ACRE/server.js.map +1 -1
  281. package/lib/wallet-api/ACRE/server.test.d.ts +2 -0
  282. package/lib/wallet-api/ACRE/server.test.d.ts.map +1 -0
  283. package/lib/wallet-api/ACRE/server.test.js +393 -0
  284. package/lib/wallet-api/ACRE/server.test.js.map +1 -0
  285. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  286. package/lib/wallet-api/Exchange/server.js +16 -13
  287. package/lib/wallet-api/Exchange/server.js.map +1 -1
  288. package/lib-es/__tests__/test-helpers/environment.js +1 -0
  289. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  290. package/lib-es/apps/inlineAppInstall.d.ts +1 -3
  291. package/lib-es/apps/inlineAppInstall.d.ts.map +1 -1
  292. package/lib-es/apps/inlineAppInstall.js +2 -2
  293. package/lib-es/apps/inlineAppInstall.js.map +1 -1
  294. package/lib-es/apps/react.d.ts +1 -2
  295. package/lib-es/apps/react.d.ts.map +1 -1
  296. package/lib-es/apps/react.js +2 -2
  297. package/lib-es/apps/react.js.map +1 -1
  298. package/lib-es/apps/runner.d.ts +2 -4
  299. package/lib-es/apps/runner.d.ts.map +1 -1
  300. package/lib-es/apps/runner.js +3 -4
  301. package/lib-es/apps/runner.js.map +1 -1
  302. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +2 -1
  303. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  304. package/lib-es/bridge/generic-alpaca/accountBridge.js +2 -2
  305. package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
  306. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
  307. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  308. package/lib-es/bridge/generic-alpaca/alpaca/index.js +10 -6
  309. package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  310. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
  311. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
  312. package/lib-es/bridge/generic-alpaca/broadcast.js +2 -2
  313. package/lib-es/bridge/generic-alpaca/broadcast.js.map +1 -1
  314. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts +3 -23
  315. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  316. package/lib-es/bridge/generic-alpaca/createTransaction.js +10 -6
  317. package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
  318. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
  319. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  320. package/lib-es/bridge/generic-alpaca/currencyBridge.js +3 -2
  321. package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  322. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  323. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +4 -2
  324. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  325. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  326. package/lib-es/bridge/generic-alpaca/getAccountShape.js +5 -5
  327. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  328. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  329. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +2 -1
  330. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  331. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts +5 -13
  332. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  333. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +2 -2
  334. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  335. package/lib-es/bridge/generic-alpaca/signOperation.d.ts +3 -2
  336. package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  337. package/lib-es/bridge/generic-alpaca/signOperation.js +19 -15
  338. package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
  339. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
  340. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
  341. package/lib-es/bridge/generic-alpaca/signer/Eth.js +47 -0
  342. package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -0
  343. package/lib-es/bridge/generic-alpaca/signer/index.d.ts +2 -10
  344. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  345. package/lib-es/bridge/generic-alpaca/signer/index.js +2 -2
  346. package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
  347. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
  348. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  349. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  350. package/lib-es/bridge/generic-alpaca/signer/types.d.ts +11 -0
  351. package/lib-es/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  352. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
  353. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
  354. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +139 -0
  355. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
  356. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +2 -0
  357. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  358. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js +5 -4
  359. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
  360. package/lib-es/bridge/generic-alpaca/types.d.ts +25 -0
  361. package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -0
  362. package/lib-es/bridge/generic-alpaca/types.js +2 -0
  363. package/lib-es/bridge/generic-alpaca/types.js.map +1 -0
  364. package/lib-es/bridge/generic-alpaca/utils.d.ts +4 -8
  365. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  366. package/lib-es/bridge/generic-alpaca/utils.js +13 -0
  367. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  368. package/lib-es/bridge/generic-alpaca/utils.test.js +22 -1
  369. package/lib-es/bridge/generic-alpaca/utils.test.js.map +1 -1
  370. package/lib-es/config/sharedConfig.d.ts.map +1 -1
  371. package/lib-es/config/sharedConfig.js +2 -0
  372. package/lib-es/config/sharedConfig.js.map +1 -1
  373. package/lib-es/e2e/data/deviceLabelsData.d.ts +27 -0
  374. package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -0
  375. package/lib-es/e2e/data/deviceLabelsData.js +75 -0
  376. package/lib-es/e2e/data/deviceLabelsData.js.map +1 -0
  377. package/lib-es/e2e/enum/Account.d.ts +2 -0
  378. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  379. package/lib-es/e2e/enum/Account.js +2 -0
  380. package/lib-es/e2e/enum/Account.js.map +1 -1
  381. package/lib-es/e2e/enum/AppInfos.d.ts +1 -0
  382. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  383. package/lib-es/e2e/enum/AppInfos.js +1 -0
  384. package/lib-es/e2e/enum/AppInfos.js.map +1 -1
  385. package/lib-es/e2e/enum/Currency.d.ts +1 -0
  386. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  387. package/lib-es/e2e/enum/Currency.js +1 -0
  388. package/lib-es/e2e/enum/Currency.js.map +1 -1
  389. package/lib-es/e2e/enum/DeviceLabels.d.ts +51 -44
  390. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  391. package/lib-es/e2e/enum/DeviceLabels.js +51 -44
  392. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  393. package/lib-es/e2e/enum/Network.d.ts +2 -1
  394. package/lib-es/e2e/enum/Network.d.ts.map +1 -1
  395. package/lib-es/e2e/enum/Network.js +1 -0
  396. package/lib-es/e2e/enum/Network.js.map +1 -1
  397. package/lib-es/e2e/families/cardano.d.ts.map +1 -1
  398. package/lib-es/e2e/families/cardano.js +1 -0
  399. package/lib-es/e2e/families/cardano.js.map +1 -1
  400. package/lib-es/e2e/families/celo.d.ts +1 -1
  401. package/lib-es/e2e/families/celo.d.ts.map +1 -1
  402. package/lib-es/e2e/families/celo.js +4 -6
  403. package/lib-es/e2e/families/celo.js.map +1 -1
  404. package/lib-es/e2e/families/cosmos.d.ts.map +1 -1
  405. package/lib-es/e2e/families/cosmos.js +2 -3
  406. package/lib-es/e2e/families/cosmos.js.map +1 -1
  407. package/lib-es/e2e/families/evm.d.ts.map +1 -1
  408. package/lib-es/e2e/families/evm.js +5 -2
  409. package/lib-es/e2e/families/evm.js.map +1 -1
  410. package/lib-es/e2e/families/kaspa.d.ts +4 -0
  411. package/lib-es/e2e/families/kaspa.d.ts.map +1 -0
  412. package/lib-es/e2e/families/kaspa.js +15 -0
  413. package/lib-es/e2e/families/kaspa.js.map +1 -0
  414. package/lib-es/e2e/families/multiversX.d.ts +2 -1
  415. package/lib-es/e2e/families/multiversX.d.ts.map +1 -1
  416. package/lib-es/e2e/families/multiversX.js +3 -5
  417. package/lib-es/e2e/families/multiversX.js.map +1 -1
  418. package/lib-es/e2e/families/near.d.ts.map +1 -1
  419. package/lib-es/e2e/families/near.js +2 -3
  420. package/lib-es/e2e/families/near.js.map +1 -1
  421. package/lib-es/e2e/families/osmosis.d.ts.map +1 -1
  422. package/lib-es/e2e/families/osmosis.js +2 -4
  423. package/lib-es/e2e/families/osmosis.js.map +1 -1
  424. package/lib-es/e2e/families/solana.d.ts +2 -1
  425. package/lib-es/e2e/families/solana.d.ts.map +1 -1
  426. package/lib-es/e2e/families/solana.js +7 -5
  427. package/lib-es/e2e/families/solana.js.map +1 -1
  428. package/lib-es/e2e/families/tezos.d.ts +2 -1
  429. package/lib-es/e2e/families/tezos.d.ts.map +1 -1
  430. package/lib-es/e2e/families/tezos.js +8 -6
  431. package/lib-es/e2e/families/tezos.js.map +1 -1
  432. package/lib-es/e2e/index.d.ts +5 -7
  433. package/lib-es/e2e/index.d.ts.map +1 -1
  434. package/lib-es/e2e/speculos.d.ts +2 -1
  435. package/lib-es/e2e/speculos.d.ts.map +1 -1
  436. package/lib-es/e2e/speculos.js +46 -27
  437. package/lib-es/e2e/speculos.js.map +1 -1
  438. package/lib-es/env.react.d.ts +1 -1
  439. package/lib-es/env.react.d.ts.map +1 -1
  440. package/lib-es/exchange/providers/swap.d.ts.map +1 -1
  441. package/lib-es/exchange/providers/swap.js +15 -0
  442. package/lib-es/exchange/providers/swap.js.map +1 -1
  443. package/lib-es/exchange/swap/transactionStrategies.d.ts +38 -11
  444. package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
  445. package/lib-es/exchange/swap/transactionStrategies.js +87 -44
  446. package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
  447. package/lib-es/families/canton/config.d.ts.map +1 -1
  448. package/lib-es/families/canton/config.js +3 -5
  449. package/lib-es/families/canton/config.js.map +1 -1
  450. package/lib-es/families/canton/setup.d.ts.map +1 -1
  451. package/lib-es/families/canton/setup.js +5 -5
  452. package/lib-es/families/canton/setup.js.map +1 -1
  453. package/lib-es/families/evm/config.js +2 -2
  454. package/lib-es/families/evm/config.js.map +1 -1
  455. package/lib-es/families/kaspa/bridge.integration.test.d.ts +2 -0
  456. package/lib-es/families/kaspa/bridge.integration.test.d.ts.map +1 -0
  457. package/lib-es/families/kaspa/bridge.integration.test.js +5 -0
  458. package/lib-es/families/kaspa/bridge.integration.test.js.map +1 -0
  459. package/lib-es/families/kaspa/config.d.ts +3 -0
  460. package/lib-es/families/kaspa/config.d.ts.map +1 -0
  461. package/lib-es/families/kaspa/config.js +11 -0
  462. package/lib-es/families/kaspa/config.js.map +1 -0
  463. package/lib-es/families/kaspa/react.d.ts +4 -0
  464. package/lib-es/families/kaspa/react.d.ts.map +1 -0
  465. package/lib-es/families/kaspa/react.js +14 -0
  466. package/lib-es/families/kaspa/react.js.map +1 -0
  467. package/lib-es/families/kaspa/setup.d.ts +18 -0
  468. package/lib-es/families/kaspa/setup.d.ts.map +1 -0
  469. package/lib-es/families/kaspa/setup.js +16 -0
  470. package/lib-es/families/kaspa/setup.js.map +1 -0
  471. package/lib-es/families/kaspa/types.d.ts +2 -0
  472. package/lib-es/families/kaspa/types.d.ts.map +1 -0
  473. package/lib-es/families/kaspa/types.js +2 -0
  474. package/lib-es/families/kaspa/types.js.map +1 -0
  475. package/lib-es/families/solana/bridge/mock-data.d.ts.map +1 -1
  476. package/lib-es/families/solana/bridge/mock-data.js +7 -0
  477. package/lib-es/families/solana/bridge/mock-data.js.map +1 -1
  478. package/lib-es/families/xrp/setup.d.ts +2 -2
  479. package/lib-es/featureFlags/defaultFeatures.d.ts +1 -0
  480. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  481. package/lib-es/featureFlags/defaultFeatures.js +6 -2
  482. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  483. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  484. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  485. package/lib-es/generated/bridge/js.d.ts +1 -0
  486. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  487. package/lib-es/generated/bridge/js.js +2 -0
  488. package/lib-es/generated/bridge/js.js.map +1 -1
  489. package/lib-es/generated/bridge/mock.d.ts +1 -1
  490. package/lib-es/generated/cli-transaction.d.ts +13 -2
  491. package/lib-es/generated/cli-transaction.d.ts.map +1 -1
  492. package/lib-es/generated/cli-transaction.js +2 -0
  493. package/lib-es/generated/cli-transaction.js.map +1 -1
  494. package/lib-es/generated/deviceTransactionConfig.d.ts +2 -0
  495. package/lib-es/generated/deviceTransactionConfig.d.ts.map +1 -1
  496. package/lib-es/generated/deviceTransactionConfig.js +2 -0
  497. package/lib-es/generated/deviceTransactionConfig.js.map +1 -1
  498. package/lib-es/generated/hw-getAddress.d.ts +1 -0
  499. package/lib-es/generated/hw-getAddress.d.ts.map +1 -1
  500. package/lib-es/generated/hw-getAddress.js +2 -0
  501. package/lib-es/generated/hw-getAddress.js.map +1 -1
  502. package/lib-es/generated/platformAdapter.d.ts +1 -1
  503. package/lib-es/generated/specs.d.ts +1 -1
  504. package/lib-es/generated/transaction.d.ts +11 -3
  505. package/lib-es/generated/transaction.d.ts.map +1 -1
  506. package/lib-es/generated/transaction.js +2 -0
  507. package/lib-es/generated/transaction.js.map +1 -1
  508. package/lib-es/generated/types.d.ts +5 -4
  509. package/lib-es/generated/types.d.ts.map +1 -1
  510. package/lib-es/generated/walletApiAdapter.d.ts +1 -1
  511. package/lib-es/hw/actions/app.d.ts.map +1 -1
  512. package/lib-es/hw/actions/app.js.map +1 -1
  513. package/lib-es/hw/getDeviceNameMaxLength.d.ts.map +1 -1
  514. package/lib-es/hw/getDeviceNameMaxLength.js +2 -0
  515. package/lib-es/hw/getDeviceNameMaxLength.js.map +1 -1
  516. package/lib-es/hw/getDeviceNameMaxLength.test.js +12 -0
  517. package/lib-es/hw/getDeviceNameMaxLength.test.js.map +1 -1
  518. package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts +1 -13
  519. package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts.map +1 -1
  520. package/lib-es/modularDrawer/data/entities/interestRateSelectors.js +2 -17
  521. package/lib-es/modularDrawer/data/entities/interestRateSelectors.js.map +1 -1
  522. package/lib-es/modularDrawer/data/entities/marketSelectors.d.ts +4 -0
  523. package/lib-es/modularDrawer/data/entities/marketSelectors.d.ts.map +1 -0
  524. package/lib-es/modularDrawer/data/entities/marketSelectors.js +3 -0
  525. package/lib-es/modularDrawer/data/entities/marketSelectors.js.map +1 -0
  526. package/lib-es/modularDrawer/data/entities/selectorUtils.d.ts +18 -0
  527. package/lib-es/modularDrawer/data/entities/selectorUtils.d.ts.map +1 -0
  528. package/lib-es/modularDrawer/data/entities/selectorUtils.js +25 -0
  529. package/lib-es/modularDrawer/data/entities/selectorUtils.js.map +1 -0
  530. package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  531. package/lib-es/modularDrawer/data/state-manager/api.js +3 -2
  532. package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -1
  533. package/lib-es/modularDrawer/data/state-manager/types.d.ts +1 -0
  534. package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +1 -1
  535. package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +50 -0
  536. package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -0
  537. package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.js +22 -0
  538. package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.js.map +1 -0
  539. package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +56 -0
  540. package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -0
  541. package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.js +32 -0
  542. package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.js.map +1 -0
  543. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +3 -1
  544. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  545. package/lib-es/modularDrawer/hooks/useAssetsData.js +6 -3
  546. package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
  547. package/lib-es/modularDrawer/hooks/useMarketByCurrencies.d.ts +3 -0
  548. package/lib-es/modularDrawer/hooks/useMarketByCurrencies.d.ts.map +1 -0
  549. package/lib-es/modularDrawer/hooks/useMarketByCurrencies.js +22 -0
  550. package/lib-es/modularDrawer/hooks/useMarketByCurrencies.js.map +1 -0
  551. package/lib-es/modularDrawer/hooks/useSearch.d.ts +16 -0
  552. package/lib-es/modularDrawer/hooks/useSearch.d.ts.map +1 -0
  553. package/lib-es/modularDrawer/hooks/useSearch.js +20 -0
  554. package/lib-es/modularDrawer/hooks/useSearch.js.map +1 -0
  555. package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
  556. package/lib-es/modularDrawer/modules/createAssetConfiguration.js +8 -0
  557. package/lib-es/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
  558. package/lib-es/modularDrawer/utils/type.d.ts +7 -0
  559. package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
  560. package/lib-es/notifications/ServiceStatusProvider/index.d.ts +1 -16
  561. package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  562. package/lib-es/notifications/ServiceStatusProvider/index.js +7 -31
  563. package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
  564. package/lib-es/wallet-api/ACRE/server.d.ts +13 -6
  565. package/lib-es/wallet-api/ACRE/server.d.ts.map +1 -1
  566. package/lib-es/wallet-api/ACRE/server.js +140 -2
  567. package/lib-es/wallet-api/ACRE/server.js.map +1 -1
  568. package/lib-es/wallet-api/ACRE/server.test.d.ts +2 -0
  569. package/lib-es/wallet-api/ACRE/server.test.d.ts.map +1 -0
  570. package/lib-es/wallet-api/ACRE/server.test.js +388 -0
  571. package/lib-es/wallet-api/ACRE/server.test.js.map +1 -0
  572. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  573. package/lib-es/wallet-api/Exchange/server.js +16 -13
  574. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  575. package/package.json +71 -68
  576. package/src/__tests__/test-helpers/environment.ts +1 -0
  577. package/src/apps/inlineAppInstall.ts +1 -4
  578. package/src/apps/react.ts +1 -3
  579. package/src/apps/runner.ts +1 -8
  580. package/src/bridge/generic-alpaca/accountBridge.ts +8 -3
  581. package/src/bridge/generic-alpaca/alpaca/index.ts +15 -17
  582. package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +38 -10
  583. package/src/bridge/generic-alpaca/broadcast.ts +2 -2
  584. package/src/bridge/generic-alpaca/createTransaction.ts +13 -24
  585. package/src/bridge/generic-alpaca/currencyBridge.ts +8 -2
  586. package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +5 -7
  587. package/src/bridge/generic-alpaca/getAccountShape.ts +7 -7
  588. package/src/bridge/generic-alpaca/getTransactionStatus.ts +5 -14
  589. package/src/bridge/generic-alpaca/prepareTransaction.ts +10 -17
  590. package/src/bridge/generic-alpaca/signOperation.ts +25 -31
  591. package/src/bridge/generic-alpaca/signer/Eth.ts +70 -0
  592. package/src/bridge/generic-alpaca/signer/index.ts +5 -15
  593. package/src/bridge/generic-alpaca/signer/signTransaction.ts +4 -3
  594. package/src/bridge/generic-alpaca/signer/types.ts +14 -0
  595. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +173 -0
  596. package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +3 -2
  597. package/src/bridge/generic-alpaca/tests/signOperation.test.ts +6 -5
  598. package/src/bridge/generic-alpaca/types.ts +23 -0
  599. package/src/bridge/generic-alpaca/utils.test.ts +29 -1
  600. package/src/bridge/generic-alpaca/utils.ts +17 -8
  601. package/src/config/sharedConfig.ts +2 -0
  602. package/src/e2e/data/deviceLabelsData.ts +100 -0
  603. package/src/e2e/enum/Account.ts +14 -0
  604. package/src/e2e/enum/AppInfos.ts +2 -0
  605. package/src/e2e/enum/Currency.ts +2 -0
  606. package/src/e2e/enum/DeviceLabels.ts +51 -44
  607. package/src/e2e/enum/Network.ts +1 -0
  608. package/src/e2e/families/cardano.ts +1 -0
  609. package/src/e2e/families/celo.ts +4 -6
  610. package/src/e2e/families/cosmos.ts +7 -3
  611. package/src/e2e/families/evm.ts +12 -2
  612. package/src/e2e/families/kaspa.ts +17 -0
  613. package/src/e2e/families/multiversX.ts +4 -5
  614. package/src/e2e/families/near.ts +8 -3
  615. package/src/e2e/families/osmosis.ts +2 -4
  616. package/src/e2e/families/solana.ts +15 -5
  617. package/src/e2e/families/tezos.ts +10 -6
  618. package/src/e2e/speculos.ts +67 -28
  619. package/src/exchange/providers/swap.ts +21 -0
  620. package/src/exchange/swap/transactionStrategies.ts +121 -73
  621. package/src/families/canton/config.ts +3 -6
  622. package/src/families/canton/setup.ts +6 -5
  623. package/src/families/evm/config.ts +2 -2
  624. package/src/families/kaspa/__snapshots__/bridge.integration.test.ts.snap +66 -0
  625. package/src/families/kaspa/bridge.integration.test.ts +5 -0
  626. package/src/families/kaspa/config.ts +12 -0
  627. package/src/families/kaspa/react.ts +19 -0
  628. package/src/families/kaspa/setup.ts +27 -0
  629. package/src/families/kaspa/types.ts +1 -0
  630. package/src/families/solana/bridge/mock-data.ts +7 -0
  631. package/src/featureFlags/defaultFeatures.ts +6 -2
  632. package/src/generated/bridge/js.ts +2 -0
  633. package/src/generated/cli-transaction.ts +2 -0
  634. package/src/generated/deviceTransactionConfig.ts +2 -0
  635. package/src/generated/hw-getAddress.ts +2 -0
  636. package/src/generated/transaction.ts +2 -0
  637. package/src/generated/types.ts +10 -0
  638. package/src/hw/actions/app.ts +0 -1
  639. package/src/hw/getDeviceNameMaxLength.test.ts +16 -0
  640. package/src/hw/getDeviceNameMaxLength.ts +2 -0
  641. package/src/modularDrawer/data/entities/interestRateSelectors.ts +2 -34
  642. package/src/modularDrawer/data/entities/marketSelectors.ts +8 -0
  643. package/src/modularDrawer/data/entities/selectorUtils.ts +42 -0
  644. package/src/modularDrawer/data/state-manager/api.ts +4 -2
  645. package/src/modularDrawer/data/state-manager/types.ts +1 -0
  646. package/src/modularDrawer/hooks/modules/useLeftMarketTrendModule.tsx +36 -0
  647. package/src/modularDrawer/hooks/modules/useRightMarketTrendModule.tsx +57 -0
  648. package/src/modularDrawer/hooks/useAssetsData.ts +24 -9
  649. package/src/modularDrawer/hooks/useMarketByCurrencies.ts +29 -0
  650. package/src/modularDrawer/hooks/useSearch.ts +52 -0
  651. package/src/modularDrawer/modules/createAssetConfiguration.ts +10 -0
  652. package/src/modularDrawer/utils/type.ts +2 -0
  653. package/src/notifications/ServiceStatusProvider/index.tsx +12 -37
  654. package/src/wallet-api/ACRE/server.test.ts +470 -0
  655. package/src/wallet-api/ACRE/server.ts +202 -14
  656. package/src/wallet-api/Exchange/server.ts +17 -14
  657. package/lib/exchange/providers/swap.integration.test.d.ts +0 -2
  658. package/lib/exchange/providers/swap.integration.test.d.ts.map +0 -1
  659. package/lib/exchange/providers/swap.integration.test.js +0 -201
  660. package/lib/exchange/providers/swap.integration.test.js.map +0 -1
  661. package/lib/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
  662. package/lib/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
  663. package/lib/notifications/ServiceStatusProvider/index.test.js +0 -88
  664. package/lib/notifications/ServiceStatusProvider/index.test.js.map +0 -1
  665. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
  666. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
  667. package/lib/notifications/ServiceStatusProvider/ledger-components.js +0 -16
  668. package/lib/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
  669. package/lib-es/exchange/providers/swap.integration.test.d.ts +0 -2
  670. package/lib-es/exchange/providers/swap.integration.test.d.ts.map +0 -1
  671. package/lib-es/exchange/providers/swap.integration.test.js +0 -199
  672. package/lib-es/exchange/providers/swap.integration.test.js.map +0 -1
  673. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
  674. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
  675. package/lib-es/notifications/ServiceStatusProvider/index.test.js +0 -86
  676. package/lib-es/notifications/ServiceStatusProvider/index.test.js.map +0 -1
  677. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
  678. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
  679. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js +0 -13
  680. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
  681. package/src/exchange/providers/swap.integration.test.ts +0 -261
  682. package/src/notifications/ServiceStatusProvider/index.test.ts +0 -102
  683. package/src/notifications/ServiceStatusProvider/ledger-components.ts +0 -12
@@ -30,6 +30,7 @@ import { sendXRP } from "./families/xrp";
30
30
  import { delegateAptos, sendAptos } from "./families/aptos";
31
31
  import { delegateNear } from "./families/near";
32
32
  import { delegateCosmos, sendCosmos } from "./families/cosmos";
33
+ import { sendKaspa } from "./families/kaspa";
33
34
  import { delegateSolana, sendSolana } from "./families/solana";
34
35
  import { delegateTezos } from "./families/tezos";
35
36
  import { delegateCelo } from "./families/celo";
@@ -39,6 +40,7 @@ import { Delegate } from "./models/Delegate";
39
40
  import { Swap } from "./models/Swap";
40
41
  import { delegateOsmosis } from "./families/osmosis";
41
42
  import { AppInfos } from "./enum/AppInfos";
43
+ import { DEVICE_LABELS_CONFIG } from "./data/deviceLabelsData";
42
44
 
43
45
  const isSpeculosRemote = process.env.REMOTE_SPECULOS === "true";
44
46
 
@@ -325,6 +327,14 @@ export const specs: Specs = {
325
327
  },
326
328
  dependency: "",
327
329
  },
330
+ Kaspa: {
331
+ currency: getCryptoCurrencyById("kaspa"),
332
+ appQuery: {
333
+ model: getSpeculosModel(),
334
+ appName: "Kaspa",
335
+ },
336
+ dependency: "",
337
+ },
328
338
  };
329
339
 
330
340
  export async function startSpeculos(
@@ -460,23 +470,22 @@ async function retryAxiosRequest<T>(
460
470
  throw lastError!;
461
471
  }
462
472
 
463
- export async function waitFor(text: string, maxAttempts = 60): Promise<string[]> {
473
+ export async function waitFor(text: string, maxAttempts = 60): Promise<string> {
464
474
  const port = getEnv("SPECULOS_API_PORT");
465
- const address = getSpeculosAddress();
466
- const url = `${address}:${port}/events?stream=false&currentscreenonly=true`;
467
-
475
+ let texts = "";
468
476
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
469
- const { data } = await retryAxiosRequest(() => axios.get<ResponseData>(url));
470
- const texts = data.events.map(event => event.text);
477
+ texts = await fetchCurrentScreenTexts(port);
471
478
 
472
- if (texts?.some(t => t?.toLowerCase().includes(text.toLowerCase()))) {
479
+ if (texts.toLowerCase().includes(text.toLowerCase())) {
473
480
  return texts;
474
481
  }
475
482
 
476
483
  await waitForTimeOut(500);
477
484
  }
478
485
 
479
- throw new Error(`Text "${text}" not found on device screen after ${maxAttempts} attempts.`);
486
+ throw new Error(
487
+ `Text "${text}" not found on device screen after ${maxAttempts} attempts. Last screen text: "${texts}"`,
488
+ );
480
489
  }
481
490
 
482
491
  export async function pressBoth() {
@@ -493,7 +502,7 @@ export async function pressUntilTextFound(
493
502
  targetText: string,
494
503
  strictMatch: boolean = false,
495
504
  ): Promise<string[]> {
496
- const maxAttempts = 15;
505
+ const maxAttempts = 18;
497
506
  const speculosApiPort = getEnv("SPECULOS_API_PORT");
498
507
 
499
508
  for (let attempts = 0; attempts < maxAttempts; attempts++) {
@@ -518,7 +527,7 @@ async function fetchCurrentScreenTexts(speculosApiPort: number): Promise<string>
518
527
  `${speculosAddress}:${speculosApiPort}/events?stream=false&currentscreenonly=true`,
519
528
  ),
520
529
  );
521
- return response.data.events.map(event => event.text).join("");
530
+ return response.data.events.map(event => event.text).join(" ");
522
531
  }
523
532
 
524
533
  async function fetchAllEvents(speculosApiPort: number): Promise<string[]> {
@@ -614,24 +623,38 @@ export async function goToSettings() {
614
623
  await pressBoth();
615
624
  }
616
625
 
617
- const APP_LABEL_MAP = new Map<AppInfos, [string, string]>([
618
- [AppInfos.ETHEREUM, [DeviceLabels.VERIFY_ETHEREUM, DeviceLabels.CONFIRM]],
619
- [AppInfos.BNB_CHAIN, [DeviceLabels.VERIFY_BSC, DeviceLabels.CONFIRM]],
620
- [AppInfos.POLYGON, [DeviceLabels.VERIFY_POLYGON, DeviceLabels.CONFIRM]],
621
- [AppInfos.SOLANA, [DeviceLabels.VERIFY_SOLANA_ADDRESS, DeviceLabels.CONFIRM]],
622
- [AppInfos.POLKADOT, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
623
- [AppInfos.COSMOS, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
624
- [AppInfos.BITCOIN, [DeviceLabels.ADDRESS, DeviceLabels.CONFIRM]],
625
- ]);
626
+ type DeviceLabelsReturn = {
627
+ delegateConfirmLabel: string;
628
+ delegateVerifyLabel: string;
629
+ receiveConfirmLabel: string;
630
+ receiveVerifyLabel: string;
631
+ };
632
+
633
+ function getDeviceLabels(appInfo: AppInfos): DeviceLabelsReturn {
634
+ const deviceModel = getSpeculosModel();
635
+ const deviceConfig = DEVICE_LABELS_CONFIG[deviceModel] ?? DEVICE_LABELS_CONFIG.default;
626
636
 
627
- const DEFAULT_LABELS: [string, string] = [DeviceLabels.ADDRESS, DeviceLabels.APPROVE];
637
+ if (!deviceConfig) {
638
+ throw new Error(`No device configuration found for ${deviceModel}`);
639
+ }
640
+
641
+ const receiveVerifyLabel =
642
+ deviceConfig.receiveVerify[appInfo.name] ?? deviceConfig.receiveVerify.default;
643
+ const receiveConfirmLabel =
644
+ deviceConfig.receiveConfirm[appInfo.name] ?? deviceConfig.receiveConfirm.default;
645
+ const delegateVerifyLabel =
646
+ deviceConfig.delegateVerify[appInfo.name] ?? deviceConfig.delegateVerify.default;
647
+ const delegateConfirmLabel =
648
+ deviceConfig.delegateConfirm[appInfo.name] ?? deviceConfig.delegateConfirm.default;
649
+
650
+ return { receiveVerifyLabel, receiveConfirmLabel, delegateVerifyLabel, delegateConfirmLabel };
651
+ }
628
652
 
629
653
  export async function expectValidAddressDevice(account: Account, addressDisplayed: string) {
630
- const labels = APP_LABEL_MAP.get(account.currency.speculosApp) ?? DEFAULT_LABELS;
631
- const [firstLabel, confirmLabel] = labels;
654
+ const { receiveVerifyLabel, receiveConfirmLabel } = getDeviceLabels(account.currency.speculosApp);
632
655
 
633
- await waitFor(firstLabel);
634
- const events = await pressUntilTextFound(confirmLabel);
656
+ await waitFor(receiveVerifyLabel);
657
+ const events = await pressUntilTextFound(receiveConfirmLabel);
635
658
  const isAddressCorrect = containsSubstringInEvent(addressDisplayed, events);
636
659
  expect(isAddressCorrect).toBeTruthy();
637
660
  await pressBoth();
@@ -677,6 +700,9 @@ export async function signSendTransaction(tx: Transaction) {
677
700
  case Currency.APT:
678
701
  await sendAptos();
679
702
  break;
703
+ case Currency.KAS:
704
+ await sendKaspa();
705
+ break;
680
706
  default:
681
707
  throw new Error(`Unsupported currency: ${currencyName.ticker}`);
682
708
  }
@@ -695,7 +721,7 @@ export async function signDelegationTransaction(delegatingAccount: Delegate) {
695
721
  const currencyName = delegatingAccount.account.currency.name;
696
722
  switch (currencyName) {
697
723
  case Account.SOL_1.currency.name:
698
- await delegateSolana();
724
+ await delegateSolana(delegatingAccount);
699
725
  break;
700
726
  case Account.NEAR_1.currency.name:
701
727
  await delegateNear(delegatingAccount);
@@ -708,13 +734,13 @@ export async function signDelegationTransaction(delegatingAccount: Delegate) {
708
734
  await delegateOsmosis(delegatingAccount);
709
735
  break;
710
736
  case Account.MULTIVERS_X_1.currency.name:
711
- await delegateMultiversX();
737
+ await delegateMultiversX(delegatingAccount);
712
738
  break;
713
739
  case Account.ADA_1.currency.name:
714
740
  await delegateCardano();
715
741
  break;
716
742
  case Account.XTZ_1.currency.name:
717
- await delegateTezos();
743
+ await delegateTezos(delegatingAccount);
718
744
  break;
719
745
  case Account.CELO_1.currency.name:
720
746
  await delegateCelo(delegatingAccount);
@@ -727,14 +753,27 @@ export async function signDelegationTransaction(delegatingAccount: Delegate) {
727
753
  }
728
754
  }
729
755
 
756
+ export async function getDelegateEvents(delegatingAccount: Delegate): Promise<string[]> {
757
+ const { delegateVerifyLabel, delegateConfirmLabel } = getDeviceLabels(
758
+ delegatingAccount.account.currency.speculosApp,
759
+ );
760
+
761
+ await waitFor(delegateVerifyLabel);
762
+ return await pressUntilTextFound(delegateConfirmLabel);
763
+ }
764
+
730
765
  export async function verifyAmountsAndAcceptSwap(swap: Swap, amount: string) {
731
766
  await waitFor(DeviceLabels.REVIEW_TRANSACTION);
732
- const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
767
+ const events =
768
+ getSpeculosModel() === DeviceModelId.nanoS
769
+ ? await pressUntilTextFound(DeviceLabels.ACCEPT_AND_SEND)
770
+ : await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
733
771
  await verifySwapData(swap, events, amount);
734
772
  await pressBoth();
735
773
  }
736
774
 
737
775
  export async function verifyAmountsAndAcceptSwapForDifferentSeed(swap: Swap, amount: string) {
776
+ await waitFor(DeviceLabels.RECEIVE_ADDRESS_DOES_NOT_BELONG);
738
777
  await pressUntilTextFound(DeviceLabels.I_UNDERSTAND);
739
778
  await pressBoth();
740
779
  const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
@@ -173,6 +173,27 @@ const DEFAULT_SWAP_PROVIDERS: Record<string, ProviderConfig & Partial<Additional
173
173
  "hex",
174
174
  ),
175
175
  },
176
+ nearintents: {
177
+ type: "CEX",
178
+ name: "NEAR Intents",
179
+ needsBearerToken: false,
180
+ termsOfUseUrl: "https://docs.thorswap.finance/thorswap/resources/terms-of-service",
181
+ supportUrl: "https://ledgerhelp.swapkit.dev/",
182
+ mainUrl: "https://www.thorswap.finance/",
183
+ needsKYC: false,
184
+ version: 2,
185
+ publicKey: {
186
+ curve: "secp256r1",
187
+ data: Buffer.from(
188
+ "0480a453a91e728c5f622d966b90d15de6fdb6c267bb8147dd0e0d4e1c730d631594e724aaf2b2f526600f3713ce6bc2adbfdbaafd2121bfee64fce93fd59a9050",
189
+ "hex",
190
+ ),
191
+ },
192
+ signature: Buffer.from(
193
+ "30440220331fca95bc6b8cf2264d72a0da9d791888c4ead9ed02bee4f6525f7e512911ca02204a78d416baa7b3fc8d6a82abbadda2e096abcbfa9a57769a8a20260d3e553b7d",
194
+ "hex",
195
+ ),
196
+ },
176
197
  lifi: {
177
198
  type: "CEX",
178
199
  name: "lifi",
@@ -1,16 +1,7 @@
1
1
  import { BigNumber } from "bignumber.js";
2
2
 
3
- import {
4
- CosmosTransaction,
5
- ElrondTransaction,
6
- RippleTransaction,
7
- SolanaTransaction,
8
- StellarTransaction,
9
- TonTransaction,
10
- Transaction,
11
- TransactionCommon,
12
- } from "@ledgerhq/wallet-api-client";
13
-
3
+ import { Transaction } from "../../generated/types";
4
+ import { TransactionCommon } from "@ledgerhq/types-live";
14
5
  export type { SwapLiveError } from "@ledgerhq/wallet-api-exchange-module";
15
6
 
16
7
  export function defaultTransaction({
@@ -18,35 +9,81 @@ export function defaultTransaction({
18
9
  amount,
19
10
  recipient,
20
11
  customFeeConfig,
21
- }: TransactionWithCustomFee): Transaction {
22
- return <Transaction>{
12
+ }: TransactionWithCustomFee): Partial<Transaction> {
13
+ // Type assertion needed because each Transaction family has different required properties
14
+ // This function provides base properties that are then extended by family-specific functions
15
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
16
+ return {
23
17
  family,
24
18
  amount,
25
19
  recipient,
26
20
  ...customFeeConfig,
21
+ } as Partial<Transaction>;
22
+ }
23
+
24
+ export function cardanoTransaction({
25
+ amount,
26
+ recipient,
27
+ customFeeConfig,
28
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "cardano" }>> {
29
+ return {
30
+ family: "cardano",
31
+ amount,
32
+ recipient,
33
+ mode: "send",
34
+ ...customFeeConfig,
27
35
  };
28
36
  }
29
37
 
30
- export function modeSendTransaction({
31
- family,
38
+ export function nearTransaction({
32
39
  amount,
33
40
  recipient,
34
41
  customFeeConfig,
35
- }: TransactionWithCustomFee): Transaction {
42
+ }: TransactionWithCustomFee): Extract<Transaction, { family: "near" }> {
36
43
  return {
37
- ...defaultTransaction({ family, amount, recipient, customFeeConfig }),
44
+ family: "near",
45
+ amount,
46
+ recipient,
38
47
  mode: "send",
48
+ ...customFeeConfig,
49
+ };
50
+ }
51
+
52
+ export function tezosTransaction({
53
+ amount,
54
+ recipient,
55
+ customFeeConfig,
56
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "tezos" }>> {
57
+ return {
58
+ family: "tezos",
59
+ amount,
60
+ recipient,
61
+ mode: "send",
62
+ ...customFeeConfig,
63
+ };
64
+ }
65
+
66
+ export function tronTransaction({
67
+ amount,
68
+ recipient,
69
+ customFeeConfig,
70
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "tron" }>> {
71
+ return {
72
+ family: "tron",
73
+ amount,
74
+ recipient,
75
+ mode: "send",
76
+ ...customFeeConfig,
39
77
  };
40
78
  }
41
79
 
42
80
  export function stellarTransaction({
43
- family,
44
81
  amount,
45
82
  recipient,
46
83
  customFeeConfig,
47
84
  payinExtraId,
48
85
  customErrorType,
49
- }: TransactionWithCustomFee): StellarTransaction {
86
+ }: TransactionWithCustomFee): Extract<Transaction, { family: "stellar" }> {
50
87
  if (!payinExtraId)
51
88
  throw {
52
89
  error: new Error("Missing payinExtraId"),
@@ -55,8 +92,11 @@ export function stellarTransaction({
55
92
  };
56
93
 
57
94
  return {
58
- ...defaultTransaction({ family, amount, recipient, customFeeConfig }),
59
95
  family: "stellar",
96
+ mode: "send",
97
+ amount,
98
+ recipient,
99
+ ...customFeeConfig,
60
100
  memoValue: payinExtraId,
61
101
  memoType: "MEMO_TEXT",
62
102
  };
@@ -68,7 +108,7 @@ export function rippleTransaction({
68
108
  customFeeConfig,
69
109
  payinExtraId,
70
110
  customErrorType,
71
- }: TransactionWithCustomFee): RippleTransaction {
111
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "xrp" }>> {
72
112
  if (!payinExtraId)
73
113
  throw {
74
114
  error: new Error("Missing payinExtraId"),
@@ -76,38 +116,40 @@ export function rippleTransaction({
76
116
  customErrorType,
77
117
  };
78
118
 
79
- const transaction: RippleTransaction = {
80
- family: "ripple",
119
+ return {
120
+ family: "xrp",
81
121
  amount,
82
122
  recipient,
83
123
  ...customFeeConfig,
84
124
  tag: new BigNumber(payinExtraId).toNumber(),
85
125
  };
86
- return transaction;
87
126
  }
88
127
 
89
- // Function to remove gasLimit from customFeeConfig for Ethereum or Bitcoin
90
- export function withoutGasLimitTransaction({
91
- family,
128
+ export function evmTransaction({
92
129
  amount,
93
130
  recipient,
94
131
  customFeeConfig,
95
132
  extraTransactionParameters,
96
- }: TransactionWithCustomFee): Transaction {
133
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "evm" }>> {
97
134
  if (customFeeConfig?.gasLimit) {
98
135
  delete customFeeConfig.gasLimit;
99
136
  }
100
137
 
101
138
  if (extraTransactionParameters) {
102
- return <Transaction>{
103
- family,
139
+ return {
140
+ family: "evm" as const,
104
141
  amount,
105
142
  recipient,
106
143
  ...customFeeConfig,
107
144
  data: Buffer.from(extraTransactionParameters, "hex"),
108
145
  };
109
146
  }
110
- return defaultTransaction({ family, amount, recipient, customFeeConfig });
147
+ return {
148
+ family: "evm" as const,
149
+ amount,
150
+ recipient,
151
+ ...customFeeConfig,
152
+ };
111
153
  }
112
154
 
113
155
  export function bitcoinTransaction({
@@ -115,33 +157,33 @@ export function bitcoinTransaction({
115
157
  recipient,
116
158
  customFeeConfig,
117
159
  extraTransactionParameters,
118
- }: TransactionWithCustomFee): Transaction {
160
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "bitcoin" }>> {
161
+ const baseTransaction = {
162
+ family: "bitcoin" as const,
163
+ amount,
164
+ recipient,
165
+ ...customFeeConfig,
166
+ };
167
+
119
168
  if (extraTransactionParameters) {
120
169
  return {
121
- family: "bitcoin",
122
- amount,
123
- recipient,
124
- ...customFeeConfig,
170
+ ...baseTransaction,
125
171
  opReturnData: Buffer.from(extraTransactionParameters, "utf-8"),
126
172
  };
127
173
  }
128
- return {
129
- family: "bitcoin",
130
- amount,
131
- recipient,
132
- ...customFeeConfig,
133
- };
174
+
175
+ return baseTransaction;
134
176
  }
135
177
 
136
178
  export function solanaTransaction({
137
- family,
138
179
  amount,
139
180
  recipient,
140
- customFeeConfig,
141
- }: TransactionWithCustomFee): SolanaTransaction {
181
+ customFeeConfig: _customFeeConfig,
182
+ }: TransactionWithCustomFee): Extract<Transaction, { family: "solana" }> {
142
183
  return {
143
- ...defaultTransaction({ family, amount, recipient, customFeeConfig }),
144
184
  family: "solana",
185
+ amount,
186
+ recipient,
145
187
  model: { kind: "transfer", uiState: {} },
146
188
  };
147
189
  }
@@ -150,43 +192,44 @@ export function elrondTransaction({
150
192
  amount,
151
193
  recipient,
152
194
  customFeeConfig,
153
- }: TransactionWithCustomFee): ElrondTransaction {
154
- const transaction: ElrondTransaction = {
155
- family: "elrond",
195
+ }: TransactionWithCustomFee): Extract<Transaction, { family: "multiversx" }> {
196
+ return {
197
+ family: "multiversx",
156
198
  amount,
157
199
  recipient,
158
200
  mode: "send",
159
- ...customFeeConfig,
160
- gasLimit: 0, // FIXME: Placeholder, adjust as needed
201
+ fees: customFeeConfig.fees || null,
202
+ gasLimit: customFeeConfig.gasLimit ? Number(customFeeConfig.gasLimit) : 0,
161
203
  };
162
- return transaction;
163
204
  }
164
205
 
165
206
  function tonTransaction({
166
- family,
167
207
  amount,
168
208
  recipient,
169
- customFeeConfig,
170
- }: TransactionWithCustomFee): TonTransaction {
209
+ customFeeConfig: _customFeeConfig,
210
+ }: TransactionWithCustomFee): Extract<Transaction, { family: "ton" }> {
171
211
  return {
172
- ...defaultTransaction({ family, amount, recipient, customFeeConfig }),
173
212
  family: "ton",
213
+ amount,
214
+ recipient,
174
215
  comment: { isEncrypted: false, text: "" },
175
216
  fees: new BigNumber(0), // Set default value as completeExchange call prepareTransaction, which set again fees.
176
217
  };
177
218
  }
178
219
 
179
220
  export function cosmosTransaction({
180
- family,
181
221
  amount,
182
222
  recipient,
183
223
  customFeeConfig,
184
224
  payinExtraId,
185
- }: TransactionWithCustomFee): CosmosTransaction {
186
- return <CosmosTransaction>{
187
- ...defaultTransaction({ family, amount, recipient, customFeeConfig }),
225
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "cosmos" }>> {
226
+ return {
188
227
  family: "cosmos",
228
+ amount,
229
+ recipient,
189
230
  mode: "send",
231
+ networkInfo: null,
232
+ ...customFeeConfig,
190
233
  memo: payinExtraId ?? undefined,
191
234
  };
192
235
  }
@@ -198,10 +241,13 @@ export type TransactionWithCustomFee = TransactionCommon & {
198
241
  payinExtraId?: string;
199
242
  customErrorType?: "swap";
200
243
  extraTransactionParameters?: string;
244
+ family: string;
201
245
  };
202
246
 
203
247
  // Define a specific type for the strategy functions, assuming they might need parameters
204
- export type TransactionStrategyFunction = (params: TransactionWithCustomFee) => Transaction;
248
+ export type TransactionStrategyFunction = (
249
+ params: TransactionWithCustomFee,
250
+ ) => Partial<Transaction>;
205
251
 
206
252
  export const transactionStrategy: {
207
253
  [K in Transaction["family"]]: TransactionStrategyFunction;
@@ -209,26 +255,28 @@ export const transactionStrategy: {
209
255
  algorand: defaultTransaction,
210
256
  aptos: defaultTransaction,
211
257
  bitcoin: bitcoinTransaction,
212
- cardano: modeSendTransaction,
258
+ canton: defaultTransaction,
259
+ cardano: cardanoTransaction,
260
+ casper: defaultTransaction,
213
261
  celo: defaultTransaction,
214
262
  cosmos: cosmosTransaction,
215
- crypto_org: defaultTransaction,
216
- elrond: elrondTransaction,
217
- ethereum: withoutGasLimitTransaction,
263
+ evm: evmTransaction,
218
264
  filecoin: defaultTransaction,
219
265
  hedera: defaultTransaction,
220
- near: modeSendTransaction,
221
- neo: defaultTransaction,
266
+ icon: defaultTransaction,
267
+ internet_computer: defaultTransaction,
268
+ mina: defaultTransaction,
269
+ multiversx: elrondTransaction,
270
+ near: nearTransaction,
222
271
  polkadot: defaultTransaction,
223
- ripple: rippleTransaction,
224
272
  solana: solanaTransaction,
225
273
  stacks: defaultTransaction,
226
274
  stellar: stellarTransaction,
227
- tezos: modeSendTransaction,
275
+ sui: defaultTransaction,
276
+ tezos: tezosTransaction,
228
277
  ton: tonTransaction,
229
- tron: modeSendTransaction,
278
+ tron: tronTransaction,
230
279
  vechain: defaultTransaction,
231
- casper: defaultTransaction,
232
- sui: defaultTransaction,
233
- internet_computer: defaultTransaction,
280
+ kaspa: defaultTransaction,
281
+ xrp: rippleTransaction,
234
282
  };
@@ -7,10 +7,8 @@ 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,
@@ -29,8 +27,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
29
27
  minReserve: 0,
30
28
  useGateway: true,
31
29
  networkType: "devnet",
32
- nativeInstrumentId:
33
- "6e9fc50fb94e56751b49f09ba2dc84da53a9d7cff08115ebb4f6b7a12d0c990c:Splice.Amulet:Amulet",
30
+ nativeInstrumentId: "Amulet",
34
31
  },
35
32
  },
36
33
  config_currency_canton_network_localnet: {
@@ -14,16 +14,17 @@ import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/se
14
14
  import cantonBridgeMock from "./bridge/mock";
15
15
  import { Resolver } from "../../hw/getAddress/types";
16
16
  import { getCurrencyConfiguration } from "../../config";
17
- import { getCryptoCurrencyById } from "../../currencies";
17
+ import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
18
18
 
19
19
  const createSigner: CreateSigner<CantonSigner> = (transport: Transport) => {
20
20
  return new LegacySignerCanton(transport);
21
21
  };
22
22
 
23
- const getCurrencyConfig = () => {
24
- // Use devnet for development/testing
25
- const currencyId = getEnv("MOCK") ? "canton_network_devnet" : "canton_network_devnet";
26
- return getCurrencyConfiguration<CantonCoinConfig>(getCryptoCurrencyById(currencyId));
23
+ const getCurrencyConfig = (currency?: CryptoCurrency) => {
24
+ if (!currency) {
25
+ throw new Error("currency not defined");
26
+ }
27
+ return getCurrencyConfiguration<CantonCoinConfig>(currency);
27
28
  };
28
29
 
29
30
  const bridge: Bridge<Transaction, Account, TransactionStatus> = getEnv("MOCK")
@@ -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
  },