@ledgerhq/live-common 21.29.0 → 21.32.0-hotfix.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 (428) hide show
  1. package/lib/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.js +1 -0
  2. package/lib/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.js.map +1 -1
  3. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.getAddress.d.ts +2 -0
  4. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.getAddress.d.ts.map +1 -0
  5. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.getAddress.js +126 -0
  6. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.getAddress.js.map +1 -0
  7. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.js +0 -10
  8. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.js.map +1 -1
  9. package/lib/__tests__/test-helpers/bridge.js +1 -1
  10. package/lib/__tests__/test-helpers/bridge.js.map +1 -1
  11. package/lib/__tests__/test-helpers/setup.js +1 -0
  12. package/lib/__tests__/test-helpers/setup.js.map +1 -1
  13. package/lib/account/support.d.ts.map +1 -1
  14. package/lib/account/support.js.map +1 -1
  15. package/lib/api/Ethereum.d.ts.map +1 -1
  16. package/lib/api/Ethereum.js +1 -0
  17. package/lib/api/Ethereum.js.map +1 -1
  18. package/lib/apps/hw.d.ts.map +1 -1
  19. package/lib/apps/hw.js +8 -3
  20. package/lib/apps/hw.js.map +1 -1
  21. package/lib/apps/logic.d.ts.map +1 -1
  22. package/lib/apps/logic.js +7 -5
  23. package/lib/apps/logic.js.map +1 -1
  24. package/lib/apps/polyfill.d.ts.map +1 -1
  25. package/lib/apps/polyfill.js +1 -0
  26. package/lib/apps/polyfill.js.map +1 -1
  27. package/lib/bot/engine.d.ts.map +1 -1
  28. package/lib/bot/engine.js +4 -1
  29. package/lib/bot/engine.js.map +1 -1
  30. package/lib/bridge/jsHelpers.js +1 -1
  31. package/lib/data/icons/react/celo.d.ts +8 -0
  32. package/lib/data/icons/react/celo.d.ts.map +1 -0
  33. package/lib/data/icons/react/celo.js +32 -0
  34. package/lib/data/icons/react/celo.js.map +1 -0
  35. package/lib/data/icons/react/index.d.ts +1 -0
  36. package/lib/data/icons/react/index.d.ts.map +1 -1
  37. package/lib/data/icons/react/index.js +11 -8
  38. package/lib/data/icons/react/index.js.map +1 -1
  39. package/lib/data/icons/reactNative/celo.d.ts +8 -0
  40. package/lib/data/icons/reactNative/celo.d.ts.map +1 -0
  41. package/lib/data/icons/reactNative/celo.js +33 -0
  42. package/lib/data/icons/reactNative/celo.js.map +1 -0
  43. package/lib/data/icons/reactNative/index.d.ts +1 -0
  44. package/lib/data/icons/reactNative/index.d.ts.map +1 -1
  45. package/lib/data/icons/reactNative/index.js +11 -8
  46. package/lib/data/icons/reactNative/index.js.map +1 -1
  47. package/lib/env.d.ts +25 -5
  48. package/lib/env.d.ts.map +1 -1
  49. package/lib/env.js +20 -0
  50. package/lib/env.js.map +1 -1
  51. package/lib/env.react.d.ts +1 -1
  52. package/lib/env.react.d.ts.map +1 -1
  53. package/lib/errors.d.ts +3 -0
  54. package/lib/errors.d.ts.map +1 -1
  55. package/lib/errors.js +3 -2
  56. package/lib/errors.js.map +1 -1
  57. package/lib/exchange/platform/transfer/index.d.ts.map +1 -1
  58. package/lib/exchange/platform/transfer/index.js +15 -1
  59. package/lib/exchange/platform/transfer/index.js.map +1 -1
  60. package/lib/families/algorand/buildTransaction.d.ts +2 -2
  61. package/lib/families/algorand/buildTransaction.d.ts.map +1 -1
  62. package/lib/families/algorand/buildTransaction.js +13 -19
  63. package/lib/families/algorand/buildTransaction.js.map +1 -1
  64. package/lib/families/algorand/js-getFeesForTransaction.js +4 -6
  65. package/lib/families/algorand/js-getFeesForTransaction.js.map +1 -1
  66. package/lib/families/algorand/js-signOperation.js +3 -7
  67. package/lib/families/algorand/js-signOperation.js.map +1 -1
  68. package/lib/families/algorand/js-synchronization.d.ts.map +1 -1
  69. package/lib/families/algorand/js-synchronization.js +1 -0
  70. package/lib/families/algorand/js-synchronization.js.map +1 -1
  71. package/lib/families/bitcoin/js-signOperation.d.ts.map +1 -1
  72. package/lib/families/bitcoin/js-signOperation.js +3 -5
  73. package/lib/families/bitcoin/js-signOperation.js.map +1 -1
  74. package/lib/families/bitcoin/js-synchronisation.js +4 -4
  75. package/lib/families/bitcoin/js-synchronisation.js.map +1 -1
  76. package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts +4 -3
  77. package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts.map +1 -1
  78. package/lib/families/bitcoin/wallet-btc/crypto/base.js +8 -7
  79. package/lib/families/bitcoin/wallet-btc/crypto/base.js.map +1 -1
  80. package/lib/families/bitcoin/wallet-btc/crypto/bip32.js +2 -2
  81. package/lib/families/bitcoin/wallet-btc/crypto/bip32.js.map +1 -1
  82. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.d.ts +1 -1
  83. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.d.ts.map +1 -1
  84. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js +3 -7
  85. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js.map +1 -1
  86. package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.d.ts +3 -4
  87. package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.d.ts.map +1 -1
  88. package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js +27 -53
  89. package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js.map +1 -1
  90. package/lib/families/bitcoin/wallet-btc/crypto/decred.d.ts +1 -1
  91. package/lib/families/bitcoin/wallet-btc/crypto/decred.d.ts.map +1 -1
  92. package/lib/families/bitcoin/wallet-btc/crypto/decred.js +2 -7
  93. package/lib/families/bitcoin/wallet-btc/crypto/decred.js.map +1 -1
  94. package/lib/families/bitcoin/wallet-btc/crypto/litecoin.d.ts +1 -6
  95. package/lib/families/bitcoin/wallet-btc/crypto/litecoin.d.ts.map +1 -1
  96. package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js +0 -51
  97. package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js.map +1 -1
  98. package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts +1 -0
  99. package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts.map +1 -1
  100. package/lib/families/bitcoin/wallet-btc/crypto/zec.d.ts +5 -6
  101. package/lib/families/bitcoin/wallet-btc/crypto/zec.d.ts.map +1 -1
  102. package/lib/families/bitcoin/wallet-btc/crypto/zec.js +63 -33
  103. package/lib/families/bitcoin/wallet-btc/crypto/zec.js.map +1 -1
  104. package/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts +3 -5
  105. package/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts.map +1 -1
  106. package/lib/families/bitcoin/wallet-btc/crypto/zen.js +77 -46
  107. package/lib/families/bitcoin/wallet-btc/crypto/zen.js.map +1 -1
  108. package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts.map +1 -1
  109. package/lib/families/bitcoin/wallet-btc/explorer/index.js +20 -0
  110. package/lib/families/bitcoin/wallet-btc/explorer/index.js.map +1 -1
  111. package/lib/families/bitcoin/wallet-btc/storage/types.d.ts +0 -1
  112. package/lib/families/bitcoin/wallet-btc/storage/types.d.ts.map +1 -1
  113. package/lib/families/celo/api/hubble.d.ts +8 -0
  114. package/lib/families/celo/api/hubble.d.ts.map +1 -0
  115. package/lib/families/celo/api/hubble.js +144 -0
  116. package/lib/families/celo/api/hubble.js.map +1 -0
  117. package/lib/families/celo/api/index.d.ts +2 -0
  118. package/lib/families/celo/api/index.d.ts.map +1 -0
  119. package/lib/families/celo/api/index.js +13 -0
  120. package/lib/families/celo/api/index.js.map +1 -0
  121. package/lib/families/celo/api/sdk.d.ts +3 -0
  122. package/lib/families/celo/api/sdk.d.ts.map +1 -0
  123. package/lib/families/celo/api/sdk.js +13 -0
  124. package/lib/families/celo/api/sdk.js.map +1 -0
  125. package/lib/families/celo/bridge/js.d.ts +8 -0
  126. package/lib/families/celo/bridge/js.d.ts.map +1 -0
  127. package/lib/families/celo/bridge/js.js +87 -0
  128. package/lib/families/celo/bridge/js.js.map +1 -0
  129. package/lib/families/celo/cli-transaction.d.ts +14 -0
  130. package/lib/families/celo/cli-transaction.d.ts.map +1 -0
  131. package/lib/families/celo/cli-transaction.js +37 -0
  132. package/lib/families/celo/cli-transaction.js.map +1 -0
  133. package/lib/families/celo/datasets/celo.scanAccounts.1.d.ts +5 -0
  134. package/lib/families/celo/datasets/celo.scanAccounts.1.d.ts.map +1 -0
  135. package/lib/families/celo/datasets/celo.scanAccounts.1.js +12 -0
  136. package/lib/families/celo/datasets/celo.scanAccounts.1.js.map +1 -0
  137. package/lib/families/celo/deviceTransactionConfig.d.ts +4 -0
  138. package/lib/families/celo/deviceTransactionConfig.d.ts.map +1 -0
  139. package/lib/families/celo/deviceTransactionConfig.js +16 -0
  140. package/lib/families/celo/deviceTransactionConfig.js.map +1 -0
  141. package/lib/families/celo/hw-app-celo.d.ts +19 -0
  142. package/lib/families/celo/hw-app-celo.d.ts.map +1 -0
  143. package/lib/families/celo/hw-app-celo.js +147 -0
  144. package/lib/families/celo/hw-app-celo.js.map +1 -0
  145. package/lib/families/celo/hw-getAddress.d.ts +2 -0
  146. package/lib/families/celo/hw-getAddress.d.ts.map +1 -0
  147. package/lib/families/celo/hw-getAddress.js +13 -0
  148. package/lib/families/celo/hw-getAddress.js.map +1 -0
  149. package/lib/families/celo/js-broadcast.d.ts +8 -0
  150. package/lib/families/celo/js-broadcast.d.ts.map +1 -0
  151. package/lib/families/celo/js-broadcast.js +58 -0
  152. package/lib/families/celo/js-broadcast.js.map +1 -0
  153. package/lib/families/celo/js-buildTransaction.d.ts +6 -0
  154. package/lib/families/celo/js-buildTransaction.d.ts.map +1 -0
  155. package/lib/families/celo/js-buildTransaction.js +89 -0
  156. package/lib/families/celo/js-buildTransaction.js.map +1 -0
  157. package/lib/families/celo/js-createTransaction.d.ts +4 -0
  158. package/lib/families/celo/js-createTransaction.d.ts.map +1 -0
  159. package/lib/families/celo/js-createTransaction.js +12 -0
  160. package/lib/families/celo/js-createTransaction.js.map +1 -0
  161. package/lib/families/celo/js-estimateMaxSpendable.d.ts +10 -0
  162. package/lib/families/celo/js-estimateMaxSpendable.d.ts.map +1 -0
  163. package/lib/families/celo/js-estimateMaxSpendable.js +77 -0
  164. package/lib/families/celo/js-estimateMaxSpendable.js.map +1 -0
  165. package/lib/families/celo/js-getFeesForTransaction.d.ts +8 -0
  166. package/lib/families/celo/js-getFeesForTransaction.d.ts.map +1 -0
  167. package/lib/families/celo/js-getFeesForTransaction.js +76 -0
  168. package/lib/families/celo/js-getFeesForTransaction.js.map +1 -0
  169. package/lib/families/celo/js-getTransactionStatus.d.ts +5 -0
  170. package/lib/families/celo/js-getTransactionStatus.d.ts.map +1 -0
  171. package/lib/families/celo/js-getTransactionStatus.js +86 -0
  172. package/lib/families/celo/js-getTransactionStatus.js.map +1 -0
  173. package/lib/families/celo/js-prepareTransaction.d.ts +5 -0
  174. package/lib/families/celo/js-prepareTransaction.d.ts.map +1 -0
  175. package/lib/families/celo/js-prepareTransaction.js +76 -0
  176. package/lib/families/celo/js-prepareTransaction.js.map +1 -0
  177. package/lib/families/celo/js-signOperation.d.ts +13 -0
  178. package/lib/families/celo/js-signOperation.d.ts.map +1 -0
  179. package/lib/families/celo/js-signOperation.js +150 -0
  180. package/lib/families/celo/js-signOperation.js.map +1 -0
  181. package/lib/families/celo/js-synchronisation.d.ts +10 -0
  182. package/lib/families/celo/js-synchronisation.d.ts.map +1 -0
  183. package/lib/families/celo/js-synchronisation.js +88 -0
  184. package/lib/families/celo/js-synchronisation.js.map +1 -0
  185. package/lib/families/celo/specs.d.ts +7 -0
  186. package/lib/families/celo/specs.d.ts.map +1 -0
  187. package/lib/families/celo/specs.js +56 -0
  188. package/lib/families/celo/specs.js.map +1 -0
  189. package/lib/families/celo/speculos-deviceActions.d.ts +7 -0
  190. package/lib/families/celo/speculos-deviceActions.d.ts.map +1 -0
  191. package/lib/families/celo/speculos-deviceActions.js +52 -0
  192. package/lib/families/celo/speculos-deviceActions.js.map +1 -0
  193. package/lib/families/celo/transaction.d.ts +11 -0
  194. package/lib/families/celo/transaction.d.ts.map +1 -0
  195. package/lib/families/celo/transaction.js +39 -0
  196. package/lib/families/celo/transaction.js.map +1 -0
  197. package/lib/families/celo/types.d.ts +16 -0
  198. package/lib/families/celo/types.d.ts.map +1 -0
  199. package/lib/families/celo/types.js +6 -0
  200. package/lib/families/celo/types.js.map +1 -0
  201. package/lib/families/ethereum/datasets/ethereum.scanAccounts.1.d.ts +1 -0
  202. package/lib/families/ethereum/datasets/ethereum.scanAccounts.1.d.ts.map +1 -1
  203. package/lib/families/ethereum/datasets/ethereum.scanAccounts.1.js +1 -0
  204. package/lib/families/ethereum/datasets/ethereum.scanAccounts.1.js.map +1 -1
  205. package/lib/families/ethereum/modules/erc1155.d.ts.map +1 -1
  206. package/lib/families/ethereum/modules/erc1155.js +8 -2
  207. package/lib/families/ethereum/modules/erc1155.js.map +1 -1
  208. package/lib/families/ethereum/signOperation.d.ts.map +1 -1
  209. package/lib/families/ethereum/signOperation.js +26 -15
  210. package/lib/families/ethereum/signOperation.js.map +1 -1
  211. package/lib/families/ethereum/specs.d.ts.map +1 -1
  212. package/lib/families/ethereum/specs.js +2 -4
  213. package/lib/families/ethereum/specs.js.map +1 -1
  214. package/lib/families/ethereum/transaction.d.ts +4 -1
  215. package/lib/families/ethereum/transaction.d.ts.map +1 -1
  216. package/lib/families/ethereum/transaction.js +15 -27
  217. package/lib/families/ethereum/transaction.js.map +1 -1
  218. package/lib/families/polkadot/cache.d.ts +1 -1
  219. package/lib/families/polkadot/cache.js +1 -1
  220. package/lib/families/solana/api/chain/index.d.ts +2 -2
  221. package/lib/families/solana/api/chain/index.d.ts.map +1 -1
  222. package/lib/families/solana/api/chain/index.js +1 -3
  223. package/lib/families/solana/api/chain/index.js.map +1 -1
  224. package/lib/families/solana/api/chain/instruction/token/types.d.ts +1 -1
  225. package/lib/families/solana/bridge/bridge.js +5 -5
  226. package/lib/families/solana/bridge/bridge.js.map +1 -1
  227. package/lib/families/solana/bridge/js.js +3 -3
  228. package/lib/families/solana/bridge/js.js.map +1 -1
  229. package/lib/families/solana/bridge/mock.js +1 -1
  230. package/lib/families/solana/bridge/mock.js.map +1 -1
  231. package/lib/families/solana/specs.js +1 -1
  232. package/lib/families/solana/specs.js.map +1 -1
  233. package/lib/families/solana/test-dataset.d.ts.map +1 -1
  234. package/lib/families/solana/test-dataset.js +210 -209
  235. package/lib/families/solana/test-dataset.js.map +1 -1
  236. package/lib/families/solana/utils.d.ts +1 -2
  237. package/lib/families/solana/utils.d.ts.map +1 -1
  238. package/lib/families/solana/utils.js +11 -9
  239. package/lib/families/solana/utils.js.map +1 -1
  240. package/lib/families/tezos/bakers.whitelist-default.d.ts.map +1 -1
  241. package/lib/families/tezos/bakers.whitelist-default.js +1 -1
  242. package/lib/families/tezos/bakers.whitelist-default.js.map +1 -1
  243. package/lib/families/tezos/bridge/js.d.ts.map +1 -1
  244. package/lib/families/tezos/bridge/js.js +2 -1
  245. package/lib/families/tezos/bridge/js.js.map +1 -1
  246. package/lib/families/tezos/synchronisation.d.ts.map +1 -1
  247. package/lib/families/tezos/synchronisation.js +2 -0
  248. package/lib/families/tezos/synchronisation.js.map +1 -1
  249. package/lib/families/tezos/test-specifics.d.ts.map +1 -1
  250. package/lib/families/tezos/test-specifics.js +1 -0
  251. package/lib/families/tezos/test-specifics.js.map +1 -1
  252. package/lib/families/tron/synchronisation.test.js +1 -0
  253. package/lib/families/tron/synchronisation.test.js.map +1 -1
  254. package/lib/featureFlags/FeatureToggle.d.ts +10 -0
  255. package/lib/featureFlags/FeatureToggle.d.ts.map +1 -0
  256. package/lib/featureFlags/FeatureToggle.js +17 -0
  257. package/lib/featureFlags/FeatureToggle.js.map +1 -0
  258. package/lib/featureFlags/defaultFeatures.d.ts +3 -0
  259. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -0
  260. package/lib/featureFlags/defaultFeatures.js +9 -0
  261. package/lib/featureFlags/defaultFeatures.js.map +1 -0
  262. package/lib/featureFlags/index.d.ts +5 -0
  263. package/lib/featureFlags/index.d.ts.map +1 -0
  264. package/lib/featureFlags/index.js +17 -0
  265. package/lib/featureFlags/index.js.map +1 -0
  266. package/lib/featureFlags/provider.d.ts +13 -0
  267. package/lib/featureFlags/provider.d.ts.map +1 -0
  268. package/lib/featureFlags/provider.js +68 -0
  269. package/lib/featureFlags/provider.js.map +1 -0
  270. package/lib/featureFlags/types.d.ts +8 -0
  271. package/lib/featureFlags/types.d.ts.map +1 -0
  272. package/lib/featureFlags/types.js +3 -0
  273. package/lib/featureFlags/types.js.map +1 -0
  274. package/lib/featureFlags/useFeature.d.ts +3 -0
  275. package/lib/featureFlags/useFeature.d.ts.map +1 -0
  276. package/lib/featureFlags/useFeature.js +9 -0
  277. package/lib/featureFlags/useFeature.js.map +1 -0
  278. package/lib/generated/bridge/js.d.ts +4 -0
  279. package/lib/generated/bridge/js.d.ts.map +1 -1
  280. package/lib/generated/bridge/js.js +24 -22
  281. package/lib/generated/bridge/js.js.map +1 -1
  282. package/lib/generated/cli-transaction.d.ts +9 -0
  283. package/lib/generated/cli-transaction.d.ts.map +1 -1
  284. package/lib/generated/cli-transaction.js +24 -22
  285. package/lib/generated/cli-transaction.js.map +1 -1
  286. package/lib/generated/deviceTransactionConfig.d.ts +2 -0
  287. package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
  288. package/lib/generated/deviceTransactionConfig.js +22 -20
  289. package/lib/generated/deviceTransactionConfig.js.map +1 -1
  290. package/lib/generated/hw-getAddress.d.ts +1 -0
  291. package/lib/generated/hw-getAddress.d.ts.map +1 -1
  292. package/lib/generated/hw-getAddress.js +26 -24
  293. package/lib/generated/hw-getAddress.js.map +1 -1
  294. package/lib/generated/specs.d.ts +3 -0
  295. package/lib/generated/specs.d.ts.map +1 -1
  296. package/lib/generated/specs.js +24 -22
  297. package/lib/generated/specs.js.map +1 -1
  298. package/lib/generated/speculos-deviceActions.d.ts +3 -0
  299. package/lib/generated/speculos-deviceActions.d.ts.map +1 -1
  300. package/lib/generated/speculos-deviceActions.js +24 -22
  301. package/lib/generated/speculos-deviceActions.js.map +1 -1
  302. package/lib/generated/transaction.d.ts +5 -0
  303. package/lib/generated/transaction.d.ts.map +1 -1
  304. package/lib/generated/transaction.js +26 -24
  305. package/lib/generated/transaction.js.map +1 -1
  306. package/lib/generated/types.d.ts +12 -6
  307. package/lib/generated/types.d.ts.map +1 -1
  308. package/lib/generated/types.js +14 -12
  309. package/lib/generated/types.js.map +1 -1
  310. package/lib/load/speculos.d.ts +7 -0
  311. package/lib/load/speculos.d.ts.map +1 -1
  312. package/lib/load/speculos.js +27 -11
  313. package/lib/load/speculos.js.map +1 -1
  314. package/lib/platform/PlatformAppProvider/helpers.d.ts +1 -0
  315. package/lib/platform/PlatformAppProvider/helpers.d.ts.map +1 -1
  316. package/lib/platform/PlatformAppProvider/helpers.js +23 -1
  317. package/lib/platform/PlatformAppProvider/helpers.js.map +1 -1
  318. package/lib/platform/PlatformAppProvider/index.d.ts.map +1 -1
  319. package/lib/platform/PlatformAppProvider/index.js +2 -1
  320. package/lib/platform/PlatformAppProvider/index.js.map +1 -1
  321. package/lib/types/index.d.ts +1 -0
  322. package/lib/types/index.d.ts.map +1 -1
  323. package/lib/types/index.js +1 -0
  324. package/lib/types/index.js.map +1 -1
  325. package/lib/types/manager.d.ts +7 -0
  326. package/lib/types/manager.d.ts.map +1 -1
  327. package/lib/types/manager.js +7 -0
  328. package/lib/types/manager.js.map +1 -1
  329. package/package.json +24 -21
  330. package/src/.DS_Store +0 -0
  331. package/src/__tests__/.DS_Store +0 -0
  332. package/src/__tests__/__snapshots__/all.libcore.ts.snap +457 -33597
  333. package/src/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.ts +2 -0
  334. package/src/__tests__/families/bitcoin/wallet-btc/xpub.getAddress.ts +78 -0
  335. package/src/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.ts +0 -11
  336. package/src/__tests__/test-helpers/bridge.ts +1 -1
  337. package/src/__tests__/test-helpers/setup.ts +1 -0
  338. package/src/account/support.ts +1 -0
  339. package/src/api/Ethereum.ts +1 -0
  340. package/src/apps/hw.ts +7 -0
  341. package/src/apps/logic.ts +6 -3
  342. package/src/apps/polyfill.ts +1 -0
  343. package/src/bot/engine.ts +4 -1
  344. package/src/bridge/jsHelpers.ts +1 -1
  345. package/src/data/icons/react/celo.tsx +12 -0
  346. package/src/data/icons/react/index.tsx +1 -0
  347. package/src/data/icons/reactNative/celo.tsx +13 -0
  348. package/src/data/icons/reactNative/index.tsx +1 -0
  349. package/src/data/icons/svg/CELO.svg +5 -0
  350. package/src/env.ts +20 -0
  351. package/src/errors.ts +3 -0
  352. package/src/exchange/platform/transfer/index.ts +21 -1
  353. package/src/families/algorand/buildTransaction.ts +4 -8
  354. package/src/families/algorand/js-getFeesForTransaction.ts +1 -1
  355. package/src/families/algorand/js-signOperation.ts +2 -2
  356. package/src/families/algorand/js-synchronization.ts +1 -0
  357. package/src/families/bitcoin/js-signOperation.ts +3 -5
  358. package/src/families/bitcoin/js-synchronisation.ts +4 -4
  359. package/src/families/bitcoin/wallet-btc/crypto/base.ts +31 -18
  360. package/src/families/bitcoin/wallet-btc/crypto/bip32.ts +2 -2
  361. package/src/families/bitcoin/wallet-btc/crypto/bitcoin.ts +3 -17
  362. package/src/families/bitcoin/wallet-btc/crypto/bitcoincash.ts +5 -39
  363. package/src/families/bitcoin/wallet-btc/crypto/decred.ts +2 -15
  364. package/src/families/bitcoin/wallet-btc/crypto/litecoin.ts +1 -71
  365. package/src/families/bitcoin/wallet-btc/crypto/types.ts +7 -0
  366. package/src/families/bitcoin/wallet-btc/crypto/zec.ts +23 -41
  367. package/src/families/bitcoin/wallet-btc/crypto/zen.ts +30 -49
  368. package/src/families/bitcoin/wallet-btc/explorer/index.ts +20 -0
  369. package/src/families/bitcoin/wallet-btc/storage/types.ts +0 -1
  370. package/src/families/celo/api/hubble.ts +93 -0
  371. package/src/families/celo/api/index.ts +1 -0
  372. package/src/families/celo/api/sdk.ts +8 -0
  373. package/src/families/celo/bridge/js.ts +38 -0
  374. package/src/families/celo/cli-transaction.ts +41 -0
  375. package/src/families/celo/datasets/celo.scanAccounts.1.ts +20 -0
  376. package/src/families/celo/deviceTransactionConfig.ts +19 -0
  377. package/src/families/celo/hw-app-celo.ts +108 -0
  378. package/src/families/celo/hw-getAddress.ts +1 -0
  379. package/src/families/celo/js-broadcast.ts +12 -0
  380. package/src/families/celo/js-buildTransaction.ts +32 -0
  381. package/src/families/celo/js-createTransaction.ts +12 -0
  382. package/src/families/celo/js-estimateMaxSpendable.ts +28 -0
  383. package/src/families/celo/js-getFeesForTransaction.ts +38 -0
  384. package/src/families/celo/js-getTransactionStatus.ts +67 -0
  385. package/src/families/celo/js-prepareTransaction.ts +28 -0
  386. package/src/families/celo/js-signOperation.ts +149 -0
  387. package/src/families/celo/js-synchronisation.ts +40 -0
  388. package/src/families/celo/specs.ts +53 -0
  389. package/src/families/celo/speculos-deviceActions.ts +50 -0
  390. package/src/families/celo/transaction.ts +39 -0
  391. package/src/families/celo/types.ts +20 -0
  392. package/src/families/ethereum/datasets/ethereum.scanAccounts.1.ts +1 -0
  393. package/src/families/ethereum/modules/erc1155.ts +9 -0
  394. package/src/families/ethereum/signOperation.ts +21 -20
  395. package/src/families/ethereum/specs.ts +0 -2
  396. package/src/families/ethereum/transaction.ts +10 -24
  397. package/src/families/polkadot/cache.ts +1 -1
  398. package/src/families/solana/api/chain/index.ts +2 -5
  399. package/src/families/solana/bridge/bridge.ts +11 -11
  400. package/src/families/solana/bridge/js.ts +3 -3
  401. package/src/families/solana/bridge/mock.ts +1 -1
  402. package/src/families/solana/specs.ts +1 -1
  403. package/src/families/solana/test-dataset.ts +340 -338
  404. package/src/families/solana/utils.ts +9 -8
  405. package/src/families/tezos/bakers.whitelist-default.ts +0 -2
  406. package/src/families/tezos/bridge/js.ts +6 -1
  407. package/src/families/tezos/synchronisation.ts +2 -0
  408. package/src/families/tezos/test-specifics.ts +1 -0
  409. package/src/families/tron/synchronisation.test.ts +2 -0
  410. package/src/featureFlags/FeatureToggle.tsx +24 -0
  411. package/src/featureFlags/defaultFeatures.ts +7 -0
  412. package/src/featureFlags/index.ts +4 -0
  413. package/src/featureFlags/provider.tsx +48 -0
  414. package/src/featureFlags/types.ts +9 -0
  415. package/src/featureFlags/useFeature.ts +8 -0
  416. package/src/generated/bridge/js.ts +3 -0
  417. package/src/generated/cli-transaction.ts +3 -0
  418. package/src/generated/deviceTransactionConfig.ts +3 -0
  419. package/src/generated/hw-getAddress.ts +3 -0
  420. package/src/generated/specs.ts +3 -0
  421. package/src/generated/speculos-deviceActions.ts +3 -0
  422. package/src/generated/transaction.ts +3 -0
  423. package/src/generated/types.ts +14 -0
  424. package/src/load/speculos.ts +23 -10
  425. package/src/platform/PlatformAppProvider/helpers.ts +29 -0
  426. package/src/platform/PlatformAppProvider/index.tsx +3 -2
  427. package/src/types/index.ts +1 -0
  428. package/src/types/manager.ts +7 -0
