@ledgerhq/live-common 34.37.0-nightly.4 → 34.37.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 (326) hide show
  1. package/lib/__tests__/test-helpers/bridge.d.ts.map +1 -1
  2. package/lib/__tests__/test-helpers/bridge.js +4 -4
  3. package/lib/__tests__/test-helpers/bridge.js.map +1 -1
  4. package/lib/bridge/impl.d.ts.map +1 -1
  5. package/lib/bridge/impl.js +3 -59
  6. package/lib/bridge/impl.js.map +1 -1
  7. package/lib/config/index.d.ts +2 -3
  8. package/lib/config/index.d.ts.map +1 -1
  9. package/lib/config/index.js +1 -9
  10. package/lib/config/index.js.map +1 -1
  11. package/lib/config/sharedConfig.d.ts.map +1 -1
  12. package/lib/config/sharedConfig.js +0 -7
  13. package/lib/config/sharedConfig.js.map +1 -1
  14. package/lib/e2e/index.d.ts +0 -4
  15. package/lib/e2e/index.d.ts.map +1 -1
  16. package/lib/e2e/speculos.d.ts.map +1 -1
  17. package/lib/e2e/speculos.js +0 -3
  18. package/lib/e2e/speculos.js.map +1 -1
  19. package/lib/e2e/speculosCI.js +1 -1
  20. package/lib/exchange/providers/swap.d.ts +0 -1
  21. package/lib/exchange/providers/swap.d.ts.map +1 -1
  22. package/lib/exchange/providers/swap.integration.test.js +12 -26
  23. package/lib/exchange/providers/swap.integration.test.js.map +1 -1
  24. package/lib/exchange/providers/swap.js +0 -25
  25. package/lib/exchange/providers/swap.js.map +1 -1
  26. package/lib/families/evm/config.js +2 -2
  27. package/lib/families/evm/config.js.map +1 -1
  28. package/lib/families/xrp/setup.d.ts +6 -3
  29. package/lib/families/xrp/setup.d.ts.map +1 -1
  30. package/lib/families/xrp/setup.js +7 -1
  31. package/lib/families/xrp/setup.js.map +1 -1
  32. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  33. package/lib/featureFlags/defaultFeatures.js +0 -10
  34. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  35. package/lib/featureFlags/useFeature.d.ts +1 -1
  36. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  37. package/lib/generated/bridge/js.d.ts +1 -0
  38. package/lib/generated/bridge/js.d.ts.map +1 -1
  39. package/lib/generated/bridge/js.js +6 -4
  40. package/lib/generated/bridge/js.js.map +1 -1
  41. package/lib/hooks/useOFACGeoBlockCheck.js +1 -1
  42. package/lib/hooks/useOFACGeoBlockCheck.js.map +1 -1
  43. package/lib/hw/connectAppEventMapper.d.ts.map +1 -1
  44. package/lib/hw/connectAppEventMapper.js +4 -4
  45. package/lib/hw/connectAppEventMapper.js.map +1 -1
  46. package/lib/wallet-api/Exchange/server.d.ts +0 -2
  47. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  48. package/lib/wallet-api/Exchange/server.js +0 -6
  49. package/lib/wallet-api/Exchange/server.js.map +1 -1
  50. package/lib/wallet-api/ModularDrawer/types.d.ts +25 -30
  51. package/lib/wallet-api/ModularDrawer/types.d.ts.map +1 -1
  52. package/lib/wallet-api/ModularDrawer/types.js +11 -15
  53. package/lib/wallet-api/ModularDrawer/types.js.map +1 -1
  54. package/lib/wallet-api/ModularDrawer/utils.js +1 -1
  55. package/lib/wallet-api/ModularDrawer/utils.js.map +1 -1
  56. package/lib-es/__tests__/test-helpers/bridge.d.ts.map +1 -1
  57. package/lib-es/__tests__/test-helpers/bridge.js +4 -4
  58. package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
  59. package/lib-es/bridge/impl.d.ts.map +1 -1
  60. package/lib-es/bridge/impl.js +3 -59
  61. package/lib-es/bridge/impl.js.map +1 -1
  62. package/lib-es/config/index.d.ts +2 -3
  63. package/lib-es/config/index.d.ts.map +1 -1
  64. package/lib-es/config/index.js +1 -8
  65. package/lib-es/config/index.js.map +1 -1
  66. package/lib-es/config/sharedConfig.d.ts.map +1 -1
  67. package/lib-es/config/sharedConfig.js +0 -7
  68. package/lib-es/config/sharedConfig.js.map +1 -1
  69. package/lib-es/e2e/index.d.ts +0 -4
  70. package/lib-es/e2e/index.d.ts.map +1 -1
  71. package/lib-es/e2e/speculos.d.ts.map +1 -1
  72. package/lib-es/e2e/speculos.js +0 -3
  73. package/lib-es/e2e/speculos.js.map +1 -1
  74. package/lib-es/e2e/speculosCI.js +1 -1
  75. package/lib-es/exchange/providers/swap.d.ts +0 -1
  76. package/lib-es/exchange/providers/swap.d.ts.map +1 -1
  77. package/lib-es/exchange/providers/swap.integration.test.js +13 -27
  78. package/lib-es/exchange/providers/swap.integration.test.js.map +1 -1
  79. package/lib-es/exchange/providers/swap.js +0 -25
  80. package/lib-es/exchange/providers/swap.js.map +1 -1
  81. package/lib-es/families/evm/config.js +2 -2
  82. package/lib-es/families/evm/config.js.map +1 -1
  83. package/lib-es/families/xrp/setup.d.ts +6 -3
  84. package/lib-es/families/xrp/setup.d.ts.map +1 -1
  85. package/lib-es/families/xrp/setup.js +7 -2
  86. package/lib-es/families/xrp/setup.js.map +1 -1
  87. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  88. package/lib-es/featureFlags/defaultFeatures.js +0 -10
  89. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  90. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  91. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  92. package/lib-es/generated/bridge/js.d.ts +1 -0
  93. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  94. package/lib-es/generated/bridge/js.js +2 -0
  95. package/lib-es/generated/bridge/js.js.map +1 -1
  96. package/lib-es/hooks/useOFACGeoBlockCheck.js +1 -1
  97. package/lib-es/hooks/useOFACGeoBlockCheck.js.map +1 -1
  98. package/lib-es/hw/connectAppEventMapper.d.ts.map +1 -1
  99. package/lib-es/hw/connectAppEventMapper.js +5 -5
  100. package/lib-es/hw/connectAppEventMapper.js.map +1 -1
  101. package/lib-es/wallet-api/Exchange/server.d.ts +0 -2
  102. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  103. package/lib-es/wallet-api/Exchange/server.js +0 -6
  104. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  105. package/lib-es/wallet-api/ModularDrawer/types.d.ts +25 -30
  106. package/lib-es/wallet-api/ModularDrawer/types.d.ts.map +1 -1
  107. package/lib-es/wallet-api/ModularDrawer/types.js +5 -9
  108. package/lib-es/wallet-api/ModularDrawer/types.js.map +1 -1
  109. package/lib-es/wallet-api/ModularDrawer/utils.js +1 -1
  110. package/lib-es/wallet-api/ModularDrawer/utils.js.map +1 -1
  111. package/package.json +69 -69
  112. package/src/__tests__/test-helpers/bridge.ts +4 -2
  113. package/src/bridge/impl.ts +5 -87
  114. package/src/config/index.ts +2 -11
  115. package/src/config/sharedConfig.ts +0 -8
  116. package/src/e2e/speculos.ts +0 -3
  117. package/src/e2e/speculosCI.ts +1 -1
  118. package/src/exchange/providers/swap.integration.test.ts +16 -33
  119. package/src/exchange/providers/swap.ts +0 -32
  120. package/src/families/evm/config.ts +2 -2
  121. package/src/families/xrp/setup.ts +15 -2
  122. package/src/featureFlags/defaultFeatures.ts +0 -12
  123. package/src/generated/bridge/js.ts +2 -0
  124. package/src/hooks/useOFACGeoBlockCheck.ts +1 -1
  125. package/src/hw/connectAppEventMapper.ts +4 -4
  126. package/src/wallet-api/Exchange/server.ts +0 -8
  127. package/src/wallet-api/ModularDrawer/types.ts +5 -9
  128. package/src/wallet-api/ModularDrawer/utils.ts +1 -1
  129. package/lib/bridge/generic-alpaca/accountBridge.d.ts +0 -3
  130. package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +0 -1
  131. package/lib/bridge/generic-alpaca/accountBridge.js +0 -34
  132. package/lib/bridge/generic-alpaca/accountBridge.js.map +0 -1
  133. package/lib/bridge/generic-alpaca/alpaca/index.d.ts +0 -3
  134. package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +0 -1
  135. package/lib/bridge/generic-alpaca/alpaca/index.js +0 -20
  136. package/lib/bridge/generic-alpaca/alpaca/index.js.map +0 -1
  137. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +0 -16
  138. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +0 -1
  139. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js +0 -123
  140. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +0 -1
  141. package/lib/bridge/generic-alpaca/broadcast.d.ts +0 -3
  142. package/lib/bridge/generic-alpaca/broadcast.d.ts.map +0 -1
  143. package/lib/bridge/generic-alpaca/broadcast.js +0 -11
  144. package/lib/bridge/generic-alpaca/broadcast.js.map +0 -1
  145. package/lib/bridge/generic-alpaca/createTransaction.d.ts +0 -16
  146. package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +0 -1
  147. package/lib/bridge/generic-alpaca/createTransaction.js +0 -20
  148. package/lib/bridge/generic-alpaca/createTransaction.js.map +0 -1
  149. package/lib/bridge/generic-alpaca/currencyBridge.d.ts +0 -3
  150. package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +0 -1
  151. package/lib/bridge/generic-alpaca/currencyBridge.js +0 -20
  152. package/lib/bridge/generic-alpaca/currencyBridge.js.map +0 -1
  153. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts +0 -3
  154. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +0 -1
  155. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +0 -26
  156. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +0 -1
  157. package/lib/bridge/generic-alpaca/getAccountShape.d.ts +0 -3
  158. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +0 -1
  159. package/lib/bridge/generic-alpaca/getAccountShape.js +0 -58
  160. package/lib/bridge/generic-alpaca/getAccountShape.js.map +0 -1
  161. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts +0 -3
  162. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +0 -1
  163. package/lib/bridge/generic-alpaca/getTransactionStatus.js +0 -36
  164. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +0 -1
  165. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts +0 -3
  166. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +0 -1
  167. package/lib/bridge/generic-alpaca/prepareTransaction.js +0 -21
  168. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +0 -1
  169. package/lib/bridge/generic-alpaca/signOperation.d.ts +0 -7
  170. package/lib/bridge/generic-alpaca/signOperation.d.ts.map +0 -1
  171. package/lib/bridge/generic-alpaca/signOperation.js +0 -49
  172. package/lib/bridge/generic-alpaca/signOperation.js.map +0 -1
  173. package/lib/bridge/generic-alpaca/signer/index.d.ts +0 -11
  174. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +0 -1
  175. package/lib/bridge/generic-alpaca/signer/index.js +0 -28
  176. package/lib/bridge/generic-alpaca/signer/index.js.map +0 -1
  177. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +0 -5
  178. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +0 -1
  179. package/lib/bridge/generic-alpaca/signer/signTransaction.js +0 -11
  180. package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +0 -1
  181. package/lib/bridge/generic-alpaca/signer/types.d.ts +0 -5
  182. package/lib/bridge/generic-alpaca/signer/types.d.ts.map +0 -1
  183. package/lib/bridge/generic-alpaca/signer/types.js +0 -3
  184. package/lib/bridge/generic-alpaca/signer/types.js.map +0 -1
  185. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.d.ts +0 -2
  186. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.d.ts.map +0 -1
  187. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +0 -90
  188. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +0 -1
  189. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.d.ts +0 -2
  190. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.d.ts.map +0 -1
  191. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +0 -53
  192. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +0 -1
  193. package/lib/bridge/generic-alpaca/tests/signOperation.test.d.ts +0 -2
  194. package/lib/bridge/generic-alpaca/tests/signOperation.test.d.ts.map +0 -1
  195. package/lib/bridge/generic-alpaca/tests/signOperation.test.js +0 -79
  196. package/lib/bridge/generic-alpaca/tests/signOperation.test.js.map +0 -1
  197. package/lib/bridge/generic-alpaca/utils.d.ts +0 -6
  198. package/lib/bridge/generic-alpaca/utils.d.ts.map +0 -1
  199. package/lib/bridge/generic-alpaca/utils.js +0 -55
  200. package/lib/bridge/generic-alpaca/utils.js.map +0 -1
  201. package/lib/hooks/useShowProviderLoadingTransition.d.ts +0 -9
  202. package/lib/hooks/useShowProviderLoadingTransition.d.ts.map +0 -1
  203. package/lib/hooks/useShowProviderLoadingTransition.js +0 -46
  204. package/lib/hooks/useShowProviderLoadingTransition.js.map +0 -1
  205. package/lib/hooks/useShowProviderLoadingTransition.test.d.ts +0 -5
  206. package/lib/hooks/useShowProviderLoadingTransition.test.d.ts.map +0 -1
  207. package/lib/hooks/useShowProviderLoadingTransition.test.js +0 -83
  208. package/lib/hooks/useShowProviderLoadingTransition.test.js.map +0 -1
  209. package/lib/sanction/errors.d.ts +0 -13
  210. package/lib/sanction/errors.d.ts.map +0 -1
  211. package/lib/sanction/errors.js +0 -36
  212. package/lib/sanction/errors.js.map +0 -1
  213. package/lib/sanction/index.d.ts +0 -3
  214. package/lib/sanction/index.d.ts.map +0 -1
  215. package/lib/sanction/index.js +0 -51
  216. package/lib/sanction/index.js.map +0 -1
  217. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +0 -3
  218. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +0 -1
  219. package/lib-es/bridge/generic-alpaca/accountBridge.js +0 -27
  220. package/lib-es/bridge/generic-alpaca/accountBridge.js.map +0 -1
  221. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts +0 -3
  222. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +0 -1
  223. package/lib-es/bridge/generic-alpaca/alpaca/index.js +0 -16
  224. package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +0 -1
  225. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +0 -16
  226. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +0 -1
  227. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js +0 -116
  228. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +0 -1
  229. package/lib-es/bridge/generic-alpaca/broadcast.d.ts +0 -3
  230. package/lib-es/bridge/generic-alpaca/broadcast.d.ts.map +0 -1
  231. package/lib-es/bridge/generic-alpaca/broadcast.js +0 -7
  232. package/lib-es/bridge/generic-alpaca/broadcast.js.map +0 -1
  233. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts +0 -16
  234. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +0 -1
  235. package/lib-es/bridge/generic-alpaca/createTransaction.js +0 -13
  236. package/lib-es/bridge/generic-alpaca/createTransaction.js.map +0 -1
  237. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts +0 -3
  238. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +0 -1
  239. package/lib-es/bridge/generic-alpaca/currencyBridge.js +0 -16
  240. package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +0 -1
  241. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts +0 -3
  242. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +0 -1
  243. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +0 -19
  244. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +0 -1
  245. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts +0 -3
  246. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +0 -1
  247. package/lib-es/bridge/generic-alpaca/getAccountShape.js +0 -51
  248. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +0 -1
  249. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts +0 -3
  250. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +0 -1
  251. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +0 -29
  252. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +0 -1
  253. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts +0 -3
  254. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +0 -1
  255. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +0 -14
  256. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +0 -1
  257. package/lib-es/bridge/generic-alpaca/signOperation.d.ts +0 -7
  258. package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +0 -1
  259. package/lib-es/bridge/generic-alpaca/signOperation.js +0 -45
  260. package/lib-es/bridge/generic-alpaca/signOperation.js.map +0 -1
  261. package/lib-es/bridge/generic-alpaca/signer/index.d.ts +0 -11
  262. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +0 -1
  263. package/lib-es/bridge/generic-alpaca/signer/index.js +0 -21
  264. package/lib-es/bridge/generic-alpaca/signer/index.js.map +0 -1
  265. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +0 -5
  266. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +0 -1
  267. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js +0 -7
  268. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +0 -1
  269. package/lib-es/bridge/generic-alpaca/signer/types.d.ts +0 -5
  270. package/lib-es/bridge/generic-alpaca/signer/types.d.ts.map +0 -1
  271. package/lib-es/bridge/generic-alpaca/signer/types.js +0 -2
  272. package/lib-es/bridge/generic-alpaca/signer/types.js.map +0 -1
  273. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.d.ts +0 -2
  274. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.d.ts.map +0 -1
  275. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +0 -62
  276. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +0 -1
  277. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.d.ts +0 -2
  278. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.d.ts.map +0 -1
  279. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +0 -48
  280. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +0 -1
  281. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.d.ts +0 -2
  282. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.d.ts.map +0 -1
  283. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js +0 -77
  284. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js.map +0 -1
  285. package/lib-es/bridge/generic-alpaca/utils.d.ts +0 -6
  286. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +0 -1
  287. package/lib-es/bridge/generic-alpaca/utils.js +0 -46
  288. package/lib-es/bridge/generic-alpaca/utils.js.map +0 -1
  289. package/lib-es/hooks/useShowProviderLoadingTransition.d.ts +0 -9
  290. package/lib-es/hooks/useShowProviderLoadingTransition.d.ts.map +0 -1
  291. package/lib-es/hooks/useShowProviderLoadingTransition.js +0 -41
  292. package/lib-es/hooks/useShowProviderLoadingTransition.js.map +0 -1
  293. package/lib-es/hooks/useShowProviderLoadingTransition.test.d.ts +0 -5
  294. package/lib-es/hooks/useShowProviderLoadingTransition.test.d.ts.map +0 -1
  295. package/lib-es/hooks/useShowProviderLoadingTransition.test.js +0 -81
  296. package/lib-es/hooks/useShowProviderLoadingTransition.test.js.map +0 -1
  297. package/lib-es/sanction/errors.d.ts +0 -13
  298. package/lib-es/sanction/errors.d.ts.map +0 -1
  299. package/lib-es/sanction/errors.js +0 -29
  300. package/lib-es/sanction/errors.js.map +0 -1
  301. package/lib-es/sanction/index.d.ts +0 -3
  302. package/lib-es/sanction/index.d.ts.map +0 -1
  303. package/lib-es/sanction/index.js +0 -44
  304. package/lib-es/sanction/index.js.map +0 -1
  305. package/src/bridge/generic-alpaca/accountBridge.ts +0 -32
  306. package/src/bridge/generic-alpaca/alpaca/index.ts +0 -20
  307. package/src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts +0 -182
  308. package/src/bridge/generic-alpaca/broadcast.ts +0 -11
  309. package/src/bridge/generic-alpaca/createTransaction.ts +0 -27
  310. package/src/bridge/generic-alpaca/currencyBridge.ts +0 -17
  311. package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +0 -27
  312. package/src/bridge/generic-alpaca/getAccountShape.ts +0 -62
  313. package/src/bridge/generic-alpaca/getTransactionStatus.ts +0 -38
  314. package/src/bridge/generic-alpaca/prepareTransaction.ts +0 -22
  315. package/src/bridge/generic-alpaca/signOperation.ts +0 -83
  316. package/src/bridge/generic-alpaca/signer/index.ts +0 -33
  317. package/src/bridge/generic-alpaca/signer/signTransaction.ts +0 -13
  318. package/src/bridge/generic-alpaca/signer/types.ts +0 -4
  319. package/src/bridge/generic-alpaca/tests/estimateMaxSpendable.test.ts +0 -76
  320. package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +0 -66
  321. package/src/bridge/generic-alpaca/tests/signOperation.test.ts +0 -96
  322. package/src/bridge/generic-alpaca/utils.ts +0 -63
  323. package/src/hooks/useShowProviderLoadingTransition.test.ts +0 -112
  324. package/src/hooks/useShowProviderLoadingTransition.ts +0 -57
  325. package/src/sanction/errors.ts +0 -31
  326. package/src/sanction/index.ts +0 -59
