@ledgerhq/coin-evm 15.2.0 → 16.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 (211) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/api/index.d.ts +1 -1
  3. package/lib/api/index.d.ts.map +1 -1
  4. package/lib/api/index.js +14 -14
  5. package/lib/api/index.js.map +1 -1
  6. package/lib/chains.d.ts +6 -0
  7. package/lib/chains.d.ts.map +1 -1
  8. package/lib/chains.js +16 -1
  9. package/lib/chains.js.map +1 -1
  10. package/lib/config.d.ts +1 -1
  11. package/lib/config.d.ts.map +1 -1
  12. package/lib/config.js +2 -1
  13. package/lib/config.js.map +1 -1
  14. package/lib/errors.d.ts +11 -0
  15. package/lib/errors.d.ts.map +1 -1
  16. package/lib/errors.js +17 -1
  17. package/lib/errors.js.map +1 -1
  18. package/lib/logic/broadcast.d.ts +1 -1
  19. package/lib/logic/broadcast.d.ts.map +1 -1
  20. package/lib/logic/broadcast.js +2 -2
  21. package/lib/logic/broadcast.js.map +1 -1
  22. package/lib/logic/craftTransaction.d.ts +1 -1
  23. package/lib/logic/craftTransaction.d.ts.map +1 -1
  24. package/lib/logic/craftTransaction.js +3 -3
  25. package/lib/logic/craftTransaction.js.map +1 -1
  26. package/lib/logic/estimateFees.d.ts +1 -1
  27. package/lib/logic/estimateFees.d.ts.map +1 -1
  28. package/lib/logic/estimateFees.js +19 -4
  29. package/lib/logic/estimateFees.js.map +1 -1
  30. package/lib/logic/getBalance.d.ts +1 -2
  31. package/lib/logic/getBalance.d.ts.map +1 -1
  32. package/lib/logic/getBalance.js +5 -6
  33. package/lib/logic/getBalance.js.map +1 -1
  34. package/lib/logic/getBlock.d.ts +1 -1
  35. package/lib/logic/getBlock.d.ts.map +1 -1
  36. package/lib/logic/getBlock.js +2 -2
  37. package/lib/logic/getBlock.js.map +1 -1
  38. package/lib/logic/getBlockInfo.d.ts +1 -1
  39. package/lib/logic/getBlockInfo.d.ts.map +1 -1
  40. package/lib/logic/getBlockInfo.js +2 -2
  41. package/lib/logic/getBlockInfo.js.map +1 -1
  42. package/lib/logic/getNextSequence.d.ts +1 -1
  43. package/lib/logic/getNextSequence.d.ts.map +1 -1
  44. package/lib/logic/getNextSequence.js +2 -2
  45. package/lib/logic/getNextSequence.js.map +1 -1
  46. package/lib/logic/getStakes.d.ts +1 -1
  47. package/lib/logic/getStakes.d.ts.map +1 -1
  48. package/lib/logic/getStakes.js +2 -2
  49. package/lib/logic/getStakes.js.map +1 -1
  50. package/lib/logic/lastBlock.d.ts +1 -1
  51. package/lib/logic/lastBlock.d.ts.map +1 -1
  52. package/lib/logic/lastBlock.js +2 -2
  53. package/lib/logic/lastBlock.js.map +1 -1
  54. package/lib/logic/listOperations.d.ts +1 -1
  55. package/lib/logic/listOperations.d.ts.map +1 -1
  56. package/lib/logic/listOperations.js +2 -2
  57. package/lib/logic/listOperations.js.map +1 -1
  58. package/lib/logic/validateIntent.d.ts +1 -1
  59. package/lib/logic/validateIntent.d.ts.map +1 -1
  60. package/lib/logic/validateIntent.js +3 -3
  61. package/lib/logic/validateIntent.js.map +1 -1
  62. package/lib/logic.d.ts.map +1 -1
  63. package/lib/logic.js +5 -10
  64. package/lib/logic.js.map +1 -1
  65. package/lib/network/node/ledger.d.ts.map +1 -1
  66. package/lib/network/node/ledger.js +1 -9
  67. package/lib/network/node/ledger.js.map +1 -1
  68. package/lib/network/node/rpc.common.d.ts.map +1 -1
  69. package/lib/network/node/rpc.common.js +1 -9
  70. package/lib/network/node/rpc.common.js.map +1 -1
  71. package/lib/staking/detectOperationType.js +1 -1
  72. package/lib/staking/validators/index.d.ts +1 -1
  73. package/lib/staking/validators/index.d.ts.map +1 -1
  74. package/lib/staking/validators/index.js +2 -2
  75. package/lib/staking/validators/index.js.map +1 -1
  76. package/lib/staking/validators/monadResolver.js +1 -1
  77. package/lib/staking/validators/monadResolver.js.map +1 -1
  78. package/lib-es/api/index.d.ts +1 -1
  79. package/lib-es/api/index.d.ts.map +1 -1
  80. package/lib-es/api/index.js +14 -14
  81. package/lib-es/api/index.js.map +1 -1
  82. package/lib-es/chains.d.ts +6 -0
  83. package/lib-es/chains.d.ts.map +1 -1
  84. package/lib-es/chains.js +15 -0
  85. package/lib-es/chains.js.map +1 -1
  86. package/lib-es/config.d.ts +1 -1
  87. package/lib-es/config.d.ts.map +1 -1
  88. package/lib-es/config.js +1 -1
  89. package/lib-es/config.js.map +1 -1
  90. package/lib-es/errors.d.ts +11 -0
  91. package/lib-es/errors.d.ts.map +1 -1
  92. package/lib-es/errors.js +15 -0
  93. package/lib-es/errors.js.map +1 -1
  94. package/lib-es/logic/broadcast.d.ts +1 -1
  95. package/lib-es/logic/broadcast.d.ts.map +1 -1
  96. package/lib-es/logic/broadcast.js +2 -2
  97. package/lib-es/logic/broadcast.js.map +1 -1
  98. package/lib-es/logic/craftTransaction.d.ts +1 -1
  99. package/lib-es/logic/craftTransaction.d.ts.map +1 -1
  100. package/lib-es/logic/craftTransaction.js +3 -3
  101. package/lib-es/logic/craftTransaction.js.map +1 -1
  102. package/lib-es/logic/estimateFees.d.ts +1 -1
  103. package/lib-es/logic/estimateFees.d.ts.map +1 -1
  104. package/lib-es/logic/estimateFees.js +19 -4
  105. package/lib-es/logic/estimateFees.js.map +1 -1
  106. package/lib-es/logic/getBalance.d.ts +1 -2
  107. package/lib-es/logic/getBalance.d.ts.map +1 -1
  108. package/lib-es/logic/getBalance.js +5 -6
  109. package/lib-es/logic/getBalance.js.map +1 -1
  110. package/lib-es/logic/getBlock.d.ts +1 -1
  111. package/lib-es/logic/getBlock.d.ts.map +1 -1
  112. package/lib-es/logic/getBlock.js +2 -2
  113. package/lib-es/logic/getBlock.js.map +1 -1
  114. package/lib-es/logic/getBlockInfo.d.ts +1 -1
  115. package/lib-es/logic/getBlockInfo.d.ts.map +1 -1
  116. package/lib-es/logic/getBlockInfo.js +2 -2
  117. package/lib-es/logic/getBlockInfo.js.map +1 -1
  118. package/lib-es/logic/getNextSequence.d.ts +1 -1
  119. package/lib-es/logic/getNextSequence.d.ts.map +1 -1
  120. package/lib-es/logic/getNextSequence.js +2 -2
  121. package/lib-es/logic/getNextSequence.js.map +1 -1
  122. package/lib-es/logic/getStakes.d.ts +1 -1
  123. package/lib-es/logic/getStakes.d.ts.map +1 -1
  124. package/lib-es/logic/getStakes.js +2 -2
  125. package/lib-es/logic/getStakes.js.map +1 -1
  126. package/lib-es/logic/lastBlock.d.ts +1 -1
  127. package/lib-es/logic/lastBlock.d.ts.map +1 -1
  128. package/lib-es/logic/lastBlock.js +2 -2
  129. package/lib-es/logic/lastBlock.js.map +1 -1
  130. package/lib-es/logic/listOperations.d.ts +1 -1
  131. package/lib-es/logic/listOperations.d.ts.map +1 -1
  132. package/lib-es/logic/listOperations.js +2 -2
  133. package/lib-es/logic/listOperations.js.map +1 -1
  134. package/lib-es/logic/validateIntent.d.ts +1 -1
  135. package/lib-es/logic/validateIntent.d.ts.map +1 -1
  136. package/lib-es/logic/validateIntent.js +3 -3
  137. package/lib-es/logic/validateIntent.js.map +1 -1
  138. package/lib-es/logic.d.ts.map +1 -1
  139. package/lib-es/logic.js +6 -11
  140. package/lib-es/logic.js.map +1 -1
  141. package/lib-es/network/node/ledger.d.ts.map +1 -1
  142. package/lib-es/network/node/ledger.js +2 -10
  143. package/lib-es/network/node/ledger.js.map +1 -1
  144. package/lib-es/network/node/rpc.common.d.ts.map +1 -1
  145. package/lib-es/network/node/rpc.common.js +2 -10
  146. package/lib-es/network/node/rpc.common.js.map +1 -1
  147. package/lib-es/staking/detectOperationType.js +1 -1
  148. package/lib-es/staking/validators/index.d.ts +1 -1
  149. package/lib-es/staking/validators/index.d.ts.map +1 -1
  150. package/lib-es/staking/validators/index.js +2 -2
  151. package/lib-es/staking/validators/index.js.map +1 -1
  152. package/lib-es/staking/validators/monadResolver.js +1 -1
  153. package/lib-es/staking/validators/monadResolver.js.map +1 -1
  154. package/package.json +1 -1
  155. package/src/api/index.ts +14 -16
  156. package/src/api/tests/getBlock.integ.test.ts +3 -3
  157. package/src/api/tests/index.arbitrum.integ.test.ts +1 -1
  158. package/src/api/tests/index.arc.integ.test.ts +1 -1
  159. package/src/api/tests/index.avalanche_c_chain_fuji.integ.test.ts +1 -1
  160. package/src/api/tests/index.cronos.integ.test.ts +1 -1
  161. package/src/api/tests/index.flare.integ.test.ts +1 -1
  162. package/src/api/tests/index.integ.test.ts +5 -5
  163. package/src/api/tests/index.linea.integ.test.ts +1 -1
  164. package/src/api/tests/index.monad_testnet.integ.test.ts +1 -1
  165. package/src/api/tests/index.optimism.integ.test.ts +1 -1
  166. package/src/api/tests/index.rsk.integ.test.ts +1 -1
  167. package/src/api/tests/index.shape.integ.test.ts +1 -1
  168. package/src/api/tests/index.somnia.integ.test.ts +1 -1
  169. package/src/api/tests/index.test.ts +6 -6
  170. package/src/api/tests/index.zksync.integ.test.ts +1 -1
  171. package/src/chains.ts +16 -0
  172. package/src/config.ts +1 -1
  173. package/src/errors.ts +14 -0
  174. package/src/fixtures/context.fixtures.ts +2 -4
  175. package/src/logic/broadcast.ts +1 -2
  176. package/src/logic/craftTransaction.ts +2 -3
  177. package/src/logic/estimateFees.ts +22 -4
  178. package/src/logic/getBalance.ts +3 -6
  179. package/src/logic/getBlock.ts +2 -6
  180. package/src/logic/getBlockInfo.ts +2 -6
  181. package/src/logic/getNextSequence.ts +2 -6
  182. package/src/logic/getStakes.ts +1 -2
  183. package/src/logic/lastBlock.ts +2 -2
  184. package/src/logic/listOperations.ts +1 -2
  185. package/src/logic/tests/broadcast.integ.test.ts +1 -1
  186. package/src/logic/tests/broadcast.test.ts +4 -4
  187. package/src/logic/tests/broadcastSource.test.ts +3 -3
  188. package/src/logic/tests/craftTransaction.test.ts +15 -20
  189. package/src/logic/tests/estimateFees.test.ts +39 -17
  190. package/src/logic/tests/getBalance.test.ts +19 -22
  191. package/src/logic/tests/getBlock.test.ts +37 -38
  192. package/src/logic/tests/getBlockInfo.test.ts +5 -5
  193. package/src/logic/tests/getNextSequence.test.ts +1 -1
  194. package/src/logic/tests/getStakes.test.ts +14 -14
  195. package/src/logic/tests/lastBlock.test.ts +3 -3
  196. package/src/logic/tests/listOperations.test.ts +46 -52
  197. package/src/logic/tests/validateIntent.test.ts +3 -61
  198. package/src/logic/validateIntent.ts +2 -3
  199. package/src/logic.test.ts +23 -6
  200. package/src/logic.ts +6 -11
  201. package/src/network/node/ledger.ts +2 -10
  202. package/src/network/node/rpc.common.ts +2 -10
  203. package/src/network/tests/explorer/index.test.ts +4 -4
  204. package/src/network/tests/node/ledger.test.ts +2 -0
  205. package/src/network/tests/node/rpc.test.ts +42 -0
  206. package/src/staking/detectOperationType.ts +1 -1
  207. package/src/staking/redelegations.test.ts +3 -3
  208. package/src/staking/validators/index.ts +1 -2
  209. package/src/staking/validators/monadResolver.ts +1 -1
  210. package/src/staking/validators.integ.test.ts +1 -1
  211. package/src/staking/validators.test.ts +1 -1
