@across-protocol/sdk 3.1.27 → 3.1.28-beta.1

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 (136) hide show
  1. package/dist/cjs/clients/BundleDataClient/BundleDataClient.d.ts +59 -0
  2. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js +926 -0
  3. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -0
  4. package/dist/cjs/clients/BundleDataClient/index.d.ts +2 -0
  5. package/dist/cjs/clients/BundleDataClient/index.js +6 -0
  6. package/dist/cjs/clients/BundleDataClient/index.js.map +1 -0
  7. package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.d.ts +15 -0
  8. package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.js +131 -0
  9. package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.js.map +1 -0
  10. package/dist/cjs/clients/BundleDataClient/utils/FillUtils.d.ts +6 -0
  11. package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js +19 -0
  12. package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js.map +1 -0
  13. package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts +3 -0
  14. package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.js +23 -0
  15. package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.js.map +1 -0
  16. package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +24 -0
  17. package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js +129 -0
  18. package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -0
  19. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.d.ts +302 -0
  20. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js +77 -0
  21. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -0
  22. package/dist/cjs/clients/BundleDataClient/utils/index.d.ts +6 -0
  23. package/dist/cjs/clients/BundleDataClient/utils/index.js +10 -0
  24. package/dist/cjs/clients/BundleDataClient/utils/index.js.map +1 -0
  25. package/dist/cjs/clients/BundleDataClient/utils/shims.d.ts +8 -0
  26. package/dist/cjs/clients/BundleDataClient/utils/shims.js +3 -0
  27. package/dist/cjs/clients/BundleDataClient/utils/shims.js.map +1 -0
  28. package/dist/cjs/clients/index.d.ts +1 -0
  29. package/dist/cjs/clients/index.js +2 -1
  30. package/dist/cjs/clients/index.js.map +1 -1
  31. package/dist/cjs/interfaces/BundleData.d.ts +63 -0
  32. package/dist/cjs/interfaces/BundleData.js +3 -0
  33. package/dist/cjs/interfaces/BundleData.js.map +1 -0
  34. package/dist/cjs/interfaces/index.d.ts +1 -0
  35. package/dist/cjs/interfaces/index.js +1 -0
  36. package/dist/cjs/interfaces/index.js.map +1 -1
  37. package/dist/cjs/utils/AddressUtils.d.ts +1 -0
  38. package/dist/cjs/utils/AddressUtils.js +15 -1
  39. package/dist/cjs/utils/AddressUtils.js.map +1 -1
  40. package/dist/cjs/utils/ContractUtils.d.ts +1 -0
  41. package/dist/cjs/utils/ContractUtils.js +12 -0
  42. package/dist/cjs/utils/ContractUtils.js.map +1 -0
  43. package/dist/cjs/utils/ObjectUtils.d.ts +18 -0
  44. package/dist/cjs/utils/ObjectUtils.js +27 -1
  45. package/dist/cjs/utils/ObjectUtils.js.map +1 -1
  46. package/dist/esm/clients/BundleDataClient/BundleDataClient.d.ts +59 -0
  47. package/dist/esm/clients/BundleDataClient/BundleDataClient.js +1090 -0
  48. package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -0
  49. package/dist/esm/clients/BundleDataClient/index.d.ts +2 -0
  50. package/dist/esm/clients/BundleDataClient/index.js +3 -0
  51. package/dist/esm/clients/BundleDataClient/index.js.map +1 -0
  52. package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.d.ts +15 -0
  53. package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js +182 -0
  54. package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js.map +1 -0
  55. package/dist/esm/clients/BundleDataClient/utils/FillUtils.d.ts +6 -0
  56. package/dist/esm/clients/BundleDataClient/utils/FillUtils.js +20 -0
  57. package/dist/esm/clients/BundleDataClient/utils/FillUtils.js.map +1 -0
  58. package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts +3 -0
  59. package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.js +20 -0
  60. package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.js.map +1 -0
  61. package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +24 -0
  62. package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js +157 -0
  63. package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -0
  64. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.d.ts +302 -0
  65. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js +79 -0
  66. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -0
  67. package/dist/esm/clients/BundleDataClient/utils/index.d.ts +6 -0
  68. package/dist/esm/clients/BundleDataClient/utils/index.js +7 -0
  69. package/dist/esm/clients/BundleDataClient/utils/index.js.map +1 -0
  70. package/dist/esm/clients/BundleDataClient/utils/shims.d.ts +8 -0
  71. package/dist/esm/clients/BundleDataClient/utils/shims.js +2 -0
  72. package/dist/esm/clients/BundleDataClient/utils/shims.js.map +1 -0
  73. package/dist/esm/clients/index.d.ts +1 -0
  74. package/dist/esm/clients/index.js +2 -0
  75. package/dist/esm/clients/index.js.map +1 -1
  76. package/dist/esm/interfaces/BundleData.d.ts +63 -0
  77. package/dist/esm/interfaces/BundleData.js +2 -0
  78. package/dist/esm/interfaces/BundleData.js.map +1 -0
  79. package/dist/esm/interfaces/index.d.ts +1 -0
  80. package/dist/esm/interfaces/index.js +1 -0
  81. package/dist/esm/interfaces/index.js.map +1 -1
  82. package/dist/esm/utils/AddressUtils.d.ts +1 -0
  83. package/dist/esm/utils/AddressUtils.js +16 -1
  84. package/dist/esm/utils/AddressUtils.js.map +1 -1
  85. package/dist/esm/utils/ContractUtils.d.ts +1 -0
  86. package/dist/esm/utils/ContractUtils.js +8 -0
  87. package/dist/esm/utils/ContractUtils.js.map +1 -0
  88. package/dist/esm/utils/ObjectUtils.d.ts +18 -0
  89. package/dist/esm/utils/ObjectUtils.js +24 -0
  90. package/dist/esm/utils/ObjectUtils.js.map +1 -1
  91. package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts +60 -0
  92. package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -0
  93. package/dist/types/clients/BundleDataClient/index.d.ts +3 -0
  94. package/dist/types/clients/BundleDataClient/index.d.ts.map +1 -0
  95. package/dist/types/clients/BundleDataClient/utils/DataworkerUtils.d.ts +16 -0
  96. package/dist/types/clients/BundleDataClient/utils/DataworkerUtils.d.ts.map +1 -0
  97. package/dist/types/clients/BundleDataClient/utils/FillUtils.d.ts +7 -0
  98. package/dist/types/clients/BundleDataClient/utils/FillUtils.d.ts.map +1 -0
  99. package/dist/types/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts +4 -0
  100. package/dist/types/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts.map +1 -0
  101. package/dist/types/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +25 -0
  102. package/dist/types/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts.map +1 -0
  103. package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts +303 -0
  104. package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts.map +1 -0
  105. package/dist/types/clients/BundleDataClient/utils/index.d.ts +7 -0
  106. package/dist/types/clients/BundleDataClient/utils/index.d.ts.map +1 -0
  107. package/dist/types/clients/BundleDataClient/utils/shims.d.ts +9 -0
  108. package/dist/types/clients/BundleDataClient/utils/shims.d.ts.map +1 -0
  109. package/dist/types/clients/index.d.ts +1 -0
  110. package/dist/types/clients/index.d.ts.map +1 -1
  111. package/dist/types/interfaces/BundleData.d.ts +64 -0
  112. package/dist/types/interfaces/BundleData.d.ts.map +1 -0
  113. package/dist/types/interfaces/index.d.ts +1 -0
  114. package/dist/types/interfaces/index.d.ts.map +1 -1
  115. package/dist/types/utils/AddressUtils.d.ts +1 -0
  116. package/dist/types/utils/AddressUtils.d.ts.map +1 -1
  117. package/dist/types/utils/ContractUtils.d.ts +2 -0
  118. package/dist/types/utils/ContractUtils.d.ts.map +1 -0
  119. package/dist/types/utils/ObjectUtils.d.ts +18 -0
  120. package/dist/types/utils/ObjectUtils.d.ts.map +1 -1
  121. package/package.json +1 -1
  122. package/src/clients/BundleDataClient/BundleDataClient.ts +1297 -0
  123. package/src/clients/BundleDataClient/index.ts +2 -0
  124. package/src/clients/BundleDataClient/utils/DataworkerUtils.ts +268 -0
  125. package/src/clients/BundleDataClient/utils/FillUtils.ts +46 -0
  126. package/src/clients/BundleDataClient/utils/MerkleTreeUtils.ts +26 -0
  127. package/src/clients/BundleDataClient/utils/PoolRebalanceUtils.ts +238 -0
  128. package/src/clients/BundleDataClient/utils/SuperstructUtils.ts +132 -0
  129. package/src/clients/BundleDataClient/utils/index.ts +6 -0
  130. package/src/clients/BundleDataClient/utils/shims.ts +10 -0
  131. package/src/clients/index.ts +1 -0
  132. package/src/interfaces/BundleData.ts +68 -0
  133. package/src/interfaces/index.ts +1 -0
  134. package/src/utils/AddressUtils.ts +15 -1
  135. package/src/utils/ContractUtils.ts +8 -0
  136. package/src/utils/ObjectUtils.ts +23 -0
