@rango-dev/queue-manager-rango-preset 0.0.0-experimental-936229e8-20251208

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 (75) hide show
  1. package/CHANGELOG.md +353 -0
  2. package/dist/actions/checkStatus.d.ts +13 -0
  3. package/dist/actions/checkStatus.d.ts.map +1 -0
  4. package/dist/actions/common/checkEnvironmentBeforeExecuteTransaction.d.ts +8 -0
  5. package/dist/actions/common/checkEnvironmentBeforeExecuteTransaction.d.ts.map +1 -0
  6. package/dist/actions/common/produceNextStateForTransaction.d.ts +17 -0
  7. package/dist/actions/common/produceNextStateForTransaction.d.ts.map +1 -0
  8. package/dist/actions/common/utils.d.ts +5 -0
  9. package/dist/actions/common/utils.d.ts.map +1 -0
  10. package/dist/actions/createTransaction.d.ts +12 -0
  11. package/dist/actions/createTransaction.d.ts.map +1 -0
  12. package/dist/actions/executeTransaction/executeTransaction.d.ts +14 -0
  13. package/dist/actions/executeTransaction/executeTransaction.d.ts.map +1 -0
  14. package/dist/actions/executeTransaction/index.d.ts +2 -0
  15. package/dist/actions/executeTransaction/index.d.ts.map +1 -0
  16. package/dist/actions/scheduleNextStep.d.ts +14 -0
  17. package/dist/actions/scheduleNextStep.d.ts.map +1 -0
  18. package/dist/actions/start.d.ts +4 -0
  19. package/dist/actions/start.d.ts.map +1 -0
  20. package/dist/configs.d.ts +14 -0
  21. package/dist/configs.d.ts.map +1 -0
  22. package/dist/constants.d.ts +7 -0
  23. package/dist/constants.d.ts.map +1 -0
  24. package/dist/helpers.d.ts +255 -0
  25. package/dist/helpers.d.ts.map +1 -0
  26. package/dist/hooks.d.ts +19 -0
  27. package/dist/hooks.d.ts.map +1 -0
  28. package/dist/index.d.ts +11 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +2 -0
  31. package/dist/index.js.map +7 -0
  32. package/dist/migration.d.ts +15 -0
  33. package/dist/migration.d.ts.map +1 -0
  34. package/dist/numbers.d.ts +3 -0
  35. package/dist/numbers.d.ts.map +1 -0
  36. package/dist/queue-manager-rango-preset.build.json +1 -0
  37. package/dist/queueDef.d.ts +10 -0
  38. package/dist/queueDef.d.ts.map +1 -0
  39. package/dist/services/eventEmitter.d.ts +10 -0
  40. package/dist/services/eventEmitter.d.ts.map +1 -0
  41. package/dist/services/httpService.d.ts +3 -0
  42. package/dist/services/httpService.d.ts.map +1 -0
  43. package/dist/services/index.d.ts +2 -0
  44. package/dist/services/index.d.ts.map +1 -0
  45. package/dist/shared-errors.d.ts +25 -0
  46. package/dist/shared-errors.d.ts.map +1 -0
  47. package/dist/shared.d.ts +81 -0
  48. package/dist/shared.d.ts.map +1 -0
  49. package/dist/types.d.ts +172 -0
  50. package/dist/types.d.ts.map +1 -0
  51. package/package.json +45 -0
  52. package/readme.md +2 -0
  53. package/src/actions/checkStatus.ts +564 -0
  54. package/src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts +157 -0
  55. package/src/actions/common/produceNextStateForTransaction.ts +167 -0
  56. package/src/actions/common/utils.ts +25 -0
  57. package/src/actions/createTransaction.ts +117 -0
  58. package/src/actions/executeTransaction/executeTransaction.ts +107 -0
  59. package/src/actions/executeTransaction/index.ts +1 -0
  60. package/src/actions/scheduleNextStep.ts +104 -0
  61. package/src/actions/start.ts +16 -0
  62. package/src/configs.ts +38 -0
  63. package/src/constants.ts +18 -0
  64. package/src/helpers.ts +1598 -0
  65. package/src/hooks.ts +94 -0
  66. package/src/index.ts +68 -0
  67. package/src/migration.ts +124 -0
  68. package/src/numbers.ts +68 -0
  69. package/src/queueDef.ts +39 -0
  70. package/src/services/eventEmitter.ts +290 -0
  71. package/src/services/httpService.ts +10 -0
  72. package/src/services/index.ts +1 -0
  73. package/src/shared-errors.ts +165 -0
  74. package/src/shared.ts +473 -0
  75. package/src/types.ts +305 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,353 @@