@@ -1,29 +1,11 @@
1
- import { isAddressSanctioned } from "../sanction";
2
1
  import { CurrencyNotSupported } from "@ledgerhq/errors";
3
- import { getEnv } from "@ledgerhq/live-env";
4
- import type { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
5
- import {
6
- Account,
7
- AccountBridge,
8
- AccountLike,
9
- CurrencyBridge,
10
- TransactionStatusCommon,
11
- } from "@ledgerhq/types-live";
12
2
  import { decodeAccountId, getMainAccount } from "../account";
3
+ import { getEnv } from "@ledgerhq/live-env";
13
4
  import { checkAccountSupported } from "../account/index";
14
5
  import jsBridges from "../generated/bridge/js";
15
6
  import mockBridges from "../generated/bridge/mock";
16
- import { RecipientAddressSanctionedError, UserAddressSanctionedError } from "../sanction/errors";
17
- import { getAlpacaCurrencyBridge } from "./generic-alpaca/currencyBridge";
18
- import { getAlpacaAccountBridge } from "./generic-alpaca/accountBridge";
19
- import { TransactionCommon } from "@ledgerhq/types-live";
20
-
21
- const alpacaized = {
22
- xrp: true,
23
- };
24
-
25
- let accountBridgeInstance: AccountBridge<any> | null = null;
26
- let currencyBridgeInstance: CurrencyBridge | null = null;
7
+ import type { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
8
+ import { Account, AccountBridge, AccountLike, CurrencyBridge } from "@ledgerhq/types-live";
27
9
 
28
10
  export const getCurrencyBridge = (currency: CryptoCurrency): CurrencyBridge => {
29
11
  if (getEnv("MOCK")) {
@@ -34,13 +16,6 @@ export const getCurrencyBridge = (currency: CryptoCurrency): CurrencyBridge => {
34
16
  });
35
17
  }
36
18
 
37
- if (alpacaized[currency.family]) {
38
- if (!currencyBridgeInstance) {
39
- currencyBridgeInstance = getAlpacaCurrencyBridge(currency.family, "local");
40
- }
41
- return currencyBridgeInstance;
42
- }
43
-
44
19
  const jsBridge = jsBridges[currency.family];
45
20
  if (jsBridge) {
46
21
  return jsBridge.currencyBridge;
@@ -82,66 +57,9 @@ export function getAccountBridgeByFamily(family: string, accountId?: string): Ac
82
57
  }
83
58
  }
84
59
 
85
- if (alpacaized[family]) {
86
- if (!accountBridgeInstance) {
87
- accountBridgeInstance = getAlpacaAccountBridge(family, "local");
88
- }
89
- return accountBridgeInstance;
90
- }
91
-
92
60
  const jsBridge = jsBridges[family];
93
61
  if (!jsBridge) {
94
- throw new CurrencyNotSupported("account currency bridge not found " + family);
62
+ throw new CurrencyNotSupported("currency bridge not found " + family);
95
63
  }
96
- return wrapAccountBridge(jsBridge.accountBridge);
97
- }
98
-
99
- function wrapAccountBridge<T extends TransactionCommon>(
100
- bridge: AccountBridge<T>,
101
- ): AccountBridge<T> {
102
- return {
103
- ...bridge,
104
- getTransactionStatus: async (...args) => {
105
- const blockchainSpecific = await bridge.getTransactionStatus(...args);
106
- const common = await commonGetTransactionStatus(...args);
107
- const merged = mergeResults(blockchainSpecific, common);
108
- return merged;
109
- },
110
- };
111
- }
112
-
113
- function mergeResults(
114
- blockchainSpecific: TransactionStatusCommon,
115
- common: Partial<TransactionStatusCommon>,
116
- ): TransactionStatusCommon {
117
- const errors = { ...blockchainSpecific.errors, ...common.errors };
118
- const warnings = { ...blockchainSpecific.warnings, ...common.warnings };
119
- return { ...blockchainSpecific, errors, warnings };
120
- }
121
-
122
- async function commonGetTransactionStatus(
123
- account: Account,
124
- transaction: TransactionCommon,
125
- ): Promise<Partial<TransactionStatusCommon>> {
126
- const errors: Record<string, Error> = {};
127
- const warnings: Record<string, Error> = {};
128
-
129
- let recipientIsBlacklisted = false;
130
- if (transaction.recipient && transaction.recipient !== "") {
131
- recipientIsBlacklisted = await isAddressSanctioned(account.currency, transaction.recipient);
132
- if (recipientIsBlacklisted) {
133
- errors.recipient = new RecipientAddressSanctionedError();
134
- }
135
- }
136
-
137
- const userIsBlacklisted = await isAddressSanctioned(account.currency, account.freshAddress);
138
- if (userIsBlacklisted) {
139
- errors.amount = new UserAddressSanctionedError();
140
- }
141
-
142
- if (userIsBlacklisted || recipientIsBlacklisted) {
143
- // Send log
144
- }
145
-
146
- return { errors, warnings };
64
+ return jsBridge.accountBridge;
147
65
  }