@@ -0,0 +1,302 @@
1
+ import { BigNumber } from "ethers";
2
+ export declare const BundleDataSS: import("superstruct").Struct<{
3
+ bundleDepositsV3: Record<string, Record<string, {
4
+ depositId: number;
5
+ originChainId: number;
6
+ blockNumber: number;
7
+ transactionIndex: number;
8
+ logIndex: number;
9
+ transactionHash: string;
10
+ message: string;
11
+ inputToken: string;
12
+ inputAmount: BigNumber;
13
+ quoteTimestamp: number;
14
+ destinationChainId: number;
15
+ fromLiteChain: boolean;
16
+ toLiteChain: boolean;
17
+ depositor: string;
18
+ recipient: string;
19
+ outputToken: string;
20
+ outputAmount: BigNumber;
21
+ fillDeadline: number;
22
+ exclusiveRelayer: string;
23
+ exclusivityDeadline: number;
24
+ quoteBlockNumber: number;
25
+ updatedRecipient?: string | undefined;
26
+ updatedMessage?: string | undefined;
27
+ updatedOutputAmount?: BigNumber | undefined;
28
+ speedUpSignature?: string | undefined;
29
+ relayerFeePct?: BigNumber | undefined;
30
+ }[]>>;
31
+ bundleFillsV3: Record<string, Record<string, {
32
+ fills: {
33
+ depositId: number;
34
+ originChainId: number;
35
+ blockNumber: number;
36
+ transactionIndex: number;
37
+ logIndex: number;
38
+ transactionHash: string;
39
+ message: string;
40
+ inputToken: string;
41
+ inputAmount: BigNumber;
42
+ quoteTimestamp: number;
43
+ destinationChainId: number;
44
+ depositor: string;
45
+ recipient: string;
46
+ outputToken: string;
47
+ outputAmount: BigNumber;
48
+ fillDeadline: number;
49
+ exclusiveRelayer: string;
50
+ exclusivityDeadline: number;
51
+ repaymentChainId: number;
52
+ lpFeePct: BigNumber;
53
+ relayer: string;
54
+ relayExecutionInfo: {
55
+ updatedRecipient: string;
56
+ updatedMessage: string;
57
+ updatedOutputAmount: BigNumber;
58
+ fillType: number;
59
+ };
60
+ }[];
61
+ refunds: Record<string, BigNumber>;
62
+ realizedLpFees: BigNumber;
63
+ totalRefundAmount: BigNumber;
64
+ }>>;
65
+ bundleSlowFillsV3: Record<string, Record<string, {
66
+ depositId: number;
67
+ originChainId: number;
68
+ blockNumber: number;
69
+ transactionIndex: number;
70
+ logIndex: number;
71
+ transactionHash: string;
72
+ message: string;
73
+ inputToken: string;
74
+ inputAmount: BigNumber;
75
+ quoteTimestamp: number;
76
+ destinationChainId: number;
77
+ fromLiteChain: boolean;
78
+ toLiteChain: boolean;
79
+ depositor: string;
80
+ recipient: string;
81
+ outputToken: string;
82
+ outputAmount: BigNumber;
83
+ fillDeadline: number;
84
+ exclusiveRelayer: string;
85
+ exclusivityDeadline: number;
86
+ quoteBlockNumber: number;
87
+ lpFeePct: BigNumber;
88
+ updatedRecipient?: string | undefined;
89
+ updatedMessage?: string | undefined;
90
+ updatedOutputAmount?: BigNumber | undefined;
91
+ speedUpSignature?: string | undefined;
92
+ relayerFeePct?: BigNumber | undefined;
93
+ }[]>>;
94
+ expiredDepositsToRefundV3: Record<string, Record<string, {
95
+ depositId: number;
96
+ originChainId: number;
97
+ blockNumber: number;
98
+ transactionIndex: number;
99
+ logIndex: number;
100
+ transactionHash: string;
101
+ message: string;
102
+ inputToken: string;
103
+ inputAmount: BigNumber;
104
+ quoteTimestamp: number;
105
+ destinationChainId: number;
106
+ fromLiteChain: boolean;
107
+ toLiteChain: boolean;
108
+ depositor: string;
109
+ recipient: string;
110
+ outputToken: string;
111
+ outputAmount: BigNumber;
112
+ fillDeadline: number;
113
+ exclusiveRelayer: string;
114
+ exclusivityDeadline: number;
115
+ quoteBlockNumber: number;
116
+ updatedRecipient?: string | undefined;
117
+ updatedMessage?: string | undefined;
118
+ updatedOutputAmount?: BigNumber | undefined;
119
+ speedUpSignature?: string | undefined;
120
+ relayerFeePct?: BigNumber | undefined;
121
+ }[]>>;
122
+ unexecutableSlowFills: Record<string, Record<string, {
123
+ depositId: number;
124
+ originChainId: number;
125
+ blockNumber: number;
126
+ transactionIndex: number;
127
+ logIndex: number;
128
+ transactionHash: string;
129
+ message: string;
130
+ inputToken: string;
131
+ inputAmount: BigNumber;
132
+ quoteTimestamp: number;
133
+ destinationChainId: number;
134
+ fromLiteChain: boolean;
135
+ toLiteChain: boolean;
136
+ depositor: string;
137
+ recipient: string;
138
+ outputToken: string;
139
+ outputAmount: BigNumber;
140
+ fillDeadline: number;
141
+ exclusiveRelayer: string;
142
+ exclusivityDeadline: number;
143
+ quoteBlockNumber: number;
144
+ lpFeePct: BigNumber;
145
+ updatedRecipient?: string | undefined;
146
+ updatedMessage?: string | undefined;
147
+ updatedOutputAmount?: BigNumber | undefined;
148
+ speedUpSignature?: string | undefined;
149
+ relayerFeePct?: BigNumber | undefined;
150
+ }[]>>;
151
+ bundleBlockRanges: number[][];
152
+ }, {
153
+ bundleBlockRanges: import("superstruct").Struct<number[][], import("superstruct").Struct<number[], import("superstruct").Struct<number, null>>>;
154
+ bundleDepositsV3: import("superstruct").Struct<Record<string, Record<string, {
155
+ depositId: number;
156
+ originChainId: number;
157
+ blockNumber: number;
158
+ transactionIndex: number;
159
+ logIndex: number;
160
+ transactionHash: string;
161
+ message: string;
162
+ inputToken: string;
163
+ inputAmount: BigNumber;
164
+ quoteTimestamp: number;
165
+ destinationChainId: number;
166
+ fromLiteChain: boolean;
167
+ toLiteChain: boolean;
168
+ depositor: string;
169
+ recipient: string;
170
+ outputToken: string;
171
+ outputAmount: BigNumber;
172
+ fillDeadline: number;
173
+ exclusiveRelayer: string;
174
+ exclusivityDeadline: number;
175
+ quoteBlockNumber: number;
176
+ updatedRecipient?: string | undefined;
177
+ updatedMessage?: string | undefined;
178
+ updatedOutputAmount?: BigNumber | undefined;
179
+ speedUpSignature?: string | undefined;
180
+ relayerFeePct?: BigNumber | undefined;
181
+ }[]>>, null>;
182
+ expiredDepositsToRefundV3: import("superstruct").Struct<Record<string, Record<string, {
183
+ depositId: number;
184
+ originChainId: number;
185
+ blockNumber: number;
186
+ transactionIndex: number;
187
+ logIndex: number;
188
+ transactionHash: string;
189
+ message: string;
190
+ inputToken: string;
191
+ inputAmount: BigNumber;
192
+ quoteTimestamp: number;
193
+ destinationChainId: number;
194
+ fromLiteChain: boolean;
195
+ toLiteChain: boolean;
196
+ depositor: string;
197
+ recipient: string;
198
+ outputToken: string;
199
+ outputAmount: BigNumber;
200
+ fillDeadline: number;
201
+ exclusiveRelayer: string;
202
+ exclusivityDeadline: number;
203
+ quoteBlockNumber: number;
204
+ updatedRecipient?: string | undefined;
205
+ updatedMessage?: string | undefined;
206
+ updatedOutputAmount?: BigNumber | undefined;
207
+ speedUpSignature?: string | undefined;
208
+ relayerFeePct?: BigNumber | undefined;
209
+ }[]>>, null>;
210
+ unexecutableSlowFills: import("superstruct").Struct<Record<string, Record<string, {
211
+ depositId: number;
212
+ originChainId: number;
213
+ blockNumber: number;
214
+ transactionIndex: number;
215
+ logIndex: number;
216
+ transactionHash: string;
217
+ message: string;
218
+ inputToken: string;
219
+ inputAmount: BigNumber;
220
+ quoteTimestamp: number;
221
+ destinationChainId: number;
222
+ fromLiteChain: boolean;
223
+ toLiteChain: boolean;
224
+ depositor: string;
225
+ recipient: string;
226
+ outputToken: string;
227
+ outputAmount: BigNumber;
228
+ fillDeadline: number;
229
+ exclusiveRelayer: string;
230
+ exclusivityDeadline: number;
231
+ quoteBlockNumber: number;
232
+ lpFeePct: BigNumber;
233
+ updatedRecipient?: string | undefined;
234
+ updatedMessage?: string | undefined;
235
+ updatedOutputAmount?: BigNumber | undefined;
236
+ speedUpSignature?: string | undefined;
237
+ relayerFeePct?: BigNumber | undefined;
238
+ }[]>>, null>;
239
+ bundleSlowFillsV3: import("superstruct").Struct<Record<string, Record<string, {
240
+ depositId: number;
241
+ originChainId: number;
242
+ blockNumber: number;
243
+ transactionIndex: number;
244
+ logIndex: number;
245
+ transactionHash: string;
246
+ message: string;
247
+ inputToken: string;
248
+ inputAmount: BigNumber;
249
+ quoteTimestamp: number;
250
+ destinationChainId: number;
251
+ fromLiteChain: boolean;
252
+ toLiteChain: boolean;
253
+ depositor: string;
254
+ recipient: string;
255
+ outputToken: string;
256
+ outputAmount: BigNumber;
257
+ fillDeadline: number;
258
+ exclusiveRelayer: string;
259
+ exclusivityDeadline: number;
260
+ quoteBlockNumber: number;
261
+ lpFeePct: BigNumber;
262
+ updatedRecipient?: string | undefined;
263
+ updatedMessage?: string | undefined;
264
+ updatedOutputAmount?: BigNumber | undefined;
265
+ speedUpSignature?: string | undefined;
266
+ relayerFeePct?: BigNumber | undefined;
267
+ }[]>>, null>;
268
+ bundleFillsV3: import("superstruct").Struct<Record<string, Record<string, {
269
+ fills: {
270
+ depositId: number;
271
+ originChainId: number;
272
+ blockNumber: number;
273
+ transactionIndex: number;
274
+ logIndex: number;
275
+ transactionHash: string;
276
+ message: string;
277
+ inputToken: string;
278
+ inputAmount: BigNumber;
279
+ quoteTimestamp: number;
280
+ destinationChainId: number;
281
+ depositor: string;
282
+ recipient: string;
283
+ outputToken: string;
284
+ outputAmount: BigNumber;
285
+ fillDeadline: number;
286
+ exclusiveRelayer: string;
287
+ exclusivityDeadline: number;
288
+ repaymentChainId: number;
289
+ lpFeePct: BigNumber;
290
+ relayer: string;
291
+ relayExecutionInfo: {
292
+ updatedRecipient: string;
293
+ updatedMessage: string;
294
+ updatedOutputAmount: BigNumber;
295
+ fillType: number;
296
+ };
297
+ }[];
298
+ refunds: Record<string, BigNumber>;
299
+ realizedLpFees: BigNumber;
300
+ totalRefundAmount: BigNumber;
301
+ }>>, null>;
302
+ }>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BundleDataSS = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var superstruct_1 = require("superstruct");
6
+ var ethers_1 = require("ethers");
7
+ var PositiveIntegerStringSS = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /\d+/);
8
+ var Web3AddressSS = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /^0x[a-fA-F0-9]{40}$/);
9
+ var BigNumberType = (0, superstruct_1.coerce)((0, superstruct_1.instance)(ethers_1.BigNumber), (0, superstruct_1.string)(), function (value) {
10
+ try {
11
+ return ethers_1.BigNumber.from(value);
12
+ }
13
+ catch (error) {
14
+ return value;
15
+ }
16
+ });
17
+ var FillTypeSS = (0, superstruct_1.number)();
18
+ var V3RelayDataSS = {
19
+ inputToken: (0, superstruct_1.string)(),
20
+ inputAmount: BigNumberType,
21
+ outputToken: (0, superstruct_1.string)(),
22
+ outputAmount: BigNumberType,
23
+ fillDeadline: (0, superstruct_1.number)(),
24
+ exclusiveRelayer: (0, superstruct_1.string)(),
25
+ exclusivityDeadline: (0, superstruct_1.number)(),
26
+ originChainId: (0, superstruct_1.number)(),
27
+ depositor: (0, superstruct_1.string)(),
28
+ recipient: (0, superstruct_1.string)(),
29
+ depositId: (0, superstruct_1.number)(),
30
+ message: (0, superstruct_1.string)(),
31
+ };
32
+ var SortableEventSS = {
33
+ blockNumber: (0, superstruct_1.number)(),
34
+ transactionIndex: (0, superstruct_1.number)(),
35
+ logIndex: (0, superstruct_1.number)(),
36
+ transactionHash: (0, superstruct_1.string)(),
37
+ };
38
+ var V3DepositSS = {
39
+ fromLiteChain: (0, superstruct_1.defaulted)((0, superstruct_1.boolean)(), false),
40
+ toLiteChain: (0, superstruct_1.defaulted)((0, superstruct_1.boolean)(), false),
41
+ destinationChainId: (0, superstruct_1.number)(),
42
+ quoteTimestamp: (0, superstruct_1.number)(),
43
+ relayerFeePct: (0, superstruct_1.optional)(BigNumberType),
44
+ speedUpSignature: (0, superstruct_1.optional)((0, superstruct_1.string)()),
45
+ updatedRecipient: (0, superstruct_1.optional)((0, superstruct_1.string)()),
46
+ updatedOutputAmount: (0, superstruct_1.optional)(BigNumberType),
47
+ updatedMessage: (0, superstruct_1.optional)((0, superstruct_1.string)()),
48
+ };
49
+ var _V3DepositWithBlockSS = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ quoteBlockNumber: (0, superstruct_1.number)() }, V3DepositSS), SortableEventSS), V3RelayDataSS);
50
+ var V3DepositWithBlockSS = (0, superstruct_1.object)(_V3DepositWithBlockSS);
51
+ var V3DepositWithBlockLpFeeSS = (0, superstruct_1.object)(tslib_1.__assign(tslib_1.__assign({}, _V3DepositWithBlockSS), { lpFeePct: BigNumberType }));
52
+ var V3RelayExecutionEventInfoSS = (0, superstruct_1.object)({
53
+ updatedOutputAmount: BigNumberType,
54
+ fillType: FillTypeSS,
55
+ updatedRecipient: (0, superstruct_1.string)(),
56
+ updatedMessage: (0, superstruct_1.string)(),
57
+ });
58
+ var V3FillSS = tslib_1.__assign(tslib_1.__assign({}, V3RelayDataSS), { destinationChainId: (0, superstruct_1.number)(), relayer: (0, superstruct_1.string)(), repaymentChainId: (0, superstruct_1.number)(), relayExecutionInfo: V3RelayExecutionEventInfoSS, quoteTimestamp: (0, superstruct_1.number)() });
59
+ var V3FillWithBlockSS = tslib_1.__assign(tslib_1.__assign({}, SortableEventSS), V3FillSS);
60
+ var BundleFillV3SS = (0, superstruct_1.object)(tslib_1.__assign(tslib_1.__assign({}, V3FillWithBlockSS), { lpFeePct: BigNumberType }));
61
+ var nestedV3DepositRecordSS = (0, superstruct_1.record)(PositiveIntegerStringSS, (0, superstruct_1.record)(Web3AddressSS, (0, superstruct_1.array)(V3DepositWithBlockSS)));
62
+ var nestedV3DepositRecordWithLpFeePctSS = (0, superstruct_1.record)(PositiveIntegerStringSS, (0, superstruct_1.record)(Web3AddressSS, (0, superstruct_1.array)(V3DepositWithBlockLpFeeSS)));
63
+ var nestedV3BundleFillsSS = (0, superstruct_1.record)(PositiveIntegerStringSS, (0, superstruct_1.record)(Web3AddressSS, (0, superstruct_1.object)({
64
+ fills: (0, superstruct_1.array)(BundleFillV3SS),
65
+ refunds: (0, superstruct_1.record)((0, superstruct_1.string)(), BigNumberType),
66
+ totalRefundAmount: BigNumberType,
67
+ realizedLpFees: BigNumberType,
68
+ })));
69
+ exports.BundleDataSS = (0, superstruct_1.object)({
70
+ bundleBlockRanges: (0, superstruct_1.array)((0, superstruct_1.array)((0, superstruct_1.number)())),
71
+ bundleDepositsV3: nestedV3DepositRecordSS,
72
+ expiredDepositsToRefundV3: nestedV3DepositRecordSS,
73
+ unexecutableSlowFills: nestedV3DepositRecordWithLpFeePctSS,
74
+ bundleSlowFillsV3: nestedV3DepositRecordWithLpFeePctSS,
75
+ bundleFillsV3: nestedV3BundleFillsSS,
76
+ });
77
+ //# sourceMappingURL=SuperstructUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuperstructUtils.js","sourceRoot":"","sources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Ac,EAAE,IAAA,oBAAM,GAAE,GACzB,CAAC;AAEF,IAAM,iBAAiB,yCAClB,eAAe,GACf,QAAQ,CACZ,CAAC;AAEF,IAAM,cAAc,GAAG,IAAA,oBAAM,wCACxB,iBAAiB,KACpB,QAAQ,EAAE,aAAa,IACvB,CAAC;AAEH,IAAM,uBAAuB,GAAG,IAAA,oBAAM,EAAC,uBAAuB,EAAE,IAAA,oBAAM,EAAC,aAAa,EAAE,IAAA,mBAAK,EAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;AACpH,IAAM,mCAAmC,GAAG,IAAA,oBAAM,EAChD,uBAAuB,EACvB,IAAA,oBAAM,EAAC,aAAa,EAAE,IAAA,mBAAK,EAAC,yBAAyB,CAAC,CAAC,CACxD,CAAC;AAEF,IAAM,qBAAqB,GAAG,IAAA,oBAAM,EAElC,uBAAuB,EACvB,IAAA,oBAAM,EACJ,aAAa,EACb,IAAA,oBAAM,EAAC;IACL,KAAK,EAAE,IAAA,mBAAK,EAAC,cAAc,CAAC;IAC5B,OAAO,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,aAAa,CAAC;IACxC,iBAAiB,EAAE,aAAa;IAChC,cAAc,EAAE,aAAa;CAC9B,CAAC,CACH,CACF,CAAC;AAEW,QAAA,YAAY,GAAG,IAAA,oBAAM,EAAC;IACjC,iBAAiB,EAAE,IAAA,mBAAK,EAAC,IAAA,mBAAK,EAAC,IAAA,oBAAM,GAAE,CAAC,CAAC;IACzC,gBAAgB,EAAE,uBAAuB;IACzC,yBAAyB,EAAE,uBAAuB;IAClD,qBAAqB,EAAE,mCAAmC;IAC1D,iBAAiB,EAAE,mCAAmC;IACtD,aAAa,EAAE,qBAAqB;CACrC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./shims";
2
+ export * from "./FillUtils";
3
+ export * from "./DataworkerUtils";
4
+ export * from "./PoolRebalanceUtils";
5
+ export * from "./SuperstructUtils";
6
+ export * from "./MerkleTreeUtils";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./shims"), exports);
5
+ tslib_1.__exportStar(require("./FillUtils"), exports);
6
+ tslib_1.__exportStar(require("./DataworkerUtils"), exports);
7
+ tslib_1.__exportStar(require("./PoolRebalanceUtils"), exports);
8
+ tslib_1.__exportStar(require("./SuperstructUtils"), exports);
9
+ tslib_1.__exportStar(require("./MerkleTreeUtils"), exports);
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/clients/BundleDataClient/utils/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,sDAA4B;AAC5B,4DAAkC;AAClC,+DAAqC;AACrC,6DAAmC;AACnC,4DAAkC"}
@@ -0,0 +1,8 @@
1
+ import { RelayData, Deposit, DepositWithBlock, SpeedUp, Fill, FillWithBlock, SlowFillLeaf } from "../../../interfaces";
2
+ export type V3RelayData = RelayData;
3
+ export type V3Deposit = Deposit;
4
+ export type V3DepositWithBlock = DepositWithBlock;
5
+ export type V3SpeedUp = SpeedUp;
6
+ export type V3Fill = Fill;
7
+ export type V3FillWithBlock = FillWithBlock;
8
+ export type V3SlowFillLeaf = SlowFillLeaf;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=shims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shims.js","sourceRoot":"","sources":["../../../../../src/clients/BundleDataClient/utils/shims.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  export { DEFAULT_CONFIG_STORE_VERSION, GLOBAL_CONFIG_STORE_KEYS, AcrossConfigStoreClient, ConfigStoreUpdate, } from "./AcrossConfigStoreClient";
2
2
  export { HubPoolClient, LpFeeRequest } from "./HubPoolClient";
