@ledgerhq/live-common 34.45.0 → 34.45.1-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 (305) hide show
  1. package/lib/__tests__/test-helpers/bridge.d.ts.map +1 -1
  2. package/lib/__tests__/test-helpers/bridge.js +3 -1
  3. package/lib/__tests__/test-helpers/bridge.js.map +1 -1
  4. package/lib/bridge/generic-alpaca/accountBridge.d.ts +1 -1
  5. package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  6. package/lib/bridge/generic-alpaca/accountBridge.js.map +1 -1
  7. package/lib/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
  8. package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  9. package/lib/bridge/generic-alpaca/alpaca/index.js +4 -2
  10. package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  11. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +4 -4
  12. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
  13. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js +10 -10
  14. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  15. package/lib/bridge/generic-alpaca/broadcast.d.ts +1 -1
  16. package/lib/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
  17. package/lib/bridge/generic-alpaca/broadcast.js.map +1 -1
  18. package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts +17 -0
  19. package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -0
  20. package/lib/bridge/generic-alpaca/buildSubAccounts.js +75 -0
  21. package/lib/bridge/generic-alpaca/buildSubAccounts.js.map +1 -0
  22. package/lib/bridge/generic-alpaca/createTransaction.d.ts +17 -9
  23. package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  24. package/lib/bridge/generic-alpaca/createTransaction.js +36 -10
  25. package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
  26. package/lib/bridge/generic-alpaca/currencyBridge.d.ts +1 -1
  27. package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  28. package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  29. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts +1 -1
  30. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  31. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +9 -0
  32. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  33. package/lib/bridge/generic-alpaca/getAccountShape.d.ts +1 -1
  34. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  35. package/lib/bridge/generic-alpaca/getAccountShape.js +66 -37
  36. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  37. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts +1 -1
  38. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  39. package/lib/bridge/generic-alpaca/getTransactionStatus.js +27 -15
  40. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  41. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts +5 -1
  42. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  43. package/lib/bridge/generic-alpaca/prepareTransaction.js +28 -5
  44. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  45. package/lib/bridge/generic-alpaca/signOperation.d.ts +1 -1
  46. package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  47. package/lib/bridge/generic-alpaca/signOperation.js +68 -13
  48. package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
  49. package/lib/bridge/generic-alpaca/signer/index.d.ts +1 -1
  50. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  51. package/lib/bridge/generic-alpaca/signer/index.js +38 -5
  52. package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
  53. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -0
  54. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  55. package/lib/bridge/generic-alpaca/signer/signTransaction.js +8 -1
  56. package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  57. package/lib/bridge/generic-alpaca/signer/types.d.ts +3 -0
  58. package/lib/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  59. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +70 -46
  60. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
  61. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
  62. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  63. package/lib/bridge/generic-alpaca/tests/signOperation.test.js +25 -22
  64. package/lib/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
  65. package/lib/bridge/generic-alpaca/tests/utils.test.d.ts.map +1 -0
  66. package/lib/bridge/generic-alpaca/{utils.test.js → tests/utils.test.js} +1 -1
  67. package/lib/bridge/generic-alpaca/tests/utils.test.js.map +1 -0
  68. package/lib/bridge/generic-alpaca/utils.d.ts +36 -1
  69. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  70. package/lib/bridge/generic-alpaca/utils.js +130 -14
  71. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  72. package/lib/bridge/impl.d.ts.map +1 -1
  73. package/lib/bridge/impl.js +5 -4
  74. package/lib/bridge/impl.js.map +1 -1
  75. package/lib/e2e/enum/Account.js +4 -4
  76. package/lib/e2e/enum/Account.js.map +1 -1
  77. package/lib/e2e/enum/AppInfos.d.ts +1 -1
  78. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  79. package/lib/e2e/enum/AppInfos.js +1 -1
  80. package/lib/e2e/enum/AppInfos.js.map +1 -1
  81. package/lib/e2e/enum/Currency.d.ts +3 -1
  82. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  83. package/lib/e2e/enum/Currency.js +102 -42
  84. package/lib/e2e/enum/Currency.js.map +1 -1
  85. package/lib/e2e/enum/Network.d.ts +34 -0
  86. package/lib/e2e/enum/Network.d.ts.map +1 -0
  87. package/lib/e2e/enum/Network.js +38 -0
  88. package/lib/e2e/enum/Network.js.map +1 -0
  89. package/lib/e2e/speculos.js +2 -2
  90. package/lib/e2e/speculos.js.map +1 -1
  91. package/lib/exchange/index.d.ts.map +1 -1
  92. package/lib/exchange/index.js +1 -0
  93. package/lib/exchange/index.js.map +1 -1
  94. package/lib/families/evm/config.js +1 -1
  95. package/lib/families/evm/config.js.map +1 -1
  96. package/lib/families/stellar/bridge/logic.d.ts +1 -1
  97. package/lib/families/stellar/bridge/logic.d.ts.map +1 -1
  98. package/lib/families/stellar/bridge/logic.js +1 -1
  99. package/lib/families/stellar/bridge/logic.js.map +1 -1
  100. package/lib/families/stellar/bridge/mock.js +2 -2
  101. package/lib/families/stellar/bridge/mock.js.map +1 -1
  102. package/lib/families/stellar/setup.d.ts +3 -6
  103. package/lib/families/stellar/setup.d.ts.map +1 -1
  104. package/lib/families/stellar/setup.js +3 -12
  105. package/lib/families/stellar/setup.js.map +1 -1
  106. package/lib/families/xrp/bridge/mock.js +2 -2
  107. package/lib/families/xrp/bridge/mock.js.map +1 -1
  108. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  109. package/lib/featureFlags/defaultFeatures.js +4 -2
  110. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  111. package/lib/generated/bridge/js.d.ts +0 -1
  112. package/lib/generated/bridge/js.d.ts.map +1 -1
  113. package/lib/generated/bridge/js.js +12 -14
  114. package/lib/generated/bridge/js.js.map +1 -1
  115. package/lib/generated/transaction.d.ts +1 -1
  116. package/lib/modularDrawer/__test__/useModularDrawerVisibility.test.js +229 -14
  117. package/lib/modularDrawer/__test__/useModularDrawerVisibility.test.js.map +1 -1
  118. package/lib/modularDrawer/enums.d.ts +0 -1
  119. package/lib/modularDrawer/enums.d.ts.map +1 -1
  120. package/lib/modularDrawer/enums.js +0 -1
  121. package/lib/modularDrawer/enums.js.map +1 -1
  122. package/lib/modularDrawer/useModularDrawerVisibility.d.ts +7 -1
  123. package/lib/modularDrawer/useModularDrawerVisibility.d.ts.map +1 -1
  124. package/lib/modularDrawer/useModularDrawerVisibility.js +18 -2
  125. package/lib/modularDrawer/useModularDrawerVisibility.js.map +1 -1
  126. package/lib-es/__tests__/test-helpers/bridge.d.ts.map +1 -1
  127. package/lib-es/__tests__/test-helpers/bridge.js +3 -1
  128. package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
  129. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +1 -1
  130. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  131. package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
  132. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
  133. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  134. package/lib-es/bridge/generic-alpaca/alpaca/index.js +4 -2
  135. package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  136. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +4 -4
  137. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
  138. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js +10 -10
  139. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  140. package/lib-es/bridge/generic-alpaca/broadcast.d.ts +1 -1
  141. package/lib-es/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
  142. package/lib-es/bridge/generic-alpaca/broadcast.js.map +1 -1
  143. package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts +17 -0
  144. package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -0
  145. package/lib-es/bridge/generic-alpaca/buildSubAccounts.js +65 -0
  146. package/lib-es/bridge/generic-alpaca/buildSubAccounts.js.map +1 -0
  147. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts +17 -9
  148. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  149. package/lib-es/bridge/generic-alpaca/createTransaction.js +35 -9
  150. package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
  151. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts +1 -1
  152. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  153. package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  154. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts +1 -1
  155. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  156. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +9 -0
  157. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  158. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts +1 -1
  159. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  160. package/lib-es/bridge/generic-alpaca/getAccountShape.js +66 -37
  161. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  162. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts +1 -1
  163. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  164. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +27 -15
  165. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  166. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts +5 -1
  167. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  168. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +26 -4
  169. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  170. package/lib-es/bridge/generic-alpaca/signOperation.d.ts +1 -1
  171. package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  172. package/lib-es/bridge/generic-alpaca/signOperation.js +65 -13
  173. package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
  174. package/lib-es/bridge/generic-alpaca/signer/index.d.ts +1 -1
  175. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  176. package/lib-es/bridge/generic-alpaca/signer/index.js +39 -6
  177. package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
  178. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -0
  179. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  180. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js +6 -0
  181. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  182. package/lib-es/bridge/generic-alpaca/signer/types.d.ts +3 -0
  183. package/lib-es/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
  184. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +70 -46
  185. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
  186. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
  187. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  188. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js +25 -22
  189. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
  190. package/lib-es/bridge/generic-alpaca/tests/utils.test.d.ts.map +1 -0
  191. package/lib-es/bridge/generic-alpaca/{utils.test.js → tests/utils.test.js} +1 -1
  192. package/lib-es/bridge/generic-alpaca/tests/utils.test.js.map +1 -0
  193. package/lib-es/bridge/generic-alpaca/utils.d.ts +36 -1
  194. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  195. package/lib-es/bridge/generic-alpaca/utils.js +130 -14
  196. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  197. package/lib-es/bridge/impl.d.ts.map +1 -1
  198. package/lib-es/bridge/impl.js +5 -4
  199. package/lib-es/bridge/impl.js.map +1 -1
  200. package/lib-es/e2e/enum/Account.js +4 -4
  201. package/lib-es/e2e/enum/Account.js.map +1 -1
  202. package/lib-es/e2e/enum/AppInfos.d.ts +1 -1
  203. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  204. package/lib-es/e2e/enum/AppInfos.js +1 -1
  205. package/lib-es/e2e/enum/AppInfos.js.map +1 -1
  206. package/lib-es/e2e/enum/Currency.d.ts +3 -1
  207. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  208. package/lib-es/e2e/enum/Currency.js +102 -42
  209. package/lib-es/e2e/enum/Currency.js.map +1 -1
  210. package/lib-es/e2e/enum/Network.d.ts +34 -0
  211. package/lib-es/e2e/enum/Network.d.ts.map +1 -0
  212. package/lib-es/e2e/enum/Network.js +35 -0
  213. package/lib-es/e2e/enum/Network.js.map +1 -0
  214. package/lib-es/e2e/speculos.js +2 -2
  215. package/lib-es/e2e/speculos.js.map +1 -1
  216. package/lib-es/exchange/index.d.ts.map +1 -1
  217. package/lib-es/exchange/index.js +1 -0
  218. package/lib-es/exchange/index.js.map +1 -1
  219. package/lib-es/families/evm/config.js +1 -1
  220. package/lib-es/families/evm/config.js.map +1 -1
  221. package/lib-es/families/stellar/bridge/logic.d.ts +1 -1
  222. package/lib-es/families/stellar/bridge/logic.d.ts.map +1 -1
  223. package/lib-es/families/stellar/bridge/logic.js +1 -1
  224. package/lib-es/families/stellar/bridge/logic.js.map +1 -1
  225. package/lib-es/families/stellar/bridge/mock.js +2 -2
  226. package/lib-es/families/stellar/bridge/mock.js.map +1 -1
  227. package/lib-es/families/stellar/setup.d.ts +3 -6
  228. package/lib-es/families/stellar/setup.d.ts.map +1 -1
  229. package/lib-es/families/stellar/setup.js +2 -10
  230. package/lib-es/families/stellar/setup.js.map +1 -1
  231. package/lib-es/families/xrp/bridge/mock.js +2 -2
  232. package/lib-es/families/xrp/bridge/mock.js.map +1 -1
  233. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  234. package/lib-es/featureFlags/defaultFeatures.js +4 -2
  235. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  236. package/lib-es/generated/bridge/js.d.ts +0 -1
  237. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  238. package/lib-es/generated/bridge/js.js +0 -2
  239. package/lib-es/generated/bridge/js.js.map +1 -1
  240. package/lib-es/generated/transaction.d.ts +1 -1
  241. package/lib-es/modularDrawer/__test__/useModularDrawerVisibility.test.js +229 -14
  242. package/lib-es/modularDrawer/__test__/useModularDrawerVisibility.test.js.map +1 -1
  243. package/lib-es/modularDrawer/enums.d.ts +0 -1
  244. package/lib-es/modularDrawer/enums.d.ts.map +1 -1
  245. package/lib-es/modularDrawer/enums.js +0 -1
  246. package/lib-es/modularDrawer/enums.js.map +1 -1
  247. package/lib-es/modularDrawer/useModularDrawerVisibility.d.ts +7 -1
  248. package/lib-es/modularDrawer/useModularDrawerVisibility.d.ts.map +1 -1
  249. package/lib-es/modularDrawer/useModularDrawerVisibility.js +18 -2
  250. package/lib-es/modularDrawer/useModularDrawerVisibility.js.map +1 -1
  251. package/package.json +7 -5
  252. package/src/__tests__/test-helpers/bridge.ts +3 -1
  253. package/src/bridge/generic-alpaca/accountBridge.ts +1 -4
  254. package/src/bridge/generic-alpaca/alpaca/index.ts +7 -2
  255. package/src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts +17 -22
  256. package/src/bridge/generic-alpaca/broadcast.ts +1 -4
  257. package/src/bridge/generic-alpaca/buildSubAccounts.ts +110 -0
  258. package/src/bridge/generic-alpaca/createTransaction.ts +48 -18
  259. package/src/bridge/generic-alpaca/currencyBridge.ts +1 -1
  260. package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +13 -4
  261. package/src/bridge/generic-alpaca/getAccountShape.ts +84 -46
  262. package/src/bridge/generic-alpaca/getTransactionStatus.ts +46 -22
  263. package/src/bridge/generic-alpaca/prepareTransaction.ts +41 -7
  264. package/src/bridge/generic-alpaca/signOperation.ts +88 -18
  265. package/src/bridge/generic-alpaca/signer/index.ts +43 -7
  266. package/src/bridge/generic-alpaca/signer/signTransaction.ts +11 -0
  267. package/src/bridge/generic-alpaca/signer/types.ts +1 -0
  268. package/src/bridge/generic-alpaca/tests/estimateMaxSpendable.test.ts +72 -47
  269. package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +1 -1
  270. package/src/bridge/generic-alpaca/tests/signOperation.test.ts +28 -26
  271. package/src/bridge/generic-alpaca/{utils.test.ts → tests/utils.test.ts} +1 -1
  272. package/src/bridge/generic-alpaca/utils.ts +158 -18
  273. package/src/bridge/impl.ts +5 -4
  274. package/src/e2e/enum/Account.ts +4 -4
  275. package/src/e2e/enum/AppInfos.ts +1 -1
  276. package/src/e2e/enum/Currency.ts +102 -40
  277. package/src/e2e/enum/Network.ts +33 -0
  278. package/src/e2e/speculos.ts +2 -2
  279. package/src/exchange/index.ts +1 -0
  280. package/src/families/evm/config.ts +1 -1
  281. package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +184 -1887
  282. package/src/families/stellar/bridge/logic.ts +1 -1
  283. package/src/families/stellar/bridge/mock.ts +2 -2
  284. package/src/families/stellar/setup.ts +2 -22
  285. package/src/families/xrp/bridge/mock.ts +2 -2
  286. package/src/featureFlags/defaultFeatures.ts +4 -2
  287. package/src/generated/bridge/js.ts +0 -2
  288. package/src/modularDrawer/__test__/useModularDrawerVisibility.test.ts +345 -14
  289. package/src/modularDrawer/enums.ts +0 -1
  290. package/src/modularDrawer/useModularDrawerVisibility.ts +26 -2
  291. package/lib/bridge/generic-alpaca/utils.test.d.ts.map +0 -1
  292. package/lib/bridge/generic-alpaca/utils.test.js.map +0 -1
  293. package/lib/families/canton/bridge.integration.test.d.ts +0 -2
  294. package/lib/families/canton/bridge.integration.test.d.ts.map +0 -1
  295. package/lib/families/canton/bridge.integration.test.js +0 -7
  296. package/lib/families/canton/bridge.integration.test.js.map +0 -1
  297. package/lib-es/bridge/generic-alpaca/utils.test.d.ts.map +0 -1
  298. package/lib-es/bridge/generic-alpaca/utils.test.js.map +0 -1
  299. package/lib-es/families/canton/bridge.integration.test.d.ts +0 -2
  300. package/lib-es/families/canton/bridge.integration.test.d.ts.map +0 -1
  301. package/lib-es/families/canton/bridge.integration.test.js +0 -5
  302. package/lib-es/families/canton/bridge.integration.test.js.map +0 -1
  303. package/src/families/canton/bridge.integration.test.ts +0 -6
  304. /package/lib/bridge/generic-alpaca/{utils.test.d.ts → tests/utils.test.d.ts} +0 -0
  305. /package/lib-es/bridge/generic-alpaca/{utils.test.d.ts → tests/utils.test.d.ts} +0 -0