1
+ # [0.57.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.56.1...queue-manager-rango-preset@0.57.0) (2025-12-02)
2
+
3
+
4
+
5
+ ## [0.56.1](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.56.0...queue-manager-rango-preset@0.56.1) (2025-11-22)
6
+
7
+
8
+
9
+ # [0.54.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.53.0...queue-manager-rango-preset@0.54.0) (2025-10-29)
10
+
11
+
12
+
13
+ # [0.53.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.52.0...queue-manager-rango-preset@0.53.0) (2025-09-29)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * fix update and reset network status in execute transaction ([8cd631f](https://github.com/rango-exchange/rango-client/commit/8cd631f78e0360cd96e9f8675d31b23bb1e8a73b))
19
+
20
+
21
+
22
+ # [0.52.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.51.0...queue-manager-rango-preset@0.52.0) (2025-09-06)
23
+
24
+
25
+
26
+ # [0.51.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.50.0...queue-manager-rango-preset@0.51.0) (2025-08-27)
27
+
28
+
29
+ ### Features
30
+
31
+ * add swap mode tabs to history page ([be3ae60](https://github.com/rango-exchange/rango-client/commit/be3ae60f5867f0bc921d8e7ceb1ae673766a38f3))
32
+ * add swap mode to payload of route events ([492d076](https://github.com/rango-exchange/rango-client/commit/492d07649e356437cca79dd10f1664d3927b0fb9))
33
+
34
+
35
+
36
+ # [0.50.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.49.0...queue-manager-rango-preset@0.50.0) (2025-08-19)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * remove retry dynamic import and throw refined error on dynamic import failure ([a2944ac](https://github.com/rango-exchange/rango-client/commit/a2944ac3c05a0e945f6e5621fa5693ab89625485))
42
+
43
+
44
+
45
+ # [0.49.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.48.1...queue-manager-rango-preset@0.49.0) (2025-08-05)
46
+
47
+
48
+ ### Features
49
+
50
+ * implement canSwitchNetwork for hub providers ([5a4eced](https://github.com/rango-exchange/rango-client/commit/5a4eced221046b5474176aca7c569092e36f1bde))
51
+ * improve swap details page switch network modal ([f92e2bd](https://github.com/rango-exchange/rango-client/commit/f92e2bd26affc3ff680e1b15ae938e471dd41393))
52
+
53
+
54
+
55
+ ## [0.48.1](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.48.0...queue-manager-rango-preset@0.48.1) (2025-07-27)
56
+
57
+
58
+ ### Bug Fixes
59
+
60
+ * fix undefined wallet type for transfer transactions ([75c310c](https://github.com/rango-exchange/rango-client/commit/75c310c34335ab073ee612cb5bbde45ff1b99b3c))
61
+
62
+
63
+
64
+ # [0.48.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.47.0...queue-manager-rango-preset@0.48.0) (2025-07-22)
65
+
66
+
67
+ ### Features
68
+
69
+ * redesign swap details modal ([ef59df5](https://github.com/rango-exchange/rango-client/commit/ef59df5ade0f5f05f8415f6ccfbe4ded368bfd99))
70
+
71
+
72
+ ### Reverts
73
+
74
+ * Revert "chore(release): publish" ([064ce15](https://github.com/rango-exchange/rango-client/commit/064ce157a2f819856f647f83aeb1c0410542e8d7))
75
+
76
+
77
+
78
+ # [0.46.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.45.1...queue-manager-rango-preset@0.46.0) (2025-06-09)
79
+
80
+
81
+ ### Bug Fixes
82
+
83
+ * fix retry swap on connect wallet ([f6c45b6](https://github.com/rango-exchange/rango-client/commit/f6c45b6c4a6b92a208e04606b42ed98d327ad349))
84
+
85
+
86
+
87
+ ## [0.45.1](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.45.0...queue-manager-rango-preset@0.45.1) (2025-05-04)
88
+
89
+
90
+
91
+ # [0.45.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.44.0...queue-manager-rango-preset@0.45.0) (2025-04-30)
92
+
93
+
94
+ ### Bug Fixes
95
+
96
+ * rename pbt to ptb for sui ([3d6d89f](https://github.com/rango-exchange/rango-client/commit/3d6d89f2265766607a15d61e0df92643fb33072b))
97
+ * show network name instead of namespace ([0d46834](https://github.com/rango-exchange/rango-client/commit/0d46834cc820ff93165279d655a7d80b469320d8))
98
+
99
+
100
+ ### Features
101
+
102
+ * update sui to consider recent api changes ([d764b25](https://github.com/rango-exchange/rango-client/commit/d764b2501df9bb295f63cdbc0b05acd4a3abb4b9))
103
+
104
+
105
+
106
+ # [0.44.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.43.0...queue-manager-rango-preset@0.44.0) (2025-03-11)
107
+
108
+
109
+ ### Features
110
+
111
+ * add sui namespace support for widget ([990d4c3](https://github.com/rango-exchange/rango-client/commit/990d4c32e7ad674c01140ca0bd557d541c596bbb))
112
+ * update the event payload for failed step and failed route events ([75aa989](https://github.com/rango-exchange/rango-client/commit/75aa9898040aede600aee2d9aa8188295a5a37ae))
113
+
114
+
115
+
116
+ # [0.43.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.42.0...queue-manager-rango-preset@0.43.0) (2025-02-23)
117
+
118
+
119
+ ### Bug Fixes
120
+
121
+ * display correct network in switch network modal ([8a558f1](https://github.com/rango-exchange/rango-client/commit/8a558f190cc1c25e15a1ca57a7c3f760906fd067))
122
+ * showing correct network in notification ([3c4ef13](https://github.com/rango-exchange/rango-client/commit/3c4ef1320f773dadc174d49a707ebfae73b7c0db))
123
+
124
+
125
+ ### Features
126
+
127
+ * add an adapter for Hub for wallets-react and enabling Hub by default. ([a14bdf9](https://github.com/rango-exchange/rango-client/commit/a14bdf9619e448bc4568d6b758ca86d2359e1740))
128
+
129
+
130
+
131
+ # [0.42.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.41.0...queue-manager-rango-preset@0.42.0) (2025-01-27)
132
+
133
+
134
+ ### Features
135
+
136
+ * update payload for events ([36a11b6](https://github.com/rango-exchange/rango-client/commit/36a11b6cebc153eced9e01f97fa1fabaf9a44e9f))
137
+
138
+
139
+
140
+ # [0.41.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.40.0...queue-manager-rango-preset@0.41.0) (2024-12-30)
141
+
142
+
143
+
144
+ # [0.40.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.39.0...queue-manager-rango-preset@0.40.0) (2024-11-27)
145
+
146
+
147
+
148
+ # [0.39.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.38.0...queue-manager-rango-preset@0.39.0) (2024-11-12)
149
+
150
+
151
+
152
+ # [0.38.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.37.0...queue-manager-rango-preset@0.38.0) (2024-10-12)
153
+
154
+
155
+ ### Bug Fixes
156
+
157
+ * bump sdk and fix type issues ([d442208](https://github.com/rango-exchange/rango-client/commit/d4422083bf5dd27d5f509ce1db7f9560d05428c8))
158
+
159
+
160
+ ### Performance Improvements
161
+
162
+ * lazy load signer packages ([7b88f18](https://github.com/rango-exchange/rango-client/commit/7b88f1834f7b29b4b81ab6c81a07bb88e8ccf55c))
163
+
164
+
165
+
166
+ # [0.37.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.36.0...queue-manager-rango-preset@0.37.0) (2024-09-10)
167
+
168
+
169
+
170
+ # [0.36.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.35.1...queue-manager-rango-preset@0.36.0) (2024-08-11)
171
+
172
+
173
+
174
+ ## [0.35.1](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.35.0...queue-manager-rango-preset@0.35.1) (2024-07-14)
175
+
176
+
177
+
178
+ # [0.35.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.33.2...queue-manager-rango-preset@0.35.0) (2024-07-09)
179
+
180
+
181
+ ### Features
182
+
183
+ * support new widget events ([37a9b6c](https://github.com/rango-exchange/rango-client/commit/37a9b6c023cba660c87af27bcbfceadfb8daa8d0))
184
+
185
+
186
+ ### Performance Improvements
187
+
188
+ * improve finding tokens from store ([3e890bd](https://github.com/rango-exchange/rango-client/commit/3e890bdcd47971b072f347c368c4370225cb11ff))
189
+
190
+
191
+
192
+ # [0.34.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.33.2...queue-manager-rango-preset@0.34.0) (2024-06-01)
193
+
194
+
195
+
196
+ ## [0.33.2](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.33.1...queue-manager-rango-preset@0.33.2) (2024-05-26)
197
+
198
+
199
+
200
+ ## [0.33.1](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.33.0...queue-manager-rango-preset@0.33.1) (2024-05-25)
201
+
202
+
203
+
204
+ # [0.33.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.32.0...queue-manager-rango-preset@0.33.0) (2024-05-14)
205
+
206
+
207
+
208
+ # [0.32.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.31.0...queue-manager-rango-preset@0.32.0) (2024-04-24)
209
+
210
+
211
+
212
+ # [0.31.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.30.0...queue-manager-rango-preset@0.31.0) (2024-04-23)
213
+
214
+
215
+
216
+ # [0.30.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.29.1...queue-manager-rango-preset@0.30.0) (2024-04-09)
217
+
218
+
219
+ ### Bug Fixes
220
+
221
+ * fix widget event hook ([c8547b6](https://github.com/rango-exchange/rango-client/commit/c8547b6a31354afe13aa32c0b72be5b62b3f0d67))
222
+
223
+
224
+
225
+ ## [0.29.1](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.29.0...queue-manager-rango-preset@0.29.1) (2024-03-12)
226
+
227
+
228
+ ### Bug Fixes
229
+
230
+ * increase approval checking interval ([e6444c8](https://github.com/rango-exchange/rango-client/commit/e6444c84dd216ddcf949b49708bb2c358fee2d88))
231
+
232
+
233
+
234
+ # [0.29.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.28.0...queue-manager-rango-preset@0.29.0) (2024-03-12)
235
+
236
+
237
+ ### Features
238
+
239
+ * logging packages to be able to create log records and capture them. ([ca9b7e9](https://github.com/rango-exchange/rango-client/commit/ca9b7e918d67bf0d93e5b8313264c5984f3adb4e))
240
+
241
+
242
+
243
+ # [0.28.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.27.0...queue-manager-rango-preset@0.28.0) (2024-02-20)
244
+
245
+
246
+ ### Bug Fixes
247
+
248
+ * fix some swap messages in widget-embedded ([f859190](https://github.com/rango-exchange/rango-client/commit/f85919050b0c8f3bb0f91d4f3b87a58cca29601b))
249
+
250
+
251
+
252
+ # [0.27.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.26.0...queue-manager-rango-preset@0.27.0) (2024-02-07)
253
+
254
+
255
+
256
+ # [0.26.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.25.0...queue-manager-rango-preset@0.26.0) (2024-01-22)
257
+
258
+
259
+ ### Features
260
+
261
+ * export notifications from useWidget ([fc50baf](https://github.com/rango-exchange/rango-client/commit/fc50baf1b4043755162a54bcdd07f10fab94da39))
262
+
263
+
264
+
265
+ # [0.25.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.24.0...queue-manager-rango-preset@0.25.0) (2023-12-24)
266
+
267
+
268
+ ### Bug Fixes
269
+
270
+ * add initial state with props in app store and fix bug of passing liquidity sources via config ([5d50d0f](https://github.com/rango-exchange/rango-client/commit/5d50d0fa18c0519a9464bb205684ecdaf881d936))
271
+ * add wallets-core to rango-preset package dependencies ([0a8920a](https://github.com/rango-exchange/rango-client/commit/0a8920a11db4a8d213e01ee770289242bf1defc8))
272
+ * display transaction url after refreshing ([c976bff](https://github.com/rango-exchange/rango-client/commit/c976bffd3827ee20de5dd0f21be6d430432fff28))
273
+ * fix emitting failed event in swap execution ([cedc535](https://github.com/rango-exchange/rango-client/commit/cedc53523dc8ddc5f339b4da6afa822058bd760d))
274
+ * fix HMR for widget and playground ([8524820](https://github.com/rango-exchange/rango-client/commit/8524820f10cf0b8921f3db0c4f620ff98daa4103))
275
+
276
+
277
+ ### Features
278
+
279
+ * add state of wallets' details to useWidget ([2a59055](https://github.com/rango-exchange/rango-client/commit/2a590551cc0a3d663fd9901e125890ff1386c0aa))
280
+
281
+
282
+
283
+ # [0.14.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.13.0...queue-manager-rango-preset@0.14.0) (2023-08-03)
284
+
285
+
286
+
287
+ # [0.13.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.12.0...queue-manager-rango-preset@0.13.0) (2023-08-01)
288
+
289
+
290
+
291
+ # [0.9.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.8.0...queue-manager-rango-preset@0.9.0) (2023-07-31)
292
+
293
+
294
+ ### Features
295
+
296
+ * Get Wallet Connect project id from config ([9fb30b4](https://github.com/rango-exchange/rango-client/commit/9fb30b4b1a83e2005bbf42553298f24b1e278e1c))
297
+ * support safe wallet ([d04cbcd](https://github.com/rango-exchange/rango-client/commit/d04cbcd2a612755563512d9dff6f2312088d8b4d))
298
+
299
+
300
+
301
+ # [0.7.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.6.0...queue-manager-rango-preset@0.7.0) (2023-07-11)
302
+
303
+
304
+
305
+ # [0.6.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.5.0...queue-manager-rango-preset@0.6.0) (2023-07-11)
306
+
307
+
308
+ ### Bug Fixes
309
+
310
+ * better parsing of evm rpc errors ([f23031a](https://github.com/rango-exchange/rango-client/commit/f23031ae14e6e841ee488591bd1bf58cfa7ca15b))
311
+ * fix signer wait change network issues ([e453db6](https://github.com/rango-exchange/rango-client/commit/e453db6ccf7736e36e5ada0c29502be32254fe9c))
312
+
313
+
314
+ ### Features
315
+
316
+ * add widget events and refactor swap execution events ([0d76806](https://github.com/rango-exchange/rango-client/commit/0d7680693dd77439de38cd0b20f263f6ae8cceb0))
317
+
318
+
319
+
320
+ # [0.5.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.4.0...queue-manager-rango-preset@0.5.0) (2023-05-31)
321
+
322
+
323
+
324
+ # [0.4.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.3.0...queue-manager-rango-preset@0.4.0) (2023-05-31)
325
+
326
+
327
+
328
+ # [0.3.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.2.0...queue-manager-rango-preset@0.3.0) (2023-05-30)
329
+
330
+
331
+
332
+ # [0.2.0](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.1.14...queue-manager-rango-preset@0.2.0) (2023-05-30)
333
+
334
+
335
+ ### Bug Fixes
336
+
337
+ * avoid getting transaction receipt multiple times ([3ef2875](https://github.com/rango-exchange/rango-client/commit/3ef2875bfad470cf2780ae5f82c4841e7eeb60ff))
338
+ * fix bug of duplicate modals for wallet connect ([efb5482](https://github.com/rango-exchange/rango-client/commit/efb54827fd51e6c6c8f42c6abf33c3d7610755e8))
339
+ * handle replaced transactions ([1c8598d](https://github.com/rango-exchange/rango-client/commit/1c8598d2755afc9e439ee80c0951d83c6aed9f2a))
340
+
341
+
342
+
343
+ ## [0.1.13](https://github.com/rango-exchange/rango-client/compare/queue-manager-rango-preset@0.1.12...queue-manager-rango-preset@0.1.13) (2023-05-15)
344
+
345
+
346
+ ### Bug Fixes
347
+
348
+ * fix flow bug when check status failed ([3a886e6](https://github.com/rango-exchange/rango-client/commit/3a886e68cf45c8bf500823fae96070acbbd3942a))
349
+ * getChainId & networkMatched on wallet connect v1 ([9ec8cfb](https://github.com/rango-exchange/rango-client/commit/9ec8cfbd3f9be9befcfb632485afa1ee436e92a2))
350
+ * update rango-types and fix notification bugs ([993f185](https://github.com/rango-exchange/rango-client/commit/993f185e0b8c5e5e15a2c65ba2d85d1f9c8daa90))
351
+
352
+
353
+
@@ -0,0 +1,13 @@
1
+ import type { SwapQueueContext, SwapStorage } from '../types';
2
+ import type { ExecuterActions } from '@rango-dev/queue-manager-core';
3
+ import { SwapActionTypes } from '../types';
4
+ /**
5
+ *
6
+ * For doing a swap the user needs to accept a `contract` so it can use the user balance.
7
+ * There is two types of check status:
8
+ * 1. Checking approval transaction (Give permission to a contract)
9
+ * 2. Checking swap transaction.
10
+ *
11
+ */
12
+ export declare function checkStatus(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
13
+ //# sourceMappingURL=checkStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkStatus.d.ts","sourceRoot":"","sources":["../../src/actions/checkStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAkCrE,OAAO,EAAiB,eAAe,EAAE,MAAM,UAAU,CAAC;AAmf1D;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,CAmBf"}
@@ -0,0 +1,8 @@
1
+ import type { SwapActionTypes, SwapQueueContext, SwapStorage } from '../../types';
2
+ import type { BlockedReason, ExecuterActions } from '@rango-dev/queue-manager-core';
3
+ import { type Result } from 'ts-results';
4
+ /**
5
+ * Check for network & address be matched and queue to not be blocked and update the swap accordingly.
6
+ */
7
+ export declare function checkEnvironmentBeforeExecuteTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<Result<true, BlockedReason>>;
8
+ //# sourceMappingURL=checkEnvironmentBeforeExecuteTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkEnvironmentBeforeExecuteTransaction.d.ts","sourceRoot":"","sources":["../../../src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAuBlD;;GAEG;AACH,wBAAsB,wCAAwC,CAC5D,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CA4CtC"}
@@ -0,0 +1,17 @@
1
+ import type { ExecuterActions } from '@rango-dev/queue-manager-core';
2
+ import type { APIErrorCode, SignerErrorCode, StepStatus, SwapStatus } from 'rango-types';
3
+ import { type Result } from 'ts-results';
4
+ import { type SwapActionTypes, type SwapQueueContext, type SwapStorage } from '../../types';
5
+ export interface NextTransactionState {
6
+ nextStatus?: SwapStatus;
7
+ nextStepStatus: StepStatus;
8
+ message: string;
9
+ details?: string;
10
+ }
11
+ export interface NextTransactionStateError extends NextTransactionState {
12
+ errorCode: APIErrorCode | SignerErrorCode | null;
13
+ }
14
+ export declare function produceNextStateForTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Result<NextTransactionState, NextTransactionStateError>;
15
+ export declare function onNextStateError(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>, error: NextTransactionStateError): void;
16
+ export declare function onNextStateOk(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>, ok: NextTransactionState): void;
17
+ //# sourceMappingURL=produceNextStateForTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"produceNextStateForTransaction.d.ts","sourceRoot":"","sources":["../../../src/actions/common/produceNextStateForTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,UAAU,EACV,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAalD,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,EAAE,UAAU,CAAC;IAE3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE,SAAS,EAAE,YAAY,GAAG,eAAe,GAAG,IAAI,CAAC;CAClD;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,MAAM,CAAC,oBAAoB,EAAE,yBAAyB,CAAC,CAmDzD;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,EACxE,KAAK,EAAE,yBAAyB,QAmCjC;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,EACxE,EAAE,EAAE,oBAAoB,QA6BzB"}
@@ -0,0 +1,5 @@
1
+ import type { SwapActionTypes, SwapQueueContext, SwapStorage } from '../../types';
2
+ import type { BlockedReason, ExecuterActions } from '@rango-dev/queue-manager-core';
3
+ export declare function isClaimedByCurrentQueue(context: SwapQueueContext): boolean;
4
+ export declare function requestBlockQueue(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>, blockedFor: BlockedReason): void;
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/actions/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAE1E;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,EACxE,UAAU,EAAE,aAAa,QAQ1B"}
@@ -0,0 +1,12 @@
1
+ import type { SwapQueueContext, SwapStorage } from '../types';
2
+ import type { ExecuterActions } from '@rango-dev/queue-manager-core';
3
+ import { SwapActionTypes } from '../types';
4
+ /**
5
+ *
6
+ * When a user asks for a swap, We first create the transaction by sending a request to server
7
+ * Server will return the transaction that need to be sent to wallet.
8
+ * It can be failed if server goes through an error, If not, we will schedule the `EXECTUTE_TRANSACTION`.
9
+ *
10
+ */
11
+ export declare function createTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
12
+ //# sourceMappingURL=createTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTransaction.d.ts","sourceRoot":"","sources":["../../src/actions/createTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAgBrE,OAAO,EAGL,eAAe,EAChB,MAAM,UAAU,CAAC;AAElB;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,CAoFf"}
@@ -0,0 +1,14 @@
1
+ import type { SwapActionTypes, SwapQueueContext, SwapStorage } from '../../types';
2
+ import type { ExecuterActions } from '@rango-dev/queue-manager-core';
3
+ /**
4
+ *
5
+ * Excecute a created transaction.
6
+ *
7
+ * This function implemented the parallel mode by `claim` mechanism which means
8
+ * All the queues the meet certain situation (like multiple evm transaction) will go through
9
+ * a `claim` mechanims that decides which queue should be run and it blocks other ones.
10
+ *
11
+ * A queue will be go to sign process, if the wallet and network is matched.
12
+ */
13
+ export declare function executeTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
14
+ //# sourceMappingURL=executeTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeTransaction.d.ts","sourceRoot":"","sources":["../../../src/actions/executeTransaction/executeTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAoBrE;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,CAqEf"}
@@ -0,0 +1,2 @@
1
+ export { executeTransaction } from './executeTransaction.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/executeTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { SwapQueueContext, SwapStorage } from '../types';
2
+ import type { ExecuterActions } from '@rango-dev/queue-manager-core';
3
+ import { SwapActionTypes } from '../types';
4
+ /**
5
+ *
6
+ * This function is responsibe for scheduling the correct `action` based on `PendingSwap` status.
7
+ * It means `action`s schedule this step to decide what should be the next step/task.
8
+ *
9
+ * It's acts like a `while(true)` and will `break` the loop on certain `action`s like `CHECK_STATUS`.
10
+ *
11
+ *
12
+ */
13
+ export declare function scheduleNextStep({ schedule, next, failed, setStorage, getStorage, }: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): void;
14
+ //# sourceMappingURL=scheduleNextStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduleNextStep.d.ts","sourceRoot":"","sources":["../../src/actions/scheduleNextStep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAYrE,OAAO,EAAiB,eAAe,EAAE,MAAM,UAAU,CAAC;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,UAAU,EACV,UAAU,GACX,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GAAG,IAAI,CAyExE"}
@@ -0,0 +1,4 @@
1
+ import { ExecuterActions } from '@rango-dev/queue-manager-core';
2
+ import { SwapActionTypes, SwapStorage } from '../types';
3
+ export declare function start({ schedule, next, getStorage, }: ExecuterActions<SwapStorage, SwapActionTypes>): void;
4
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/actions/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAiB,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvE,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,IAAI,EACJ,UAAU,GACX,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,CAAC,GAAG,IAAI,CAOtD"}
@@ -0,0 +1,14 @@
1
+ import type { RouteExecutionEvents } from './types';
2
+ interface Emitter<Events extends Record<string, unknown>> {
3
+ emit<K extends keyof Events>(type: K, event: Events[K]): void;
4
+ }
5
+ export interface Configs {
6
+ API_KEY: string;
7
+ BASE_URL?: string;
8
+ emitter?: Emitter<RouteExecutionEvents>;
9
+ }
10
+ export declare function getConfig<K extends keyof Configs>(name: K): Configs[K];
11
+ export declare function setConfig(name: keyof Configs, value: any): any;
12
+ export declare function initConfig(nextConfigs: Configs): Configs;
13
+ export {};
14
+ //# sourceMappingURL=configs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../src/configs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,UAAU,OAAO,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtD,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC/D;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACzC;AAcD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEtE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,OAIxD;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,WAG9C"}
@@ -0,0 +1,7 @@
1
+ export declare const ERROR_MESSAGE_DEPENDS_ON_OTHER_QUEUES = "Waiting for other swaps to complete";
2
+ export declare const ERROR_MESSAGE_WAIT_FOR_WALLET = "Waiting for connecting wallet";
3
+ export declare const ERROR_MESSAGE_WAIT_FOR_WALLET_DESCRIPTION_WRONG_WALLET: (type: string | null, address: string | null) => string;
4
+ export declare const ERROR_MESSAGE_WAIT_FOR_WALLET_DESCRIPTION: (type: string | null) => string;
5
+ export declare const ERROR_MESSAGE_WAIT_FOR_CHANGE_NETWORK: (network: string | null) => string;
6
+ export declare const DEFAULT_ERROR_CODE = "CLIENT_UNEXPECTED_BEHAVIOUR";
7
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qCAAqC,wCACX,CAAC;AACxC,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,sDAAsD,SAC3D,MAAM,GAAG,IAAI,WACV,MAAM,GAAG,IAAI,KACrB,MAGC,CAAC;AACL,eAAO,MAAM,yCAAyC,SAC9C,MAAM,GAAG,IAAI,KAClB,MAAqD,CAAC;AACzD,eAAO,MAAM,qCAAqC,YACvC,MAAM,GAAG,IAAI,KACrB,MAAqD,CAAC;AAEzD,eAAO,MAAM,kBAAkB,gCAAgC,CAAC"}