3
3
  export { SpokePoolClient, SpokePoolUpdate } from "./SpokePoolClient";
4
+ export * as BundleDataClient from "./BundleDataClient";
4
5
  export * as mocks from "./mocks";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mocks = exports.SpokePoolClient = exports.HubPoolClient = exports.AcrossConfigStoreClient = exports.GLOBAL_CONFIG_STORE_KEYS = exports.DEFAULT_CONFIG_STORE_VERSION = void 0;
3
+ exports.mocks = exports.BundleDataClient = exports.SpokePoolClient = exports.HubPoolClient = exports.AcrossConfigStoreClient = exports.GLOBAL_CONFIG_STORE_KEYS = exports.DEFAULT_CONFIG_STORE_VERSION = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var AcrossConfigStoreClient_1 = require("./AcrossConfigStoreClient");
6
6
  Object.defineProperty(exports, "DEFAULT_CONFIG_STORE_VERSION", { enumerable: true, get: function () { return AcrossConfigStoreClient_1.DEFAULT_CONFIG_STORE_VERSION; } });
@@ -10,5 +10,6 @@ var HubPoolClient_1 = require("./HubPoolClient");
10
10
  Object.defineProperty(exports, "HubPoolClient", { enumerable: true, get: function () { return HubPoolClient_1.HubPoolClient; } });
