@ledgerhq/coin-evm 5.4.0 → 7.0.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 (342) hide show
  1. package/CHANGELOG.md +197 -0
  2. package/docs/evm-family-integration-process/README.md +1 -1
  3. package/knip.json +2 -3
  4. package/lib/adapters/blockOperations.js +6 -6
  5. package/lib/adapters/blockOperations.js.map +1 -1
  6. package/lib/adapters/etherscan.js +23 -23
  7. package/lib/adapters/etherscan.js.map +1 -1
  8. package/lib/adapters/ledger.js +17 -17
  9. package/lib/adapters/ledger.js.map +1 -1
  10. package/lib/api/index.js +4 -4
  11. package/lib/api/index.js.map +1 -1
  12. package/lib/config.d.ts +21 -15
  13. package/lib/config.d.ts.map +1 -1
  14. package/lib/config.js +5 -25
  15. package/lib/config.js.map +1 -1
  16. package/lib/errors.d.ts +9 -0
  17. package/lib/errors.d.ts.map +1 -1
  18. package/lib/errors.js +15 -1
  19. package/lib/errors.js.map +1 -1
  20. package/lib/logic/broadcast.js +1 -1
  21. package/lib/logic/broadcast.js.map +1 -1
  22. package/lib/logic/common.d.ts +2 -1
  23. package/lib/logic/common.d.ts.map +1 -1
  24. package/lib/logic/common.js +4 -4
  25. package/lib/logic/common.js.map +1 -1
  26. package/lib/logic/craftTransaction.d.ts.map +1 -1
  27. package/lib/logic/craftTransaction.js +2 -2
  28. package/lib/logic/craftTransaction.js.map +1 -1
  29. package/lib/logic/estimateFees.d.ts.map +1 -1
  30. package/lib/logic/estimateFees.js +9 -9
  31. package/lib/logic/estimateFees.js.map +1 -1
  32. package/lib/logic/getBalance.d.ts.map +1 -1
  33. package/lib/logic/getBalance.js +50 -16
  34. package/lib/logic/getBalance.js.map +1 -1
  35. package/lib/logic/getBlock.d.ts.map +1 -1
  36. package/lib/logic/getBlock.js +19 -11
  37. package/lib/logic/getBlock.js.map +1 -1
  38. package/lib/logic/getBlockInfo.js +1 -1
  39. package/lib/logic/getBlockInfo.js.map +1 -1
  40. package/lib/logic/getNextSequence.d.ts.map +1 -1
  41. package/lib/logic/getNextSequence.js +1 -1
  42. package/lib/logic/getNextSequence.js.map +1 -1
  43. package/lib/logic/index.d.ts +2 -0
  44. package/lib/logic/index.d.ts.map +1 -1
  45. package/lib/logic/index.js +4 -0
  46. package/lib/logic/index.js.map +1 -1
  47. package/lib/logic/lastBlock.js +1 -1
  48. package/lib/logic/lastBlock.js.map +1 -1
  49. package/lib/logic/listOperations.d.ts.map +1 -1
  50. package/lib/logic/listOperations.js +10 -1
  51. package/lib/logic/listOperations.js.map +1 -1
  52. package/lib/logic/validateIntent.d.ts.map +1 -1
  53. package/lib/logic/validateIntent.js +12 -12
  54. package/lib/logic/validateIntent.js.map +1 -1
  55. package/lib/logic-public/index.d.ts +3 -0
  56. package/lib/logic-public/index.d.ts.map +1 -0
  57. package/lib/logic-public/index.js +19 -0
  58. package/lib/logic-public/index.js.map +1 -0
  59. package/lib/{utils.d.ts → logic-public/utils.d.ts} +0 -44
  60. package/lib/logic-public/utils.d.ts.map +1 -0
  61. package/lib/logic-public/utils.js +166 -0
  62. package/lib/logic-public/utils.js.map +1 -0
  63. package/lib/logic.d.ts +2 -1
  64. package/lib/logic.d.ts.map +1 -1
  65. package/lib/logic.js +3 -3
  66. package/lib/logic.js.map +1 -1
  67. package/lib/network/explorer/etherscan.d.ts +16 -3
  68. package/lib/network/explorer/etherscan.d.ts.map +1 -1
  69. package/lib/network/explorer/etherscan.js +61 -6
  70. package/lib/network/explorer/etherscan.js.map +1 -1
  71. package/lib/network/explorer/ledger.d.ts +50 -4
  72. package/lib/network/explorer/ledger.d.ts.map +1 -1
  73. package/lib/network/explorer/ledger.js +286 -37
  74. package/lib/network/explorer/ledger.js.map +1 -1
  75. package/lib/network/explorer/none.d.ts +1 -0
  76. package/lib/network/explorer/none.d.ts.map +1 -1
  77. package/lib/network/explorer/none.js +4 -1
  78. package/lib/network/explorer/none.js.map +1 -1
  79. package/lib/network/explorer/types.d.ts +15 -2
  80. package/lib/network/explorer/types.d.ts.map +1 -1
  81. package/lib/network/explorer/types.js.map +1 -1
  82. package/lib/network/index.d.ts +5 -0
  83. package/lib/network/index.d.ts.map +1 -0
  84. package/lib/network/index.js +23 -0
  85. package/lib/network/index.js.map +1 -0
  86. package/lib/network/node/explorerProxy.d.ts +27 -0
  87. package/lib/network/node/explorerProxy.d.ts.map +1 -0
  88. package/lib/network/node/explorerProxy.js +262 -0
  89. package/lib/network/node/explorerProxy.js.map +1 -0
  90. package/lib/network/node/index.d.ts +2 -1
  91. package/lib/network/node/index.d.ts.map +1 -1
  92. package/lib/network/node/index.js +11 -10
  93. package/lib/network/node/index.js.map +1 -1
  94. package/lib/network/node/ledger.js +7 -7
  95. package/lib/network/node/ledger.js.map +1 -1
  96. package/lib/network/node/rpc.common.d.ts +2 -2
  97. package/lib/network/node/rpc.common.js +19 -19
  98. package/lib/network/node/rpc.common.js.map +1 -1
  99. package/lib/network/node/withNodeSources.d.ts +21 -0
  100. package/lib/network/node/withNodeSources.d.ts.map +1 -0
  101. package/lib/network/node/withNodeSources.js +78 -0
  102. package/lib/network/node/withNodeSources.js.map +1 -0
  103. package/lib/nodeSources.d.ts +15 -0
  104. package/lib/nodeSources.d.ts.map +1 -0
  105. package/lib/nodeSources.js +33 -0
  106. package/lib/nodeSources.js.map +1 -0
  107. package/lib/staking/contracts.js +1 -1
  108. package/lib/staking/contracts.js.map +1 -1
  109. package/lib/staking/fetchers.js +1 -1
  110. package/lib/staking/fetchers.js.map +1 -1
  111. package/lib/staking/operations/sei.js +1 -1
  112. package/lib/staking/operations/sei.js.map +1 -1
  113. package/lib/staking/prepareIntents.js +3 -3
  114. package/lib/staking/prepareIntents.js.map +1 -1
  115. package/lib/staking/rewards.js +1 -1
  116. package/lib/staking/rewards.js.map +1 -1
  117. package/lib/staking/transactionData.js +2 -2
  118. package/lib/staking/transactionData.js.map +1 -1
  119. package/lib/staking/utils.d.ts +45 -0
  120. package/lib/staking/utils.d.ts.map +1 -0
  121. package/lib/{utils.js → staking/utils.js} +5 -164
  122. package/lib/staking/utils.js.map +1 -0
  123. package/lib/staking/validators/sei.js +1 -1
  124. package/lib/staking/validators/sei.js.map +1 -1
  125. package/lib/types/staking.d.ts +2 -2
  126. package/lib-es/adapters/blockOperations.js +1 -1
  127. package/lib-es/adapters/blockOperations.js.map +1 -1
  128. package/lib-es/adapters/etherscan.js +1 -1
  129. package/lib-es/adapters/etherscan.js.map +1 -1
  130. package/lib-es/adapters/ledger.js +1 -1
  131. package/lib-es/adapters/ledger.js.map +1 -1
  132. package/lib-es/api/index.js +2 -2
  133. package/lib-es/api/index.js.map +1 -1
  134. package/lib-es/config.d.ts +21 -15
  135. package/lib-es/config.d.ts.map +1 -1
  136. package/lib-es/config.js +1 -21
  137. package/lib-es/config.js.map +1 -1
  138. package/lib-es/errors.d.ts +9 -0
  139. package/lib-es/errors.d.ts.map +1 -1
  140. package/lib-es/errors.js +13 -0
  141. package/lib-es/errors.js.map +1 -1
  142. package/lib-es/logic/broadcast.js +1 -1
  143. package/lib-es/logic/broadcast.js.map +1 -1
  144. package/lib-es/logic/common.d.ts +2 -1
  145. package/lib-es/logic/common.d.ts.map +1 -1
  146. package/lib-es/logic/common.js +3 -3
  147. package/lib-es/logic/common.js.map +1 -1
  148. package/lib-es/logic/craftTransaction.d.ts.map +1 -1
  149. package/lib-es/logic/craftTransaction.js +2 -2
  150. package/lib-es/logic/craftTransaction.js.map +1 -1
  151. package/lib-es/logic/estimateFees.d.ts.map +1 -1
  152. package/lib-es/logic/estimateFees.js +6 -6
  153. package/lib-es/logic/estimateFees.js.map +1 -1
  154. package/lib-es/logic/getBalance.d.ts.map +1 -1
  155. package/lib-es/logic/getBalance.js +50 -16
  156. package/lib-es/logic/getBalance.js.map +1 -1
  157. package/lib-es/logic/getBlock.d.ts.map +1 -1
  158. package/lib-es/logic/getBlock.js +16 -8
  159. package/lib-es/logic/getBlock.js.map +1 -1
  160. package/lib-es/logic/getBlockInfo.js +1 -1
  161. package/lib-es/logic/getBlockInfo.js.map +1 -1
  162. package/lib-es/logic/getNextSequence.d.ts.map +1 -1
  163. package/lib-es/logic/getNextSequence.js +1 -1
  164. package/lib-es/logic/getNextSequence.js.map +1 -1
  165. package/lib-es/logic/index.d.ts +2 -0
  166. package/lib-es/logic/index.d.ts.map +1 -1
  167. package/lib-es/logic/index.js +4 -0
  168. package/lib-es/logic/index.js.map +1 -1
  169. package/lib-es/logic/lastBlock.js +1 -1
  170. package/lib-es/logic/lastBlock.js.map +1 -1
  171. package/lib-es/logic/listOperations.d.ts.map +1 -1
  172. package/lib-es/logic/listOperations.js +10 -1
  173. package/lib-es/logic/listOperations.js.map +1 -1
  174. package/lib-es/logic/validateIntent.d.ts.map +1 -1
  175. package/lib-es/logic/validateIntent.js +4 -4
  176. package/lib-es/logic/validateIntent.js.map +1 -1
  177. package/lib-es/logic-public/index.d.ts +3 -0
  178. package/lib-es/logic-public/index.d.ts.map +1 -0
  179. package/lib-es/logic-public/index.js +4 -0
  180. package/lib-es/logic-public/index.js.map +1 -0
  181. package/lib-es/{utils.d.ts → logic-public/utils.d.ts} +0 -44
  182. package/lib-es/logic-public/utils.d.ts.map +1 -0
  183. package/lib-es/logic-public/utils.js +150 -0
  184. package/lib-es/logic-public/utils.js.map +1 -0
  185. package/lib-es/logic.d.ts +2 -1
  186. package/lib-es/logic.d.ts.map +1 -1
  187. package/lib-es/logic.js +3 -3
  188. package/lib-es/logic.js.map +1 -1
  189. package/lib-es/network/explorer/etherscan.d.ts +16 -3
  190. package/lib-es/network/explorer/etherscan.d.ts.map +1 -1
  191. package/lib-es/network/explorer/etherscan.js +60 -5
  192. package/lib-es/network/explorer/etherscan.js.map +1 -1
  193. package/lib-es/network/explorer/ledger.d.ts +50 -4
  194. package/lib-es/network/explorer/ledger.d.ts.map +1 -1
  195. package/lib-es/network/explorer/ledger.js +283 -37
  196. package/lib-es/network/explorer/ledger.js.map +1 -1
  197. package/lib-es/network/explorer/none.d.ts +1 -0
  198. package/lib-es/network/explorer/none.d.ts.map +1 -1
  199. package/lib-es/network/explorer/none.js +2 -0
  200. package/lib-es/network/explorer/none.js.map +1 -1
  201. package/lib-es/network/explorer/types.d.ts +15 -2
  202. package/lib-es/network/explorer/types.d.ts.map +1 -1
  203. package/lib-es/network/explorer/types.js.map +1 -1
  204. package/lib-es/network/index.d.ts +5 -0
  205. package/lib-es/network/index.d.ts.map +1 -0
  206. package/lib-es/network/index.js +7 -0
  207. package/lib-es/network/index.js.map +1 -0
  208. package/lib-es/network/node/explorerProxy.d.ts +27 -0
  209. package/lib-es/network/node/explorerProxy.d.ts.map +1 -0
  210. package/lib-es/network/node/explorerProxy.js +254 -0
  211. package/lib-es/network/node/explorerProxy.js.map +1 -0
  212. package/lib-es/network/node/index.d.ts +2 -1
  213. package/lib-es/network/node/index.d.ts.map +1 -1
  214. package/lib-es/network/node/index.js +11 -10
  215. package/lib-es/network/node/index.js.map +1 -1
  216. package/lib-es/network/node/ledger.js +1 -1
  217. package/lib-es/network/node/ledger.js.map +1 -1
  218. package/lib-es/network/node/rpc.common.d.ts +2 -2
  219. package/lib-es/network/node/rpc.common.js +3 -3
  220. package/lib-es/network/node/rpc.common.js.map +1 -1
  221. package/lib-es/network/node/withNodeSources.d.ts +21 -0
  222. package/lib-es/network/node/withNodeSources.d.ts.map +1 -0
  223. package/lib-es/network/node/withNodeSources.js +74 -0
  224. package/lib-es/network/node/withNodeSources.js.map +1 -0
  225. package/lib-es/nodeSources.d.ts +15 -0
  226. package/lib-es/nodeSources.d.ts.map +1 -0
  227. package/lib-es/nodeSources.js +28 -0
  228. package/lib-es/nodeSources.js.map +1 -0
  229. package/lib-es/staking/contracts.js +1 -1
  230. package/lib-es/staking/contracts.js.map +1 -1
  231. package/lib-es/staking/fetchers.js +1 -1
  232. package/lib-es/staking/fetchers.js.map +1 -1
  233. package/lib-es/staking/operations/sei.js +1 -1
  234. package/lib-es/staking/operations/sei.js.map +1 -1
  235. package/lib-es/staking/prepareIntents.js +1 -1
  236. package/lib-es/staking/prepareIntents.js.map +1 -1
  237. package/lib-es/staking/rewards.js +1 -1
  238. package/lib-es/staking/rewards.js.map +1 -1
  239. package/lib-es/staking/transactionData.js +1 -1
  240. package/lib-es/staking/transactionData.js.map +1 -1
  241. package/lib-es/staking/utils.d.ts +45 -0
  242. package/lib-es/staking/utils.d.ts.map +1 -0
  243. package/lib-es/{utils.js → staking/utils.js} +1 -147
  244. package/lib-es/staking/utils.js.map +1 -0
  245. package/lib-es/staking/validators/sei.js +1 -1
  246. package/lib-es/staking/validators/sei.js.map +1 -1
  247. package/lib-es/types/staking.d.ts +2 -2
  248. package/package.json +72 -7
  249. package/src/adapters/blockOperations.ts +1 -1
  250. package/src/adapters/etherscan.ts +1 -1
  251. package/src/adapters/ledger.ts +1 -1
  252. package/src/api/{index.arc_testnet.integ.test.ts → index.arc.integ.test.ts} +15 -12
  253. package/src/api/index.monad_testnet.integ.test.ts +95 -4
  254. package/src/api/index.ts +2 -2
  255. package/src/config.ts +22 -34
  256. package/src/errors.ts +13 -0
  257. package/src/fixtures/context.fixtures.ts +6 -1
  258. package/src/logic/broadcast.ts +1 -1
  259. package/src/logic/common.ts +4 -2
  260. package/src/logic/craftTransaction.ts +2 -1
  261. package/src/logic/estimateFees.ts +20 -6
  262. package/src/logic/getBalance.ts +72 -26
  263. package/src/logic/getBlock.ts +26 -14
  264. package/src/logic/getBlockInfo.ts +1 -1
  265. package/src/logic/getNextSequence.ts +4 -1
  266. package/src/logic/index.ts +4 -0
  267. package/src/logic/lastBlock.ts +1 -1
  268. package/src/logic/listOperations.ts +14 -1
  269. package/src/logic/tests/broadcast.integ.test.ts +53 -0
  270. package/src/logic/{broadcast.test.ts → tests/broadcast.test.ts} +7 -7
  271. package/src/logic/{broadcastSource.test.ts → tests/broadcastSource.test.ts} +6 -6
  272. package/src/logic/{combine.test.ts → tests/combine.test.ts} +1 -1
  273. package/src/logic/{common.test.ts → tests/common.test.ts} +45 -21
  274. package/src/logic/{computeGasLimit.test.ts → tests/computeGasLimit.test.ts} +2 -2
  275. package/src/logic/{craftTransaction.test.ts → tests/craftTransaction.test.ts} +7 -7
  276. package/src/logic/{craftTransactionData.test.ts → tests/craftTransactionData.test.ts} +4 -4
  277. package/src/logic/{estimateFees.test.ts → tests/estimateFees.test.ts} +12 -12
  278. package/src/logic/tests/getBalance.test.ts +602 -0
  279. package/src/logic/{getBlock.test.ts → tests/getBlock.test.ts} +182 -89
  280. package/src/logic/{getBlockInfo.test.ts → tests/getBlockInfo.test.ts} +8 -8
  281. package/src/logic/{getErc20Data.test.ts → tests/getErc20Data.test.ts} +1 -1
  282. package/src/logic/{getNextSequence.test.ts → tests/getNextSequence.test.ts} +7 -7
  283. package/src/logic/{getStakes.test.ts → tests/getStakes.test.ts} +13 -13
  284. package/src/logic/{internalTransactionsFetcher.test.ts → tests/internalTransactionsFetcher.test.ts} +8 -8
  285. package/src/logic/{lastBlock.test.ts → tests/lastBlock.test.ts} +7 -7
  286. package/src/logic/{listOperations.test.ts → tests/listOperations.test.ts} +125 -6
  287. package/src/logic/{validateAddress.test.ts → tests/validateAddress.test.ts} +1 -1
  288. package/src/logic/{validateIntent.test.ts → tests/validateIntent.test.ts} +80 -78
  289. package/src/logic/validateIntent.ts +7 -4
  290. package/src/logic-public/index.ts +18 -0
  291. package/src/{utils.test.ts → logic-public/tests/utils.test.ts} +1 -27
  292. package/src/logic-public/utils.ts +184 -0
  293. package/src/logic.test.ts +5 -59
  294. package/src/logic.ts +5 -3
  295. package/src/network/explorer/etherscan.test.ts +403 -195
  296. package/src/network/explorer/etherscan.ts +99 -10
  297. package/src/network/explorer/index.test.ts +27 -0
  298. package/src/network/explorer/ledger.test.ts +791 -62
  299. package/src/network/explorer/ledger.ts +426 -54
  300. package/src/network/explorer/none.ts +3 -0
  301. package/src/network/explorer/types.ts +29 -5
  302. package/src/network/index.ts +7 -0
  303. package/src/network/node/explorerProxy.test.ts +673 -0
  304. package/src/network/node/explorerProxy.ts +308 -0
  305. package/src/network/node/index.memoization.test.ts +22 -10
  306. package/src/network/node/index.test.ts +6 -3
  307. package/src/network/node/index.ts +11 -7
  308. package/src/network/node/ledger.ts +1 -1
  309. package/src/network/node/rpc.common.ts +3 -3
  310. package/src/network/node/rpc.test.ts +66 -105
  311. package/src/network/node/withNodeSources.test.ts +240 -0
  312. package/src/network/node/withNodeSources.ts +95 -0
  313. package/src/nodeSources.ts +38 -0
  314. package/src/staking/contracts.ts +1 -1
  315. package/src/staking/encoder.test.ts +1 -1
  316. package/src/staking/fetchers.ts +1 -1
  317. package/src/staking/operations/sei.ts +1 -1
  318. package/src/staking/prepareIntents.ts +1 -1
  319. package/src/staking/redelegations.test.ts +1 -1
  320. package/src/staking/rewards.test.ts +1 -1
  321. package/src/staking/rewards.ts +1 -1
  322. package/src/staking/transactionData.ts +1 -1
  323. package/src/staking/unbondings.test.ts +1 -1
  324. package/src/staking/utils.test.ts +25 -0
  325. package/src/{utils.ts → staking/utils.ts} +2 -182
  326. package/src/staking/validators/sei.ts +1 -1
  327. package/src/types/staking.ts +2 -2
  328. package/lib/constants.d.ts +0 -2
  329. package/lib/constants.d.ts.map +0 -1
  330. package/lib/constants.js +0 -11
  331. package/lib/constants.js.map +0 -1
  332. package/lib/utils.d.ts.map +0 -1
  333. package/lib/utils.js.map +0 -1
  334. package/lib-es/constants.d.ts +0 -2
  335. package/lib-es/constants.d.ts.map +0 -1
  336. package/lib-es/constants.js +0 -7
  337. package/lib-es/constants.js.map +0 -1
  338. package/lib-es/utils.d.ts.map +0 -1
  339. package/lib-es/utils.js.map +0 -1
  340. package/src/constants.ts +0 -9
  341. package/src/logic/broadcast.integ.test.ts +0 -46
  342. package/src/logic/getBalance.test.ts +0 -362