@@ -1,20 +1,11 @@
1
1
  import { CryptoCurrency, CryptoCurrencyId } from "@ledgerhq/types-cryptoassets";
2
2
  import { ConfigInfo, LiveConfig } from "@ledgerhq/live-config/LiveConfig";
3
- import { CurrencyConfig, SharedConfig } from "@ledgerhq/coin-framework/config";
3
+ import { CurrencyConfig } from "@ledgerhq/coin-framework/config";
4
4
 
5
5
  export type CurrencyLiveConfigDefinition = Partial<
6
6
  Record<`config_currency_${CryptoCurrencyId}`, ConfigInfo>
7
7
  >;
8
8
 
9
- const getSharedConfiguration = (): SharedConfig => {
10
- const config = LiveConfig.getValueByKey("config_currency");
11
- if (!config) {
12
- throw new Error("Configuration config_currency not found, please check Firebase Remote Config");
13
- }
14
-
15
- return config;
16
- };
17
-
18
9
  const getCurrencyConfiguration = <T extends CurrencyConfig>(
19
10
  currency: CryptoCurrency,
20
11
  ): T & Record<string, unknown> => {
@@ -26,4 +17,4 @@ const getCurrencyConfiguration = <T extends CurrencyConfig>(
26
17
  return currencyData;
27
18
  };
28
19
 
29
- export { getCurrencyConfiguration, getSharedConfiguration };
20
+ export { getCurrencyConfiguration };
@@ -36,13 +36,6 @@ const countervaluesConfig: ConfigSchema = {
36
36
  },
37
37
  };