11
11
  var SpokePoolClient_1 = require("./SpokePoolClient");
12
12
  Object.defineProperty(exports, "SpokePoolClient", { enumerable: true, get: function () { return SpokePoolClient_1.SpokePoolClient; } });
13
+ exports.BundleDataClient = tslib_1.__importStar(require("./BundleDataClient"));
13
14
  exports.mocks = tslib_1.__importStar(require("./mocks"));
14
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":";;;;AAAA,qEAKmC;AAJjC,uIAAA,4BAA4B,OAAA;AAC5B,mIAAA,wBAAwB,OAAA;AACxB,kIAAA,uBAAuB,OAAA;AAGzB,iDAA8D;AAArD,8GAAA,aAAa,OAAA;AACtB,qDAAqE;AAA5D,kHAAA,eAAe,OAAA;AACxB,yDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":";;;;AAAA,qEAKmC;AAJjC,uIAAA,4BAA4B,OAAA;AAC5B,mIAAA,wBAAwB,OAAA;AACxB,kIAAA,uBAAuB,OAAA;AAGzB,iDAA8D;AAArD,8GAAA,aAAa,OAAA;AACtB,qDAAqE;AAA5D,kHAAA,eAAe,OAAA;AACxB,+EAAuD;AACvD,yDAAiC"}
@@ -0,0 +1,63 @@
1
+ import { BigNumber, Signer } from "ethers";
2
+ import { DepositWithBlock, FillWithBlock, Refund } from "./SpokePool";
3
+ import { HubPoolClient } from "../clients/HubPoolClient";
4
+ import { AcrossConfigStoreClient } from "../clients";
5
+ import { ArweaveClient } from "../caching";
6
+ export type ExpiredDepositsToRefundV3 = {
7
+ [originChainId: number]: {
8
+ [originToken: string]: DepositWithBlock[];
9
+ };
10
+ };
11
+ export type BundleDepositsV3 = {
12
+ [originChainId: number]: {
13
+ [originToken: string]: DepositWithBlock[];
14
+ };
15
+ };
16
+ export interface BundleFillV3 extends FillWithBlock {
17
+ lpFeePct: BigNumber;
18
+ }
19
+ export type BundleFillsV3 = {
20
+ [repaymentChainId: number]: {
21
+ [repaymentToken: string]: {
22
+ fills: BundleFillV3[];
23
+ refunds: Refund;
24
+ totalRefundAmount: BigNumber;
25
+ realizedLpFees: BigNumber;
26
+ };
27
+ };
28
+ };
29
+ export type BundleExcessSlowFills = {
30
+ [destinationChainId: number]: {
31
+ [destinationToken: string]: (DepositWithBlock & {
32
+ lpFeePct: BigNumber;
33
+ })[];
34
+ };
35
+ };
36
+ export type BundleSlowFills = {
37
+ [destinationChainId: number]: {
38
+ [destinationToken: string]: (DepositWithBlock & {
39
+ lpFeePct: BigNumber;
40
+ })[];
41
+ };
42
+ };
43
+ export type LoadDataReturnValue = {
44
+ bundleDepositsV3: BundleDepositsV3;
45
+ expiredDepositsToRefundV3: ExpiredDepositsToRefundV3;
46
+ bundleFillsV3: BundleFillsV3;
47
+ unexecutableSlowFills: BundleExcessSlowFills;
48
+ bundleSlowFillsV3: BundleSlowFills;
49
+ };
50
+ export type BundleData = LoadDataReturnValue & {
51
+ bundleBlockRanges: number[][];
52
+ };
53
+ export interface Clients {
54
+ hubPoolClient: HubPoolClient;
55
+ configStoreClient: AcrossConfigStoreClient;
56
+ hubSigner?: Signer;
57
+ arweaveClient: ArweaveClient;
58
+ }
59
+ export type CombinedRefunds = {
60
+ [repaymentChainId: number]: {
61
+ [repaymentToken: string]: Refund;
62
+ };
63
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BundleData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BundleData.js","sourceRoot":"","sources":["../../../src/interfaces/BundleData.ts"],"names":[],"mappings":""}
@@ -6,3 +6,4 @@ export * from "./Bridge";
6
6
  export * from "./Error";
7
7
  export * from "./TypedData";
8
8
  export * from "./CachingMechanism";
9
+ export * from "./BundleData";
@@ -9,4 +9,5 @@ tslib_1.__exportStar(require("./Bridge"), exports);
9
9
  tslib_1.__exportStar(require("./Error"), exports);
10
10
  tslib_1.__exportStar(require("./TypedData"), exports);
11
11
  tslib_1.__exportStar(require("./CachingMechanism"), exports);
12
+ tslib_1.__exportStar(require("./BundleData"), exports);
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,wDAA8B;AAC9B,oDAA0B;AAC1B,sDAA4B;AAC5B,mDAAyB;AACzB,kDAAwB;AACxB,sDAA4B;AAC5B,6DAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,wDAA8B;AAC9B,oDAA0B;AAC1B,sDAA4B;AAC5B,mDAAyB;AACzB,kDAAwB;AACxB,sDAA4B;AAC5B,6DAAmC;AACnC,uDAA6B"}
@@ -1,3 +1,4 @@
1
1
  import { providers } from "ethers";
2
2
  export declare function isContractDeployedToAddress(address: string, provider: providers.Provider): Promise<boolean>;
3
+ export declare function compareAddresses(addressA: string, addressB: string): 1 | -1 | 0;
3
4
  export declare function compareAddressesSimple(addressA?: string, addressB?: string): boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compareAddressesSimple = exports.isContractDeployedToAddress = void 0;
3
+ exports.compareAddressesSimple = exports.compareAddresses = exports.isContractDeployedToAddress = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var ethers_1 = require("ethers");
6
6
  function isContractDeployedToAddress(address, provider) {
@@ -21,6 +21,20 @@ function isContractDeployedToAddress(address, provider) {
21
21
  });
22
22
  }