@@ -39,7 +39,7 @@ describe('getBlockInfo', () => {
39
39
  parentHash: '0xparent123',
40
40
  })
41
41
 
42
- expect(await getBlockInfo(context, '', 99999)).toEqual({
42
+ expect(await getBlockInfo(context, 99999)).toEqual({
43
43
  hash: '0xdef456',
44
44
  height: 99999,
45
45
  time: new Date('2025-02-20T15:45:00Z'),
@@ -58,7 +58,7 @@ describe('getBlockInfo', () => {
58
58
  parentHash: '',
59
59
  })
60
60
 
61
- expect(await getBlockInfo(context, '', 0)).toEqual({
61
+ expect(await getBlockInfo(context, 0)).toEqual({
62
62
  hash: '0xgenesis',
63
63
  height: 0,
64
64
  time: new Date('2015-07-30T00:00:00Z'),
@@ -73,7 +73,7 @@ describe('getBlockInfo', () => {
73
73
  parentHash: '0xgenesis',
74
74
  })
75
75
 
76
- const result = await getBlockInfo(context, '', 1)
76
+ const result = await getBlockInfo(context, 1)
77
77
 
78
78
  expect(result).toEqual({
79
79
  hash: '0xblock1',
@@ -96,7 +96,7 @@ describe('getBlockInfo', () => {
96
96
  parentHash: '0xparent',
97
97
  })
98
98
 
99
- const result = await getBlockInfo(context, '', currentHeight)
99
+ const result = await getBlockInfo(context, currentHeight)
100
100
 
101
101
  expect(result.height).toBe(currentHeight)
102
102
  expect(result.parent?.height).toBe(currentHeight - 1)
@@ -111,7 +111,7 @@ describe('getBlockInfo', () => {
111
111
  parentHash: '0xparent',
112
112
  })
113
113
 
114
- const result = await getBlockInfo(context, '', 100)
114
+ const result = await getBlockInfo(context, 100)
115
115
 
116
116
  expect(result.time).toBeInstanceOf(Date)
117
117
  expect(result.parent).toMatchObject({ height: 99, hash: '0xparent' })
@@ -32,6 +32,6 @@ describe('getNextSequence', () => {
32
32
  const context = createMockEvmContext({ node })
33
33
  nodeApiMock.getTransactionCount.mockResolvedValue(42)
34
34
 
35
- expect(await getNextSequence(context, '', '')).toEqual(42n)
35
+ expect(await getNextSequence(context, '')).toEqual(42n)
36
36
  })
37
37
  })
@@ -76,7 +76,7 @@ describe('EVM Staking - getStakes', () => {
76
76
  mockEncodeStakingData.mockReturnValue('0xdeadbeef')
77
77
  mockDecodeStakingResult.mockReturnValue(mkResult({ toString: (): string => '1000000' }))
78
78
 
79
- const result = await getStakes(context, 'celo', address)
79
+ const result = await getStakes(context, address)
80
80
 
81
81
  expect(result).toEqual({
82
82
  items: [
@@ -108,7 +108,7 @@ describe('EVM Staking - getStakes', () => {
108
108
  mockEncodeStakingData.mockReturnValue('0xdeadbeef')
109
109
  mockDecodeStakingResult.mockReturnValue(mkResult({ toString: (): string => '0' }))
110
110
 
111
- const result = await getStakes(context, 'celo', address)
111
+ const result = await getStakes(context, address)
112
112
 
113
113
  expect(result).toEqual({
114
114
  items: [],
@@ -142,7 +142,7 @@ describe('EVM Staking - getStakes', () => {
142
142
  })
143
143
  )
144
144
 
145
- const result = await getStakes(seiContext, 'sei_evm', address)
145
+ const result = await getStakes(seiContext, address)
146
146
 
147
147
  expect(result).toEqual({
148
148
  items: [
@@ -161,7 +161,7 @@ describe('EVM Staking - getStakes', () => {
161
161
  })
162
162
 
163
163
  it('should return empty list for currencies not configured for staking', async () => {
164
- const result = await getStakes(ethereumContext, 'ethereum', address)
164
+ const result = await getStakes(ethereumContext, address)
165
165
 
166
166
  expect(result).toEqual({
167
167
  items: [],
@@ -176,7 +176,7 @@ describe('EVM Staking - getStakes', () => {
176
176
  })
177
177
  mockEncodeStakingData.mockReturnValue('0xdeadbeef')
178
178
 
179
- const result = await getStakes(context, 'celo', address)
179
+ const result = await getStakes(context, address)
180
180
 
181
181
  expect(result).toEqual({
182
182
  items: [],
@@ -203,7 +203,7 @@ describe('EVM Staking - getStakes', () => {
203
203
  })
204
204
  mockEncodeStakingData.mockReturnValue('0xdeadbeef')
205
205
 
206
- const result = await getStakes(seiContext, 'sei_evm', address)
206
+ const result = await getStakes(seiContext, address)
207
207
 
208
208
  expect(result).toEqual({
209
209
  items: [],
@@ -214,7 +214,7 @@ describe('EVM Staking - getStakes', () => {
214
214
  it('should handle SEI when no validators are available', async () => {
215
215
  mockGetValidators.mockResolvedValue({ items: [], next: undefined })
216
216
 
217
- const result = await getStakes(seiContext, 'sei_evm', address)
217
+ const result = await getStakes(seiContext, address)
218
218
 
219
219
  expect(result).toEqual({
220
220
  items: [],
@@ -224,7 +224,7 @@ describe('EVM Staking - getStakes', () => {
224
224
  it('should survive network failures during validator fetching', async () => {
225
225
  mockGetValidators.mockRejectedValue(new Error('Network unreachable'))
226
226
 
227
- const result = await getStakes(seiContext, 'sei_evm', address)
227
+ const result = await getStakes(seiContext, address)
228
228
 
229
229
  expect(result).toEqual({
230
230
  items: [],
@@ -232,7 +232,7 @@ describe('EVM Staking - getStakes', () => {
232
232
  })
233
233
 
234
234
  it('should handle completely unsupported currencies', async () => {
235
- const result = await getStakes(ethereumContext, 'unsupported_currency', address)
235
+ const result = await getStakes(ethereumContext, address)
236
236
 
237
237
  expect(result).toEqual({
238
238
  items: [],
@@ -244,7 +244,7 @@ describe('EVM Staking - getStakes', () => {
244
244
  throw new Error('API Error')
245
245
  })
246
246
 
247
- const result = await getStakes(context, 'celo', address)
247
+ const result = await getStakes(context, address)
248
248
 
249
249
  expect(result).toEqual({
250
250
  items: [],
@@ -290,7 +290,7 @@ describe('EVM Staking - getStakes', () => {
290
290
  mockOneDelegation()
291
291
  mockFetchUnbondings.mockResolvedValue([unbondingStake])
292
292
 
293
- const result = await getStakes(seiContext, 'sei_evm', address)
293
+ const result = await getStakes(seiContext, address)
294
294
 
295
295
  expect(result.items.map((i) => i.state)).toEqual(['active', 'deactivating'])
296
296
  })
@@ -299,7 +299,7 @@ describe('EVM Staking - getStakes', () => {
299
299
  mockGetValidators.mockResolvedValue({ items: [], next: undefined })
300
300
  mockFetchUnbondings.mockResolvedValue([unbondingStake])
301
301
 
302
- const result = await getStakes(seiContext, 'sei_evm', address)
302
+ const result = await getStakes(seiContext, address)
303
303
 
304
304
  expect(result.items).toEqual([unbondingStake])
305
305
  })
@@ -308,7 +308,7 @@ describe('EVM Staking - getStakes', () => {
308
308
  mockOneDelegation()
309
309
  mockFetchUnbondings.mockRejectedValue(new Error('REST down'))
310
310
 
311
- const result = await getStakes(seiContext, 'sei_evm', address)
311
+ const result = await getStakes(seiContext, address)
312
312
 
313
313
  expect(result.items.map((i) => i.state)).toEqual(['active'])
314
314
  })
@@ -322,7 +322,7 @@ describe('EVM Staking - getStakes', () => {
322
322
  mockEncodeStakingData.mockReturnValue('0xdeadbeef')
323
323
  mockDecodeStakingResult.mockReturnValue(mkResult({ toString: (): string => '1000000' }))
324
324
 
325
- const result = await getStakes(context, 'celo', address)
325
+ const result = await getStakes(context, address)
326
326
 
327
327
  expect(result.items.map((i) => i.state)).toEqual(['active'])
328
328
  })
@@ -45,7 +45,7 @@ describe('lastBlock', () => {
45
45
  const context = createMockEvmContext({ node })
46
46
  nodeApiMock.getBlockByHeight.mockResolvedValue(blockResult)
47
47
 
48
- expect(await lastBlock(context, '')).toEqual(expectedInfo)
48
+ expect(await lastBlock(context)).toEqual(expectedInfo)
49
49
  })
50
50
 
51
51
  it.each([
@@ -62,7 +62,7 @@ describe('lastBlock', () => {
62
62
  const context = createMockEvmContext({ node })
63
63
  nodeApiMock.getBlockByHeight.mockResolvedValue(blockResult)
64
64
 
65
- await lastBlock(context, '')
65
+ await lastBlock(context)
66
66
 
67
67
  expect(nodeApiMock.getBlockByHeight).toHaveBeenCalledWith('latest')
68
68
  })
@@ -93,7 +93,7 @@ describe('lastBlock', () => {
93
93
  const context = createMockEvmContext({ node, finalizationLevel })
94
94
  nodeApiMock.getBlockByHeight.mockResolvedValue(blockResult)
95
95
 
96
- expect(await lastBlock(context, '')).toEqual(expectedInfo)
96
+ expect(await lastBlock(context)).toEqual(expectedInfo)
97
97
  expect(nodeApiMock.getBlockByHeight).toHaveBeenCalledWith(finalizationLevel)
98
98
  }
99
99
  )
@@ -19,7 +19,6 @@ import ledgerExplorer from '../../network/explorer/ledger'
19
19
  import { listOperations } from '../listOperations'
20
20
 
21
21
  describe('listOperations', () => {
22
- const currency = ''
23
22
  const address = 'address'
24
23
 
25
24
  describe('limit validation', () => {
@@ -31,15 +30,10 @@ describe('listOperations', () => {
31
30
  .mockResolvedValue({ data: { data: [], token: '' } })
32
31
 
33
32
  await expect(
34
- listOperations(
35
- ctxWithExplorer(mkLedgerExplorer({ explorerId: 'eth' })),
36
- currency,
37
- address,
38
- {
39
- minHeight: 0,
40
- limit,
41
- }
42
- )
33
+ listOperations(ctxWithExplorer(mkLedgerExplorer({ explorerId: 'eth' })), address, {
34
+ minHeight: 0,
35
+ limit,
36
+ })
43
37
  ).rejects.toBeInstanceOf(InvalidParameterError)
44
38
  // Nothing reaches the explorer: a zero page size used to make the paged walk double a
45
39
  // zero forever, so this has to be caught before the first request.
@@ -319,7 +313,7 @@ describe('listOperations', () => {
319
313
  const minHeight = 5
320
314
 
321
315
  // here order is "asc" but that's just the sort order, not how the explorer is queried
322
- const result = await listOperations(testContext, currency, address, {
316
+ const result = await listOperations(testContext, address, {
323
317
  minHeight,
324
318
  order: 'asc',
325
319
  })
@@ -646,7 +640,7 @@ describe('listOperations', () => {
646
640
  })
647
641
 
648
642
  expect(
649
- await listOperations(testContext, '', address.toLowerCase(), {
643
+ await listOperations(testContext, address.toLowerCase(), {
650
644
  minHeight: 1,
651
645
  order: 'asc',
652
646
  })
@@ -742,7 +736,7 @@ describe('listOperations', () => {
742
736
  })
743
737
 
744
738
  expect(
745
- await listOperations(testContext, '', 'address1', {
739
+ await listOperations(testContext, 'address1', {
746
740
  minHeight: 1,
747
741
  order: 'asc',
748
742
  })
@@ -837,7 +831,7 @@ describe('listOperations', () => {
837
831
  nextPagingToken: '',
838
832
  })
839
833
 
840
- const { items } = await listOperations(testContext, '', recipient, {
834
+ const { items } = await listOperations(testContext, recipient, {
841
835
  minHeight: 1,
842
836
  order: 'asc',
843
837
  })
@@ -914,7 +908,7 @@ describe('listOperations', () => {
914
908
  nextPagingToken: '',
915
909
  })
916
910
 
917
- const { items } = await listOperations(testContext, '', address, {
911
+ const { items } = await listOperations(testContext, address, {
918
912
  minHeight: 0,
919
913
  order: 'asc',
920
914
  })
@@ -989,7 +983,7 @@ describe('listOperations', () => {
989
983
  nextPagingToken: '',
990
984
  })
991
985
 
992
- const { items } = await listOperations(testContext, '', address, {
986
+ const { items } = await listOperations(testContext, address, {
993
987
  minHeight: 0,
994
988
  order: 'asc',
995
989
  })
@@ -1041,7 +1035,7 @@ describe('listOperations', () => {
1041
1035
  nextPagingToken: '',
1042
1036
  })
1043
1037
 
1044
- const { items } = await listOperations(testContext, '', address, {
1038
+ const { items } = await listOperations(testContext, address, {
1045
1039
  minHeight: 0,
1046
1040
  order: 'asc',
1047
1041
  })
@@ -1109,7 +1103,7 @@ describe('listOperations', () => {
1109
1103
  })
1110
1104
 
1111
1105
  expect(
1112
- await listOperations(testContext, '', 'address1', {
1106
+ await listOperations(testContext, 'address1', {
1113
1107
  minHeight: 1,
1114
1108
  order: 'asc',
1115
1109
  })
@@ -1201,7 +1195,7 @@ describe('listOperations', () => {
1201
1195
  async ({ limit, order, expectedExplorerOrder, expectedResultOrder }) => {
1202
1196
  const testContext = ctxWithExplorer(mkEtherscanExplorer())
1203
1197
  const getOperationsSpy = buildOperationsSpy(etherscanExplorer.explorerApi)
1204
- const { items: result } = await listOperations(testContext, currency, address, {
1198
+ const { items: result } = await listOperations(testContext, address, {
1205
1199
  minHeight: 0,
1206
1200
  ...(limit !== undefined ? { limit } : {}),
1207
1201
  ...(order !== undefined ? { order } : {}),
@@ -1283,7 +1277,7 @@ describe('listOperations', () => {
1283
1277
  return { data: { data: allRecords.slice(0, params.batch_size), token: '' } }
1284
1278
  })
1285
1279
 
1286
- const { next } = await listOperations(testContext, '', address, {
1280
+ const { next } = await listOperations(testContext, address, {
1287
1281
  minHeight: 0,
1288
1282
  limit: 3,
1289
1283
  cursor: '11:0xh11',
@@ -1368,7 +1362,7 @@ describe('listOperations', () => {
1368
1362
  nextPagingToken: '',
1369
1363
  })
1370
1364
 
1371
- const { items: result } = await listOperations(testContext, '', address, {
1365
+ const { items: result } = await listOperations(testContext, address, {
1372
1366
  minHeight: 1,
1373
1367
  order: 'asc',
1374
1368
  })
@@ -1409,7 +1403,7 @@ describe('listOperations', () => {
1409
1403
  nextPagingToken: '',
1410
1404
  })
1411
1405
 
1412
- const { items } = await listOperations(testContext, '', address, {
1406
+ const { items } = await listOperations(testContext, address, {
1413
1407
  minHeight: 0,
1414
1408
  order: 'asc',
1415
1409
  })
@@ -1449,7 +1443,7 @@ describe('listOperations', () => {
1449
1443
  nextPagingToken: '',
1450
1444
  })
1451
1445
 
1452
- const { items } = await listOperations(testContext, '', address, {
1446
+ const { items } = await listOperations(testContext, address, {
1453
1447
  minHeight: 0,
1454
1448
  order: 'asc',
1455
1449
  })
@@ -1492,7 +1486,7 @@ describe('listOperations', () => {
1492
1486
  nextPagingToken: '',
1493
1487
  })
1494
1488
 
1495
- const { items } = await listOperations(testContext, '', 'address', {
1489
+ const { items } = await listOperations(testContext, 'address', {
1496
1490
  minHeight: 1,
1497
1491
  order: 'asc',
1498
1492
  })
@@ -1653,11 +1647,11 @@ describe('listOperations', () => {
1653
1647
  ],
1654
1648
  })
1655
1649
 
1656
- const address1Result = await listOperations(testContext, '', 'address1', {
1650
+ const address1Result = await listOperations(testContext, 'address1', {
1657
1651
  minHeight: 0,
1658
1652
  order: 'asc',
1659
1653
  })
1660
- const address2Result = await listOperations(testContext, '', 'address2', {
1654
+ const address2Result = await listOperations(testContext, 'address2', {
1661
1655
  minHeight: 0,
1662
1656
  order: 'asc',
1663
1657
  })
@@ -1699,7 +1693,7 @@ describe('listOperations', () => {
1699
1693
  ],
1700
1694
  })
1701
1695
 
1702
- const result = await listOperations(testContext, '', 'address1', {
1696
+ const result = await listOperations(testContext, 'address1', {
1703
1697
  minHeight: 0,
1704
1698
  order: 'asc',
1705
1699
  })
@@ -1736,7 +1730,7 @@ describe('listOperations', () => {
1736
1730
  '0xselfsend'
1737
1731
  )
1738
1732
 
1739
- const result = await listOperations(testContext, '', 'address1', {
1733
+ const result = await listOperations(testContext, 'address1', {
1740
1734
  minHeight: 0,
1741
1735
  order: 'asc',
1742
1736
  })
@@ -1784,11 +1778,11 @@ describe('listOperations', () => {
1784
1778
  sharedTxHash
1785
1779
  )
1786
1780
 
1787
- const address1Result = await listOperations(testContext, '', 'address1', {
1781
+ const address1Result = await listOperations(testContext, 'address1', {
1788
1782
  minHeight: 0,
1789
1783
  order: 'asc',
1790
1784
  })
1791
- const address2Result = await listOperations(testContext, '', 'address2', {
1785
+ const address2Result = await listOperations(testContext, 'address2', {
1792
1786
  minHeight: 0,
1793
1787
  order: 'asc',
1794
1788
  })
@@ -1843,7 +1837,7 @@ describe('listOperations', () => {
1843
1837
  '0xcase4'
1844
1838
  )
1845
1839
 
1846
- const result = await listOperations(testContext, '', 'address1', {
1840
+ const result = await listOperations(testContext, 'address1', {
1847
1841
  minHeight: 0,
1848
1842
  order: 'asc',
1849
1843
  })
@@ -1895,11 +1889,11 @@ describe('listOperations', () => {
1895
1889
  sharedTxHash
1896
1890
  )
1897
1891
 
1898
- const address1Result = await listOperations(testContext, '', 'address1', {
1892
+ const address1Result = await listOperations(testContext, 'address1', {
1899
1893
  minHeight: 0,
1900
1894
  order: 'asc',
1901
1895
  })
1902
- const address2Result = await listOperations(testContext, '', 'address2', {
1896
+ const address2Result = await listOperations(testContext, 'address2', {
1903
1897
  minHeight: 0,
1904
1898
  order: 'asc',
1905
1899
  })
@@ -1955,15 +1949,15 @@ describe('listOperations', () => {
1955
1949
  sharedTxHash
1956
1950
  )
1957
1951
 
1958
- const address1Result = await listOperations(testContext, '', 'address1', {
1952
+ const address1Result = await listOperations(testContext, 'address1', {
1959
1953
  minHeight: 0,
1960
1954
  order: 'asc',
1961
1955
  })
1962
- const address2Result = await listOperations(testContext, '', 'address2', {
1956
+ const address2Result = await listOperations(testContext, 'address2', {
1963
1957
  minHeight: 0,
1964
1958
  order: 'asc',
1965
1959
  })
1966
- const address3Result = await listOperations(testContext, '', 'address3', {
1960
+ const address3Result = await listOperations(testContext, 'address3', {
1967
1961
  minHeight: 0,
1968
1962
  order: 'asc',
1969
1963
  })
@@ -2016,7 +2010,7 @@ describe('listOperations', () => {
2016
2010
  ],
2017
2011
  })
2018
2012
 
2019
- const result = await listOperations(testContext, '', 'address1', {
2013
+ const result = await listOperations(testContext, 'address1', {
2020
2014
  minHeight: 0,
2021
2015
  order: 'asc',
2022
2016
  })
@@ -2060,7 +2054,7 @@ describe('listOperations', () => {
2060
2054
  '0xcase8'
2061
2055
  )
2062
2056
 
2063
- const result = await listOperations(testContext, '', 'address1', {
2057
+ const result = await listOperations(testContext, 'address1', {
2064
2058
  minHeight: 0,
2065
2059
  order: 'asc',
2066
2060
  })
@@ -2104,11 +2098,11 @@ describe('listOperations', () => {
2104
2098
  sharedTxHash
2105
2099
  )
2106
2100
 
2107
- const address1Result = await listOperations(testContext, '', 'address1', {
2101
+ const address1Result = await listOperations(testContext, 'address1', {
2108
2102
  minHeight: 0,
2109
2103
  order: 'asc',
2110
2104
  })
2111
- const address2Result = await listOperations(testContext, '', 'address2', {
2105
+ const address2Result = await listOperations(testContext, 'address2', {
2112
2106
  minHeight: 0,
2113
2107
  order: 'asc',
2114
2108
  })
@@ -2164,11 +2158,11 @@ describe('listOperations', () => {
2164
2158
  sharedTxHash
2165
2159
  )
2166
2160
 
2167
- const address1Result = await listOperations(testContext, '', 'address1', {
2161
+ const address1Result = await listOperations(testContext, 'address1', {
2168
2162
  minHeight: 0,
2169
2163
  order: 'asc',
2170
2164
  })
2171
- const address2Result = await listOperations(testContext, '', 'address2', {
2165
+ const address2Result = await listOperations(testContext, 'address2', {
2172
2166
  minHeight: 0,
2173
2167
  order: 'asc',
2174
2168
  })
@@ -2234,15 +2228,15 @@ describe('listOperations', () => {
2234
2228
  sharedTxHash
2235
2229
  )
2236
2230
 
2237
- const address1Result = await listOperations(testContext, '', 'address1', {
2231
+ const address1Result = await listOperations(testContext, 'address1', {
2238
2232
  minHeight: 0,
2239
2233
  order: 'asc',
2240
2234
  })
2241
- const address2Result = await listOperations(testContext, '', 'address2', {
2235
+ const address2Result = await listOperations(testContext, 'address2', {
2242
2236
  minHeight: 0,
2243
2237
  order: 'asc',
2244
2238
  })
2245
- const address3Result = await listOperations(testContext, '', 'address3', {
2239
+ const address3Result = await listOperations(testContext, 'address3', {
2246
2240
  minHeight: 0,
2247
2241
  order: 'asc',
2248
2242
  })
@@ -2316,7 +2310,7 @@ describe('listOperations', () => {
2316
2310
  sharedTxHash
2317
2311
  )
2318
2312
 
2319
- const result = await listOperations(testContext, '', 'address1', {
2313
+ const result = await listOperations(testContext, 'address1', {
2320
2314
  minHeight: 0,
2321
2315
  order: 'asc',
2322
2316
  })
@@ -2364,7 +2358,7 @@ describe('listOperations', () => {
2364
2358
  sharedTxHash
2365
2359
  )
2366
2360
 
2367
- const result = await listOperations(testContext, '', 'address1', {
2361
+ const result = await listOperations(testContext, 'address1', {
2368
2362
  minHeight: 0,
2369
2363
  order: 'asc',
2370
2364
  })
@@ -2395,7 +2389,7 @@ describe('listOperations', () => {
2395
2389
  sharedTxHash
2396
2390
  )
2397
2391
 
2398
- const result = await listOperations(testContext, '', 'user', {
2392
+ const result = await listOperations(testContext, 'user', {
2399
2393
  minHeight: 0,
2400
2394
  order: 'asc',
2401
2395
  })
@@ -2427,7 +2421,7 @@ describe('listOperations', () => {
2427
2421
  sharedTxHash
2428
2422
  )
2429
2423
 
2430
- const result = await listOperations(testContext, '', 'user', {
2424
+ const result = await listOperations(testContext, 'user', {
2431
2425
  minHeight: 0,
2432
2426
  order: 'asc',
2433
2427
  })
@@ -2461,7 +2455,7 @@ describe('listOperations', () => {
2461
2455
  sharedTxHash
2462
2456
  )
2463
2457
 
2464
- const result = await listOperations(testContext, '', 'user', {
2458
+ const result = await listOperations(testContext, 'user', {
2465
2459
  minHeight: 0,
2466
2460
  order: 'asc',
2467
2461
  })
@@ -2509,7 +2503,7 @@ describe('listOperations', () => {
2509
2503
  sharedTxHash
2510
2504
  )
2511
2505
 
2512
- const result = await listOperations(testContext, '', 'address1', {
2506
+ const result = await listOperations(testContext, 'address1', {
2513
2507
  minHeight: 0,
2514
2508
  order: 'asc',
2515
2509
  })
@@ -2554,7 +2548,7 @@ describe('listOperations', () => {
2554
2548
  sharedTxHash
2555
2549
  )
2556
2550
 
2557
- const result = await listOperations(testContext, '', 'address1', {
2551
+ const result = await listOperations(testContext, 'address1', {
2558
2552
  minHeight: 0,
2559
2553
  order: 'asc',
2560
2554
  })