@@ -2,33 +2,65 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { delay } from '@ledgerhq/coin-module-framework/promises';
4
4
  import axios from 'axios';
5
+ import eip55 from 'eip55';
5
6
  import { ledgerERC1155EventToOperations, ledgerERC20EventToOperations, ledgerERC721EventToOperations, ledgerInternalTransactionToOperations, ledgerOperationToOperations, } from '../../adapters/index';
6
7
  import { DEFAULT_LEDGER_EXPLORER_URI } from '../../config';
7
- import { LedgerExplorerUsedIncorrectly, RateLimitError } from '../../errors';
8
+ import { LedgerExplorerUsedIncorrectly, RateLimitError, UnpageableLedgerExplorerBlock, } from '../../errors';
9
+ import { safeEncodeEIP55 } from '../../logic-public';
8
10
  import { isLedgerExplorerConfig, NO_TOKEN } from './types';
9
11
  export const DEFAULT_BATCH_SIZE = 10_000;
10
12
  export const LEDGER_TIMEOUT = 200; // 200ms between 2 calls
11
13
  export const DEFAULT_RETRIES_API = 2;
14
+ /**
15
+ * Page size for the discovery walk (see `discoverTokenAssets` below). Once discovery no longer
16
+ * accumulates pages (see `fetchPaginatedOpsWithRetries`), its peak memory is one *parsed* page,
17
+ * so this constant is a memory bound, not a throughput knob — it does not affect `getOperations`.
18
+ */
19
+ export const DISCOVERY_BATCH_SIZE = 100;
20
+ /**
21
+ * The explorer serves at most this many records per request regardless of a larger `batch_size`
22
+ * — measured against `https://explorers.api.live.ledger.com`: a requested 10 000 is served as
23
+ * 500. A raw page at or above this ceiling can never be trusted as proof there is nothing more,
24
+ * no matter how large `batch_size` was asked to be — see `fetchLedgerOpsPage`.
25
+ */
26
+ export const EXPLORER_MAX_PAGE_SIZE = 500;
27
+ function mapExplorerOrder(order = 'asc') {
28
+ return order === 'desc' ? 'descending' : 'ascending';
29
+ }
30
+ /**
31
+ * Bare HTTP call for a single page: no retry, no accumulation.
32
+ *
33
+ * `paginationToken`: `undefined` omits the `token` parameter entirely (the paged fetch resumes
34
+ * through `from_height`/`to_height`, never through the explorer's own token); `null` or a string
35
+ * requests continuation through the explorer's token, as the exhaustive walks below do.
36
+ */
37
+ async function requestOpsPage(params, paginationToken) {
38
+ const { data: { data: operations, token }, } = await axios.request({
39
+ ...(params.clientVersion
40
+ ? { headers: { 'X-Ledger-Client-Version': params.clientVersion } }
41
+ : {}),
42
+ method: 'GET',
43
+ url: `${params.explorerUri ?? DEFAULT_LEDGER_EXPLORER_URI}/blockchain/v4/${params.explorerId}/address/${params.address}/txs`,
44
+ params: {
45
+ filtering: true,
46
+ from_height: params.fromBlock ?? 0,
47
+ // Needed to make sure we get transactions after the block height and not before, when no
48
+ // explicit order is requested. Order is still descending in the end for that legacy walk.
49
+ order: mapExplorerOrder(params.order),
50
+ batch_size: params.batchSize,
51
+ ...(params.toBlock !== undefined ? { to_height: params.toBlock } : {}),
52
+ ...(paginationToken !== undefined ? { token: paginationToken } : {}),
53
+ },
54
+ });
55
+ return { operations, token };
56
+ }
12
57
  /**
13
58
  * Request fetching all operations from an address
14
59
  * and supporting pagination through tokens.
15
60
  */