23
23
  exports.isContractDeployedToAddress = isContractDeployedToAddress;
24
+ function compareAddresses(addressA, addressB) {
25
+ var bnAddressA = ethers_1.BigNumber.from(addressA);
26
+ var bnAddressB = ethers_1.BigNumber.from(addressB);
27
+ if (bnAddressA.gt(bnAddressB)) {
28
+ return 1;
29
+ }
30
+ else if (bnAddressA.lt(bnAddressB)) {
31
+ return -1;
32
+ }
33
+ else {
34
+ return 0;
35
+ }
36
+ }
37
+ exports.compareAddresses = compareAddresses;
24
38
  function compareAddressesSimple(addressA, addressB) {
25
39
  if (addressA === undefined || addressB === undefined) {
26
40
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"AddressUtils.js","sourceRoot":"","sources":["../../../src/utils/AddressUtils.ts"],"names":[],"mappings":";;;;AAAA,iCAA0C;AAQ1C,SAAsB,2BAA2B,CAAC,OAAe,EAAE,QAA4B;;;;;;oBAE7F,IAAI,CAAC,OAAO,IAAI,CAAC,cAAK,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;wBACzC,WAAO,KAAK,EAAC;qBACd;oBAEY,WAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAA;;oBAAt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AAQ,KAAK,SAAS,EAAE;QACpD,OAAO,KAAK,CAAC;KACd;IACD,OAAO,QAAQ,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,WAAW,EAAE,CAAC;AAC3D,CAAC;AALD,wDAKC"}
@@ -0,0 +1 @@
1
+ export declare function getParamType(contractName: string, functionName: string, paramName: string): string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getParamType = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var typechain = tslib_1.__importStar(require("@across-protocol/contracts/dist/typechain"));
6
+ function getParamType(contractName, functionName, paramName) {
7
+ var artifact = typechain["".concat([contractName], "__factory")];
8
+ var fragment = artifact.abi.find(function (fragment) { return fragment.name === functionName; });
9
+ return (fragment === null || fragment === void 0 ? void 0 : fragment.inputs.find(function (input) { return input.name === paramName; })) || "";
10
+ }
11
+ exports.getParamType = getParamType;
12
+ //# sourceMappingURL=ContractUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContractUtils.js","sourceRoot":"","sources":["../../../src/utils/ContractUtils.ts"],"names":[],"mappings":";;;;AAAA,2FAAuE;AAEvE,SAAgB,YAAY,CAAC,YAAoB,EAAE,YAAoB,EAAE,SAAiB;IAExF,IAAM,QAAQ,GAAI,SAAiB,CAAC,UAAG,CAAC,YAAY,CAAC,cAAW,CAAC,CAAC;IAClE,IAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAC,QAA0B,IAAK,OAAA,QAAQ,CAAC,IAAI,KAAK,YAAY,EAA9B,CAA8B,CAAC,CAAC;IACnG,OAAO,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,CAAC,UAAC,KAAuB,IAAK,OAAA,KAAK,CAAC,IAAI,KAAK,SAAS,EAAxB,CAAwB,CAAC,KAAI,EAAE,CAAC;AAC5F,CAAC;AALD,oCAKC"}
@@ -3,3 +3,21 @@ export declare function groupObjectCountsByThreeProps(objects: any[], primaryPro
3
3
  export declare function groupObjectCountsByTwoProps(objects: any[], primaryProp: string, getSecondaryProp: (obj: any) => string): any;
4
4
  export declare function groupObjectCountsByProp(objects: any[], getProp: (obj: any) => string): any;
5
5
  export declare function filterFalsyKeys(obj: Record<string | number, unknown>): Record<string | number, unknown>;
6
+ export declare function count2DDictionaryValues(dictionary: {
7
+ [key: string]: {
8
+ [key2: string]: any[];
9
+ };
10
+ }): {
11
+ [key: string]: {
12
+ [key2: string]: number;
13
+ };
14
+ };
15
+ export declare function count3DDictionaryValues(dictionary: {
16
+ [key: string]: {
17
+ [key2: string]: any;
18
+ };
19
+ }, innerPropName: string): {
20
+ [key: string]: {
21
+ [key2: string]: number;
22
+ };
23
+ };