38
38
 
39
- const sharedCurrencyConfig: ConfigSchema = {
40
- config_currency: {
41
- type: "object",
42
- default: {},
43
- },
44
- };
45
-
46
39
  const liveCommonConfig: ConfigSchema = {
47
40
  ...appConfig,
48
41
  };
@@ -74,5 +67,4 @@ export const liveConfig: ConfigSchema = {
74
67
  ...iconConfig,
75
68
  ...tonConfig,
76
69
  ...suiConfig,
77
- ...sharedCurrencyConfig,
78
70
  };
@@ -569,9 +569,6 @@ export async function expectValidAddressDevice(account: Account, addressDisplaye
569
569
  case Currency.ATOM:
570
570
  deviceLabels = [DeviceLabels.ADDRESS, DeviceLabels.CAPS_APPROVE, DeviceLabels.CAPS_REJECT];
571
571
  break;
572
- case Currency.BTC:
573
- deviceLabels = [DeviceLabels.ADDRESS, DeviceLabels.CONFIRM, DeviceLabels.CANCEL];
574
- break;
575
572
  default:
576
573
  deviceLabels = [DeviceLabels.ADDRESS, DeviceLabels.APPROVE, DeviceLabels.REJECT];
577
574
  break;
@@ -58,7 +58,7 @@ async function githubApiRequest<T = unknown>({
58
58
  }
59
59
  }
60
60
 
61
- function waitForSpeculosReady(url: string, { interval = 2000, timeout = 300_000 } = {}) {
61
+ function waitForSpeculosReady(url: string, { interval = 2000, timeout = 120_000 } = {}) {
62
62
  return new Promise((resolve, reject) => {
63
63
  const startTime = Date.now();
64
64
 
@@ -1,4 +1,19 @@
1
- import { fetchAndMergeProviderData } from "./swap";
1
+ import { fetchAndMergeProviderData, findExchangeCurrencyData } from "./swap";
2
+
3
+ describe("findExchangeCurrencyData", () => {
4
+ it("returns all data in expected format", async () => {
5
+ // When
6
+ const currencies = await findExchangeCurrencyData("arbitrum");
7
+
8
+ // Then
9
+ expect(currencies).toEqual({
10
+ config: "0345544808457468657265756d0d0345544812000000000000a4b1",
11
+ id: "arbitrum",
12
+ signature:
13
+ "30450221008ca557e4acc2fa290a6a44c2b0eb5232712ba69b23df93645a320bcff9789fd9022017e6e05582806a9d4b7b2aaaedbcc3471bd26e10ad686e4f313fc0b1068b5d64",
14
+ });
15
+ });
16
+ });
2
17
 
3
18
  describe("fetchAndMergeProviderData", () => {
4
19
  it("returns all data in expected format", async () => {
@@ -16,11 +31,6 @@ describe("fetchAndMergeProviderData", () => {
16
31
  mainUrl: "https://changelly.com/",
17
32
  name: "Changelly",
18
33
  needsKYC: false,
19
- usefulUrls: [
20
- "https://changelly.com/terms-of-use",
21
- "https://changelly.com/aml-kyc",
22
- "https://support.changelly.com/en/support/tickets/new",
23
- ],
24
34
  publicKey: {
25
35
  curve: "secp256k1",
26
36
  data: Buffer.from(
@@ -37,33 +47,6 @@ describe("fetchAndMergeProviderData", () => {
37
47
  type: "CEX",
38
48
  version: 1,
39
49
  },
40
- changelly_v2: {
41
- displayName: "Changelly",
42
- name: "Changelly",
43
- useInExchangeApp: true,
44
- publicKey: {
45
- curve: "secp256k1",
46
- data: Buffer.from(
47
- "0480d7c0d3a9183597395f58dda05999328da6f18fabd5cda0aff8e8e3fc633436a2dbf48ecb23d40df7c3c7d3e774b77b4b5df0e9f7e08cf1cdf2dba788eb085b",
48
- "hex",
49
- ),
50
- },
51
- signature: Buffer.from(
52
- "3045022100c2db00da651cfcc84702f75ab5f131a3f037592080ea750a6f665a8cb36797c802200e594938cdf2c836b34717f57487002a0588f2088f64f00a6c4d320fd37db6fa",
53
- "hex",
54
- ),
55
- needsKYC: false,
56
- type: "CEX",
57
- usefulUrls: [
58
- "https://changelly.com/terms-of-use",
59
- "https://changelly.com/aml-kyc",
60
- "https://support.changelly.com/en/support/tickets/new",
61
- ],
62
- termsOfUseUrl: "https://changelly.com/terms-of-use",
63
- supportUrl: "https://support.changelly.com/en/support/home",
64
- mainUrl: "https://changelly.com/",
65
- version: 2,
66
- },
67
50
  changenow: {
68
51
  name: "ChangeNOW",
69
52
  publicKey: {
@@ -15,7 +15,6 @@ export type AdditionalProviderConfig = SwapProviderConfig & { type: "DEX" | "CEX
15
15
  version?: number;
16
16
  termsOfUseUrl: string;
17
17
  supportUrl: string;
18
- usefulUrls?: string[];
19
18
  mainUrl: string;
20
19
  useInExchangeApp: boolean;
21
20
  displayName: string;
@@ -40,41 +39,10 @@ const DEFAULT_SWAP_PROVIDERS: Record<string, ProviderConfig & Partial<Additional
40
39
  needsKYC: false,
41
40
  needsBearerToken: false,
42
41
  type: "CEX",
43
- usefulUrls: [
44
- "https://changelly.com/terms-of-use",
45
- "https://changelly.com/aml-kyc",
46
- "https://support.changelly.com/en/support/tickets/new",
47
- ],
48
42
  termsOfUseUrl: "https://changelly.com/terms-of-use",
49
43
  supportUrl: "https://support.changelly.com/en/support/home",
50
44
  mainUrl: "https://changelly.com/",
51
45
  },
52
- changelly_v2: {
53
- name: "Changelly",
54
- publicKey: {
55
- curve: "secp256k1",
56
- data: Buffer.from(
57
- "0480d7c0d3a9183597395f58dda05999328da6f18fabd5cda0aff8e8e3fc633436a2dbf48ecb23d40df7c3c7d3e774b77b4b5df0e9f7e08cf1cdf2dba788eb085b",
58
- "hex",
59
- ),
60
- },
61
- signature: Buffer.from(
62
- "3045022100c2db00da651cfcc84702f75ab5f131a3f037592080ea750a6f665a8cb36797c802200e594938cdf2c836b34717f57487002a0588f2088f64f00a6c4d320fd37db6fa",
63
- "hex",
64
- ),
65
- needsKYC: false,
66
- needsBearerToken: false,
67
- type: "CEX",
68
- usefulUrls: [
69
- "https://changelly.com/terms-of-use",
70
- "https://changelly.com/aml-kyc",
71
- "https://support.changelly.com/en/support/tickets/new",
72
- ],
73
- termsOfUseUrl: "https://changelly.com/terms-of-use",
74
- supportUrl: "https://support.changelly.com/en/support/home",
75
- mainUrl: "https://changelly.com/",
76
- version: 2,
77
- },
78
46
  exodus: {
79
47
  name: "exodus",
80
48
  publicKey: {
@@ -104,7 +104,7 @@ const evmConfig: CurrencyLiveConfigDefinition = {
104
104
  type: "ledger",
105
105
  explorerId: "eth",
106
106
  },
107
- showNfts: false,
107
+ showNfts: true,
108
108
  },
109
109
  },
110
110
  config_currency_sonic: {
@@ -266,7 +266,7 @@ const evmConfig: CurrencyLiveConfigDefinition = {
266
266
  type: "ledger",
267
267
  explorerId: "matic",
268
268
  },
269
- showNfts: false,
269
+ showNfts: true,
270
270
  },
271
271
  },
272
272
  config_currency_reosc: {
@@ -1,18 +1,31 @@
1
1
  // Goal of this file is to inject all necessary device/signer dependency to coin-modules
2
2
 
3
3
  import Xrp from "@ledgerhq/hw-app-xrp";
4
+ import { Bridge } from "@ledgerhq/types-live";
4
5
  import Transport from "@ledgerhq/hw-transport";
6
+ import { createBridges, type XrpCoinConfig } from "@ledgerhq/coin-xrp";
5
7
  import xrpResolver from "@ledgerhq/coin-xrp/signer/index";
6
8
  import makeCliTools from "@ledgerhq/coin-xrp/test/cli";
7
- import { CreateSigner, createResolver } from "../../bridge/setup";
9
+ import { Transaction as XrpTransaction } from "@ledgerhq/coin-xrp/types";
10
+ import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
11
+ import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup";
12
+ import { getCurrencyConfiguration } from "../../config";
8
13
  import { Resolver } from "../../hw/getAddress/types";
9
14
 
10
15
  const createSigner: CreateSigner<Xrp> = (transport: Transport) => {
11
16
  return new Xrp(transport);
12
17
  };
13
18
 
19
+ const getCoinConfig = () =>
20
+ getCurrencyConfiguration<XrpCoinConfig>(getCryptoCurrencyById("ripple"));
21
+
22
+ const bridge: Bridge<XrpTransaction> = createBridges(
23
+ executeWithSigner(createSigner),
24
+ getCoinConfig,
25
+ );
26
+
14
27
  const resolver: Resolver = createResolver(createSigner, xrpResolver);
15
28
 
16
29
  const cliTools = makeCliTools();
17
30
 
18
- export { cliTools, resolver };
31
+ export { bridge, cliTools, resolver };
@@ -396,13 +396,6 @@ export const DEFAULT_FEATURES: Features = {
396
396
  },
397
397
  },
398
398
 
399
- buySellLoader: {
400
- enabled: false,
401
- params: {
402
- durationMs: 0,
403
- },
404
- },
405
-
406
399
  buySellShortcut: {
407
400
  enabled: false,
408
401
  },
@@ -429,10 +422,6 @@ export const DEFAULT_FEATURES: Features = {
429
422
  },
430
423
  },
431
424
 
432
- ptxSwapLiveAppKycWarning: {
433
- enabled: false,
434
- },
435
-
436
425
  llmAnalyticsOptInPrompt: {
437
426
  enabled: false,
438
427
  params: {
@@ -616,7 +605,6 @@ export const DEFAULT_FEATURES: Features = {
616
605
  live_app: true,
617
606
  receive_flow: true,
618
607
  send_flow: true,
619
- enableModularization: false,
620
608
  },
621
609
  },
622
610
  llNftSupport: DEFAULT_FEATURE,
@@ -20,6 +20,7 @@ import { bridge as tezos } from "../../families/tezos/setup";
20
20
  import { bridge as ton } from "../../families/ton/setup";
21
21
  import { bridge as tron } from "../../families/tron/setup";
22
22
  import { bridge as vechain } from "../../families/vechain/setup";
23
+ import { bridge as xrp } from "../../families/xrp/setup";
23
24
  import { bridge as sui } from "../../families/sui/setup";
24
25
  import { bridge as mina } from "../../families/mina/setup";
25
26
 
@@ -46,6 +47,7 @@ export default {
46
47
  ton,
47
48
  tron,
48
49
  vechain,
50
+ xrp,
49
51
  sui,
50
52
  mina,
51
53
  };
@@ -20,7 +20,7 @@ export const useOFACGeoBlockCheck = ({
20
20
  queryKey: ["ofac-geo-block", geoBlockingFeatureFlagKey],
21
21
  queryFn: async () => {
22
22
  if (!platformOfacGeoBlocking?.enabled) return false;
23
- const res = await fetch(`${baseURL()}/v3/markets`);
23
+ const res = await fetch(`${baseURL()}/v3/market`);
24
24
  return res.status === 451;
25
25
  },
26
26
  });
@@ -11,9 +11,9 @@ import type {
11
11
  } from "@ledgerhq/device-management-kit";
12
12
  import {
13
13
  DeviceActionStatus,
14
+ DeviceDisconnectedWhileSendingError,
14
15
  DeviceLockedError,
15
16
  DeviceSessionStateType,
16
- DeviceStatus,
17
17
  UserInteractionRequired,
18
18
  OutOfMemoryDAError,
19
19
  SecureChannelError,
@@ -96,9 +96,7 @@ export class ConnectAppEventMapper {
96
96
  return;
97
97
  }
98
98
 
99
- if (deviceState.deviceStatus === DeviceStatus.NOT_CONNECTED) {
100
- this.eventSubject.next({ type: "disconnected", expected: false });
101
- } else if (
99
+ if (
102
100
  deviceState.firmwareVersion?.metadata &&
103
101
  deviceState.firmwareUpdateContext &&
104
102
  !this.lastSeenDeviceSent
@@ -259,6 +257,8 @@ export class ConnectAppEventMapper {
259
257
  this.eventSubject.complete();
260
258
  } else if (error instanceof SecureChannelError) {
261
259
  this.eventSubject.error(new UserRefusedAllowManager());
260
+ } else if (error instanceof DeviceDisconnectedWhileSendingError) {
261
+ this.eventSubject.next({ type: "disconnected", expected: false });
262
262
  } else if ("_tag" in error && error._tag === "WebHidSendReportError") {
263
263
  this.eventSubject.next({ type: "disconnected", expected: false });
264
264
  this.eventSubject.complete();
@@ -65,8 +65,6 @@ export type CompleteExchangeUiRequest = {
65
65
  swapId?: string;
66
66
  amountExpectedTo?: number;
67
67
  magnitudeAwareRate?: BigNumber;
68
- refundAddress?: string;
69
- payoutAddress?: string;
70
68
  };
71
69
 
72
70
  type ExchangeStartParamsUiRequest =
@@ -288,15 +286,11 @@ export const handlers = ({
288
286
 
289
287
  let amountExpectedTo;
290
288
  let magnitudeAwareRate;
291
- let refundAddress;
292
- let payoutAddress;
293
289
  if (params.exchangeType === "SWAP") {
294
290
  // Get amountExpectedTo and magnitudeAwareRate from binary payload
295
291
  const decodePayload = await decodeSwapPayload(params.hexBinaryPayload);
296
292
  amountExpectedTo = new BigNumber(decodePayload.amountToWallet.toString());
297
293
  magnitudeAwareRate = tx.amount && amountExpectedTo.dividedBy(tx.amount);
298
- refundAddress = decodePayload.refundAddress;
299
- payoutAddress = decodePayload.payoutAddress;
300
294
  }
301
295
 
302
296
  return new Promise((resolve, reject) =>
@@ -312,8 +306,6 @@ export const handlers = ({
312
306
  swapId: params.exchangeType === "SWAP" ? params.swapId : undefined,
313
307
  amountExpectedTo,
314
308
  magnitudeAwareRate,
315
- refundAddress,
316
- payoutAddress,
317
309
  },
318
310
  onSuccess: (transactionHash: string) => {
319
311
  tracking.completeExchangeSuccess({
@@ -12,15 +12,11 @@ export type ModularDrawerConfiguration = {
12
12
  };
13
13
  };
14
14
 
15
- export const filterOptions = ["topNetworks", "undefined"] as const;
16
- export const assetsLeftElementOptions = ["apy", "priceVariation", "undefined"] as const;
17
- export const assetsRightElementOptions = ["balance", "marketTrend", "undefined"] as const;
18
- export const networksLeftElementOptions = [
19
- "numberOfAccounts",
20
- "numberOfAccountsAndApy",
21
- "undefined",
22
- ] as const;
23
- export const networksRightElementOptions = ["balance", "undefined"] as const;
15
+ const filterOptions = ["topNetworks"] as const;
16
+ const assetsLeftElementOptions = ["apy", "priceVariation"] as const;
17
+ const assetsRightElementOptions = ["balance", "marketTrend"] as const;
18
+ const networksLeftElementOptions = ["numberOfAccounts", "numberOfAccountsAndApy"] as const;
19
+ const networksRightElementOptions = ["balance"] as const;
24
20
 
25
21
  export const EnhancedModularDrawerConfigurationSchema = z.object({
26
22
  assets: z
@@ -19,7 +19,7 @@ export function validateAndTransformConfigurationWithZod(
19
19
  const result = EnhancedModularDrawerConfigurationSchema.safeParse(config);
20
20
 
21
21
  if (!result.success) {
22
- console.warn("Modular Drawer invalid configuration received:", result.error);
22
+ console.warn("Modulare Drawer invalid configuration received:", result.error);
23
23
  return {};
24
24
  }
25
25
 
@@ -1,3 +0,0 @@
1
- import { AccountBridge } from "@ledgerhq/types-live";
2
- export declare function getAlpacaAccountBridge(network: string, kind: string): AccountBridge<any>;
3
- //# sourceMappingURL=accountBridge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accountBridge.d.ts","sourceRoot":"","sources":["../../../src/bridge/generic-alpaca/accountBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAiBrD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAcxF"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getAlpacaAccountBridge = void 0;
7
- const jsHelpers_1 = require("../jsHelpers");
8
- const getAccountShape_1 = require("./getAccountShape");
9
- const jsHelpers_2 = require("@ledgerhq/coin-framework/bridge/jsHelpers");
10
- const getAddressWrapper_1 = __importDefault(require("@ledgerhq/coin-framework/bridge/getAddressWrapper"));
11
- const signer_1 = require("./signer");
12
- const prepareTransaction_1 = require("./prepareTransaction");
13
- const getTransactionStatus_1 = require("./getTransactionStatus");
14
- const estimateMaxSpendable_1 = require("./estimateMaxSpendable");
15
- const createTransaction_1 = require("./createTransaction");
16
- const broadcast_1 = require("./broadcast");
17
- const signOperation_1 = require("./signOperation");
18
- function getAlpacaAccountBridge(network, kind) {
19
- const signer = (0, signer_1.getSigner)(network);
20
- return {
21
- sync: (0, jsHelpers_1.makeSync)({ getAccountShape: (0, getAccountShape_1.genericGetAccountShape)(network, kind) }),
22
- receive: (0, jsHelpers_2.makeAccountBridgeReceive)((0, getAddressWrapper_1.default)(signer.getAddress)),
23
- createTransaction: createTransaction_1.createTransaction,
24
- updateTransaction: (jsHelpers_2.updateTransaction),
25
- prepareTransaction: (0, prepareTransaction_1.genericPrepareTransaction)(network, kind),
26
- getTransactionStatus: (0, getTransactionStatus_1.genericGetTransactionStatus)(network, kind),
27
- estimateMaxSpendable: (0, estimateMaxSpendable_1.genericEstimateMaxSpendable)(network, kind),
28
- broadcast: (0, broadcast_1.genericBroadcast)(network, kind),
29
- signOperation: (0, signOperation_1.genericSignOperation)(network, kind)(signer.context),
30
- getSerializedAddressParameters: jsHelpers_2.getSerializedAddressParameters, // NOTE: check wether it should be exposed by coin-module's api instead?
31
- };
32
- }
33
- exports.getAlpacaAccountBridge = getAlpacaAccountBridge;
34
- //# sourceMappingURL=accountBridge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accountBridge.js","sourceRoot":"","sources":["../../../src/bridge/generic-alpaca/accountBridge.ts"],"names":[],"mappings":";;;;;;AACA,4CAAwC;AACxC,uDAA2D;AAC3D,yEAImD;AACnD,0GAAkF;AAClF,qCAAqC;AACrC,6DAAiE;AACjE,iEAAqE;AACrE,iEAAqE;AACrE,2DAAwD;AACxD,2CAA+C;AAC/C,mDAAuD;AAEvD,SAAgB,sBAAsB,CAAC,OAAe,EAAE,IAAY;IAClE,MAAM,MAAM,GAAG,IAAA,kBAAS,EAAC,OAAO,CAAC,CAAC;IAClC,OAAO;QACL,IAAI,EAAE,IAAA,oBAAQ,EAAC,EAAE,eAAe,EAAE,IAAA,wCAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;QAC1E,OAAO,EAAE,IAAA,oCAAwB,EAAC,IAAA,2BAAiB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACvE,iBAAiB,EAAE,qCAAiB;QACpC,iBAAiB,EAAE,CAAA,6BAAsB,CAAA;QACzC,kBAAkB,EAAE,IAAA,8CAAyB,EAAC,OAAO,EAAE,IAAI,CAAC;QAC5D,oBAAoB,EAAE,IAAA,kDAA2B,EAAC,OAAO,EAAE,IAAI,CAAC;QAChE,oBAAoB,EAAE,IAAA,kDAA2B,EAAC,OAAO,EAAE,IAAI,CAAC;QAChE,SAAS,EAAE,IAAA,4BAAgB,EAAC,OAAO,EAAE,IAAI,CAAC;QAC1C,aAAa,EAAE,IAAA,oCAAoB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;QAClE,8BAA8B,EAA9B,0CAA8B,EAAE,wEAAwE;KAC7C,CAAC;AAChE,CAAC;AAdD,wDAcC"}
@@ -1,3 +0,0 @@
1
- import { Api } from "@ledgerhq/coin-framework/api/types";
2
- export declare function getAlpacaApi(network: string, kind: "local" | "remote"): Api<any, any>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bridge/generic-alpaca/alpaca/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAGzD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAYrF"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAlpacaApi = void 0;
4
- const index_1 = require("@ledgerhq/coin-xrp/api/index");
5
- const config_1 = require("../../../config");
6
- const currencies_1 = require("@ledgerhq/cryptoassets/currencies");
7
- const network_alpaca_1 = require("./network/network-alpaca");
8
- function getAlpacaApi(network, kind) {
9
- if (kind === "local") {
10
- switch (network) {
11
- case "ripple":
12
- case "xrp":
13
- return (0, index_1.createApi)((0, config_1.getCurrencyConfiguration)((0, currencies_1.getCryptoCurrencyById)("ripple")));
14
- // as unknown as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
15
- }
16
- }
17
- return (0, network_alpaca_1.getNetworkAlpacaApi)(network);
18
- }
19
- exports.getAlpacaApi = getAlpacaApi;
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bridge/generic-alpaca/alpaca/index.ts"],"names":[],"mappings":";;;AAAA,wDAAyE;AACzE,4CAA2D;AAC3D,kEAA0E;AAC1E,6DAA+D;AAI/D,SAAgB,YAAY,CAAC,OAAe,EAAE,IAAwB;IACpE,IAAI,IAAI,KAAK,OAAO,EAAE;QACpB,QAAQ,OAAO,EAAE;YACf,KAAK,QAAQ,CAAC;YACd,KAAK,KAAK;gBACR,OAAO,IAAA,iBAAY,EACjB,IAAA,iCAAwB,EAAgB,IAAA,kCAAqB,EAAC,QAAQ,CAAC,CAAC,CACxD,CAAC;YACrB,mHAAmH;SACpH;KACF;IACD,OAAO,IAAA,oCAAmB,EAAC,OAAO,CAAmD,CAAC;AACxF,CAAC;AAZD,oCAYC"}
@@ -1,16 +0,0 @@
1
- import type { Account, Balance, BlockInfo, Operation, FeeEstimation, Pagination, TransactionIntent, Transaction, TransactionValidation } from "@ledgerhq/coin-framework/api/index";
2
- type AssetInfo = {
3
- type: "native";
4
- };
5
- export declare const getNetworkAlpacaApi: (networkFamily: string) => {
6
- broadcast: (signedOperation: string) => Promise<string>;
7
- combine: (tx: string, signature: string, pubKey?: string) => Promise<string>;
8
- validateIntent: (account: Account, transaction: Transaction) => Promise<TransactionValidation>;
9
- estimateFees: (intent: TransactionIntent<any>) => Promise<FeeEstimation>;
10
- getBalance: (address: string) => Promise<Balance<AssetInfo>[]>;
11
- listOperations: (address: string, pagination: Pagination) => Promise<[Operation<any>[], string]>;
12
- lastBlock: () => Promise<BlockInfo>;
13
- craftTransaction: (intent: TransactionIntent<any>) => Promise<string>;
14
- };
15
- export {};
16
- //# sourceMappingURL=network-alpaca.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"network-alpaca.d.ts","sourceRoot":"","sources":["../../../../../src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EACP,OAAO,EACP,SAAS,EACT,SAAS,EACT,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,qBAAqB,EAEtB,MAAM,oCAAoC,CAAC;AAiG5C,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AA4DF,eAAO,MAAM,mBAAmB,kBAAmB,MAAM;iCA9Ib,MAAM,KAAG,QAAQ,MAAM,CAAC;kBAmBvC,MAAM,aAAa,MAAM,WAAW,MAAM,KAAG,QAAQ,MAAM,CAAC;8BAqC5E,OAAO,eACH,WAAW,KACvB,QAAQ,qBAAqB,CAAC;2BApBG,kBAAkB,GAAG,CAAC,KAAG,QAAQ,aAAa,CAAC;0BA+ChD,MAAM,KAAG,QAAQ,QAAQ,SAAS,CAAC,EAAE,CAAC;8BAgB9D,MAAM,cACH,UAAU,KACrB,QAAQ,CAAC,UAAU,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;qBAYV,QAAQ,SAAS,CAAC;+BAaN,kBAAkB,GAAG,CAAC,KAAG,QAAQ,MAAM,CAAC;CAwB3D,CAAC"}