16
61
  export async function fetchPaginatedOpsWithRetries(params, paginationToken = null, previousOperations = [], retries = DEFAULT_RETRIES_API) {
17
62
  try {
18
- const { data: { data: operationsBatch, token }, } = await axios.request({
19
- ...(params.clientVersion
20
- ? { headers: { 'X-Ledger-Client-Version': params.clientVersion } }
21
- : {}),
22
- method: 'GET',
23
- url: `${params.explorerUri ?? DEFAULT_LEDGER_EXPLORER_URI}/blockchain/v4/${params.explorerId}/address/${params.address}/txs`,
24
- params: {
25
- filtering: true,
26
- from_height: params.fromBlock ?? 0,
27
- order: 'ascending', // Needed to make sure we get transactions after the block height and not before. Order is still descending in the end
28
- batch_size: params.batchSize,
29
- token: paginationToken,
30
- },
31
- });
63
+ const { operations: operationsBatch, token } = await requestOpsPage(params, paginationToken);
32
64
  previousOperations.push(...operationsBatch);
33
65
  return token
34
66
  ? fetchPaginatedOpsWithRetries(params, token, previousOperations, retries)
@@ -50,25 +82,138 @@ export async function fetchPaginatedOpsWithRetries(params, paginationToken = nul
50
82
  }
51
83
  }
52
84
  /**
53
- * Returns all operation types from an address
85
+ * Fetch a single page, retrying up to `retries` times on failure. Shared by the discovery walk
86
+ * and the paged fetch below. Unlike `fetchPaginatedOpsWithRetries`, the retry budget is per page,
87
+ * not per walk: a page that keeps failing after its own retries propagates instead of being
88
+ * silently skipped — a hole in the middle of a walk is worse than a failure.
54
89
  *
55
- * Note: Ledger explorer fetches all pages recursively internally,
56
- * so pagination parameters are ignored and nextPagingToken is always empty.
57
- * Pagination may be supported in the future.
90
+ * A rate limit is the one error that is never retried, exactly as the exhaustive walk treats it:
91
+ * it is not transient, so spending the budget on it only walks the caller into a timeout.
58
92
  */
59
- export const getOperations = async (config, currencyId, address, fromBlock) => {
60
- const { explorer } = config || /* istanbul ignore next */ {};
61
- if (!isLedgerExplorerConfig(explorer)) {
62
- throw new LedgerExplorerUsedIncorrectly(`Ledger explorer used incorrectly with currency: ${currencyId}`);
93
+ async function requestOpsPageWithRetries(params, paginationToken, retries = DEFAULT_RETRIES_API) {
94
+ try {
95
+ return await requestOpsPage(params, paginationToken);
63
96
  }
64
- const ledgerExplorerOps = await fetchPaginatedOpsWithRetries({
65
- explorerUri: config.ledgerExplorerUri,
66
- clientVersion: config.ledgerClientVersion,
67
- explorerId: explorer.explorerId,
68
- address,
69
- fromBlock,
70
- batchSize: explorer.batchSize ?? DEFAULT_BATCH_SIZE,
71
- }, null, [], explorer.retries ?? DEFAULT_RETRIES_API);
97
+ catch (e) {
98
+ if (axios.isAxiosError(e) && e.response?.status === 429) {
99
+ throw new RateLimitError();
100
+ }
101
+ if (retries) {
102
+ await delay(LEDGER_TIMEOUT);
103
+ return requestOpsPageWithRetries(params, paginationToken, retries - 1);
104
+ }
105
+ throw e;
106
+ }
107
+ }
108
+ /** Serialises a cursor, or `NO_TOKEN` when there is no record to resume from. */
109
+ export function serializeLedgerCursor(record) {
110
+ return record ? `${record.height}:${record.hash}` : NO_TOKEN;
111
+ }
112
+ /**
113
+ * Parses a cursor produced by `serializeLedgerCursor`. Returns `undefined` for an absent cursor
114
+ * or `NO_TOKEN` (first page); throws on anything else that does not match the `height:hash` shape
115
+ * — mirroring `deserializePagingToken`'s contract for the etherscan-like arm.
116
+ */
117
+ export function parseLedgerCursor(cursor) {
118
+ if (cursor === undefined || cursor === NO_TOKEN)
119
+ return undefined;
120
+ const separatorIndex = cursor.indexOf(':');
121
+ const heightPart = cursor.slice(0, separatorIndex);
122
+ const hash = cursor.slice(separatorIndex + 1);
123
+ const height = Number.parseInt(heightPart, 10);
124
+ if (separatorIndex <= 0 || hash.length === 0 || Number.isNaN(height)) {
125
+ throw new Error(`Invalid ledger explorer cursor: ${cursor}`);
126
+ }
127
+ return { height, hash };
128
+ }
129
+ /**
130
+ * Resolves the block window for one paged request: the cursor caps a descending walk (it is a
131
+ * ceiling, combined with the caller's `toBlock` as the more restrictive of the two) and floors an
132
+ * ascending one (combined with the caller's `fromBlock` the same way). `from_height` is always a
133
+ * floor on this explorer, never a resume point — resuming a descending walk therefore goes
134
+ * through `to_height`, not `from_height`.
135
+ */
136
+ function resolveWindow(order, fromBlock, toBlock, cursor) {
137
+ if (order === 'desc') {
138
+ const ceiling = cursor === undefined
139
+ ? toBlock
140
+ : toBlock === undefined
141
+ ? cursor.height
142
+ : Math.min(cursor.height, toBlock);
143
+ return { fromBlock, toBlock: ceiling };
144
+ }
145
+ const floor = cursor === undefined ? fromBlock : Math.max(cursor.height, fromBlock);
146
+ return { fromBlock: floor, toBlock };
147
+ }
148
+ /**
149
+ * Fetch exactly one page for a caller that supplied `limit`: one explorer request in the common
150
+ * case, more only to work around boundary exhaustion (see below). Never accumulates further
151
+ * pages — a caller that stops after this page causes no further explorer request.
152
+ */
153
+ async function fetchLedgerOpsPage(params) {
154
+ const cursor = parseLedgerCursor(params.cursor);
155
+ const { fromBlock, toBlock } = resolveWindow(params.order, params.fromBlock, params.toBlock, cursor);
156
+ let batchSize = params.limit;
157
+ let records = [];
158
+ let rawPageIsFull = false;
159
+ for (;;) {
160
+ const { operations: rawRecords } = await requestOpsPageWithRetries({
161
+ explorerUri: params.explorerUri,
162
+ clientVersion: params.clientVersion,
163
+ explorerId: params.explorerId,
164
+ address: params.address,
165
+ fromBlock,
166
+ toBlock,
167
+ batchSize,
168
+ order: params.order,
169
+ }, undefined, // resumed through from_height/to_height, never through the explorer's token
170
+ params.retries);
171
+ // A raw page at or beyond the explorer's own page-size ceiling can never prove the window is
172
+ // exhausted, no matter how large `batchSize` was asked to be (measured: requests above ~500
173
+ // are served as 500) — "full" is judged against whichever of the two is smaller, so doubling
174
+ // past that ceiling cannot be mistaken for the walk having reached the end of the window.
175
+ rawPageIsFull = rawRecords.length >= Math.min(batchSize, EXPLORER_MAX_PAGE_SIZE);
176
+ const cursorIndex = cursor ? rawRecords.findIndex((record) => record.hash === cursor.hash) : -1;
177
+ // No cursor: the whole page is new. A cursor supplied but not located in this page is never
178
+ // treated as "nothing to skip" — that would risk re-serving already-delivered records if a
179
+ // caller changed `limit` between two calls — it is treated the same as an exhausted boundary
180
+ // block below, so the loop can only end once every already-delivered record is accounted for.
181
+ records = !cursor ? rawRecords : cursorIndex === -1 ? [] : rawRecords.slice(cursorIndex + 1);
182
+ // Boundary exhaustion: everything the cursor should skip is still in this page, and the raw
183
+ // page was full, so the block holding the cursor's record may hold more records than the
184
+ // requested page size. Enlarge the page and re-request the same window. Bounded by that
185
+ // block's record count: the loop ends once a new record surfaces or the explorer confirms
186
+ // there is nothing left (a raw page that is not full).
187
+ if (records.length > 0 || !rawPageIsFull)
188
+ break;
189
+ if (batchSize >= EXPLORER_MAX_PAGE_SIZE) {
190
+ // Even a request at the explorer's own ceiling cannot get past this block: there is no
191
+ // per-block offset in this API, so no `batch_size` ever will either. Paging through it is
192
+ // impossible, not merely slow — fail loudly rather than loop forever or silently report the
193
+ // end of the history (which would be indistinguishable from a genuinely complete one).
194
+ // This branch is only reachable with a cursor: without one, `records` always equals
195
+ // `rawRecords`, so `records.length === 0` (the other condition to reach here) requires an
196
+ // empty raw page, which is never "full" and breaks the loop before this check.
197
+ const boundaryHeight = cursor.height;
198
+ throw new UnpageableLedgerExplorerBlock(`Ledger explorer block ${boundaryHeight} holds more records than a single page can ` +
199
+ `serve (explorer page-size ceiling: ${EXPLORER_MAX_PAGE_SIZE})`, { blockHeight: boundaryHeight, explorerMaxPageSize: EXPLORER_MAX_PAGE_SIZE });
200
+ }
201
+ batchSize *= 2;
202
+ }
203
+ // `rawPageIsFull` is only ever true when the loop above broke on `records.length > 0`, so
204
+ // `lastRecord` is always defined on that branch.
205
+ const lastRecord = records[records.length - 1];
206
+ const nextPagingToken = rawPageIsFull
207
+ ? serializeLedgerCursor({ height: lastRecord.block.height, hash: lastRecord.hash })
208
+ : NO_TOKEN;
209
+ return { operations: records, nextPagingToken };
210
+ }
211
+ /**
212
+ * Turns explorer records into the four operation buckets `getOperations` returns. Shared by both
213
+ * the legacy exhaustive path and the paged path: the same input records must produce the same
214
+ * operations regardless of which path fetched them.
215
+ */
216
+ function adaptLedgerRecords(config, currencyId, address, records) {
72
217
  const lastCoinOperations = [];
73
218
  const lastTokenOperations = [];
74
219
  const lastNftOperations = [];
@@ -76,7 +221,7 @@ export const getOperations = async (config, currencyId, address, fromBlock) => {
76
221
  // Drop ERC20 Transfer events on contracts that mirror the native asset
77
222
  const nativeContractsSet = new Set((config.nativeContracts ?? []).map((c) => c.toLowerCase()));
78
223
  const isNativeContract = (contract) => nativeContractsSet.has(contract.toLowerCase());
79
- for (const ledgerOp of ledgerExplorerOps) {
224
+ for (const ledgerOp of records) {
80
225
  const coinOps = ledgerOperationToOperations(address, currencyId, ledgerOp);
81
226
  const erc20TransferEvents = nativeContractsSet.size === 0
82
227
  ? ledgerOp.transfer_events
@@ -95,16 +240,117 @@ export const getOperations = async (config, currencyId, address, fromBlock) => {
95
240
  lastNftOperations.push(...erc1155Ops);
96
241
  lastInternalOperations.push(...internalOps);
97
242
  }
243
+ return { lastCoinOperations, lastTokenOperations, lastNftOperations, lastInternalOperations };
244
+ }
245
+ /**
246
+ * Returns all operation types from an address.
247
+ *
248
+ * With no `limit`, Ledger explorer fetches all pages recursively internally, so `nextPagingToken`
249
+ * is always empty — this is the legacy, unchanged shape. With a `limit`, exactly one page is
250
+ * fetched and `nextPagingToken` carries a cursor the caller can resume from (see
251
+ * `serializeLedgerCursor`).
252
+ */
253
+ export const getOperations = async (config, currencyId, address, fromBlock, toBlock, pagingToken, limit, order) => {
254
+ const { explorer } = config || /* istanbul ignore next */ {};
255
+ if (!isLedgerExplorerConfig(explorer)) {
256
+ throw new LedgerExplorerUsedIncorrectly(`Ledger explorer used incorrectly with currency: ${currencyId}`);
257
+ }
258
+ const settings = {
259
+ explorerUri: config.ledgerExplorerUri,
260
+ clientVersion: config.ledgerClientVersion,
261
+ explorerId: explorer.explorerId,
262
+ address,
263
+ };
264
+ let records;
265
+ let nextPagingToken;
266
+ if (limit === undefined) {
267
+ records = await fetchPaginatedOpsWithRetries({
268
+ ...settings,
269
+ fromBlock,
270
+ batchSize: explorer.batchSize ?? DEFAULT_BATCH_SIZE,
271
+ }, null, [], explorer.retries ?? DEFAULT_RETRIES_API);
272
+ nextPagingToken = NO_TOKEN; // Ledger explorer fetches all pages internally
273
+ }
274
+ else {
275
+ const page = await fetchLedgerOpsPage({
276
+ ...settings,
277
+ fromBlock,
278
+ toBlock,
279
+ cursor: pagingToken,
280
+ limit,
281
+ order: order ?? 'desc',
282
+ retries: explorer.retries ?? DEFAULT_RETRIES_API,
283
+ });
284
+ records = page.operations;
285
+ nextPagingToken = page.nextPagingToken;
286
+ }
98
287
  return {
99
- lastCoinOperations,
100
- lastTokenOperations,
101
- lastNftOperations,
102
- lastInternalOperations,
103
- nextPagingToken: NO_TOKEN, // Ledger explorer fetches all pages internally
288
+ ...adaptLedgerRecords(config, currencyId, address, records),
289
+ nextPagingToken,
290
+ };
291
+ };
292
+ /**
293
+ * Discover which tokens an address holds by walking its ERC20 transfer events, one page at a
294
+ * time, without ever holding more than the current page in memory.
295
+ *
296
+ * Unlike `getOperations`, this walk loops instead of recursing over pages and drops each page
297
+ * once its events are folded into the running `Map<assetReference, AssetInfo>`, so its peak
298
+ * memory is O(distinct contracts), not O(history length). It never caps or truncates: it keeps
299
+ * walking until the explorer says there is no more, and a page that cannot be fetched after its
300
+ * own retry budget propagates rather than being skipped.
301
+ */
302
+ export const discoverTokenAssets = async (config, currencyId, address, fromBlock) => {
303
+ const { explorer } = config || /* istanbul ignore next */ {};
304
+ if (!isLedgerExplorerConfig(explorer)) {
305
+ throw new LedgerExplorerUsedIncorrectly(`Ledger explorer used incorrectly with currency: ${currencyId}`);
306
+ }
307
+ // A smaller operator-configured batch size is honoured (it only shrinks the page); a larger
308
+ // one cannot defeat the memory bound the discovery walk relies on. A non-positive one is not
309
+ // honoured at all: it would make every page empty, end the walk immediately, and report an
310
+ // account as holding no token -- which the framework turns into a zero balance on every token
311
+ // it does hold.
312
+ const configuredBatchSize = explorer.batchSize;
313
+ const batchSize = configuredBatchSize !== undefined && configuredBatchSize > 0
314
+ ? Math.min(configuredBatchSize, DISCOVERY_BATCH_SIZE)
315
+ : DISCOVERY_BATCH_SIZE;
316
+ const params = {
317
+ explorerUri: config.ledgerExplorerUri,
318
+ clientVersion: config.ledgerClientVersion,
319
+ explorerId: explorer.explorerId,
320
+ address,
321
+ fromBlock: fromBlock ?? 0,
322
+ batchSize,
104
323
  };
324
+ const checksummedAddress = eip55.encode(address);
325
+ const assets = new Map();
326
+ let token = null;
327
+ for (;;) {
328
+ const page = await requestOpsPageWithRetries(params, token, explorer.retries ?? DEFAULT_RETRIES_API);
329
+ for (const record of page.operations) {
330
+ for (const event of record.transfer_events) {
331
+ // Same party filter as the ERC20 adapter: an event contributes an asset only if the
332
+ // requested address is its `from` or `to`, never a third party the address merely
333
+ // co-occurred with in the same transaction.
334
+ const isParty = safeEncodeEIP55(event.from) === checksummedAddress ||
335
+ safeEncodeEIP55(event.to) === checksummedAddress;
336
+ if (!isParty)
337
+ continue;
338
+ const contract = eip55.encode(event.contract);
339
+ assets.set(contract, { type: 'erc20', assetReference: contract, assetOwner: address });
340
+ }
341
+ }
342
+ // Stop on: a falsy token (normal end of history), an empty page that still carries a token
343
+ // (defends against a misbehaving explorer), or a token identical to the one just used (a
344
+ // cycling-cursor guard a plain recursion could not express).
345
+ if (!page.token || page.operations.length === 0 || page.token === token)
346
+ break;
347
+ token = page.token;
348
+ }
349
+ return Array.from(assets.values());
105
350
  };
106
351
  const ledgerExplorerAPI = {
107
352
  getOperations,
353
+ discoverTokenAssets,
108
354
  };
109
355
  export default ledgerExplorerAPI;
110
356
  //# sourceMappingURL=ledger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../../src/network/explorer/ledger.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAKtC,OAAO,EAAE,KAAK,EAAE,MAAM,0CAA0C,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,EAC5B,6BAA6B,EAC7B,qCAAqC,EACrC,2BAA2B,GAC5B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,6BAA6B,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAE1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAA;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA,CAAC,wBAAwB;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAepC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,MAAkE,EAClE,kBAAiC,IAAI,EACrC,qBAAgD,EAAE,EAClD,OAAO,GAAG,mBAAmB;IAE7B,IAAI,CAAC;QACH,MAAM,EACJ,IAAI,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,GACvC,GAAG,MAAM,KAAK,CAAC,OAAO,CAGpB;YACD,GAAG,CAAC,MAAM,CAAC,aAAa;gBACtB,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,yBAAyB,EAAE,MAAM,CAAC,aAAa,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AAK,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;YAAE,MAAK;QAC9E,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACpB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;AACpC,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAgB;IACrC,aAAa;IACb,mBAAmB;CACpB,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -4,6 +4,7 @@ import type { ExplorerApi } from './types';
4
4
  * No explorer configured - returns empty results
5
5
  */
6
6
  export declare const getOperations: ExplorerApi['getOperations'];
7
+ export declare const discoverTokenAssets: ExplorerApi['discoverTokenAssets'];
7
8
  declare const noExplorerAPI: ExplorerApi;
8
9
  export default noExplorerAPI;
9
10
  //# sourceMappingURL=none.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../../src/network/explorer/none.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAG1C;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,eAAe,CAQtD,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,WAEpB,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../../src/network/explorer/none.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAG1C;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,eAAe,CAQtD,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAAkB,CAAA;AAErF,QAAA,MAAM,aAAa,EAAE,WAGpB,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -14,8 +14,10 @@ export const getOperations = async () => {
14
14
  nextPagingToken: NO_TOKEN,
15
15
  };
16
16
  };
17
+ export const discoverTokenAssets = async () => [];
17
18
  const noExplorerAPI = {
18
19
  getOperations,
20
+ discoverTokenAssets,
19
21
  };
20
22
  export default noExplorerAPI;
21
23
  //# sourceMappingURL=none.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"none.js","sourceRoot":"","sources":["../../../src/network/explorer/none.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAGtC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,KAAK,IAAI,EAAE;IACpE,OAAO;QACL,kBAAkB,EAAE,EAAE;QACtB,mBAAmB,EAAE,EAAE;QACvB,iBAAiB,EAAE,EAAE;QACrB,sBAAsB,EAAE,EAAE;QAC1B,eAAe,EAAE,QAAQ;KAC1B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAgB;IACjC,aAAa;CACd,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"none.js","sourceRoot":"","sources":["../../../src/network/explorer/none.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAGtC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,KAAK,IAAI,EAAE;IACpE,OAAO;QACL,kBAAkB,EAAE,EAAE;QACtB,mBAAmB,EAAE,EAAE;QACvB,iBAAiB,EAAE,EAAE;QACrB,sBAAsB,EAAE,EAAE;QAC1B,eAAe,EAAE,QAAQ;KAC1B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAuC,KAAK,IAAI,EAAE,CAAC,EAAE,CAAA;AAErF,MAAM,aAAa,GAAgB;IACjC,aAAa;IACb,mBAAmB;CACpB,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -1,15 +1,28 @@
1
1
  import type { EvmConfigInfo } from '../../config';
2
- import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types';
2
+ import type { AssetInfo, MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types';
3
+ import type { Logger } from '@ledgerhq/coin-module-framework/config';
3
4
  /** Constant representing no pagination token (end of pagination or first page) */
4
5
  export declare const NO_TOKEN = "";
5
6
  export type ExplorerApi = {
6
- getOperations: (config: EvmConfigInfo, currencyId: string, address: string, fromBlock: number, toBlock?: number, pagingToken?: string, limit?: number, order?: 'asc' | 'desc') => Promise<{
7
+ getOperations: (config: EvmConfigInfo, currencyId: string, address: string, fromBlock: number, toBlock: number | undefined, pagingToken: string | undefined, limit: number | undefined, order: 'asc' | 'desc' | undefined, logger: Logger) => Promise<{
7
8
  lastCoinOperations: Array<Operation<MemoNotSupported>>;
8
9
  lastTokenOperations: Array<Operation<MemoNotSupported>>;
9
10
  lastNftOperations: Array<Operation<MemoNotSupported>>;
10
11
  lastInternalOperations: Array<Operation<MemoNotSupported>>;
11
12
  nextPagingToken: string;
12
13
  }>;
14
+ /**
15
+ * Discover the tokens an address holds, without accumulating its operation history.
16
+ *
17
+ * Returns the deduplicated set of assets the address has ever transferred, as of the current
18
+ * chain head (or resumed from `fromBlock` when the arm supports it) — never operations, never
19
+ * raw explorer records. This is the only input `getBalance` needs to know which contracts to
20
+ * read a balance for.
21
+ *
22
+ * @param fromBlock resume the walk from this height instead of from genesis; an arm that does
23
+ * not support resuming ignores it and walks the full history.
24
+ */
25
+ discoverTokenAssets: (config: EvmConfigInfo, currencyId: string, address: string, fromBlock?: number) => Promise<AssetInfo[]>;
13
26
  };
14
27
  type ExplorerConfig = EvmConfigInfo['explorer'];
15
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/network/explorer/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE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I,EAAE,QAAQ,CAAA;CAErD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B,GACxC,gBAAgB,cAAc,KAC7B,cAAc,IAAI,cAAc,GAAG;IACpC,IAAI,EAAE,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAA;CAKvF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/network/explorer/types.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAKtC,kFAAkF;AAClF,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAA;AAuB1B;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,cAA8B,EACyB,EAAE;IACzD,OAAO,cAAc,EAAE,IAAI,KAAK,QAAQ,CAAA;AAC1C,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,cAA8B,EAG9B,EAAE;IACF,OAAO,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAC3F,cAAc,EAAE,IAAc,CAC/B,CAAA;AACH,CAAC,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/network/explorer/types.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAUtC,kFAAkF;AAClF,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAA;AA0C1B;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,cAA8B,EACyB,EAAE;IACzD,OAAO,cAAc,EAAE,IAAI,KAAK,QAAQ,CAAA;AAC1C,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,cAA8B,EAG9B,EAAE;IACF,OAAO,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAC3F,cAAc,EAAE,IAAc,CAC/B,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './node';
2
+ export * from './node/types';
3
+ export * from './gasTracker';
4
+ export * from './gasTracker/types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/network/index.ts"],"names":[],"mappings":"AAGA,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,7 @@
1
+ // SPDX-FileCopyrightText: © 2026 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ export * from './node';
4
+ export * from './node/types';
5
+ export * from './gasTracker';
6
+ export * from './gasTracker/types';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/network/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAEtC,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,27 @@
1
+ import type { BlockByHeightResult, NodeApi, TransactionInfo } from './types';
2
+ import type { Logger } from '@ledgerhq/coin-module-framework/config';
3
+ /**
4
+ * Fetches a block from the Etherscan-like explorer proxy endpoint (`module=proxy&action=eth_getBlockByNumber`).
5
+ * The explorer's backing node is typically an archive node and has blocks that a pruned RPC node
6
+ * does not. Returns null on network error, missing result, empty/zero block hash, or missing
7
+ * required metadata (timestamp, parentHash).
8
+ *
9
+ * Always populates `BlockByHeightResult.transactionHashes` (never `transactions`) so that
10
+ * callers fall into the individual-`getTransaction` path — which is itself wrapped by the
11
+ * source list — rather than the `eth_getBlockReceipts` optimisation path that still hits the
12
+ * (pruned) primary node.
13
+ */
14
+ export declare function getBlockFromExplorerProxy(explorerUri: string, height: number, retries?: number, logger?: Logger): Promise<BlockByHeightResult | null>;
15
+ /**
16
+ * Fetches transaction data from the Etherscan-like explorer proxy using
17
+ * `eth_getTransactionByHash` and `eth_getTransactionReceipt` in parallel.
18
+ * Returns null if either call fails or the transaction is not found.
19
+ */
20
+ export declare function getTransactionFromExplorerProxy(explorerUri: string, hash: string, retries?: number, logger?: Logger): Promise<TransactionInfo | null>;
21
+ /**
22
+ * Full {@link NodeApi} implementation backed by the Etherscan-like explorer proxy.
23
+ * Only {@link NodeApi.getBlockByHeight} and {@link NodeApi.getTransaction} are supported;
24
+ * every other method rejects immediately with a "not supported" error.
25
+ */
26
+ export declare function createExplorerProxyNodeApi(explorerUri: string, explorerRetries: number, logger: Logger): NodeApi;
27
+ //# sourceMappingURL=explorerProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explorerProxy.d.ts","sourceRoot":"","sources":["../../../src/network/node/explorerProxy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAA;AAiEpE;;;;;;;;;;GAUG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,OAAO,SAAI,EACX,MAAM,GAAE,MAAwB,GAC/B,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAyCrC;AAED;;;;GAIG;AACH,wBAAsB,+BAA+B,CACnD,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,OAAO,SAAI,EACX,MAAM,GAAE,MAAwB,GAC/B,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAuHjC;AAOD;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,GACb,OAAO,CAkCT"}