@@ -5,6 +5,8 @@ import { Account } from "../../../../families/bitcoin/wallet-btc/account";
5
5
  import { Merge } from "../../../../families/bitcoin/wallet-btc/pickingstrategies/Merge";
6
6
  import MockBtc from "../../../../mock/Btc";
7
7
 
8
+ jest.setTimeout(180000);
9
+
8
10
  describe("testing wallet", () => {
9
11
  const wallet = new BitcoinLikeWallet();
10
12
  let account: Account;
@@ -0,0 +1,78 @@
1
+ import { DerivationModes } from "../../../../families/bitcoin/wallet-btc";
2
+ import BitcoinLikeStorage from "../../../../families/bitcoin/wallet-btc/storage";
3
+ import BitcoinLikeExplorer from "../../../../families/bitcoin/wallet-btc/explorer";
4
+ import Xpub from "../../../../families/bitcoin/wallet-btc/xpub";
5
+ import coininfo from "coininfo";
6
+ import BCHCrypto from "../../../../families/bitcoin/wallet-btc/crypto/bitcoincash";
7
+ import BTCCrypto from "../../../../families/bitcoin/wallet-btc/crypto/bitcoin";
8
+ import ZECCrypto from "../../../../families/bitcoin/wallet-btc/crypto/zec";
9
+ import ZENCrypto from "../../../../families/bitcoin/wallet-btc/crypto/zen";
10
+
11
+ describe("Unit tests for getAddress", () => {
12
+ it("Test getAddress for bch and btc", async () => {
13
+ const bchCrypto = new BCHCrypto({
14
+ network: coininfo.bitcoincash.main.toBitcoinJS(),
15
+ });
16
+ const btcCrypto = new BTCCrypto({
17
+ network: coininfo.bitcoin.main.toBitcoinJS(),
18
+ });
19
+ const bchxpub = new Xpub({
20
+ storage: new BitcoinLikeStorage(),
21
+ explorer: new BitcoinLikeExplorer({
22
+ explorerURI: "https://explorers.api.vault.ledger.com/blockchain/v3/bch",
23
+ explorerVersion: "v3",
24
+ }),
25
+ crypto: bchCrypto,
26
+ xpub: "xpub6BtWBf3Pu6hYwJBKvEwG7JtrTxxDrSGy39HaTgZz6GTSaFWFdoCtuEXSQtoKGaYdz1emg8xTXKYwjhu3xXRPzFnYS1z4yjKj7hLDQyNeDZr",
27
+ derivationMode: DerivationModes.LEGACY,
28
+ });
29
+ await bchxpub.syncAddress(0, 0);
30
+ let addresses = await bchxpub.getXpubAddresses();
31
+ expect(addresses[0].address).toEqual(
32
+ "bitcoincash:qrgwhfg7tn4xs9pg2vu5rhkud490j9yfnqd63uk64m"
33
+ );
34
+
35
+ const btcxpub = new Xpub({
36
+ storage: new BitcoinLikeStorage(),
37
+ explorer: new BitcoinLikeExplorer({
38
+ explorerURI: "https://explorers.api.vault.ledger.com/blockchain/v3/btc",
39
+ explorerVersion: "v3",
40
+ }),
41
+ crypto: btcCrypto,
42
+ xpub: "xpub6BtWBf3Pu6hYwJBKvEwG7JtrTxxDrSGy39HaTgZz6GTSaFWFdoCtuEXSQtoKGaYdz1emg8xTXKYwjhu3xXRPzFnYS1z4yjKj7hLDQyNeDZr",
43
+ derivationMode: DerivationModes.LEGACY,
44
+ });
45
+ await btcxpub.syncAddress(0, 0);
46
+ addresses = await btcxpub.getXpubAddresses();
47
+ expect(addresses[0].address).toEqual("1L3fqoWstvLqEA6TgXkuLoXX8xG1xhirG3");
48
+ }, 60000);
49
+
50
+ it("Test getoutputScriptFromAddress for btc, zcash and zen", async () => {
51
+ const btcCrypto = new BTCCrypto({
52
+ network: coininfo.bitcoin.main.toBitcoinJS(),
53
+ });
54
+ const zecCrypto = new ZECCrypto({
55
+ network: coininfo.zcash.main.toBitcoinJS(),
56
+ });
57
+ const zenCrypto = new ZENCrypto({
58
+ network: coininfo.zcash.main.toBitcoinJS(),
59
+ });
60
+ expect(
61
+ btcCrypto
62
+ .toOutputScript("1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX")
63
+ .toString("hex")
64
+ ).toEqual("76a91499bc78ba577a95a11f1a344d4d2ae55f2f857b9888ac");
65
+ expect(
66
+ zecCrypto
67
+ .toOutputScript("t1T5XJvzQhh2gTsi3c5Vn9x5SMhpSWLSnVy")
68
+ .toString("hex")
69
+ ).toEqual("76a91464fa33fb6f8d72455af2a4e73ae30412af2c97ba88ac");
70
+ expect(
71
+ zenCrypto
72
+ .toOutputScript("znjbHth4PxBJM8FmHgvXYHkuq99nKFkWvMg")
73
+ .toString("hex")
74
+ ).toEqual(
75
+ "76a914cb009bf12fc17d28e61527951101fdabfeaa187288ac209ec9845acb02fab24e1c0368b3b517c1a4488fba97f0e3459ac053ea0100000003c01f02b4"
76
+ );
77
+ }, 30000);
78
+ });
@@ -67,7 +67,6 @@ describe("testing xpub legacy transactions", () => {
67
67
  output_index: 0,
68
68
  value: "5000000000",
69
69
  address: "mwXTtHo8Yy3aNKUUZLkBDrTcKT9qG9TqLb",
70
- script_hex: "76a914af9ab6987aa41b37c8bcb7c61154165d23f09e3488ac",
71
70
  output_hash:
72
71
  "9e1b337875c21f751e70ee2c2c6ee93d8a6733d0f3ba6d139ae6a0479ebcefb0",
73
72
  block_height: 1,
@@ -77,8 +76,6 @@ describe("testing xpub legacy transactions", () => {
77
76
  output_index: 1,
78
77
  value: "0",
79
78
  address: "<unknown>",
80
- script_hex:
81
- "6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9",
82
79
  output_hash:
83
80
  "9e1b337875c21f751e70ee2c2c6ee93d8a6733d0f3ba6d139ae6a0479ebcefb0",
84
81
  block_height: 1,
@@ -112,7 +109,6 @@ describe("testing xpub legacy transactions", () => {
112
109
  output_index: 0,
113
110
  value: "300000000",
114
111
  address: "mwXTtHo8Yy3aNKUUZLkBDrTcKT9qG9TqLb",
115
- script_hex: "76a914af9ab6987aa41b37c8bcb7c61154165d23f09e3488ac",
116
112
  output_hash:
117
113
  "0b9f98d07eb418fa20573112d3cba6b871d429a06c724a7888ff0886be5213d1",
118
114
  block_height: 120,
@@ -122,7 +118,6 @@ describe("testing xpub legacy transactions", () => {
122
118
  output_index: 1,
123
119
  value: "4699983200",
124
120
  address: "2MynSTpze5SDcuLr1DekSV7RVrFpQCo3LeP",
125
- script_hex: "a91447b810238a31777fc4e4de474419464c46aadf8187",
126
121
  output_hash:
127
122
  "0b9f98d07eb418fa20573112d3cba6b871d429a06c724a7888ff0886be5213d1",
128
123
  block_height: 120,
@@ -209,7 +204,6 @@ describe("testing xpub legacy transactions", () => {
209
204
  output_index: 0,
210
205
  value: "4599966400",
211
206
  address: "2NCSYYp4bWdHDYf9nYP1NDKb1GMBqa8e57H",
212
- script_hex: "a914d28e7592fc2657433296eafc89e4a8d29289ebf087",
213
207
  output_hash:
214
208
  "8f30fe84da5a5846d668b4bad260730f2b0125fa66fb2633fa1cee23c6b11053",
215
209
  block_height: 122,
@@ -219,7 +213,6 @@ describe("testing xpub legacy transactions", () => {
219
213
  output_index: 1,
220
214
  value: "100000000",
221
215
  address: "mwXTtHo8Yy3aNKUUZLkBDrTcKT9qG9TqLb",
222
- script_hex: "76a914af9ab6987aa41b37c8bcb7c61154165d23f09e3488ac",
223
216
  output_hash:
224
217
  "8f30fe84da5a5846d668b4bad260730f2b0125fa66fb2633fa1cee23c6b11053",
225
218
  block_height: 122,
@@ -253,7 +246,6 @@ describe("testing xpub legacy transactions", () => {
253
246
  output_index: 0,
254
247
  value: "4399949600",
255
248
  address: "2NFToPiLBtuKiqzZj43nPXknN8d4xNySe3o",
256
- script_hex: "a914f3b3a49bd90e6e9ae30882a2b7e9b7edfe579a8c87",
257
249
  output_hash:
258
250
  "2f90f3312ffd4dce490cb2f7429c586a43ef68c99fc2f8e549127b72af7b4209",
259
251
  block_height: 123,
@@ -263,7 +255,6 @@ describe("testing xpub legacy transactions", () => {
263
255
  output_index: 1,
264
256
  value: "200000000",
265
257
  address: "mwXTtHo8Yy3aNKUUZLkBDrTcKT9qG9TqLb",
266
- script_hex: "76a914af9ab6987aa41b37c8bcb7c61154165d23f09e3488ac",
267
258
  output_hash:
268
259
  "2f90f3312ffd4dce490cb2f7429c586a43ef68c99fc2f8e549127b72af7b4209",
269
260
  block_height: 123,
@@ -297,7 +288,6 @@ describe("testing xpub legacy transactions", () => {
297
288
  output_index: 0,
298
289
  value: "600000000",
299
290
  address: "mwXTtHo8Yy3aNKUUZLkBDrTcKT9qG9TqLb",
300
- script_hex: "76a914af9ab6987aa41b37c8bcb7c61154165d23f09e3488ac",
301
291
  output_hash:
302
292
  "2fee0c4b55e08583aa5bc565d7e428f7cdcbd2b73262f62208a6a72a74e2c945",
303
293
  block_height: 124,
@@ -307,7 +297,6 @@ describe("testing xpub legacy transactions", () => {
307
297
  output_index: 1,
308
298
  value: "3799932800",
309
299
  address: "2N53XuFRxqbShpK4XKwC1VXT4zu1wCzbAMU",
310
- script_hex: "a914816b7896ce2c4f21c39c865030fe07e7a042a9c687",
311
300
  output_hash:
312
301
  "2fee0c4b55e08583aa5bc565d7e428f7cdcbd2b73262f62208a6a72a74e2c945",
313
302
  block_height: 124,
@@ -478,7 +478,7 @@ export function testBridge<T extends Transaction>(
478
478
 
479
479
  // existing ops are keeping refs
480
480
  synced.operations.slice(count).forEach((op, i) => {
481
- expect(op).toBe(operations[i]);
481
+ expect(op).toStrictEqual(operations[i]);
482
482
  });
483
483
  }
484
484
  );
@@ -56,4 +56,5 @@ setSupportedCurrencies([
56
56
  "crypto_org",
57
57
  "filecoin",
58
58
  "solana",
59
+ "celo",
59
60
  ]);
@@ -21,6 +21,7 @@ import { getAccountBridge } from "../bridge";
21
21
  import jsBridges from "../generated/bridge/js";
22
22
 
23
23
  const experimentalIntegrations = ["algorand", "tezos"];
24
+
24
25
  export function shouldUseJS(currency: CryptoCurrency) {
25
26
  const jsBridge = jsBridges[currency.family];
26
27
  if (!jsBridge) return false;
@@ -138,6 +138,7 @@ export const apiForCurrency = (currency: CryptoCurrency): API => {
138
138
  noinput: true,
139
139
  no_input: true,
140
140
  no_token: true,
141
+ filtering: true,
141
142
  block_hash,
142
143
  },
143
144
  }),
package/src/apps/hw.ts CHANGED
@@ -5,6 +5,7 @@ import { concat, of, EMPTY, from, Observable, throwError, defer } from "rxjs";
5
5
  import { mergeMap, map } from "rxjs/operators";
6
6
  import type { Exec, AppOp, ListAppsEvent, ListAppsResult } from "./types";
7
7
  import type { App, DeviceInfo } from "../types/manager";
8
+ import { AppType } from "../types/manager";
8
9
  import manager, { getProviderId } from "../manager";
9
10
  import installApp from "../hw/installApp";
10
11
  import uninstallApp from "../hw/uninstallApp";
@@ -313,6 +314,11 @@ export const listApps = (
313
314
  }
314
315
  }
315
316
 
317
+ const type =
318
+ application.description === AppType.PLUGIN
319
+ ? AppType.PLUGIN
320
+ : AppType.APP;
321
+
316
322
  const app: App = polyfillApp({
317
323
  id: version.id,
318
324
  name: version.name,
@@ -320,6 +326,7 @@ export const listApps = (
320
326
  version: version.version,
321
327
  currencyId,
322
328
  description: version.description,
329
+ type,
323
330
  dateModified: version.date_last_modified,
324
331
  icon: version.icon,
325
332
  authorName: application.authorName,
package/src/apps/logic.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { $Shape } from "utility-types";
2
2
  import { Subject } from "rxjs";
3
3
  import flatMap from "lodash/flatMap";
4
- import invariant from "invariant";
5
4
  import semver from "semver";
6
5
  import { getDeviceModel } from "@ledgerhq/devices";
7
6
  import type { App } from "../types/manager";
@@ -17,7 +16,7 @@ import {
17
16
  findCryptoCurrencyById,
18
17
  isCurrencySupported,
19
18
  } from "../currencies";
20
- import { LatestFirmwareVersionRequired } from "../errors";
19
+ import { LatestFirmwareVersionRequired, NoSuchAppOnProvider } from "../errors";
21
20
 
22
21
  export const initState = (
23
22
  {
@@ -292,6 +291,7 @@ export const reducer = (state: State, action: Action): State => {
292
291
  // No app found but fw update is available
293
292
  if (
294
293
  !depApp &&
294
+ state.firmware?.updateAvailable?.final?.version &&
295
295
  semver.lt(
296
296
  state.deviceInfo.version,
297
297
  state.firmware?.updateAvailable?.final?.version
@@ -306,7 +306,10 @@ export const reducer = (state: State, action: Action): State => {
306
306
  );
307
307
  }
308
308
 
309
- invariant(depApp, "no such app '%s'", name);
309
+ if (!depApp) {
310
+ throw new NoSuchAppOnProvider("", { appName: name });
311
+ }
312
+
310
313
  const deps = depApp.dependencies;
311
314
  const dependentsOfDep = flatMap(deps, (dep) =>
312
315
  findDependents(state.appByName, dep)
@@ -53,6 +53,7 @@ export const whitelistDependencies = ["Decred", "Decred Testnet"];
53
53
  ["POAP", "Ethereum"],
54
54
  ["OlympusDAO", "Ethereum"],
55
55
  ["Rarible", "Ethereum"],
56
+ ["Ricochet", "Ethereum"],
56
57
  ].forEach(([name, dep]) => declareDep(name, dep));
57
58
  export const getDependencies = (appName: string): string[] =>
58
59
  directDep[appName] || [];
package/src/bot/engine.ts CHANGED
@@ -81,6 +81,9 @@ export async function runWithAppSpec<T extends Transaction>(
81
81
  const mutationReports: MutationReport<T>[] = [];
82
82
  const { appQuery, currency, dependency } = spec;
83
83
  const appCandidate = findAppCandidate(appCandidates, appQuery);
84
+ if (!appCandidate) {
85
+ console.warn("no app found for " + spec.name, { appQuery, appCandidates });
86
+ }
84
87
  invariant(
85
88
  appCandidate,
86
89
  "%s: no app found. Are you sure your COINAPPS is up to date?",
@@ -401,7 +404,7 @@ export async function runOnAccount<T extends Transaction>({
401
404
  }
402
405
  }
403
406
 
404
- // without recovering mecanism, we simply assume an error is a failure
407
+ // without recovering mechanism, we simply assume an error is a failure
405
408
  if (errors.length) {
406
409
  throw errors[0];
407
410
  }
@@ -97,7 +97,7 @@ Operation[] {
97
97
  newOps.forEach((op) => {
98
98
  newOpsIds[op.id] = op;
99
99
  });
100
- // return existins when there is no real new operations
100
+ // return existing when there is no real new operations
101
101
  if (newOps.length === 0) return existing;
102
102
  // edge case, existing can be empty. return the sorted list.
103
103
  if (existing.length === 0) return Object.values(newOpsIds);
@@ -0,0 +1,12 @@
1
+
2
+ import * as React from "react";
3
+ interface Props {
4
+ size: number;
5
+ color?: string;
6
+ };
7
+
8
+ function celo({size, color = "currentColor"}: Props) {
9
+ return <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.1053 19.1053C12.9834 19.1053 15.3158 16.7728 15.3158 13.8947C15.3158 11.0166 12.9834 8.68421 10.1053 8.68421C7.22716 8.68421 4.89474 11.0166 4.89474 13.8947C4.89474 16.7728 7.22716 19.1053 10.1053 19.1053ZM10.1053 21C6.18126 21 3 17.8187 3 13.8947C3 9.97074 6.18126 6.78947 10.1053 6.78947C14.0293 6.78947 17.2105 9.97074 17.2105 13.8947C17.2105 17.8187 14.0293 21 10.1053 21Z" fill={color} /><path d="M13.8947 15.3158C16.7728 15.3158 19.1053 12.9834 19.1053 10.1053C19.1053 7.22716 16.7728 4.89474 13.8947 4.89474C11.0166 4.89474 8.68421 7.22716 8.68421 10.1053C8.68421 12.9834 11.0166 15.3158 13.8947 15.3158ZM13.8947 17.2105C9.97074 17.2105 6.78947 14.0293 6.78947 10.1053C6.78947 6.18126 9.97074 3 13.8947 3C17.8187 3 21 6.18126 21 10.1053C21 14.0293 17.8187 17.2105 13.8947 17.2105Z" fill={color} /><path d="M14.1297 17.2105C14.6223 16.6137 14.9747 15.9145 15.1623 15.1623C15.9126 14.9747 16.6118 14.6223 17.2105 14.1297C17.184 14.9994 16.9964 15.8558 16.6573 16.6592C15.8558 16.9964 14.9994 17.184 14.1297 17.2105ZM8.83768 8.83768C8.08737 9.02526 7.38821 9.37768 6.78947 9.87032C6.816 9.00063 7.00358 8.14421 7.34274 7.34274C8.14421 7.00547 9.00253 6.81789 9.87032 6.78947C9.37768 7.38632 9.02526 8.08547 8.83768 8.83768Z" fill={color} /></svg>;
10
+ }
11
+
12
+ export default celo;
@@ -78,6 +78,7 @@ export { default as call } from "./call";
78
78
  export { default as cc } from "./cc";
79
79
  export { default as cdn } from "./cdn";
80
80
  export { default as cdt } from "./cdt";
81
+ export { default as celo } from "./celo";
81
82
  export { default as cenz } from "./cenz";
82
83
  export { default as chain } from "./chain";
83
84
  export { default as chat } from "./chat";
@@ -0,0 +1,13 @@
1
+
2
+ import * as React from "react";
3
+ import Svg, { Path } from "react-native-svg";
4
+ interface Props {
5
+ size: number;
6
+ color: string;
7
+ };
8
+
9
+ function celo({ size, color }: Props) {
10
+ return <Svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><Path d="M10.1053 19.1053C12.9834 19.1053 15.3158 16.7728 15.3158 13.8947C15.3158 11.0166 12.9834 8.68421 10.1053 8.68421C7.22716 8.68421 4.89474 11.0166 4.89474 13.8947C4.89474 16.7728 7.22716 19.1053 10.1053 19.1053ZM10.1053 21C6.18126 21 3 17.8187 3 13.8947C3 9.97074 6.18126 6.78947 10.1053 6.78947C14.0293 6.78947 17.2105 9.97074 17.2105 13.8947C17.2105 17.8187 14.0293 21 10.1053 21Z" fill={color} /><Path d="M13.8947 15.3158C16.7728 15.3158 19.1053 12.9834 19.1053 10.1053C19.1053 7.22716 16.7728 4.89474 13.8947 4.89474C11.0166 4.89474 8.68421 7.22716 8.68421 10.1053C8.68421 12.9834 11.0166 15.3158 13.8947 15.3158ZM13.8947 17.2105C9.97074 17.2105 6.78947 14.0293 6.78947 10.1053C6.78947 6.18126 9.97074 3 13.8947 3C17.8187 3 21 6.18126 21 10.1053C21 14.0293 17.8187 17.2105 13.8947 17.2105Z" fill={color} /><Path d="M14.1297 17.2105C14.6223 16.6137 14.9747 15.9145 15.1623 15.1623C15.9126 14.9747 16.6118 14.6223 17.2105 14.1297C17.184 14.9994 16.9964 15.8558 16.6573 16.6592C15.8558 16.9964 14.9994 17.184 14.1297 17.2105ZM8.83768 8.83768C8.08737 9.02526 7.38821 9.37768 6.78947 9.87032C6.816 9.00063 7.00358 8.14421 7.34274 7.34274C8.14421 7.00547 9.00253 6.81789 9.87032 6.78947C9.37768 7.38632 9.02526 8.08547 8.83768 8.83768Z" fill={color} /></Svg>;
11
+ }
12
+
13
+ export default celo;
@@ -78,6 +78,7 @@ export { default as call } from "./call";
78
78
  export { default as cc } from "./cc";
79
79
  export { default as cdn } from "./cdn";
80
80
  export { default as cdt } from "./cdt";
81
+ export { default as celo } from "./celo";
81
82
  export { default as cenz } from "./cenz";
82
83
  export { default as chain } from "./chain";
83
84
  export { default as chat } from "./chat";
@@ -0,0 +1,5 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10.1053 19.1053C12.9834 19.1053 15.3158 16.7728 15.3158 13.8947C15.3158 11.0166 12.9834 8.68421 10.1053 8.68421C7.22716 8.68421 4.89474 11.0166 4.89474 13.8947C4.89474 16.7728 7.22716 19.1053 10.1053 19.1053ZM10.1053 21C6.18126 21 3 17.8187 3 13.8947C3 9.97074 6.18126 6.78947 10.1053 6.78947C14.0293 6.78947 17.2105 9.97074 17.2105 13.8947C17.2105 17.8187 14.0293 21 10.1053 21Z" fill="#42D689"/>
3
+ <path d="M13.8947 15.3158C16.7728 15.3158 19.1053 12.9834 19.1053 10.1053C19.1053 7.22716 16.7728 4.89474 13.8947 4.89474C11.0166 4.89474 8.68421 7.22716 8.68421 10.1053C8.68421 12.9834 11.0166 15.3158 13.8947 15.3158ZM13.8947 17.2105C9.97074 17.2105 6.78947 14.0293 6.78947 10.1053C6.78947 6.18126 9.97074 3 13.8947 3C17.8187 3 21 6.18126 21 10.1053C21 14.0293 17.8187 17.2105 13.8947 17.2105Z" fill="#42D689"/>
4
+ <path d="M14.1297 17.2105C14.6223 16.6137 14.9747 15.9145 15.1623 15.1623C15.9126 14.9747 16.6118 14.6223 17.2105 14.1297C17.184 14.9994 16.9964 15.8558 16.6573 16.6592C15.8558 16.9964 14.9994 17.184 14.1297 17.2105ZM8.83768 8.83768C8.08737 9.02526 7.38821 9.37768 6.78947 9.87032C6.816 9.00063 7.00358 8.14421 7.34274 7.34274C8.14421 7.00547 9.00253 6.81789 9.87032 6.78947C9.37768 7.38632 9.02526 8.08547 8.83768 8.83768Z" fill="#42D689"/>
5
+ </svg>
package/src/env.ts CHANGED
@@ -40,6 +40,16 @@ const envDefinitions = {
40
40
  parser: stringParser,
41
41
  desc: "Node API endpoint for algorand",
42
42
  },
43
+ API_CELO_INDEXER: {
44
+ def: "https://celo.coin.ledger.com/indexer/",
45
+ parser: stringParser,
46
+ desc: "Explorer API for celo",
47
+ },
48
+ API_CELO_NODE: {
49
+ def: "https://celo.coin.ledger.com/archive/",
50
+ parser: stringParser,
51
+ desc: "Node endpoint for celo",
52
+ },
43
53
  API_COSMOS_BLOCKCHAIN_EXPLORER_API_ENDPOINT: {
44
54
  def: "https://cosmoshub4.coin.ledger.com/",
45
55
  parser: stringParser,
@@ -120,6 +130,11 @@ const envDefinitions = {
120
130
  def: "https://tron.coin.ledger.com",
121
131
  desc: "proxy url for trongrid API",
122
132
  },
133
+ API_SOLANA_PROXY: {
134
+ parser: stringParser,
135
+ def: "https://solana.coin.ledger.com",
136
+ desc: "proxy url for solana API",
137
+ },
123
138
  BASE_SOCKET_URL: {
124
139
  def: "wss://scriptrunner.api.live.ledger.com/update",
125
140
  parser: stringParser,
@@ -525,6 +540,11 @@ const envDefinitions = {
525
540
  parser: stringParser,
526
541
  desc: "url used to fetch platform app manifests (staging)",
527
542
  },
543
+ PLATFORM_LOCAL_MANIFEST_JSON: {
544
+ def: "",
545
+ parser: stringParser,
546
+ desc: 'json manifest for a local (test) platform app manifests. How to use: PLATFORM_LOCAL_MANIFEST_JSON="$(cat /path/to/file.json)"',
547
+ },
528
548
  PLATFORM_API_URL: {
529
549
  def: "",
530
550
  parser: stringParser,
package/src/errors.ts CHANGED
@@ -141,6 +141,9 @@ export const SatStackDescriptorNotImported = createCustomErrorClass(
141
141
  export const SwapNoAvailableProviders = createCustomErrorClass(
142
142
  "SwapNoAvailableProviders"
143
143
  );
144
+ export const NoSuchAppOnProvider = createCustomErrorClass(
145
+ "NoSuchAppOnProvider"
146
+ );
144
147
  export const SwapExchangeRateAmountTooLow = createCustomErrorClass(
145
148
  "SwapExchangeRateAmountTooLow"
146
149
  );
@@ -32,7 +32,27 @@ const fundProviders: Record<
32
32
  curve: string;
33
33
  }
34
34
  > = {
35
- // FIXME: no prod provider for now
35
+ baanx: {
36
+ /**
37
+ * nameAndPubkey is the concatenation of:
38
+ * - an empty buffer of the size of the partner name
39
+ * - a buffer created from the partner name string in ascii encoding
40
+ * - a buffer created from the hexadecimal version of the partner public key
41
+ */
42
+ nameAndPubkey: Buffer.concat([
43
+ Buffer.from([5]),
44
+ Buffer.from("Baanx", "ascii"),
45
+ Buffer.from(
46
+ "04551878b446b6a711949fa51cc5a8685602f8ffb1dfd08f6ab869019d7c125d7737a79e8b5022d860ec7dfbe062d510fec3b5fe0f6ebb1f5e55a074bb7e5dbc4e",
47
+ "hex"
48
+ ),
49
+ ]),
50
+ signature: Buffer.from(
51
+ "304402200345c39e93a22c5ac3f1e70f8b9938b3a60d3a4906067443cf11095af0e685a502201ee5d88dd5539ce36341e49e2505c2a1659e26d8ff08801ed33c50a9126aedd1",
52
+ "hex"
53
+ ),
54
+ curve: "secp256r1",
55
+ },
36
56
  };
37
57
 
38
58
  const getProvider = (
@@ -1,6 +1,5 @@
1
1
  import { encode as msgpackEncode } from "algo-msgpack-with-bigint";
2
2
  import type {
3
- SuggestedParams as AlgoSuggestedParams,
4
3
  Transaction as AlgoTransaction,
5
4
  EncodedTransaction as AlgoTransactionPayload,
6
5
  EncodedSignedTransaction as AlgoSignedTransactionPayload,
@@ -28,8 +27,7 @@ export const buildTransactionPayload = async (
28
27
 
29
28
  const note = memo ? new TextEncoder().encode(memo) : undefined;
30
29
 
31
- // Minor hack: cast the result as a algosdk.SuggestedParams, while it's actually a TransactionParametersResponse
32
- const params = (await getTransactionParams()) as AlgoSuggestedParams;
30
+ const params = await getTransactionParams();
33
31
 
34
32
  let algoTxn: AlgoTransaction;
35
33
  if (subAccount || (assetId && mode === "optIn")) {
@@ -78,18 +76,16 @@ export const buildTransactionPayload = async (
78
76
  return sorted;
79
77
  };
80
78
 
81
- export const encodeToSign = async (
82
- payload: AlgoTransactionPayload
83
- ): Promise<string> => {
79
+ export const encodeToSign = (payload: AlgoTransactionPayload): string => {
84
80
  const msgPackEncoded = msgpackEncode(payload);
85
81
 
86
82
  return Buffer.from(msgPackEncoded).toString("hex");
87
83
  };
88
84
 
89
- export const encodeToBroadcast = async (
85
+ export const encodeToBroadcast = (
90
86
  payload: AlgoTransactionPayload,
91
87
  signature: Buffer
92
- ): Promise<Buffer> => {
88
+ ): Buffer => {
93
89
  const signedPayload: AlgoSignedTransactionPayload = {
94
90
  sig: signature,
95
91
  txn: payload,
@@ -17,7 +17,7 @@ export const getEstimatedFees = async (
17
17
  let suggestedFees = 0;
18
18
  if (params.fee) {
19
19
  const payload = await buildTransactionPayload(account, transaction);
20
- const encoded = await encodeToSign(payload);
20
+ const encoded = encodeToSign(payload);
21
21
  suggestedFees =
22
22
  params.fee * (Buffer.from(encoded, "hex").length + SINGLE_SIGNATURE_SIZE);
23
23
  }
@@ -36,7 +36,7 @@ export const signOperation = ({
36
36
 
37
37
  const algoTx = await buildTransactionPayload(account, transaction);
38
38
 
39
- const toSign = await encodeToSign(algoTx);
39
+ const toSign = encodeToSign(algoTx);
40
40
 
41
41
  const hwApp = new Algorand(transport);
42
42
  const { freshAddressPath } = account;
@@ -53,7 +53,7 @@ export const signOperation = ({
53
53
  throw new Error("No signature");
54
54
  }
55
55
 
56
- const toBroadcast = await encodeToBroadcast(algoTx, signature);
56
+ const toBroadcast = encodeToBroadcast(algoTx, signature);
57
57
 
58
58
  const operation = buildOptimisticOperation(account, transaction);
59
59
 
@@ -291,6 +291,7 @@ const getAccountShape: GetAccountShape = async (
291
291
 
292
292
  const shape = {
293
293
  id: accountId,
294
+ xpub: address,
294
295
  blockHeight: round,
295
296
  balance,
296
297
  spendableBalance,
@@ -32,7 +32,7 @@ const signOperation = ({
32
32
  try {
33
33
  log("hw", `signTransaction ${currency.id} for account ${account.id}`);
34
34
  const txInfo = await buildTransaction(account, transaction);
35
- let senders: string[] = [];
35
+ let senders = new Set<string>();
36
36
  let recipients: string[] = [];
37
37
  let fee = new BigNumber(0);
38
38
  // Maybe better not re-calculate these fields here, instead include them
@@ -41,9 +41,7 @@ const signOperation = ({
41
41
  account,
42
42
  transaction,
43
43
  }).then((res) => {
44
- senders = res.txInputs
45
- .map((i) => i.address)
46
- .filter(Boolean) as string[];
44
+ senders = new Set(res.txInputs.map((i) => i.address).filter(Boolean));
47
45
  recipients = res.txOutputs
48
46
  .filter((o) => o.address && !o.isChange)
49
47
  .map((o) => o.address) as string[];
@@ -140,7 +138,7 @@ const signOperation = ({
140
138
  fee,
141
139
  blockHash: null,
142
140
  blockHeight: null,
143
- senders,
141
+ senders: Array.from(senders),
144
142
  recipients,
145
143
  accountId: account.id,
146
144
  date: new Date(),
@@ -100,7 +100,7 @@ const mapTxToOperations = (
100
100
  const blockHeight = tx.block?.height;
101
101
  const blockHash = tx.block?.hash;
102
102
  const date = new Date(tx.block?.time || tx.received_at);
103
- const senders: string[] = [];
103
+ const senders = new Set<string>();
104
104
  const recipients: string[] = [];
105
105
  let type: OperationType = "OUT";
106
106
  let value = new BigNumber(0);
@@ -111,7 +111,7 @@ const mapTxToOperations = (
111
111
 
112
112
  for (const input of tx.inputs) {
113
113
  if (input.address) {
114
- senders.push(
114
+ senders.add(
115
115
  syncReplaceAddress ? syncReplaceAddress(input.address) : input.address
116
116
  );
117
117
 
@@ -195,7 +195,7 @@ const mapTxToOperations = (
195
195
  type,
196
196
  value,
197
197
  fee,
198
- senders,
198
+ senders: Array.from(senders),
199
199
  recipients,
200
200
  blockHeight,
201
201
  blockHash,
@@ -229,7 +229,7 @@ const mapTxToOperations = (
229
229
  type,
230
230
  value,
231
231
  fee,
232
- senders,
232
+ senders: Array.from(senders),
233
233
  recipients,
234
234
  blockHeight,
235
235
  blockHash,