@dhedge/v2-sdk 1.10.4 → 1.10.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/v2-sdk",
3
- "version": "1.10.4",
3
+ "version": "1.10.6",
4
4
  "license": "MIT",
5
5
  "description": "🛠 An SDK for building applications on top of dHEDGE V2",
6
6
  "main": "dist/index.js",
@@ -1,303 +1,184 @@
1
- {
2
- "abi": [
3
- {
4
- "inputs": [
5
- {
6
- "internalType": "address",
7
- "name": "",
8
- "type": "address"
9
- }
10
- ],
11
- "name": "allowedPools",
12
- "outputs": [
13
- {
14
- "internalType": "bool",
15
- "name": "",
16
- "type": "bool"
17
- }
18
- ],
19
- "stateMutability": "view",
20
- "type": "function"
21
- },
22
- {
23
- "inputs": [
24
- {
25
- "internalType": "address",
26
- "name": "pool",
27
- "type": "address"
28
- },
29
- {
30
- "internalType": "contract IERC20Extended",
31
- "name": "depositAsset",
32
- "type": "address"
33
- },
34
- {
35
- "internalType": "uint256",
36
- "name": "amount",
37
- "type": "uint256"
38
- },
39
- {
40
- "internalType": "contract IERC20Extended",
41
- "name": "poolDepositAsset",
42
- "type": "address"
43
- },
44
- {
45
- "internalType": "uint256",
46
- "name": "expectedLiquidityMinted",
47
- "type": "uint256"
48
- }
49
- ],
50
- "name": "deposit",
51
- "outputs": [
52
- {
53
- "internalType": "uint256",
54
- "name": "liquidityMinted",
55
- "type": "uint256"
56
- }
57
- ],
58
- "stateMutability": "nonpayable",
59
- "type": "function"
60
- },
61
- {
62
- "inputs": [
63
- {
64
- "internalType": "address",
65
- "name": "pool",
66
- "type": "address"
67
- },
68
- {
69
- "internalType": "contract IERC20Extended",
70
- "name": "depositAsset",
71
- "type": "address"
72
- },
73
- {
74
- "internalType": "uint256",
75
- "name": "amount",
76
- "type": "uint256"
77
- },
78
- {
79
- "internalType": "contract IERC20Extended",
80
- "name": "poolDepositAsset",
81
- "type": "address"
82
- },
83
- {
84
- "internalType": "uint256",
85
- "name": "expectedLiquidityMinted",
86
- "type": "uint256"
87
- }
88
- ],
89
- "name": "depositWithCustomCooldown",
90
- "outputs": [
91
- {
92
- "internalType": "uint256",
93
- "name": "liquidityMinted",
94
- "type": "uint256"
95
- }
96
- ],
97
- "stateMutability": "nonpayable",
98
- "type": "function"
99
- },
100
- {
101
- "inputs": [
102
- {
103
- "internalType": "address",
104
- "name": "pool",
105
- "type": "address"
106
- },
107
- {
108
- "internalType": "contract IERC20Extended",
109
- "name": "poolDepositAsset",
110
- "type": "address"
111
- },
112
- {
113
- "internalType": "uint256",
114
- "name": "expectedLiquidityMinted",
115
- "type": "uint256"
116
- }
117
- ],
118
- "name": "depositNative",
119
- "outputs": [
120
- {
121
- "internalType": "uint256",
122
- "name": "liquidityMinted",
123
- "type": "uint256"
124
- }
125
- ],
126
- "stateMutability": "payable",
127
- "type": "function"
128
- },
129
- {
130
- "inputs": [
131
- {
132
- "internalType": "address",
133
- "name": "pool",
134
- "type": "address"
135
- },
136
- {
137
- "internalType": "contract IERC20Extended",
138
- "name": "poolDepositAsset",
139
- "type": "address"
140
- },
141
- {
142
- "internalType": "uint256",
143
- "name": "expectedLiquidityMinted",
144
- "type": "uint256"
145
- }
146
- ],
147
- "name": "depositNativeWithCustomCooldown",
148
- "outputs": [
149
- {
150
- "internalType": "uint256",
151
- "name": "liquidityMinted",
152
- "type": "uint256"
153
- }
154
- ],
155
- "stateMutability": "payable",
156
- "type": "function"
157
- },
158
- {
159
- "inputs": [
160
- {
161
- "internalType": "address",
162
- "name": "pool",
163
- "type": "address"
164
- },
165
- {
166
- "internalType": "contract IERC20Extended",
167
- "name": "depositAsset",
168
- "type": "address"
169
- },
170
- {
171
- "internalType": "uint256",
172
- "name": "amount",
173
- "type": "uint256"
174
- },
175
- {
176
- "internalType": "contract IERC20Extended",
177
- "name": "poolDepositAsset",
178
- "type": "address"
179
- },
180
- {
181
- "internalType": "bool",
182
- "name": "customCooldown",
183
- "type": "bool"
184
- }
185
- ],
186
- "name": "depositQuote",
187
- "outputs": [
188
- {
189
- "internalType": "uint256",
190
- "name": "expectedLiquidityMinted",
191
- "type": "uint256"
192
- }
193
- ],
194
- "stateMutability": "view",
195
- "type": "function"
196
- },
197
- {
198
- "inputs": [],
199
- "name": "feeDenominator",
200
- "outputs": [
201
- {
202
- "internalType": "uint256",
203
- "name": "",
204
- "type": "uint256"
205
- }
206
- ],
207
- "stateMutability": "view",
208
- "type": "function"
209
- },
210
- {
211
- "inputs": [],
212
- "name": "feeNumerator",
213
- "outputs": [
214
- {
215
- "internalType": "uint256",
216
- "name": "",
217
- "type": "uint256"
218
- }
219
- ],
220
- "stateMutability": "view",
221
- "type": "function"
222
- },
223
- {
224
- "inputs": [
225
- {
226
- "internalType": "address",
227
- "name": "pool",
228
- "type": "address"
229
- },
230
- {
231
- "internalType": "uint256",
232
- "name": "fundTokenAmount",
233
- "type": "uint256"
234
- },
235
- {
236
- "internalType": "contract IERC20Extended",
237
- "name": "withdrawalAsset",
238
- "type": "address"
239
- },
240
- {
241
- "internalType": "uint256",
242
- "name": "expectedAmountOut",
243
- "type": "uint256"
244
- }
245
- ],
246
- "name": "withdraw",
247
- "outputs": [],
248
- "stateMutability": "nonpayable",
249
- "type": "function"
250
- },
251
- {
252
- "inputs": [
253
- {
254
- "internalType": "address",
255
- "name": "pool",
256
- "type": "address"
257
- },
258
- {
259
- "internalType": "uint256",
260
- "name": "fundTokenAmount",
261
- "type": "uint256"
262
- },
263
- {
264
- "internalType": "uint256",
265
- "name": "expectedAmountOut",
266
- "type": "uint256"
267
- }
268
- ],
269
- "name": "withdrawNative",
270
- "outputs": [],
271
- "stateMutability": "nonpayable",
272
- "type": "function"
273
- },
274
- {
275
- "inputs": [
276
- {
277
- "internalType": "address",
278
- "name": "pool",
279
- "type": "address"
280
- },
281
- {
282
- "internalType": "uint256",
283
- "name": "fundTokenAmount",
284
- "type": "uint256"
285
- },
286
- {
287
- "internalType": "contract IERC20Extended",
288
- "name": "intermediateAsset",
289
- "type": "address"
290
- },
291
- {
292
- "internalType": "uint256",
293
- "name": "expectedAmountSUSD",
294
- "type": "uint256"
295
- }
296
- ],
297
- "name": "withdrawSUSD",
298
- "outputs": [],
299
- "stateMutability": "nonpayable",
300
- "type": "function"
301
- }
302
- ]
303
- }
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "components": [
6
+ {
7
+ "components": [
8
+ {
9
+ "internalType": "contract IERC20",
10
+ "name": "token",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "internalType": "uint256",
15
+ "name": "amount",
16
+ "type": "uint256"
17
+ },
18
+ {
19
+ "components": [
20
+ {
21
+ "internalType": "bytes32",
22
+ "name": "routerKey",
23
+ "type": "bytes32"
24
+ },
25
+ {
26
+ "internalType": "bytes",
27
+ "name": "swapData",
28
+ "type": "bytes"
29
+ }
30
+ ],
31
+ "internalType": "struct ISwapper.AggregatorData",
32
+ "name": "aggregatorData",
33
+ "type": "tuple"
34
+ }
35
+ ],
36
+ "internalType": "struct ISwapper.SrcTokenSwapDetails[]",
37
+ "name": "srcData",
38
+ "type": "tuple[]"
39
+ },
40
+ {
41
+ "components": [
42
+ {
43
+ "internalType": "contract IERC20",
44
+ "name": "destToken",
45
+ "type": "address"
46
+ },
47
+ {
48
+ "internalType": "uint256",
49
+ "name": "minDestAmount",
50
+ "type": "uint256"
51
+ }
52
+ ],
53
+ "internalType": "struct ISwapper.DestData",
54
+ "name": "destData",
55
+ "type": "tuple"
56
+ }
57
+ ],
58
+ "internalType": "struct IWithdrawalVault.MultiInSingleOutData",
59
+ "name": "_swapData",
60
+ "type": "tuple"
61
+ },
62
+ {
63
+ "internalType": "uint256",
64
+ "name": "_expectedDestTokenAmount",
65
+ "type": "uint256"
66
+ }
67
+ ],
68
+ "name": "completeWithdrawal",
69
+ "outputs": [],
70
+ "stateMutability": "nonpayable",
71
+ "type": "function"
72
+ },
73
+ {
74
+ "inputs": [
75
+ {
76
+ "internalType": "address",
77
+ "name": "_dHedgeVault",
78
+ "type": "address"
79
+ },
80
+ {
81
+ "internalType": "address",
82
+ "name": "_vaultDepositToken",
83
+ "type": "address"
84
+ },
85
+ {
86
+ "internalType": "uint256",
87
+ "name": "_depositAmount",
88
+ "type": "uint256"
89
+ }
90
+ ],
91
+ "name": "depositQuote",
92
+ "outputs": [
93
+ {
94
+ "internalType": "uint256",
95
+ "name": "expectedAmountReceived",
96
+ "type": "uint256"
97
+ }
98
+ ],
99
+ "stateMutability": "view",
100
+ "type": "function"
101
+ },
102
+ {
103
+ "inputs": [
104
+ {
105
+ "internalType": "address",
106
+ "name": "_dHedgeVault",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "internalType": "contract IERC20",
111
+ "name": "_vaultDepositToken",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "_depositAmount",
117
+ "type": "uint256"
118
+ },
119
+ {
120
+ "internalType": "uint256",
121
+ "name": "_expectedAmountReceived",
122
+ "type": "uint256"
123
+ }
124
+ ],
125
+ "name": "depositWithCustomCooldown",
126
+ "outputs": [],
127
+ "stateMutability": "nonpayable",
128
+ "type": "function"
129
+ },
130
+ {
131
+ "inputs": [
132
+ {
133
+ "internalType": "address",
134
+ "name": "_depositor",
135
+ "type": "address"
136
+ }
137
+ ],
138
+ "name": "getTrackedAssets",
139
+ "outputs": [
140
+ {
141
+ "components": [
142
+ {
143
+ "internalType": "address",
144
+ "name": "token",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "balance",
150
+ "type": "uint256"
151
+ }
152
+ ],
153
+ "internalType": "struct IWithdrawalVault.TrackedAsset[]",
154
+ "name": "trackedAssets_",
155
+ "type": "tuple[]"
156
+ }
157
+ ],
158
+ "stateMutability": "view",
159
+ "type": "function"
160
+ },
161
+ {
162
+ "inputs": [
163
+ {
164
+ "internalType": "address",
165
+ "name": "_dHedgeVault",
166
+ "type": "address"
167
+ },
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "_amountIn",
171
+ "type": "uint256"
172
+ },
173
+ {
174
+ "internalType": "uint256",
175
+ "name": "_slippageTolerance",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "name": "initWithdrawal",
180
+ "outputs": [],
181
+ "stateMutability": "nonpayable",
182
+ "type": "function"
183
+ }
184
+ ]