@@ -1,23 +1,56 @@
1
1
  import { encodeOperationId } from "@ledgerhq/coin-framework/operation";
2
2
  import { Account, Operation, OperationType, TransactionCommon } from "@ledgerhq/types-live";
3
+ import BigNumber from "bignumber.js";
4
+ import { fromBigNumberToBigInt } from "@ledgerhq/coin-framework/utils";
3
5
  import {
4
6
  Balance,
5
7
  Operation as CoreOperation,
6
8
  TransactionIntent,
7
9
  } from "@ledgerhq/coin-framework/api/types";
8
- import BigNumber from "bignumber.js";
9
- import { fromBigNumberToBigInt } from "@ledgerhq/coin-framework/utils";
10
10
 
11
11
  export function extractBalance(balances: Balance[], type: string): Balance {
12
- return balances.find(balance => balance.asset.type === type) ?? { asset: { type }, value: 0n };
12
+ return (
13
+ balances.find(balance => balance.asset.type === type) ?? {
14
+ asset: { type },
15
+ value: 0n,
16
+ }
17
+ );
13
18
  }
14
19
 
15
20
  export function adaptCoreOperationToLiveOperation(accountId: string, op: CoreOperation): Operation {
16
- return {
17
- id: encodeOperationId(accountId, op.tx.hash, op.type),
21
+ const opType = op.type as OperationType;
22
+
23
+ const extra: {
24
+ assetReference?: string;
25
+ assetOwner?: string;
26
+ assetAmount?: string | undefined;
27
+ ledgerOpType?: string | undefined;
28
+ memo?: string | undefined;
29
+ } = {};
30
+
31
+ if (op.details?.ledgerOpType !== undefined) {
32
+ extra.ledgerOpType = op.details.ledgerOpType as string;
33
+ }
34
+
35
+ if (op.details?.assetAmount !== undefined) {
36
+ extra.assetAmount = op.details.assetAmount as string;
37
+ }
38
+
39
+ if (op.asset?.type !== "native") {
40
+ extra.assetReference =
41
+ "assetReference" in (op.asset ?? {}) ? (op.asset as any).assetReference : "";
42
+ extra.assetOwner = "assetOwner" in (op.asset ?? {}) ? (op.asset as any).assetOwner : "";
43
+ }
44
+ if (op.details?.memo) {
45
+ extra.memo = op.details.memo as string;
46
+ }
47
+ const res = {
48
+ id: extra.ledgerOpType
49
+ ? encodeOperationId(accountId, op.tx.hash, extra.ledgerOpType)
50
+ : encodeOperationId(accountId, op.tx.hash, op.type),
18
51
  hash: op.tx.hash,
19
52
  accountId,
20
- type: op.type as OperationType,
53
+ type: opType,
21
54
  value: new BigNumber(op.value.toString()),
22
55
  fee: new BigNumber(op.tx.fees.toString()),
23
56
  blockHash: op.tx.block.hash,
@@ -26,21 +59,94 @@ export function adaptCoreOperationToLiveOperation(accountId: string, op: CoreOpe
26
59
  recipients: op.recipients,
27
60
  date: op.tx.date,
28
61
  transactionSequenceNumber: op.details?.sequence as number,
29
- extra: {},
62
+ hasFailed: (op.details as unknown as { status?: string })?.status === "failed",
63
+ extra,
30
64
  };
65
+
66
+ return res;
31
67
  }
32
68
 
69
+ /**
70
+ * Converts a transaction object into a `TransactionIntent` object, which is used to represent
71
+ * the intent of a transaction in a standardized format.
72
+ *
73
+ * @template MemoType - The type of memo supported by the transaction, defaults to `MemoNotSupported`.
74
+ *
75
+ * @param account - The account initiating the transaction. Contains details such as the sender's address.
76
+ * @param transaction - The transaction object containing details about the operation to be performed.
77
+ * - `assetOwner` (optional): The issuer of the asset, if applicable.
78
+ * - `assetReference` (optional): The code of the asset, if applicable.
79
+ * - `mode` (optional): The mode of the transaction, e.g., "changetrust" or "send".
80
+ * - `fees` (optional): The fees associated with the transaction.
81
+ * - `memoType` (optional): The type of memo to attach to the transaction.
82
+ * - `memoValue` (optional): The value of the memo to attach to the transaction.
83
+ *
84
+ * @returns A `TransactionIntent` object containing the standardized representation of the transaction.
85
+ * - Includes details such as type, sender, recipient, amount, fees, asset, and an optional memo.
86
+ * - If `assetReference` and `assetOwner` are provided, the asset is represented as a token.
87
+ * - If `memoType` and `memoValue` are provided, a memo is included; otherwise, a default memo of type "NO_MEMO" is added.
88
+ *
89
+ * @throws An error if the transaction mode is unsupported.
90
+ */
33
91
  export function transactionToIntent(
34
92
  account: Account,
35
- transaction: TransactionCommon,
36
- ): TransactionIntent<any> {
37
- return {
38
- type: "Payment",
93
+ transaction: TransactionCommon & {
94
+ assetOwner?: string;
95
+ assetReference?: string;
96
+ mode?: string;
97
+ fees?: bigint | null | undefined;
98
+ memoType?: string;
99
+ memoValue?: string;
100
+ useAllAmount?: boolean;
101
+ },
102
+ ): TransactionIntent<any> & { memo?: { type: string; value?: string } } {
103
+ let transactionType = "Payment"; // NOTE: assuming payment by default here, can be changed based on transaction.mode
104
+ if (transaction.mode) {
105
+ switch (transaction.mode) {
106
+ case "changeTrust":
107
+ transactionType = "changeTrust";
108
+ break;
109
+ case "send":
110
+ transactionType = "send";
111
+ break;
112
+ default:
113
+ throw new Error(`Unsupported transaction mode: ${transaction.mode}`);
114
+ }
115
+ }
116
+ const res: TransactionIntent & { memo?: { type: string; value?: string } } = {
117
+ fees: transaction?.fees ? transaction.fees : null,
118
+ type: transactionType,
39
119
  sender: account.freshAddress,
40
120
  recipient: transaction.recipient,
41
121
  amount: fromBigNumberToBigInt(transaction.amount, BigInt(0)),
42
- asset: { type: "native" },
122
+ asset: { type: "native", name: account.currency.name, unit: account.currency.units[0] },
123
+ useAllAmount: !!transaction.useAllAmount,
43
124
  };
125
+ if (transaction.assetReference && transaction.assetOwner) {
126
+ const { subAccountId } = transaction;
127
+ const { subAccounts } = account;
128
+
129
+ const tokenAccount = !subAccountId
130
+ ? null
131
+ : subAccounts && subAccounts.find(ta => ta.id === subAccountId);
132
+
133
+ res.asset = {
134
+ type: tokenAccount?.token.tokenType ?? "token",
135
+ assetReference: transaction.assetReference,
136
+ name: tokenAccount?.token.name ?? transaction.assetReference, // NOTE: for stellar, assetReference = tokenAccount.name, this is futureproofing
137
+ unit: account.currency.units[0],
138
+ assetOwner: transaction.assetOwner,
139
+ };
140
+ }
141
+ if (transaction.memoType && transaction.memoValue) {
142
+ res.memo = {
143
+ type: transaction.memoType,
144
+ value: transaction.memoValue,
145
+ };
146
+ } else {
147
+ res.memo = { type: "NO_MEMO" };
148
+ }
149
+ return res;
44
150
  }
45
151
 
46
152
  export const buildOptimisticOperation = (
@@ -48,12 +154,17 @@ export const buildOptimisticOperation = (
48
154
  transaction: TransactionCommon,
49
155
  sequenceNumber?: number,
50
156
  ): Operation => {
51
- return {
52
- id: encodeOperationId(account.id, "", "OUT"),
157
+ const type = transaction["mode"] === "changeTrust" ? "OPT_IN" : "OUT";
158
+ const fees = BigInt(transaction["fees"]?.toString() || "0");
159
+ const { subAccountId } = transaction;
160
+ const { subAccounts } = account;
161
+
162
+ const operation: Operation = {
163
+ id: encodeOperationId(account.id, "", type),
53
164
  hash: "",
54
- type: "OUT",
55
- value: transaction.amount,
56
- fee: transaction["fees"] ?? BigNumber(0),
165
+ type: type,
166
+ value: subAccountId ? new BigNumber(fees.toString()) : transaction.amount, // match old behavior
167
+ fee: new BigNumber(fees.toString()),
57
168
  blockHash: null,
58
169
  blockHeight: null,
59
170
  senders: [account.freshAddress.toString()],
@@ -61,6 +172,35 @@ export const buildOptimisticOperation = (
61
172
  transactionSequenceNumber: sequenceNumber ?? 0,
62
173
  accountId: account.id,
63
174
  date: new Date(),
64
- extra: {},
175
+ extra: {
176
+ ledgerOpType: type,
177
+ blockTime: new Date(),
178
+ index: "0",
179
+ },
65
180
  };
181
+
182
+ const tokenAccount = !subAccountId
183
+ ? null
184
+ : subAccounts && subAccounts.find(ta => ta.id === subAccountId);
185
+ if (tokenAccount && subAccountId) {
186
+ operation.subOperations = [
187
+ {
188
+ id: `${subAccountId}--OUT`,
189
+ hash: "",
190
+ type: "OUT",
191
+ value: transaction.useAllAmount ? tokenAccount.balance : transaction.amount,
192
+ fee: new BigNumber(0),
193
+ blockHash: null,
194
+ blockHeight: null,
195
+ senders: [account.freshAddress],
196
+ recipients: [transaction.recipient],
197
+ accountId: subAccountId,
198
+ date: new Date(),
199
+ extra: {
200
+ ledgerOpType: type,
201
+ },
202
+ },
203
+ ];
204
+ }
205
+ return operation;
66
206
  };
@@ -26,11 +26,12 @@ import { getCryptoAssetsStore, setCryptoAssetsStore } from "./crypto-assets";
26
26
 
27
27
  const alpacaized = {
28
28
  xrp: true,
29
+ stellar: true,
29
30
  };
30
31
 
31
32
  // let accountBridgeInstance: AccountBridge<any> | null = null;
32
33
  const bridgeCache: Record<string, AccountBridge<any>> = {};
33
- let currencyBridgeInstance: CurrencyBridge | null = null;
34
+ const currencyBridgeCache: Record<string, CurrencyBridge> = {};
34
35
 
35
36
  export const getCurrencyBridge = (currency: CryptoCurrency): CurrencyBridge => {
36
37
  if (getEnv("MOCK")) {
@@ -42,10 +43,10 @@ export const getCurrencyBridge = (currency: CryptoCurrency): CurrencyBridge => {
42
43
  }
43
44
 
44
45
  if (alpacaized[currency.family]) {
45
- if (!currencyBridgeInstance) {
46
- currencyBridgeInstance = getAlpacaCurrencyBridge(currency.family, "local");
46
+ if (!currencyBridgeCache[currency.family]) {
47
+ currencyBridgeCache[currency.family] = getAlpacaCurrencyBridge(currency.family, "local");
47
48
  }
48
- return currencyBridgeInstance;
49
+ return currencyBridgeCache[currency.family];
49
50
  }
50
51
 
51
52
  const jsBridge = jsBridges[currency.family];
@@ -94,25 +94,25 @@ export class Account {
94
94
 
95
95
  static readonly BSC_1 = new Account(
96
96
  Currency.BSC,
97
- "Binance Smart Chain 1",
97
+ "BNB Chain 1",
98
98
  "0x4BE2E2B8872AA298D6d123b9211B53E41f611566",
99
99
  0,
100
100
  );
101
101
  static readonly BSC_BUSD_1 = new Account(
102
102
  Currency.BSC_BUSD,
103
- "Binance Smart Chain 1",
103
+ "BNB Chain 1",
104
104
  "0x4BE2E2B8872AA298D6d123b9211B53E41f611566",
105
105
  0,
106
106
  );
107
107
  static readonly BSC_BUSD_2 = new Account(
108
108
  Currency.BSC_BUSD,
109
- "Binance Smart Chain 2",
109
+ "BNB Chain 2",
110
110
  "0xa1baa625c5E6A9304cB7AcD86d2fee6B710eC3eB",
111
111
  1,
112
112
  );
113
113
  static readonly BSC_SHIBA = new Account(
114
114
  Currency.BSC_SHIBA,
115
- "Binance Smart Chain 1",
115
+ "BNB Chain 1",
116
116
  "0x4BE2E2B8872AA298D6d123b9211B53E41f611566",
117
117
  0,
118
118
  );
@@ -43,7 +43,7 @@ export class AppInfos {
43
43
 
44
44
  static readonly POLYGON = new AppInfos("Polygon");
45
45
 
46
- static readonly BINANCE_SMART_CHAIN = new AppInfos("Binance Smart Chain");
46
+ static readonly BNB_CHAIN = new AppInfos("BNB Chain");
47
47
 
48
48
  static readonly TON = new AppInfos("Ton");
49
49
 
@@ -1,4 +1,5 @@
1
1
  import { AppInfos } from "./AppInfos";
2
+ import { Network } from "./Network";
2
3
 
3
4
  export type CurrencyType = Currency;
4
5
 
@@ -8,29 +9,38 @@ export class Currency {
8
9
  public readonly ticker: string,
9
10
  public readonly id: string,
10
11
  public readonly speculosApp: AppInfos,
12
+ public readonly networks: Network[],
11
13
  public readonly contractAddress?: string,
12
14
  ) {}
13
15
 
14
- static readonly CELO = new Currency("Celo", "CELO", "celo", AppInfos.CELO);
16
+ static readonly CELO = new Currency("Celo", "CELO", "celo", AppInfos.CELO, [Network.CELO]);
15
17
 
16
- static readonly INJ = new Currency("Injective", "INJ", "injective", AppInfos.INJECTIVE);
18
+ static readonly INJ = new Currency("Injective", "INJ", "injective", AppInfos.INJECTIVE, [
19
+ Network.INJECTIVE,
20
+ ]);
17
21
 
18
- static readonly BTC = new Currency("Bitcoin", "BTC", "bitcoin", AppInfos.BITCOIN);
22
+ static readonly BTC = new Currency("Bitcoin", "BTC", "bitcoin", AppInfos.BITCOIN, [
23
+ Network.BITCOIN,
24
+ ]);
19
25
 
20
- static readonly APT = new Currency("Aptos", "APT", "aptos", AppInfos.APTOS);
26
+ static readonly APT = new Currency("Aptos", "APT", "aptos", AppInfos.APTOS, [Network.APTOS]);
21
27
 
22
28
  static readonly tBTC = new Currency(
23
29
  "Bitcoin Testnet",
24
30
  "𝚝BTC",
25
31
  "bitcoin_testnet",
26
32
  AppInfos.BITCOIN_TESTNET,
33
+ [Network.BITCOIN_TESTNET],
27
34
  );
28
- static readonly DOGE = new Currency("Dogecoin", "DOGE", "dogecoin", AppInfos.DOGECOIN);
35
+ static readonly DOGE = new Currency("Dogecoin", "DOGE", "dogecoin", AppInfos.DOGECOIN, [
36
+ Network.DOGECOIN,
37
+ ]);
29
38
  static readonly ETH = new Currency(
30
39
  "Ethereum",
31
40
  "ETH",
32
41
  "ethereum",
33
42
  AppInfos.ETHEREUM,
43
+ [Network.ETHEREUM],
34
44
  "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
35
45
  );
36
46
  static readonly tETH = new Currency(
@@ -38,43 +48,65 @@ export class Currency {
38
48
  "𝚝ETH",
39
49
  "ethereum_holesky",
40
50
  AppInfos.ETHEREUM_HOLESKY,
51
+ [Network.ETHEREUM_HOLESKY],
41
52
  );
42
53
  static readonly sepETH = new Currency(
43
54
  "Ethereum Sepolia",
44
55
  "ETH",
45
56
  "ethereum_sepolia",
46
57
  AppInfos.ETHEREUM_SEPOLIA,
58
+ [Network.ETHEREUM_SEPOLIA],
47
59
  );
48
60
  static readonly ETC = new Currency(
49
61
  "Ethereum Classic",
50
62
  "ETC",
51
63
  "ethereum_classic",
52
64
  AppInfos.ETHEREUM_CLASSIC,
65
+ [Network.ETHEREUM_CLASSIC],
53
66
  );
54
- static readonly SOL = new Currency("Solana", "SOL", "solana", AppInfos.SOLANA);
67
+ static readonly SOL = new Currency("Solana", "SOL", "solana", AppInfos.SOLANA, [Network.SOLANA]);
55
68
 
56
- static readonly DOT = new Currency("Polkadot", "DOT", "polkadot", AppInfos.POLKADOT);
57
- static readonly TRX = new Currency("Tron", "TRX", "tron", AppInfos.TRON);
58
- static readonly XRP = new Currency("XRP", "XRP", "ripple", AppInfos.RIPPLE);
59
- static readonly ADA = new Currency("Cardano", "ADA", "cardano", AppInfos.CARDANO);
60
- static readonly XLM = new Currency("Stellar", "XLM", "stellar", AppInfos.STELLAR);
61
- static readonly BCH = new Currency("Bitcoin Cash", "BCH", "bitcoin_cash", AppInfos.BITCOIN_CASH);
62
- static readonly ALGO = new Currency("Algorand", "ALGO", "algorand", AppInfos.ALGORAND);
63
- static readonly ATOM = new Currency("Cosmos", "ATOM", "cosmos", AppInfos.COSMOS);
64
- static readonly XTZ = new Currency("Tezos", "XTZ", "tezos", AppInfos.TEZOS);
65
- static readonly POL = new Currency("Polygon", "POL", "polygon", AppInfos.POLYGON);
66
- static readonly BSC = new Currency(
67
- "Binance Smart Chain",
68
- "BNB",
69
- "bsc",
70
- AppInfos.BINANCE_SMART_CHAIN,
71
- );
72
- static readonly TON = new Currency("TON", "TON", "ton", AppInfos.TON);
69
+ static readonly DOT = new Currency("Polkadot", "DOT", "polkadot", AppInfos.POLKADOT, [
70
+ Network.POLKADOT,
71
+ ]);
72
+ static readonly TRX = new Currency("Tron", "TRX", "tron", AppInfos.TRON, [Network.TRON]);
73
+ static readonly XRP = new Currency("XRP", "XRP", "ripple", AppInfos.RIPPLE, [Network.XRP]);
74
+ static readonly ADA = new Currency("Cardano", "ADA", "cardano", AppInfos.CARDANO, [
75
+ Network.CARDANO,
76
+ ]);
77
+ static readonly XLM = new Currency("Stellar", "XLM", "stellar", AppInfos.STELLAR, [
78
+ Network.STELLAR,
79
+ ]);
80
+ static readonly BCH = new Currency("Bitcoin Cash", "BCH", "bitcoin_cash", AppInfos.BITCOIN_CASH, [
81
+ Network.BITCOIN_CASH,
82
+ ]);
83
+ static readonly ALGO = new Currency("Algorand", "ALGO", "algorand", AppInfos.ALGORAND, [
84
+ Network.ALGORAND,
85
+ ]);
86
+ static readonly ATOM = new Currency("Cosmos", "ATOM", "cosmos", AppInfos.COSMOS, [
87
+ Network.COSMOS,
88
+ ]);
89
+ static readonly XTZ = new Currency("Tezos", "XTZ", "tezos", AppInfos.TEZOS, [Network.TEZOS]);
90
+ static readonly POL = new Currency("Polygon", "POL", "polygon", AppInfos.POLYGON, [
91
+ Network.POLYGON,
92
+ ]);
93
+ static readonly BSC = new Currency("BNB Chain", "BNB", "bsc", AppInfos.BNB_CHAIN, [
94
+ Network.BNB_CHAIN,
95
+ ]);
96
+ static readonly TON = new Currency("TON", "TON", "ton", AppInfos.TON, [Network.TON]);
73
97
  static readonly ETH_USDT = new Currency(
74
98
  "Tether USD",
75
99
  "USDT",
76
100
  "ethereum/erc20/usd_tether__erc20_",
77
101
  AppInfos.ETHEREUM,
102
+ [
103
+ Network.ETHEREUM,
104
+ Network.ARBITRUM,
105
+ Network.POLYGON,
106
+ Network.OPTIMISM,
107
+ Network.BASE,
108
+ Network.SCROLL,
109
+ ],
78
110
  "0xdac17f958d2ee523a2206206994597c13d831ec7",
79
111
  );
80
112
  static readonly ETH_USDC = new Currency(
@@ -82,6 +114,14 @@ export class Currency {
82
114
  "USDC",
83
115
  "ethereum/erc20/usd__coin",
84
116
  AppInfos.ETHEREUM,
117
+ [
118
+ Network.ETHEREUM,
119
+ Network.ARBITRUM,
120
+ Network.POLYGON,
121
+ Network.OPTIMISM,
122
+ Network.BASE,
123
+ Network.SCROLL,
124
+ ],
85
125
  "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
86
126
  );
87
127
  static readonly ETH_LIDO = new Currency(
@@ -89,39 +129,57 @@ export class Currency {
89
129
  "STETH",
90
130
  "ethereum/erc20/steth",
91
131
  AppInfos.ETHEREUM,
132
+ [Network.ETHEREUM],
92
133
  );
93
- static readonly XLM_USCD = new Currency("USDC", "usdc", "stellar", AppInfos.STELLAR);
94
- static readonly ALGO_USDT = new Currency("Tether USDt", "USDT", "algorand", AppInfos.ALGORAND);
95
- static readonly TRX_USDT = new Currency("Tether USD", "USDT", "tron", AppInfos.TRON);
96
- static readonly TRX_BTT = new Currency("BitTorrent", "BTT", "tron", AppInfos.TRON);
134
+ static readonly XLM_USCD = new Currency("USDC", "USDC", "stellar", AppInfos.STELLAR, [
135
+ Network.STELLAR,
136
+ ]);
137
+ static readonly ALGO_USDT = new Currency("Tether USDt", "USDT", "algorand", AppInfos.ALGORAND, [
138
+ Network.ALGORAND,
139
+ ]);
140
+ static readonly TRX_USDT = new Currency("Tether USD", "USDT", "tron", AppInfos.TRON, [
141
+ Network.TRON,
142
+ ]);
143
+ static readonly TRX_BTT = new Currency("BitTorrent", "BTT", "tron", AppInfos.TRON, [
144
+ Network.TRON,
145
+ ]);
97
146
  static readonly BSC_BUSD = new Currency(
98
147
  "Binance-Peg BUSD Token",
99
148
  "BUSD",
100
149
  "bsc",
101
- AppInfos.BINANCE_SMART_CHAIN,
102
- );
103
- static readonly BSC_SHIBA = new Currency(
104
- "Shiba Inu",
105
- "SHIB",
106
- "bsc",
107
- AppInfos.BINANCE_SMART_CHAIN,
150
+ AppInfos.BNB_CHAIN,
151
+ [Network.BNB_CHAIN, Network.POLYGON],
108
152
  );
153
+ static readonly BSC_SHIBA = new Currency("Shiba Inu", "SHIB", "bsc", AppInfos.BNB_CHAIN, [
154
+ Network.BNB_CHAIN,
155
+ Network.ETHEREUM,
156
+ ]);
109
157
  static readonly POL_DAI = new Currency(
110
158
  "(PoS) Dai Stablecoin",
111
159
  "DAI",
112
160
  "polygon",
113
161
  AppInfos.POLYGON,
162
+ [Network.POLYGON],
114
163
  );
115
- static readonly POL_UNI = new Currency("Uniswap (PoS)", "UNI", "polygon", AppInfos.POLYGON);
116
- static readonly NEAR = new Currency("NEAR", "NEAR", "near", AppInfos.NEAR);
117
- static readonly OSMO = new Currency("Osmosis", "OSMO", "osmo", AppInfos.OSMOSIS);
118
- static readonly MULTIVERS_X = new Currency("MultiversX", "EGLD", "elrond", AppInfos.MULTIVERS_X);
119
- static readonly LTC = new Currency("Litecoin", "LTC", "litecoin", AppInfos.LTC);
164
+ static readonly POL_UNI = new Currency("Uniswap (PoS)", "UNI", "polygon", AppInfos.POLYGON, [
165
+ Network.POLYGON,
166
+ ]);
167
+ static readonly NEAR = new Currency("NEAR", "NEAR", "near", AppInfos.NEAR, [Network.NEAR]);
168
+ static readonly OSMO = new Currency("Osmosis", "OSMO", "osmo", AppInfos.OSMOSIS, [
169
+ Network.OSMOSIS,
170
+ ]);
171
+ static readonly MULTIVERS_X = new Currency("MultiversX", "EGLD", "elrond", AppInfos.MULTIVERS_X, [
172
+ Network.MULTIVERS_X,
173
+ ]);
174
+ static readonly LTC = new Currency("Litecoin", "LTC", "litecoin", AppInfos.LTC, [
175
+ Network.LITECOIN,
176
+ ]);
120
177
  static readonly SOL_GIGA = new Currency(
121
178
  "GIGACHAD",
122
179
  "GIGA",
123
180
  "solana",
124
181
  AppInfos.SOLANA,
182
+ [Network.SOLANA],
125
183
  "63LfDmNb3MQ8mw9MtZ2To9bEA2M71kZUUGq5tiJxcqj9",
126
184
  );
127
185
  static readonly SOL_WIF = new Currency(
@@ -129,7 +187,11 @@ export class Currency {
129
187
  "WIF",
130
188
  "solana",
131
189
  AppInfos.SOLANA,
190
+ [Network.SOLANA],
132
191
  "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm",
133
192
  );
134
- static readonly OP = new Currency("OP Mainnet", "OP", "optimism", AppInfos.ETHEREUM);
193
+
194
+ static readonly OP = new Currency("OP Mainnet", "OP", "optimism", AppInfos.ETHEREUM, [
195
+ Network.OPTIMISM,
196
+ ]);
135
197
  }
@@ -0,0 +1,33 @@
1
+ export enum Network {
2
+ CELO = "Celo",
3
+ INJECTIVE = "Injective",
4
+ BITCOIN = "Bitcoin",
5
+ APTOS = "Aptos",
6
+ BITCOIN_TESTNET = "Bitcoin Testnet",
7
+ DOGECOIN = "Dogecoin",
8
+ ETHEREUM = "Ethereum",
9
+ ETHEREUM_HOLESKY = "Ethereum Holesky",
10
+ ETHEREUM_SEPOLIA = "Ethereum Sepolia",
11
+ ETHEREUM_CLASSIC = "Ethereum Classic",
12
+ SOLANA = "Solana",
13
+ POLKADOT = "Polkadot",
14
+ TRON = "Tron",
15
+ XRP = "XRP",
16
+ CARDANO = "Cardano",
17
+ STELLAR = "Stellar",
18
+ BITCOIN_CASH = "Bitcoin Cash",
19
+ ALGORAND = "Algorand",
20
+ COSMOS = "Cosmos",
21
+ TEZOS = "Tezos",
22
+ POLYGON = "Polygon",
23
+ BNB_CHAIN = "BNB Chain",
24
+ TON = "TON",
25
+ ARBITRUM = "Arbitrum",
26
+ OPTIMISM = "Optimism",
27
+ BASE = "Base",
28
+ SCROLL = "Scroll",
29
+ NEAR = "NEAR",
30
+ OSMOSIS = "Osmosis",
31
+ MULTIVERS_X = "MultiversX",
32
+ LITECOIN = "Litecoin",
33
+ }
@@ -260,7 +260,7 @@ export const specs: Specs = {
260
260
  },
261
261
  dependency: "",
262
262
  },
263
- Binance_Smart_Chain: {
263
+ BNB_Chain: {
264
264
  currency: getCryptoCurrencyById("bsc"),
265
265
  appQuery: {
266
266
  model: getSpeculosModel(),
@@ -620,7 +620,7 @@ export async function goToSettings() {
620
620
 
621
621
  const APP_LABEL_MAP = new Map<AppInfos, [string, string]>([
622
622
  [AppInfos.ETHEREUM, [DeviceLabels.VERIFY_ETHEREUM, DeviceLabels.CONFIRM]],
623
- [AppInfos.BINANCE_SMART_CHAIN, [DeviceLabels.VERIFY_BSC, DeviceLabels.CONFIRM]],
623
+ [AppInfos.BNB_CHAIN, [DeviceLabels.VERIFY_BSC, DeviceLabels.CONFIRM]],
624
624
  [AppInfos.POLYGON, [DeviceLabels.VERIFY_POLYGON, DeviceLabels.CONFIRM]],
625
625
  [AppInfos.SOLANA, [DeviceLabels.PUBKEY, DeviceLabels.APPROVE]],
626
626
  [AppInfos.POLKADOT, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
@@ -24,6 +24,7 @@ const exchangeSupportAppVersions = {
24
24
  tron: "0.4.100",
25
25
  zcash: "1.5.0",
26
26
  zencash: "1.5.0",
27
+ sui: "1.2.0",
27
28
  };
28
29
 
29
30
  type ExchangeCurrencyNameAndSignature = {
@@ -522,7 +522,7 @@ const evmConfig: CurrencyLiveConfigDefinition = {
522
522
  },
523
523
  explorer: {
524
524
  type: "blockscout",
525
- uri: "https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api",
525
+ uri: "https://andromeda-explorer.metis.io/api",
526
526
  },
527
527
  showNfts: false,
528
528
  },