@gearbox-protocol/sdk 14.12.0-next.16 → 14.12.0-next.18

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 (104) hide show
  1. package/dist/cjs/abi/{IWithdrawalCompressorV312.js → IWithdrawalCompressorV313.js} +49 -6
  2. package/dist/cjs/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.js +45 -1
  3. package/dist/cjs/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +45 -1
  4. package/dist/cjs/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +45 -1
  5. package/dist/cjs/abi/compressors/withdrawalCompressor.js +45 -1
  6. package/dist/cjs/dev/index.js +3 -1
  7. package/dist/cjs/dev/withdrawalAbi.js +2105 -0
  8. package/dist/cjs/dev/withdrawalUtils.js +271 -0
  9. package/dist/cjs/permissionless/bindings/factory/rate-keeper-factory.js +35 -0
  10. package/dist/cjs/permissionless/bindings/market-configurator.js +11 -0
  11. package/dist/cjs/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +1015 -0
  12. package/dist/cjs/plugins/adapters/abi/adapters/{iMidasIssuanceVaultAdapter.js → iMidasIssuanceVaultAdapterV310.js} +6 -6
  13. package/dist/cjs/plugins/adapters/abi/adapters/{iMidasRedemptionVault.js → iMidasRedemptionVaultAdapterV310.js} +9 -9
  14. package/dist/cjs/plugins/adapters/abi/adapters/index.js +6 -4
  15. package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +3 -0
  16. package/dist/cjs/plugins/adapters/abi/targetContractAbi.js +3 -3
  17. package/dist/cjs/plugins/adapters/contracts/MidasGatewayAdapterContract.js +121 -0
  18. package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -2
  19. package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -2
  20. package/dist/cjs/plugins/adapters/contracts/index.js +2 -0
  21. package/dist/cjs/plugins/adapters/createAdapter.js +2 -0
  22. package/dist/cjs/plugins/adapters/types.js +1 -0
  23. package/dist/cjs/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +20 -37
  24. package/dist/cjs/sdk/OnchainSDK.js +11 -0
  25. package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +11 -58
  26. package/dist/cjs/sdk/accounts/index.js +3 -1
  27. package/dist/cjs/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +229 -0
  28. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +40 -0
  29. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +40 -0
  30. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +40 -0
  31. package/dist/cjs/sdk/accounts/withdrawal-compressor/addresses.js +52 -0
  32. package/dist/cjs/sdk/accounts/withdrawal-compressor/createWithdrawalCompressor.js +53 -0
  33. package/dist/cjs/sdk/accounts/withdrawal-compressor/index.js +36 -0
  34. package/dist/cjs/sdk/accounts/withdrawal-compressor/intent.js +172 -0
  35. package/dist/cjs/sdk/accounts/withdrawal-compressor/types.js +16 -0
  36. package/dist/esm/abi/{IWithdrawalCompressorV312.js → IWithdrawalCompressorV313.js} +45 -2
  37. package/dist/esm/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.js +45 -1
  38. package/dist/esm/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +45 -1
  39. package/dist/esm/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +45 -1
  40. package/dist/esm/abi/compressors/withdrawalCompressor.js +45 -1
  41. package/dist/esm/dev/index.js +1 -0
  42. package/dist/esm/dev/withdrawalAbi.js +2074 -0
  43. package/dist/esm/dev/withdrawalUtils.js +259 -0
  44. package/dist/esm/permissionless/bindings/factory/rate-keeper-factory.js +11 -0
  45. package/dist/esm/permissionless/bindings/market-configurator.js +11 -0
  46. package/dist/esm/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +990 -0
  47. package/dist/esm/plugins/adapters/abi/adapters/{iMidasIssuanceVaultAdapter.js → iMidasIssuanceVaultAdapterV310.js} +2 -2
  48. package/dist/esm/plugins/adapters/abi/adapters/{iMidasRedemptionVault.js → iMidasRedemptionVaultAdapterV310.js} +4 -4
  49. package/dist/esm/plugins/adapters/abi/adapters/index.js +3 -2
  50. package/dist/esm/plugins/adapters/abi/conctructorAbi.js +3 -0
  51. package/dist/esm/plugins/adapters/abi/targetContractAbi.js +2 -2
  52. package/dist/esm/plugins/adapters/contracts/MidasGatewayAdapterContract.js +104 -0
  53. package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +4 -4
  54. package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +4 -4
  55. package/dist/esm/plugins/adapters/contracts/index.js +1 -0
  56. package/dist/esm/plugins/adapters/createAdapter.js +3 -0
  57. package/dist/esm/plugins/adapters/types.js +1 -0
  58. package/dist/esm/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +21 -39
  59. package/dist/esm/sdk/OnchainSDK.js +13 -1
  60. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +10 -56
  61. package/dist/esm/sdk/accounts/index.js +1 -0
  62. package/dist/esm/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +205 -0
  63. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +16 -0
  64. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +16 -0
  65. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +16 -0
  66. package/dist/esm/sdk/accounts/withdrawal-compressor/addresses.js +28 -0
  67. package/dist/esm/sdk/accounts/withdrawal-compressor/createWithdrawalCompressor.js +29 -0
  68. package/dist/esm/sdk/accounts/withdrawal-compressor/index.js +8 -0
  69. package/dist/esm/sdk/accounts/withdrawal-compressor/intent.js +137 -0
  70. package/dist/esm/sdk/accounts/withdrawal-compressor/types.js +0 -0
  71. package/dist/types/abi/{IWithdrawalCompressorV312.d.ts → IWithdrawalCompressorV313.d.ts} +74 -1
  72. package/dist/types/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.d.ts +77 -0
  73. package/dist/types/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.d.ts +77 -0
  74. package/dist/types/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.d.ts +77 -0
  75. package/dist/types/abi/compressors/withdrawalCompressor.d.ts +77 -0
  76. package/dist/types/dev/index.d.ts +1 -0
  77. package/dist/types/dev/withdrawalAbi.d.ts +1584 -0
  78. package/dist/types/dev/withdrawalUtils.d.ts +19 -0
  79. package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +77 -0
  80. package/dist/types/permissionless/bindings/factory/rate-keeper-factory.d.ts +179 -0
  81. package/dist/types/permissionless/bindings/market-configurator.d.ts +2 -0
  82. package/dist/types/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +754 -0
  83. package/dist/types/plugins/adapters/abi/adapters/{iMidasIssuanceVaultAdapter.d.ts → iMidasIssuanceVaultAdapterV310.d.ts} +1 -1
  84. package/dist/types/plugins/adapters/abi/adapters/{iMidasRedemptionVault.d.ts → iMidasRedemptionVaultAdapterV310.d.ts} +2 -2
  85. package/dist/types/plugins/adapters/abi/adapters/index.d.ts +3 -2
  86. package/dist/types/plugins/adapters/abi/targetContractAbi.d.ts +1 -1
  87. package/dist/types/plugins/adapters/contracts/MidasGatewayAdapterContract.d.ts +790 -0
  88. package/dist/types/plugins/adapters/contracts/index.d.ts +1 -0
  89. package/dist/types/plugins/adapters/types.d.ts +2 -1
  90. package/dist/types/plugins/delayed-withdrawal/types.d.ts +4 -17
  91. package/dist/types/sdk/OnchainSDK.d.ts +10 -1
  92. package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +4 -12
  93. package/dist/types/sdk/accounts/index.d.ts +1 -0
  94. package/dist/types/sdk/accounts/types.d.ts +5 -19
  95. package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +35 -0
  96. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts +334 -0
  97. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts +338 -0
  98. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +300 -0
  99. package/dist/types/sdk/accounts/withdrawal-compressor/addresses.d.ts +21 -0
  100. package/dist/types/sdk/accounts/withdrawal-compressor/createWithdrawalCompressor.d.ts +11 -0
  101. package/dist/types/sdk/accounts/withdrawal-compressor/index.d.ts +8 -0
  102. package/dist/types/sdk/accounts/withdrawal-compressor/intent.d.ts +106 -0
  103. package/dist/types/sdk/accounts/withdrawal-compressor/types.d.ts +122 -0
  104. package/package.json +1 -1
@@ -0,0 +1,338 @@
1
+ import type { Address } from "viem";
2
+ import type { OnchainSDK } from "../../OnchainSDK.js";
3
+ import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
4
+ declare const abi: readonly [{
5
+ readonly inputs: readonly [{
6
+ readonly internalType: "address";
7
+ readonly name: "_owner";
8
+ readonly type: "address";
9
+ }, {
10
+ readonly internalType: "address";
11
+ readonly name: "addressProvider_";
12
+ readonly type: "address";
13
+ }];
14
+ readonly stateMutability: "nonpayable";
15
+ readonly type: "constructor";
16
+ }, {
17
+ readonly anonymous: false;
18
+ readonly inputs: readonly [{
19
+ readonly indexed: true;
20
+ readonly internalType: "address";
21
+ readonly name: "previousOwner";
22
+ readonly type: "address";
23
+ }, {
24
+ readonly indexed: true;
25
+ readonly internalType: "address";
26
+ readonly name: "newOwner";
27
+ readonly type: "address";
28
+ }];
29
+ readonly name: "OwnershipTransferred";
30
+ readonly type: "event";
31
+ }, {
32
+ readonly inputs: readonly [];
33
+ readonly name: "addressProvider";
34
+ readonly outputs: readonly [{
35
+ readonly internalType: "address";
36
+ readonly name: "";
37
+ readonly type: "address";
38
+ }];
39
+ readonly stateMutability: "view";
40
+ readonly type: "function";
41
+ }, {
42
+ readonly inputs: readonly [{
43
+ readonly internalType: "bytes32";
44
+ readonly name: "";
45
+ readonly type: "bytes32";
46
+ }];
47
+ readonly name: "compressorTypeToCompressor";
48
+ readonly outputs: readonly [{
49
+ readonly internalType: "address";
50
+ readonly name: "";
51
+ readonly type: "address";
52
+ }];
53
+ readonly stateMutability: "view";
54
+ readonly type: "function";
55
+ }, {
56
+ readonly inputs: readonly [];
57
+ readonly name: "contractType";
58
+ readonly outputs: readonly [{
59
+ readonly internalType: "bytes32";
60
+ readonly name: "";
61
+ readonly type: "bytes32";
62
+ }];
63
+ readonly stateMutability: "view";
64
+ readonly type: "function";
65
+ }, {
66
+ readonly inputs: readonly [{
67
+ readonly internalType: "address";
68
+ readonly name: "creditAccount";
69
+ readonly type: "address";
70
+ }];
71
+ readonly name: "getCurrentWithdrawals";
72
+ readonly outputs: readonly [{
73
+ readonly components: readonly [{
74
+ readonly internalType: "address";
75
+ readonly name: "token";
76
+ readonly type: "address";
77
+ }, {
78
+ readonly internalType: "address";
79
+ readonly name: "withdrawalPhantomToken";
80
+ readonly type: "address";
81
+ }, {
82
+ readonly internalType: "uint256";
83
+ readonly name: "withdrawalTokenSpent";
84
+ readonly type: "uint256";
85
+ }, {
86
+ readonly components: readonly [{
87
+ readonly internalType: "address";
88
+ readonly name: "token";
89
+ readonly type: "address";
90
+ }, {
91
+ readonly internalType: "bool";
92
+ readonly name: "isDelayed";
93
+ readonly type: "bool";
94
+ }, {
95
+ readonly internalType: "uint256";
96
+ readonly name: "amount";
97
+ readonly type: "uint256";
98
+ }];
99
+ readonly internalType: "struct WithdrawalOutput[]";
100
+ readonly name: "outputs";
101
+ readonly type: "tuple[]";
102
+ }, {
103
+ readonly components: readonly [{
104
+ readonly internalType: "address";
105
+ readonly name: "target";
106
+ readonly type: "address";
107
+ }, {
108
+ readonly internalType: "bytes";
109
+ readonly name: "callData";
110
+ readonly type: "bytes";
111
+ }];
112
+ readonly internalType: "struct MultiCall[]";
113
+ readonly name: "claimCalls";
114
+ readonly type: "tuple[]";
115
+ }];
116
+ readonly internalType: "struct ClaimableWithdrawal[]";
117
+ readonly name: "";
118
+ readonly type: "tuple[]";
119
+ }, {
120
+ readonly components: readonly [{
121
+ readonly internalType: "address";
122
+ readonly name: "token";
123
+ readonly type: "address";
124
+ }, {
125
+ readonly internalType: "address";
126
+ readonly name: "withdrawalPhantomToken";
127
+ readonly type: "address";
128
+ }, {
129
+ readonly components: readonly [{
130
+ readonly internalType: "address";
131
+ readonly name: "token";
132
+ readonly type: "address";
133
+ }, {
134
+ readonly internalType: "bool";
135
+ readonly name: "isDelayed";
136
+ readonly type: "bool";
137
+ }, {
138
+ readonly internalType: "uint256";
139
+ readonly name: "amount";
140
+ readonly type: "uint256";
141
+ }];
142
+ readonly internalType: "struct WithdrawalOutput[]";
143
+ readonly name: "expectedOutputs";
144
+ readonly type: "tuple[]";
145
+ }, {
146
+ readonly internalType: "uint256";
147
+ readonly name: "claimableAt";
148
+ readonly type: "uint256";
149
+ }];
150
+ readonly internalType: "struct PendingWithdrawal[]";
151
+ readonly name: "";
152
+ readonly type: "tuple[]";
153
+ }];
154
+ readonly stateMutability: "view";
155
+ readonly type: "function";
156
+ }, {
157
+ readonly inputs: readonly [{
158
+ readonly internalType: "address";
159
+ readonly name: "creditManager";
160
+ readonly type: "address";
161
+ }];
162
+ readonly name: "getWithdrawableAssets";
163
+ readonly outputs: readonly [{
164
+ readonly components: readonly [{
165
+ readonly internalType: "address";
166
+ readonly name: "token";
167
+ readonly type: "address";
168
+ }, {
169
+ readonly internalType: "address";
170
+ readonly name: "withdrawalPhantomToken";
171
+ readonly type: "address";
172
+ }, {
173
+ readonly internalType: "address";
174
+ readonly name: "underlying";
175
+ readonly type: "address";
176
+ }, {
177
+ readonly internalType: "uint256";
178
+ readonly name: "withdrawalLength";
179
+ readonly type: "uint256";
180
+ }, {
181
+ readonly internalType: "uint256";
182
+ readonly name: "maxWithdrawals";
183
+ readonly type: "uint256";
184
+ }];
185
+ readonly internalType: "struct WithdrawableAsset[]";
186
+ readonly name: "";
187
+ readonly type: "tuple[]";
188
+ }];
189
+ readonly stateMutability: "view";
190
+ readonly type: "function";
191
+ }, {
192
+ readonly inputs: readonly [{
193
+ readonly internalType: "address";
194
+ readonly name: "creditAccount";
195
+ readonly type: "address";
196
+ }, {
197
+ readonly internalType: "address";
198
+ readonly name: "token";
199
+ readonly type: "address";
200
+ }, {
201
+ readonly internalType: "uint256";
202
+ readonly name: "amount";
203
+ readonly type: "uint256";
204
+ }];
205
+ readonly name: "getWithdrawalRequestResult";
206
+ readonly outputs: readonly [{
207
+ readonly components: readonly [{
208
+ readonly internalType: "address";
209
+ readonly name: "token";
210
+ readonly type: "address";
211
+ }, {
212
+ readonly internalType: "uint256";
213
+ readonly name: "amountIn";
214
+ readonly type: "uint256";
215
+ }, {
216
+ readonly components: readonly [{
217
+ readonly internalType: "address";
218
+ readonly name: "token";
219
+ readonly type: "address";
220
+ }, {
221
+ readonly internalType: "bool";
222
+ readonly name: "isDelayed";
223
+ readonly type: "bool";
224
+ }, {
225
+ readonly internalType: "uint256";
226
+ readonly name: "amount";
227
+ readonly type: "uint256";
228
+ }];
229
+ readonly internalType: "struct WithdrawalOutput[]";
230
+ readonly name: "outputs";
231
+ readonly type: "tuple[]";
232
+ }, {
233
+ readonly components: readonly [{
234
+ readonly internalType: "address";
235
+ readonly name: "target";
236
+ readonly type: "address";
237
+ }, {
238
+ readonly internalType: "bytes";
239
+ readonly name: "callData";
240
+ readonly type: "bytes";
241
+ }];
242
+ readonly internalType: "struct MultiCall[]";
243
+ readonly name: "requestCalls";
244
+ readonly type: "tuple[]";
245
+ }, {
246
+ readonly internalType: "uint256";
247
+ readonly name: "claimableAt";
248
+ readonly type: "uint256";
249
+ }];
250
+ readonly internalType: "struct RequestableWithdrawal";
251
+ readonly name: "withdrawal";
252
+ readonly type: "tuple";
253
+ }];
254
+ readonly stateMutability: "view";
255
+ readonly type: "function";
256
+ }, {
257
+ readonly inputs: readonly [];
258
+ readonly name: "owner";
259
+ readonly outputs: readonly [{
260
+ readonly internalType: "address";
261
+ readonly name: "";
262
+ readonly type: "address";
263
+ }];
264
+ readonly stateMutability: "view";
265
+ readonly type: "function";
266
+ }, {
267
+ readonly inputs: readonly [];
268
+ readonly name: "renounceOwnership";
269
+ readonly outputs: readonly [];
270
+ readonly stateMutability: "nonpayable";
271
+ readonly type: "function";
272
+ }, {
273
+ readonly inputs: readonly [{
274
+ readonly internalType: "address";
275
+ readonly name: "subcompressor";
276
+ readonly type: "address";
277
+ }];
278
+ readonly name: "setSubcompressor";
279
+ readonly outputs: readonly [];
280
+ readonly stateMutability: "nonpayable";
281
+ readonly type: "function";
282
+ }, {
283
+ readonly inputs: readonly [{
284
+ readonly internalType: "bytes32";
285
+ readonly name: "withdrawableType";
286
+ readonly type: "bytes32";
287
+ }, {
288
+ readonly internalType: "bytes32";
289
+ readonly name: "compressorType";
290
+ readonly type: "bytes32";
291
+ }];
292
+ readonly name: "setWithdrawableTypeToCompressorType";
293
+ readonly outputs: readonly [];
294
+ readonly stateMutability: "nonpayable";
295
+ readonly type: "function";
296
+ }, {
297
+ readonly inputs: readonly [{
298
+ readonly internalType: "address";
299
+ readonly name: "newOwner";
300
+ readonly type: "address";
301
+ }];
302
+ readonly name: "transferOwnership";
303
+ readonly outputs: readonly [];
304
+ readonly stateMutability: "nonpayable";
305
+ readonly type: "function";
306
+ }, {
307
+ readonly inputs: readonly [];
308
+ readonly name: "version";
309
+ readonly outputs: readonly [{
310
+ readonly internalType: "uint256";
311
+ readonly name: "";
312
+ readonly type: "uint256";
313
+ }];
314
+ readonly stateMutability: "view";
315
+ readonly type: "function";
316
+ }, {
317
+ readonly inputs: readonly [{
318
+ readonly internalType: "bytes32";
319
+ readonly name: "";
320
+ readonly type: "bytes32";
321
+ }];
322
+ readonly name: "withdrawableTypeToCompressorType";
323
+ readonly outputs: readonly [{
324
+ readonly internalType: "bytes32";
325
+ readonly name: "";
326
+ readonly type: "bytes32";
327
+ }];
328
+ readonly stateMutability: "view";
329
+ readonly type: "function";
330
+ }];
331
+ type abi = typeof abi;
332
+ /**
333
+ * V3.11 implementation of the {@link IWithdrawalCompressorContract} interface.
334
+ **/
335
+ export declare class WithdrawalCompressorV311Contract extends AbstractWithdrawalCompressorContract<abi> {
336
+ constructor(sdk: OnchainSDK, address: Address);
337
+ }
338
+ export {};
@@ -0,0 +1,300 @@
1
+ import type { Address } from "viem";
2
+ import type { OnchainSDK } from "../../OnchainSDK.js";
3
+ import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
4
+ declare const abi: readonly [{
5
+ readonly type: "function";
6
+ readonly name: "contractType";
7
+ readonly inputs: readonly [];
8
+ readonly outputs: readonly [{
9
+ readonly name: "";
10
+ readonly type: "bytes32";
11
+ readonly internalType: "bytes32";
12
+ }];
13
+ readonly stateMutability: "view";
14
+ }, {
15
+ readonly type: "function";
16
+ readonly name: "getCurrentWithdrawals";
17
+ readonly inputs: readonly [{
18
+ readonly name: "creditAccount";
19
+ readonly type: "address";
20
+ readonly internalType: "address";
21
+ }];
22
+ readonly outputs: readonly [{
23
+ readonly name: "";
24
+ readonly type: "tuple[]";
25
+ readonly internalType: "struct ClaimableWithdrawal[]";
26
+ readonly components: readonly [{
27
+ readonly name: "token";
28
+ readonly type: "address";
29
+ readonly internalType: "address";
30
+ }, {
31
+ readonly name: "withdrawalPhantomToken";
32
+ readonly type: "address";
33
+ readonly internalType: "address";
34
+ }, {
35
+ readonly name: "withdrawalTokenSpent";
36
+ readonly type: "uint256";
37
+ readonly internalType: "uint256";
38
+ }, {
39
+ readonly name: "outputs";
40
+ readonly type: "tuple[]";
41
+ readonly internalType: "struct WithdrawalOutput[]";
42
+ readonly components: readonly [{
43
+ readonly name: "token";
44
+ readonly type: "address";
45
+ readonly internalType: "address";
46
+ }, {
47
+ readonly name: "isDelayed";
48
+ readonly type: "bool";
49
+ readonly internalType: "bool";
50
+ }, {
51
+ readonly name: "amount";
52
+ readonly type: "uint256";
53
+ readonly internalType: "uint256";
54
+ }];
55
+ }, {
56
+ readonly name: "claimCalls";
57
+ readonly type: "tuple[]";
58
+ readonly internalType: "struct MultiCall[]";
59
+ readonly components: readonly [{
60
+ readonly name: "target";
61
+ readonly type: "address";
62
+ readonly internalType: "address";
63
+ }, {
64
+ readonly name: "callData";
65
+ readonly type: "bytes";
66
+ readonly internalType: "bytes";
67
+ }];
68
+ }, {
69
+ readonly name: "extraData";
70
+ readonly type: "bytes";
71
+ readonly internalType: "bytes";
72
+ }];
73
+ }, {
74
+ readonly name: "";
75
+ readonly type: "tuple[]";
76
+ readonly internalType: "struct PendingWithdrawal[]";
77
+ readonly components: readonly [{
78
+ readonly name: "token";
79
+ readonly type: "address";
80
+ readonly internalType: "address";
81
+ }, {
82
+ readonly name: "withdrawalPhantomToken";
83
+ readonly type: "address";
84
+ readonly internalType: "address";
85
+ }, {
86
+ readonly name: "expectedOutputs";
87
+ readonly type: "tuple[]";
88
+ readonly internalType: "struct WithdrawalOutput[]";
89
+ readonly components: readonly [{
90
+ readonly name: "token";
91
+ readonly type: "address";
92
+ readonly internalType: "address";
93
+ }, {
94
+ readonly name: "isDelayed";
95
+ readonly type: "bool";
96
+ readonly internalType: "bool";
97
+ }, {
98
+ readonly name: "amount";
99
+ readonly type: "uint256";
100
+ readonly internalType: "uint256";
101
+ }];
102
+ }, {
103
+ readonly name: "claimableAt";
104
+ readonly type: "uint256";
105
+ readonly internalType: "uint256";
106
+ }];
107
+ }];
108
+ readonly stateMutability: "view";
109
+ }, {
110
+ readonly type: "function";
111
+ readonly name: "getWithdrawableAssets";
112
+ readonly inputs: readonly [{
113
+ readonly name: "creditManager";
114
+ readonly type: "address";
115
+ readonly internalType: "address";
116
+ }];
117
+ readonly outputs: readonly [{
118
+ readonly name: "";
119
+ readonly type: "tuple[]";
120
+ readonly internalType: "struct WithdrawableAsset[]";
121
+ readonly components: readonly [{
122
+ readonly name: "token";
123
+ readonly type: "address";
124
+ readonly internalType: "address";
125
+ }, {
126
+ readonly name: "withdrawalPhantomToken";
127
+ readonly type: "address";
128
+ readonly internalType: "address";
129
+ }, {
130
+ readonly name: "underlying";
131
+ readonly type: "address";
132
+ readonly internalType: "address";
133
+ }, {
134
+ readonly name: "withdrawalLength";
135
+ readonly type: "uint256";
136
+ readonly internalType: "uint256";
137
+ }, {
138
+ readonly name: "maxWithdrawals";
139
+ readonly type: "uint256";
140
+ readonly internalType: "uint256";
141
+ }];
142
+ }];
143
+ readonly stateMutability: "view";
144
+ }, {
145
+ readonly type: "function";
146
+ readonly name: "getWithdrawalRequestResult";
147
+ readonly inputs: readonly [{
148
+ readonly name: "creditAccount";
149
+ readonly type: "address";
150
+ readonly internalType: "address";
151
+ }, {
152
+ readonly name: "token";
153
+ readonly type: "address";
154
+ readonly internalType: "address";
155
+ }, {
156
+ readonly name: "withdrawalToken";
157
+ readonly type: "address";
158
+ readonly internalType: "address";
159
+ }, {
160
+ readonly name: "amount";
161
+ readonly type: "uint256";
162
+ readonly internalType: "uint256";
163
+ }, {
164
+ readonly name: "extraData";
165
+ readonly type: "bytes";
166
+ readonly internalType: "bytes";
167
+ }];
168
+ readonly outputs: readonly [{
169
+ readonly name: "";
170
+ readonly type: "tuple";
171
+ readonly internalType: "struct RequestableWithdrawal";
172
+ readonly components: readonly [{
173
+ readonly name: "token";
174
+ readonly type: "address";
175
+ readonly internalType: "address";
176
+ }, {
177
+ readonly name: "amountIn";
178
+ readonly type: "uint256";
179
+ readonly internalType: "uint256";
180
+ }, {
181
+ readonly name: "outputs";
182
+ readonly type: "tuple[]";
183
+ readonly internalType: "struct WithdrawalOutput[]";
184
+ readonly components: readonly [{
185
+ readonly name: "token";
186
+ readonly type: "address";
187
+ readonly internalType: "address";
188
+ }, {
189
+ readonly name: "isDelayed";
190
+ readonly type: "bool";
191
+ readonly internalType: "bool";
192
+ }, {
193
+ readonly name: "amount";
194
+ readonly type: "uint256";
195
+ readonly internalType: "uint256";
196
+ }];
197
+ }, {
198
+ readonly name: "requestCalls";
199
+ readonly type: "tuple[]";
200
+ readonly internalType: "struct MultiCall[]";
201
+ readonly components: readonly [{
202
+ readonly name: "target";
203
+ readonly type: "address";
204
+ readonly internalType: "address";
205
+ }, {
206
+ readonly name: "callData";
207
+ readonly type: "bytes";
208
+ readonly internalType: "bytes";
209
+ }];
210
+ }, {
211
+ readonly name: "claimableAt";
212
+ readonly type: "uint256";
213
+ readonly internalType: "uint256";
214
+ }];
215
+ }];
216
+ readonly stateMutability: "view";
217
+ }, {
218
+ readonly type: "function";
219
+ readonly name: "getWithdrawalRequestResult";
220
+ readonly inputs: readonly [{
221
+ readonly name: "creditAccount";
222
+ readonly type: "address";
223
+ readonly internalType: "address";
224
+ }, {
225
+ readonly name: "token";
226
+ readonly type: "address";
227
+ readonly internalType: "address";
228
+ }, {
229
+ readonly name: "amount";
230
+ readonly type: "uint256";
231
+ readonly internalType: "uint256";
232
+ }];
233
+ readonly outputs: readonly [{
234
+ readonly name: "";
235
+ readonly type: "tuple";
236
+ readonly internalType: "struct RequestableWithdrawal";
237
+ readonly components: readonly [{
238
+ readonly name: "token";
239
+ readonly type: "address";
240
+ readonly internalType: "address";
241
+ }, {
242
+ readonly name: "amountIn";
243
+ readonly type: "uint256";
244
+ readonly internalType: "uint256";
245
+ }, {
246
+ readonly name: "outputs";
247
+ readonly type: "tuple[]";
248
+ readonly internalType: "struct WithdrawalOutput[]";
249
+ readonly components: readonly [{
250
+ readonly name: "token";
251
+ readonly type: "address";
252
+ readonly internalType: "address";
253
+ }, {
254
+ readonly name: "isDelayed";
255
+ readonly type: "bool";
256
+ readonly internalType: "bool";
257
+ }, {
258
+ readonly name: "amount";
259
+ readonly type: "uint256";
260
+ readonly internalType: "uint256";
261
+ }];
262
+ }, {
263
+ readonly name: "requestCalls";
264
+ readonly type: "tuple[]";
265
+ readonly internalType: "struct MultiCall[]";
266
+ readonly components: readonly [{
267
+ readonly name: "target";
268
+ readonly type: "address";
269
+ readonly internalType: "address";
270
+ }, {
271
+ readonly name: "callData";
272
+ readonly type: "bytes";
273
+ readonly internalType: "bytes";
274
+ }];
275
+ }, {
276
+ readonly name: "claimableAt";
277
+ readonly type: "uint256";
278
+ readonly internalType: "uint256";
279
+ }];
280
+ }];
281
+ readonly stateMutability: "view";
282
+ }, {
283
+ readonly type: "function";
284
+ readonly name: "version";
285
+ readonly inputs: readonly [];
286
+ readonly outputs: readonly [{
287
+ readonly name: "";
288
+ readonly type: "uint256";
289
+ readonly internalType: "uint256";
290
+ }];
291
+ readonly stateMutability: "view";
292
+ }];
293
+ type abi = typeof abi;
294
+ /**
295
+ * V3.13 implementation of the {@link IWithdrawalCompressorContract} interface.
296
+ **/
297
+ export declare class WithdrawalCompressorV313Contract extends AbstractWithdrawalCompressorContract<abi> {
298
+ constructor(sdk: OnchainSDK, address: Address);
299
+ }
300
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { Address } from "viem";
2
+ import type { NetworkType } from "../../chain/chains.js";
3
+ /**
4
+ * Versions of WithdrawalCompressor supported by the SDK.
5
+ **/
6
+ export type WithdrawalCompressorVersion = 310 | 311 | 313;
7
+ /**
8
+ * Resolved withdrawal compressor deployment.
9
+ **/
10
+ export interface WithdrawalCompressorLocation {
11
+ address: Address;
12
+ version: WithdrawalCompressorVersion;
13
+ }
14
+ /**
15
+ * Returns the withdrawal compressor deployment for the given network,
16
+ * or `undefined` if none is configured.
17
+ * @param network - Network type.
18
+ * @param version - Desired compressor version; when omitted, the latest supported version is returned.
19
+ * @returns Withdrawal compressor address and version, or `undefined`.
20
+ **/
21
+ export declare function getWithdrawalCompressorAddress(network: NetworkType, version?: WithdrawalCompressorVersion): WithdrawalCompressorLocation | undefined;
@@ -0,0 +1,11 @@
1
+ import type { OnchainSDK } from "../../OnchainSDK.js";
2
+ import type { WithdrawalCompressorVersion } from "./addresses.js";
3
+ import type { IWithdrawalCompressorContract } from "./types.js";
4
+ /**
5
+ * Returns a withdrawal compressor contract for the current chain,
6
+ * reusing an instance from the contracts register when available.
7
+ * @param sdk
8
+ * @param version - Desired compressor version; when omitted, the latest supported version is used.
9
+ * @throws if no withdrawal compressor of given version is supported on the current chain.
10
+ **/
11
+ export declare function createWithdrawalCompressor(sdk: OnchainSDK, version?: WithdrawalCompressorVersion): IWithdrawalCompressorContract;
@@ -0,0 +1,8 @@
1
+ export * from "./AbstractWithdrawalCompressorContract.js";
2
+ export * from "./addresses.js";
3
+ export * from "./createWithdrawalCompressor.js";
4
+ export * from "./intent.js";
5
+ export * from "./types.js";
6
+ export * from "./WithdrawalCompressorV310Contract.js";
7
+ export * from "./WithdrawalCompressorV311Contract.js";
8
+ export * from "./WithdrawalCompressorV313Contract.js";