@morpho-dev/router 0.7.0 → 0.7.2
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/dist/cli.js +1999 -2137
- package/dist/evm/bytecode/erc20.txt +1 -1
- package/dist/evm/bytecode/morpho.txt +1 -1
- package/dist/evm/bytecode/multicall3.txt +1 -1
- package/dist/evm/bytecode/oracle.txt +1 -1
- package/dist/evm/bytecode/vault.txt +1 -1
- package/dist/index.browser.d.mts +1116 -282
- package/dist/index.browser.d.mts.map +1 -1
- package/dist/index.browser.d.ts +1116 -282
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +193 -456
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +193 -456
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +1154 -329
- package/dist/index.node.d.mts.map +1 -1
- package/dist/index.node.d.ts +1130 -305
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +4342 -4540
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +4345 -4537
- package/dist/index.node.mjs.map +1 -1
- package/docs/integrator.md +5 -6
- package/package.json +1 -1
package/dist/index.node.d.mts
CHANGED
|
@@ -2,10 +2,10 @@ import { AbiEvent, Account, Address, ChainContract, ChainFormatters, Client, Get
|
|
|
2
2
|
import { Chain } from "viem/chains";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
import { StandardMerkleTree } from "@openzeppelin/merkle-tree";
|
|
5
|
+
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
5
6
|
import { z } from "zod/v4";
|
|
6
7
|
import "reflect-metadata";
|
|
7
8
|
import { OpenAPIDocument } from "openapi-metadata";
|
|
8
|
-
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
9
9
|
import { Client as Client$1 } from "openapi-fetch";
|
|
10
10
|
import { PGlite } from "@electric-sql/pglite";
|
|
11
11
|
import { drizzle } from "drizzle-orm/node-postgres";
|
|
@@ -119,38 +119,1044 @@ declare const MetaMorphoFactory: readonly [{
|
|
|
119
119
|
readonly indexed: true;
|
|
120
120
|
}, {
|
|
121
121
|
readonly type: "address";
|
|
122
|
-
readonly name: "initialOwner";
|
|
122
|
+
readonly name: "initialOwner";
|
|
123
|
+
}, {
|
|
124
|
+
readonly type: "uint256";
|
|
125
|
+
readonly name: "initialTimelock";
|
|
126
|
+
}, {
|
|
127
|
+
readonly type: "address";
|
|
128
|
+
readonly name: "asset";
|
|
129
|
+
readonly indexed: true;
|
|
130
|
+
}, {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
readonly name: "name";
|
|
133
|
+
}, {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly name: "symbol";
|
|
136
|
+
}, {
|
|
137
|
+
readonly type: "bytes32";
|
|
138
|
+
readonly name: "salt";
|
|
139
|
+
}];
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "isMetaMorpho";
|
|
142
|
+
readonly type: "function";
|
|
143
|
+
readonly stateMutability: "view";
|
|
144
|
+
readonly inputs: readonly [{
|
|
145
|
+
readonly type: "address";
|
|
146
|
+
}];
|
|
147
|
+
readonly outputs: readonly [{
|
|
148
|
+
readonly type: "bool";
|
|
149
|
+
}];
|
|
150
|
+
}];
|
|
151
|
+
type MetaMorphoFactory = typeof MetaMorphoFactory;
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/core/Abi/MorphoV2.d.ts
|
|
154
|
+
declare const MorphoV2: readonly [{
|
|
155
|
+
readonly type: "constructor";
|
|
156
|
+
readonly stateMutability: "nonpayable";
|
|
157
|
+
readonly inputs: readonly [];
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "collateralOf";
|
|
160
|
+
readonly type: "function";
|
|
161
|
+
readonly stateMutability: "view";
|
|
162
|
+
readonly inputs: readonly [{
|
|
163
|
+
readonly type: "bytes32";
|
|
164
|
+
readonly name: "id";
|
|
165
|
+
}, {
|
|
166
|
+
readonly type: "address";
|
|
167
|
+
readonly name: "user";
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "address";
|
|
170
|
+
readonly name: "collateralToken";
|
|
171
|
+
}];
|
|
172
|
+
readonly outputs: readonly [{
|
|
173
|
+
readonly type: "uint256";
|
|
174
|
+
}];
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "consume";
|
|
177
|
+
readonly type: "function";
|
|
178
|
+
readonly stateMutability: "nonpayable";
|
|
179
|
+
readonly inputs: readonly [{
|
|
180
|
+
readonly type: "bytes32";
|
|
181
|
+
readonly name: "group";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "uint256";
|
|
184
|
+
readonly name: "amount";
|
|
185
|
+
}];
|
|
186
|
+
readonly outputs: readonly [];
|
|
187
|
+
}, {
|
|
188
|
+
readonly name: "consumed";
|
|
189
|
+
readonly type: "function";
|
|
190
|
+
readonly stateMutability: "view";
|
|
191
|
+
readonly inputs: readonly [{
|
|
192
|
+
readonly type: "address";
|
|
193
|
+
readonly name: "user";
|
|
194
|
+
}, {
|
|
195
|
+
readonly type: "bytes32";
|
|
196
|
+
readonly name: "group";
|
|
197
|
+
}];
|
|
198
|
+
readonly outputs: readonly [{
|
|
199
|
+
readonly type: "uint256";
|
|
200
|
+
}];
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "debtOf";
|
|
203
|
+
readonly type: "function";
|
|
204
|
+
readonly stateMutability: "view";
|
|
205
|
+
readonly inputs: readonly [{
|
|
206
|
+
readonly type: "bytes32";
|
|
207
|
+
readonly name: "id";
|
|
208
|
+
}, {
|
|
209
|
+
readonly type: "address";
|
|
210
|
+
readonly name: "user";
|
|
211
|
+
}];
|
|
212
|
+
readonly outputs: readonly [{
|
|
213
|
+
readonly type: "uint256";
|
|
214
|
+
}];
|
|
215
|
+
}, {
|
|
216
|
+
readonly name: "defaultFees";
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
readonly stateMutability: "view";
|
|
219
|
+
readonly inputs: readonly [{
|
|
220
|
+
readonly type: "address";
|
|
221
|
+
readonly name: "loanToken";
|
|
222
|
+
}, {
|
|
223
|
+
readonly type: "uint256";
|
|
224
|
+
readonly name: "index";
|
|
225
|
+
}];
|
|
226
|
+
readonly outputs: readonly [{
|
|
227
|
+
readonly type: "uint16";
|
|
228
|
+
}];
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "feeSetter";
|
|
231
|
+
readonly type: "function";
|
|
232
|
+
readonly stateMutability: "view";
|
|
233
|
+
readonly inputs: readonly [];
|
|
234
|
+
readonly outputs: readonly [{
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
}];
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "fees";
|
|
239
|
+
readonly type: "function";
|
|
240
|
+
readonly stateMutability: "view";
|
|
241
|
+
readonly inputs: readonly [{
|
|
242
|
+
readonly type: "bytes32";
|
|
243
|
+
readonly name: "id";
|
|
244
|
+
}];
|
|
245
|
+
readonly outputs: readonly [{
|
|
246
|
+
readonly type: "uint16[6]";
|
|
247
|
+
}];
|
|
248
|
+
}, {
|
|
249
|
+
readonly name: "flashLoan";
|
|
250
|
+
readonly type: "function";
|
|
251
|
+
readonly stateMutability: "nonpayable";
|
|
252
|
+
readonly inputs: readonly [{
|
|
253
|
+
readonly type: "address";
|
|
254
|
+
readonly name: "token";
|
|
255
|
+
}, {
|
|
256
|
+
readonly type: "uint256";
|
|
257
|
+
readonly name: "assets";
|
|
258
|
+
}, {
|
|
259
|
+
readonly type: "address";
|
|
260
|
+
readonly name: "callback";
|
|
261
|
+
}, {
|
|
262
|
+
readonly type: "bytes";
|
|
263
|
+
readonly name: "data";
|
|
264
|
+
}];
|
|
265
|
+
readonly outputs: readonly [];
|
|
266
|
+
}, {
|
|
267
|
+
readonly name: "isHealthy";
|
|
268
|
+
readonly type: "function";
|
|
269
|
+
readonly stateMutability: "view";
|
|
270
|
+
readonly inputs: readonly [{
|
|
271
|
+
readonly type: "tuple";
|
|
272
|
+
readonly components: readonly [{
|
|
273
|
+
readonly type: "address";
|
|
274
|
+
readonly name: "loanToken";
|
|
275
|
+
}, {
|
|
276
|
+
readonly type: "tuple[]";
|
|
277
|
+
readonly components: readonly [{
|
|
278
|
+
readonly type: "address";
|
|
279
|
+
readonly name: "token";
|
|
280
|
+
}, {
|
|
281
|
+
readonly type: "uint256";
|
|
282
|
+
readonly name: "lltv";
|
|
283
|
+
}, {
|
|
284
|
+
readonly type: "address";
|
|
285
|
+
readonly name: "oracle";
|
|
286
|
+
}];
|
|
287
|
+
readonly name: "collaterals";
|
|
288
|
+
}, {
|
|
289
|
+
readonly type: "uint256";
|
|
290
|
+
readonly name: "maturity";
|
|
291
|
+
}];
|
|
292
|
+
readonly name: "obligation";
|
|
293
|
+
}, {
|
|
294
|
+
readonly type: "bytes32";
|
|
295
|
+
readonly name: "id";
|
|
296
|
+
}, {
|
|
297
|
+
readonly type: "address";
|
|
298
|
+
readonly name: "borrower";
|
|
299
|
+
}];
|
|
300
|
+
readonly outputs: readonly [{
|
|
301
|
+
readonly type: "bool";
|
|
302
|
+
}];
|
|
303
|
+
}, {
|
|
304
|
+
readonly name: "liquidate";
|
|
305
|
+
readonly type: "function";
|
|
306
|
+
readonly stateMutability: "nonpayable";
|
|
307
|
+
readonly inputs: readonly [{
|
|
308
|
+
readonly type: "tuple";
|
|
309
|
+
readonly components: readonly [{
|
|
310
|
+
readonly type: "address";
|
|
311
|
+
readonly name: "loanToken";
|
|
312
|
+
}, {
|
|
313
|
+
readonly type: "tuple[]";
|
|
314
|
+
readonly components: readonly [{
|
|
315
|
+
readonly type: "address";
|
|
316
|
+
readonly name: "token";
|
|
317
|
+
}, {
|
|
318
|
+
readonly type: "uint256";
|
|
319
|
+
readonly name: "lltv";
|
|
320
|
+
}, {
|
|
321
|
+
readonly type: "address";
|
|
322
|
+
readonly name: "oracle";
|
|
323
|
+
}];
|
|
324
|
+
readonly name: "collaterals";
|
|
325
|
+
}, {
|
|
326
|
+
readonly type: "uint256";
|
|
327
|
+
readonly name: "maturity";
|
|
328
|
+
}];
|
|
329
|
+
readonly name: "obligation";
|
|
330
|
+
}, {
|
|
331
|
+
readonly type: "tuple[]";
|
|
332
|
+
readonly components: readonly [{
|
|
333
|
+
readonly type: "uint256";
|
|
334
|
+
readonly name: "collateralIndex";
|
|
335
|
+
}, {
|
|
336
|
+
readonly type: "uint256";
|
|
337
|
+
readonly name: "repaid";
|
|
338
|
+
}, {
|
|
339
|
+
readonly type: "uint256";
|
|
340
|
+
readonly name: "seized";
|
|
341
|
+
}];
|
|
342
|
+
readonly name: "seizures";
|
|
343
|
+
}, {
|
|
344
|
+
readonly type: "address";
|
|
345
|
+
readonly name: "borrower";
|
|
346
|
+
}, {
|
|
347
|
+
readonly type: "bytes";
|
|
348
|
+
readonly name: "data";
|
|
349
|
+
}];
|
|
350
|
+
readonly outputs: readonly [{
|
|
351
|
+
readonly type: "tuple[]";
|
|
352
|
+
readonly components: readonly [{
|
|
353
|
+
readonly type: "uint256";
|
|
354
|
+
readonly name: "collateralIndex";
|
|
355
|
+
}, {
|
|
356
|
+
readonly type: "uint256";
|
|
357
|
+
readonly name: "repaid";
|
|
358
|
+
}, {
|
|
359
|
+
readonly type: "uint256";
|
|
360
|
+
readonly name: "seized";
|
|
361
|
+
}];
|
|
362
|
+
}];
|
|
363
|
+
}, {
|
|
364
|
+
readonly name: "multicall";
|
|
365
|
+
readonly type: "function";
|
|
366
|
+
readonly stateMutability: "nonpayable";
|
|
367
|
+
readonly inputs: readonly [{
|
|
368
|
+
readonly type: "bytes[]";
|
|
369
|
+
readonly name: "calls";
|
|
370
|
+
}];
|
|
371
|
+
readonly outputs: readonly [];
|
|
372
|
+
}, {
|
|
373
|
+
readonly name: "obligationCreated";
|
|
374
|
+
readonly type: "function";
|
|
375
|
+
readonly stateMutability: "view";
|
|
376
|
+
readonly inputs: readonly [{
|
|
377
|
+
readonly type: "bytes32";
|
|
378
|
+
readonly name: "id";
|
|
379
|
+
}];
|
|
380
|
+
readonly outputs: readonly [{
|
|
381
|
+
readonly type: "bool";
|
|
382
|
+
}];
|
|
383
|
+
}, {
|
|
384
|
+
readonly name: "obligationState";
|
|
385
|
+
readonly type: "function";
|
|
386
|
+
readonly stateMutability: "view";
|
|
387
|
+
readonly inputs: readonly [{
|
|
388
|
+
readonly type: "bytes32";
|
|
389
|
+
readonly name: "id";
|
|
390
|
+
}];
|
|
391
|
+
readonly outputs: readonly [{
|
|
392
|
+
readonly type: "uint128";
|
|
393
|
+
readonly name: "totalUnits";
|
|
394
|
+
}, {
|
|
395
|
+
readonly type: "uint128";
|
|
396
|
+
readonly name: "totalShares";
|
|
397
|
+
}, {
|
|
398
|
+
readonly type: "uint256";
|
|
399
|
+
readonly name: "withdrawable";
|
|
400
|
+
}, {
|
|
401
|
+
readonly type: "bool";
|
|
402
|
+
readonly name: "created";
|
|
403
|
+
}];
|
|
404
|
+
}, {
|
|
405
|
+
readonly name: "owner";
|
|
406
|
+
readonly type: "function";
|
|
407
|
+
readonly stateMutability: "view";
|
|
408
|
+
readonly inputs: readonly [];
|
|
409
|
+
readonly outputs: readonly [{
|
|
410
|
+
readonly type: "address";
|
|
411
|
+
}];
|
|
412
|
+
}, {
|
|
413
|
+
readonly name: "repay";
|
|
414
|
+
readonly type: "function";
|
|
415
|
+
readonly stateMutability: "nonpayable";
|
|
416
|
+
readonly inputs: readonly [{
|
|
417
|
+
readonly type: "tuple";
|
|
418
|
+
readonly components: readonly [{
|
|
419
|
+
readonly type: "address";
|
|
420
|
+
readonly name: "loanToken";
|
|
421
|
+
}, {
|
|
422
|
+
readonly type: "tuple[]";
|
|
423
|
+
readonly components: readonly [{
|
|
424
|
+
readonly type: "address";
|
|
425
|
+
readonly name: "token";
|
|
426
|
+
}, {
|
|
427
|
+
readonly type: "uint256";
|
|
428
|
+
readonly name: "lltv";
|
|
429
|
+
}, {
|
|
430
|
+
readonly type: "address";
|
|
431
|
+
readonly name: "oracle";
|
|
432
|
+
}];
|
|
433
|
+
readonly name: "collaterals";
|
|
434
|
+
}, {
|
|
435
|
+
readonly type: "uint256";
|
|
436
|
+
readonly name: "maturity";
|
|
437
|
+
}];
|
|
438
|
+
readonly name: "obligation";
|
|
439
|
+
}, {
|
|
440
|
+
readonly type: "uint256";
|
|
441
|
+
readonly name: "obligationUnits";
|
|
442
|
+
}, {
|
|
443
|
+
readonly type: "address";
|
|
444
|
+
readonly name: "onBehalf";
|
|
445
|
+
}];
|
|
446
|
+
readonly outputs: readonly [];
|
|
447
|
+
}, {
|
|
448
|
+
readonly name: "session";
|
|
449
|
+
readonly type: "function";
|
|
450
|
+
readonly stateMutability: "view";
|
|
451
|
+
readonly inputs: readonly [{
|
|
452
|
+
readonly type: "address";
|
|
453
|
+
readonly name: "user";
|
|
454
|
+
}];
|
|
455
|
+
readonly outputs: readonly [{
|
|
456
|
+
readonly type: "bytes32";
|
|
457
|
+
}];
|
|
458
|
+
}, {
|
|
459
|
+
readonly name: "setDefaultTradingFee";
|
|
460
|
+
readonly type: "function";
|
|
461
|
+
readonly stateMutability: "nonpayable";
|
|
462
|
+
readonly inputs: readonly [{
|
|
463
|
+
readonly type: "address";
|
|
464
|
+
readonly name: "loanToken";
|
|
465
|
+
}, {
|
|
466
|
+
readonly type: "uint256";
|
|
467
|
+
readonly name: "index";
|
|
468
|
+
}, {
|
|
469
|
+
readonly type: "uint256";
|
|
470
|
+
readonly name: "newTradingFee";
|
|
471
|
+
}];
|
|
472
|
+
readonly outputs: readonly [];
|
|
473
|
+
}, {
|
|
474
|
+
readonly name: "setFeeSetter";
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
readonly stateMutability: "nonpayable";
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly type: "address";
|
|
479
|
+
readonly name: "newFeeSetter";
|
|
480
|
+
}];
|
|
481
|
+
readonly outputs: readonly [];
|
|
482
|
+
}, {
|
|
483
|
+
readonly name: "setObligationTradingFee";
|
|
484
|
+
readonly type: "function";
|
|
485
|
+
readonly stateMutability: "nonpayable";
|
|
486
|
+
readonly inputs: readonly [{
|
|
487
|
+
readonly type: "bytes32";
|
|
488
|
+
readonly name: "id";
|
|
489
|
+
}, {
|
|
490
|
+
readonly type: "uint256";
|
|
491
|
+
readonly name: "index";
|
|
492
|
+
}, {
|
|
493
|
+
readonly type: "uint256";
|
|
494
|
+
readonly name: "newTradingFee";
|
|
495
|
+
}];
|
|
496
|
+
readonly outputs: readonly [];
|
|
497
|
+
}, {
|
|
498
|
+
readonly name: "setOwner";
|
|
499
|
+
readonly type: "function";
|
|
500
|
+
readonly stateMutability: "nonpayable";
|
|
501
|
+
readonly inputs: readonly [{
|
|
502
|
+
readonly type: "address";
|
|
503
|
+
readonly name: "newOwner";
|
|
504
|
+
}];
|
|
505
|
+
readonly outputs: readonly [];
|
|
506
|
+
}, {
|
|
507
|
+
readonly name: "setTradingFeeRecipient";
|
|
508
|
+
readonly type: "function";
|
|
509
|
+
readonly stateMutability: "nonpayable";
|
|
510
|
+
readonly inputs: readonly [{
|
|
511
|
+
readonly type: "address";
|
|
512
|
+
readonly name: "recipient";
|
|
513
|
+
}];
|
|
514
|
+
readonly outputs: readonly [];
|
|
515
|
+
}, {
|
|
516
|
+
readonly name: "sharesOf";
|
|
517
|
+
readonly type: "function";
|
|
518
|
+
readonly stateMutability: "view";
|
|
519
|
+
readonly inputs: readonly [{
|
|
520
|
+
readonly type: "bytes32";
|
|
521
|
+
readonly name: "id";
|
|
522
|
+
}, {
|
|
523
|
+
readonly type: "address";
|
|
524
|
+
readonly name: "user";
|
|
525
|
+
}];
|
|
526
|
+
readonly outputs: readonly [{
|
|
527
|
+
readonly type: "uint256";
|
|
528
|
+
}];
|
|
529
|
+
}, {
|
|
530
|
+
readonly name: "shuffleSession";
|
|
531
|
+
readonly type: "function";
|
|
532
|
+
readonly stateMutability: "nonpayable";
|
|
533
|
+
readonly inputs: readonly [];
|
|
534
|
+
readonly outputs: readonly [];
|
|
535
|
+
}, {
|
|
536
|
+
readonly name: "supplyCollateral";
|
|
537
|
+
readonly type: "function";
|
|
538
|
+
readonly stateMutability: "nonpayable";
|
|
539
|
+
readonly inputs: readonly [{
|
|
540
|
+
readonly type: "tuple";
|
|
541
|
+
readonly components: readonly [{
|
|
542
|
+
readonly type: "address";
|
|
543
|
+
readonly name: "loanToken";
|
|
544
|
+
}, {
|
|
545
|
+
readonly type: "tuple[]";
|
|
546
|
+
readonly components: readonly [{
|
|
547
|
+
readonly type: "address";
|
|
548
|
+
readonly name: "token";
|
|
549
|
+
}, {
|
|
550
|
+
readonly type: "uint256";
|
|
551
|
+
readonly name: "lltv";
|
|
552
|
+
}, {
|
|
553
|
+
readonly type: "address";
|
|
554
|
+
readonly name: "oracle";
|
|
555
|
+
}];
|
|
556
|
+
readonly name: "collaterals";
|
|
557
|
+
}, {
|
|
558
|
+
readonly type: "uint256";
|
|
559
|
+
readonly name: "maturity";
|
|
560
|
+
}];
|
|
561
|
+
readonly name: "obligation";
|
|
562
|
+
}, {
|
|
563
|
+
readonly type: "address";
|
|
564
|
+
readonly name: "collateral";
|
|
565
|
+
}, {
|
|
566
|
+
readonly type: "uint256";
|
|
567
|
+
readonly name: "assets";
|
|
568
|
+
}, {
|
|
569
|
+
readonly type: "address";
|
|
570
|
+
readonly name: "onBehalf";
|
|
571
|
+
}];
|
|
572
|
+
readonly outputs: readonly [];
|
|
573
|
+
}, {
|
|
574
|
+
readonly name: "take";
|
|
575
|
+
readonly type: "function";
|
|
576
|
+
readonly stateMutability: "nonpayable";
|
|
577
|
+
readonly inputs: readonly [{
|
|
578
|
+
readonly type: "uint256";
|
|
579
|
+
readonly name: "buyerAssets";
|
|
580
|
+
}, {
|
|
581
|
+
readonly type: "uint256";
|
|
582
|
+
readonly name: "sellerAssets";
|
|
583
|
+
}, {
|
|
584
|
+
readonly type: "uint256";
|
|
585
|
+
readonly name: "obligationUnits";
|
|
586
|
+
}, {
|
|
587
|
+
readonly type: "uint256";
|
|
588
|
+
readonly name: "obligationShares";
|
|
589
|
+
}, {
|
|
590
|
+
readonly type: "address";
|
|
591
|
+
readonly name: "taker";
|
|
592
|
+
}, {
|
|
593
|
+
readonly type: "tuple";
|
|
594
|
+
readonly components: readonly [{
|
|
595
|
+
readonly type: "tuple";
|
|
596
|
+
readonly components: readonly [{
|
|
597
|
+
readonly type: "address";
|
|
598
|
+
readonly name: "loanToken";
|
|
599
|
+
}, {
|
|
600
|
+
readonly type: "tuple[]";
|
|
601
|
+
readonly components: readonly [{
|
|
602
|
+
readonly type: "address";
|
|
603
|
+
readonly name: "token";
|
|
604
|
+
}, {
|
|
605
|
+
readonly type: "uint256";
|
|
606
|
+
readonly name: "lltv";
|
|
607
|
+
}, {
|
|
608
|
+
readonly type: "address";
|
|
609
|
+
readonly name: "oracle";
|
|
610
|
+
}];
|
|
611
|
+
readonly name: "collaterals";
|
|
612
|
+
}, {
|
|
613
|
+
readonly type: "uint256";
|
|
614
|
+
readonly name: "maturity";
|
|
615
|
+
}];
|
|
616
|
+
readonly name: "obligation";
|
|
617
|
+
}, {
|
|
618
|
+
readonly type: "bool";
|
|
619
|
+
readonly name: "buy";
|
|
620
|
+
}, {
|
|
621
|
+
readonly type: "address";
|
|
622
|
+
readonly name: "maker";
|
|
623
|
+
}, {
|
|
624
|
+
readonly type: "uint256";
|
|
625
|
+
readonly name: "assets";
|
|
626
|
+
}, {
|
|
627
|
+
readonly type: "uint256";
|
|
628
|
+
readonly name: "obligationUnits";
|
|
629
|
+
}, {
|
|
630
|
+
readonly type: "uint256";
|
|
631
|
+
readonly name: "obligationShares";
|
|
632
|
+
}, {
|
|
633
|
+
readonly type: "uint256";
|
|
634
|
+
readonly name: "start";
|
|
635
|
+
}, {
|
|
636
|
+
readonly type: "uint256";
|
|
637
|
+
readonly name: "expiry";
|
|
638
|
+
}, {
|
|
639
|
+
readonly type: "uint256";
|
|
640
|
+
readonly name: "tick";
|
|
641
|
+
}, {
|
|
642
|
+
readonly type: "bytes32";
|
|
643
|
+
readonly name: "group";
|
|
644
|
+
}, {
|
|
645
|
+
readonly type: "bytes32";
|
|
646
|
+
readonly name: "session";
|
|
647
|
+
}, {
|
|
648
|
+
readonly type: "address";
|
|
649
|
+
readonly name: "callback";
|
|
650
|
+
}, {
|
|
651
|
+
readonly type: "bytes";
|
|
652
|
+
readonly name: "callbackData";
|
|
653
|
+
}];
|
|
654
|
+
readonly name: "offer";
|
|
655
|
+
}, {
|
|
656
|
+
readonly type: "tuple";
|
|
657
|
+
readonly components: readonly [{
|
|
658
|
+
readonly type: "uint8";
|
|
659
|
+
readonly name: "v";
|
|
660
|
+
}, {
|
|
661
|
+
readonly type: "bytes32";
|
|
662
|
+
readonly name: "r";
|
|
663
|
+
}, {
|
|
664
|
+
readonly type: "bytes32";
|
|
665
|
+
readonly name: "s";
|
|
666
|
+
}];
|
|
667
|
+
readonly name: "sig";
|
|
668
|
+
}, {
|
|
669
|
+
readonly type: "bytes32";
|
|
670
|
+
readonly name: "root";
|
|
671
|
+
}, {
|
|
672
|
+
readonly type: "bytes32[]";
|
|
673
|
+
readonly name: "proof";
|
|
674
|
+
}, {
|
|
675
|
+
readonly type: "address";
|
|
676
|
+
readonly name: "takerCallback";
|
|
677
|
+
}, {
|
|
678
|
+
readonly type: "bytes";
|
|
679
|
+
readonly name: "takerCallbackData";
|
|
680
|
+
}];
|
|
681
|
+
readonly outputs: readonly [{
|
|
682
|
+
readonly type: "uint256";
|
|
683
|
+
}, {
|
|
684
|
+
readonly type: "uint256";
|
|
685
|
+
}, {
|
|
686
|
+
readonly type: "uint256";
|
|
687
|
+
}, {
|
|
688
|
+
readonly type: "uint256";
|
|
689
|
+
}];
|
|
690
|
+
}, {
|
|
691
|
+
readonly name: "totalShares";
|
|
692
|
+
readonly type: "function";
|
|
693
|
+
readonly stateMutability: "view";
|
|
694
|
+
readonly inputs: readonly [{
|
|
695
|
+
readonly type: "bytes32";
|
|
696
|
+
readonly name: "id";
|
|
697
|
+
}];
|
|
698
|
+
readonly outputs: readonly [{
|
|
699
|
+
readonly type: "uint256";
|
|
700
|
+
}];
|
|
701
|
+
}, {
|
|
702
|
+
readonly name: "totalUnits";
|
|
703
|
+
readonly type: "function";
|
|
704
|
+
readonly stateMutability: "view";
|
|
705
|
+
readonly inputs: readonly [{
|
|
706
|
+
readonly type: "bytes32";
|
|
707
|
+
readonly name: "id";
|
|
708
|
+
}];
|
|
709
|
+
readonly outputs: readonly [{
|
|
710
|
+
readonly type: "uint256";
|
|
711
|
+
}];
|
|
712
|
+
}, {
|
|
713
|
+
readonly name: "touchObligation";
|
|
714
|
+
readonly type: "function";
|
|
715
|
+
readonly stateMutability: "nonpayable";
|
|
716
|
+
readonly inputs: readonly [{
|
|
717
|
+
readonly type: "tuple";
|
|
718
|
+
readonly components: readonly [{
|
|
719
|
+
readonly type: "address";
|
|
720
|
+
readonly name: "loanToken";
|
|
721
|
+
}, {
|
|
722
|
+
readonly type: "tuple[]";
|
|
723
|
+
readonly components: readonly [{
|
|
724
|
+
readonly type: "address";
|
|
725
|
+
readonly name: "token";
|
|
726
|
+
}, {
|
|
727
|
+
readonly type: "uint256";
|
|
728
|
+
readonly name: "lltv";
|
|
729
|
+
}, {
|
|
730
|
+
readonly type: "address";
|
|
731
|
+
readonly name: "oracle";
|
|
732
|
+
}];
|
|
733
|
+
readonly name: "collaterals";
|
|
734
|
+
}, {
|
|
735
|
+
readonly type: "uint256";
|
|
736
|
+
readonly name: "maturity";
|
|
737
|
+
}];
|
|
738
|
+
readonly name: "obligation";
|
|
739
|
+
}];
|
|
740
|
+
readonly outputs: readonly [{
|
|
741
|
+
readonly type: "bytes32";
|
|
742
|
+
}];
|
|
743
|
+
}, {
|
|
744
|
+
readonly name: "tradingFee";
|
|
745
|
+
readonly type: "function";
|
|
746
|
+
readonly stateMutability: "view";
|
|
747
|
+
readonly inputs: readonly [{
|
|
748
|
+
readonly type: "bytes32";
|
|
749
|
+
readonly name: "id";
|
|
750
|
+
}, {
|
|
751
|
+
readonly type: "uint256";
|
|
752
|
+
readonly name: "timeToMaturity";
|
|
753
|
+
}];
|
|
754
|
+
readonly outputs: readonly [{
|
|
755
|
+
readonly type: "uint256";
|
|
756
|
+
}];
|
|
757
|
+
}, {
|
|
758
|
+
readonly name: "tradingFeeRecipient";
|
|
759
|
+
readonly type: "function";
|
|
760
|
+
readonly stateMutability: "view";
|
|
761
|
+
readonly inputs: readonly [];
|
|
762
|
+
readonly outputs: readonly [{
|
|
763
|
+
readonly type: "address";
|
|
764
|
+
}];
|
|
765
|
+
}, {
|
|
766
|
+
readonly name: "withdraw";
|
|
767
|
+
readonly type: "function";
|
|
768
|
+
readonly stateMutability: "nonpayable";
|
|
769
|
+
readonly inputs: readonly [{
|
|
770
|
+
readonly type: "tuple";
|
|
771
|
+
readonly components: readonly [{
|
|
772
|
+
readonly type: "address";
|
|
773
|
+
readonly name: "loanToken";
|
|
774
|
+
}, {
|
|
775
|
+
readonly type: "tuple[]";
|
|
776
|
+
readonly components: readonly [{
|
|
777
|
+
readonly type: "address";
|
|
778
|
+
readonly name: "token";
|
|
779
|
+
}, {
|
|
780
|
+
readonly type: "uint256";
|
|
781
|
+
readonly name: "lltv";
|
|
782
|
+
}, {
|
|
783
|
+
readonly type: "address";
|
|
784
|
+
readonly name: "oracle";
|
|
785
|
+
}];
|
|
786
|
+
readonly name: "collaterals";
|
|
787
|
+
}, {
|
|
788
|
+
readonly type: "uint256";
|
|
789
|
+
readonly name: "maturity";
|
|
790
|
+
}];
|
|
791
|
+
readonly name: "obligation";
|
|
792
|
+
}, {
|
|
793
|
+
readonly type: "uint256";
|
|
794
|
+
readonly name: "obligationUnits";
|
|
795
|
+
}, {
|
|
796
|
+
readonly type: "uint256";
|
|
797
|
+
readonly name: "shares";
|
|
798
|
+
}, {
|
|
799
|
+
readonly type: "address";
|
|
800
|
+
readonly name: "onBehalf";
|
|
801
|
+
}];
|
|
802
|
+
readonly outputs: readonly [{
|
|
803
|
+
readonly type: "uint256";
|
|
804
|
+
}, {
|
|
805
|
+
readonly type: "uint256";
|
|
806
|
+
}];
|
|
807
|
+
}, {
|
|
808
|
+
readonly name: "withdrawCollateral";
|
|
809
|
+
readonly type: "function";
|
|
810
|
+
readonly stateMutability: "nonpayable";
|
|
811
|
+
readonly inputs: readonly [{
|
|
812
|
+
readonly type: "tuple";
|
|
813
|
+
readonly components: readonly [{
|
|
814
|
+
readonly type: "address";
|
|
815
|
+
readonly name: "loanToken";
|
|
816
|
+
}, {
|
|
817
|
+
readonly type: "tuple[]";
|
|
818
|
+
readonly components: readonly [{
|
|
819
|
+
readonly type: "address";
|
|
820
|
+
readonly name: "token";
|
|
821
|
+
}, {
|
|
822
|
+
readonly type: "uint256";
|
|
823
|
+
readonly name: "lltv";
|
|
824
|
+
}, {
|
|
825
|
+
readonly type: "address";
|
|
826
|
+
readonly name: "oracle";
|
|
827
|
+
}];
|
|
828
|
+
readonly name: "collaterals";
|
|
829
|
+
}, {
|
|
830
|
+
readonly type: "uint256";
|
|
831
|
+
readonly name: "maturity";
|
|
832
|
+
}];
|
|
833
|
+
readonly name: "obligation";
|
|
834
|
+
}, {
|
|
835
|
+
readonly type: "address";
|
|
836
|
+
readonly name: "collateral";
|
|
837
|
+
}, {
|
|
838
|
+
readonly type: "uint256";
|
|
839
|
+
readonly name: "assets";
|
|
840
|
+
}, {
|
|
841
|
+
readonly type: "address";
|
|
842
|
+
readonly name: "onBehalf";
|
|
843
|
+
}];
|
|
844
|
+
readonly outputs: readonly [];
|
|
845
|
+
}, {
|
|
846
|
+
readonly name: "withdrawable";
|
|
847
|
+
readonly type: "function";
|
|
848
|
+
readonly stateMutability: "view";
|
|
849
|
+
readonly inputs: readonly [{
|
|
850
|
+
readonly type: "bytes32";
|
|
851
|
+
readonly name: "id";
|
|
852
|
+
}];
|
|
853
|
+
readonly outputs: readonly [{
|
|
854
|
+
readonly type: "uint256";
|
|
855
|
+
}];
|
|
856
|
+
}, {
|
|
857
|
+
readonly name: "Constructor";
|
|
858
|
+
readonly type: "event";
|
|
859
|
+
readonly inputs: readonly [{
|
|
860
|
+
readonly type: "address";
|
|
861
|
+
readonly name: "owner";
|
|
862
|
+
readonly indexed: true;
|
|
863
|
+
}];
|
|
864
|
+
}, {
|
|
865
|
+
readonly name: "Consume";
|
|
866
|
+
readonly type: "event";
|
|
867
|
+
readonly inputs: readonly [{
|
|
868
|
+
readonly type: "address";
|
|
869
|
+
readonly name: "user";
|
|
870
|
+
readonly indexed: true;
|
|
871
|
+
}, {
|
|
872
|
+
readonly type: "bytes32";
|
|
873
|
+
readonly name: "group";
|
|
874
|
+
readonly indexed: true;
|
|
875
|
+
}, {
|
|
876
|
+
readonly type: "uint256";
|
|
877
|
+
readonly name: "amount";
|
|
878
|
+
}];
|
|
879
|
+
}, {
|
|
880
|
+
readonly name: "FlashLoan";
|
|
881
|
+
readonly type: "event";
|
|
882
|
+
readonly inputs: readonly [{
|
|
883
|
+
readonly type: "address";
|
|
884
|
+
readonly name: "caller";
|
|
885
|
+
readonly indexed: true;
|
|
886
|
+
}, {
|
|
887
|
+
readonly type: "address";
|
|
888
|
+
readonly name: "token";
|
|
889
|
+
readonly indexed: true;
|
|
890
|
+
}, {
|
|
891
|
+
readonly type: "uint256";
|
|
892
|
+
readonly name: "assets";
|
|
893
|
+
}];
|
|
894
|
+
}, {
|
|
895
|
+
readonly name: "Liquidate";
|
|
896
|
+
readonly type: "event";
|
|
897
|
+
readonly inputs: readonly [{
|
|
898
|
+
readonly type: "address";
|
|
899
|
+
readonly name: "caller";
|
|
900
|
+
readonly indexed: true;
|
|
901
|
+
}, {
|
|
902
|
+
readonly type: "bytes32";
|
|
903
|
+
readonly name: "id";
|
|
904
|
+
readonly indexed: true;
|
|
905
|
+
}, {
|
|
906
|
+
readonly type: "tuple[]";
|
|
907
|
+
readonly components: readonly [{
|
|
908
|
+
readonly type: "uint256";
|
|
909
|
+
readonly name: "collateralIndex";
|
|
910
|
+
}, {
|
|
911
|
+
readonly type: "uint256";
|
|
912
|
+
readonly name: "repaid";
|
|
913
|
+
}, {
|
|
914
|
+
readonly type: "uint256";
|
|
915
|
+
readonly name: "seized";
|
|
916
|
+
}];
|
|
917
|
+
readonly name: "seizures";
|
|
918
|
+
}, {
|
|
919
|
+
readonly type: "address";
|
|
920
|
+
readonly name: "borrower";
|
|
921
|
+
readonly indexed: true;
|
|
922
|
+
}, {
|
|
923
|
+
readonly type: "uint256";
|
|
924
|
+
readonly name: "totalRepaid";
|
|
925
|
+
}, {
|
|
926
|
+
readonly type: "uint256";
|
|
927
|
+
readonly name: "badDebt";
|
|
928
|
+
}];
|
|
929
|
+
}, {
|
|
930
|
+
readonly name: "ObligationCreated";
|
|
931
|
+
readonly type: "event";
|
|
932
|
+
readonly inputs: readonly [{
|
|
933
|
+
readonly type: "bytes32";
|
|
934
|
+
readonly name: "id";
|
|
935
|
+
readonly indexed: true;
|
|
936
|
+
}, {
|
|
937
|
+
readonly type: "tuple";
|
|
938
|
+
readonly components: readonly [{
|
|
939
|
+
readonly type: "address";
|
|
940
|
+
readonly name: "loanToken";
|
|
941
|
+
}, {
|
|
942
|
+
readonly type: "tuple[]";
|
|
943
|
+
readonly components: readonly [{
|
|
944
|
+
readonly type: "address";
|
|
945
|
+
readonly name: "token";
|
|
946
|
+
}, {
|
|
947
|
+
readonly type: "uint256";
|
|
948
|
+
readonly name: "lltv";
|
|
949
|
+
}, {
|
|
950
|
+
readonly type: "address";
|
|
951
|
+
readonly name: "oracle";
|
|
952
|
+
}];
|
|
953
|
+
readonly name: "collaterals";
|
|
954
|
+
}, {
|
|
955
|
+
readonly type: "uint256";
|
|
956
|
+
readonly name: "maturity";
|
|
957
|
+
}];
|
|
958
|
+
readonly name: "obligation";
|
|
959
|
+
}];
|
|
960
|
+
}, {
|
|
961
|
+
readonly name: "Repay";
|
|
962
|
+
readonly type: "event";
|
|
963
|
+
readonly inputs: readonly [{
|
|
964
|
+
readonly type: "address";
|
|
965
|
+
readonly name: "caller";
|
|
966
|
+
readonly indexed: true;
|
|
967
|
+
}, {
|
|
968
|
+
readonly type: "bytes32";
|
|
969
|
+
readonly name: "id";
|
|
970
|
+
readonly indexed: true;
|
|
971
|
+
}, {
|
|
972
|
+
readonly type: "uint256";
|
|
973
|
+
readonly name: "obligationUnits";
|
|
974
|
+
}, {
|
|
975
|
+
readonly type: "address";
|
|
976
|
+
readonly name: "onBehalf";
|
|
977
|
+
readonly indexed: true;
|
|
978
|
+
}];
|
|
979
|
+
}, {
|
|
980
|
+
readonly name: "SetDefaultTradingFee";
|
|
981
|
+
readonly type: "event";
|
|
982
|
+
readonly inputs: readonly [{
|
|
983
|
+
readonly type: "address";
|
|
984
|
+
readonly name: "loanToken";
|
|
985
|
+
readonly indexed: true;
|
|
986
|
+
}, {
|
|
987
|
+
readonly type: "uint256";
|
|
988
|
+
readonly name: "index";
|
|
989
|
+
readonly indexed: true;
|
|
990
|
+
}, {
|
|
991
|
+
readonly type: "uint256";
|
|
992
|
+
readonly name: "newTradingFee";
|
|
993
|
+
}];
|
|
994
|
+
}, {
|
|
995
|
+
readonly name: "SetFeeSetter";
|
|
996
|
+
readonly type: "event";
|
|
997
|
+
readonly inputs: readonly [{
|
|
998
|
+
readonly type: "address";
|
|
999
|
+
readonly name: "feeSetter";
|
|
1000
|
+
readonly indexed: true;
|
|
1001
|
+
}];
|
|
1002
|
+
}, {
|
|
1003
|
+
readonly name: "SetObligationTradingFee";
|
|
1004
|
+
readonly type: "event";
|
|
1005
|
+
readonly inputs: readonly [{
|
|
1006
|
+
readonly type: "bytes32";
|
|
1007
|
+
readonly name: "id";
|
|
1008
|
+
readonly indexed: true;
|
|
1009
|
+
}, {
|
|
1010
|
+
readonly type: "uint256";
|
|
1011
|
+
readonly name: "index";
|
|
1012
|
+
readonly indexed: true;
|
|
1013
|
+
}, {
|
|
1014
|
+
readonly type: "uint256";
|
|
1015
|
+
readonly name: "newTradingFee";
|
|
1016
|
+
}];
|
|
1017
|
+
}, {
|
|
1018
|
+
readonly name: "SetOwner";
|
|
1019
|
+
readonly type: "event";
|
|
1020
|
+
readonly inputs: readonly [{
|
|
1021
|
+
readonly type: "address";
|
|
1022
|
+
readonly name: "owner";
|
|
1023
|
+
readonly indexed: true;
|
|
1024
|
+
}];
|
|
1025
|
+
}, {
|
|
1026
|
+
readonly name: "SetTradingFeeRecipient";
|
|
1027
|
+
readonly type: "event";
|
|
1028
|
+
readonly inputs: readonly [{
|
|
1029
|
+
readonly type: "address";
|
|
1030
|
+
readonly name: "recipient";
|
|
1031
|
+
readonly indexed: true;
|
|
1032
|
+
}];
|
|
1033
|
+
}, {
|
|
1034
|
+
readonly name: "ShuffleSession";
|
|
1035
|
+
readonly type: "event";
|
|
1036
|
+
readonly inputs: readonly [{
|
|
1037
|
+
readonly type: "address";
|
|
1038
|
+
readonly name: "user";
|
|
1039
|
+
readonly indexed: true;
|
|
1040
|
+
}, {
|
|
1041
|
+
readonly type: "bytes32";
|
|
1042
|
+
readonly name: "session";
|
|
1043
|
+
}];
|
|
1044
|
+
}, {
|
|
1045
|
+
readonly name: "SupplyCollateral";
|
|
1046
|
+
readonly type: "event";
|
|
1047
|
+
readonly inputs: readonly [{
|
|
1048
|
+
readonly type: "address";
|
|
1049
|
+
readonly name: "caller";
|
|
1050
|
+
}, {
|
|
1051
|
+
readonly type: "bytes32";
|
|
1052
|
+
readonly name: "id";
|
|
1053
|
+
readonly indexed: true;
|
|
1054
|
+
}, {
|
|
1055
|
+
readonly type: "address";
|
|
1056
|
+
readonly name: "collateral";
|
|
1057
|
+
readonly indexed: true;
|
|
1058
|
+
}, {
|
|
1059
|
+
readonly type: "uint256";
|
|
1060
|
+
readonly name: "assets";
|
|
1061
|
+
}, {
|
|
1062
|
+
readonly type: "address";
|
|
1063
|
+
readonly name: "onBehalf";
|
|
1064
|
+
readonly indexed: true;
|
|
1065
|
+
}];
|
|
1066
|
+
}, {
|
|
1067
|
+
readonly name: "Take";
|
|
1068
|
+
readonly type: "event";
|
|
1069
|
+
readonly inputs: readonly [{
|
|
1070
|
+
readonly type: "address";
|
|
1071
|
+
readonly name: "caller";
|
|
1072
|
+
}, {
|
|
1073
|
+
readonly type: "bytes32";
|
|
1074
|
+
readonly name: "id";
|
|
1075
|
+
readonly indexed: true;
|
|
1076
|
+
}, {
|
|
1077
|
+
readonly type: "address";
|
|
1078
|
+
readonly name: "maker";
|
|
1079
|
+
readonly indexed: true;
|
|
1080
|
+
}, {
|
|
1081
|
+
readonly type: "address";
|
|
1082
|
+
readonly name: "taker";
|
|
1083
|
+
readonly indexed: true;
|
|
1084
|
+
}, {
|
|
1085
|
+
readonly type: "bool";
|
|
1086
|
+
readonly name: "offerIsBuy";
|
|
1087
|
+
}, {
|
|
1088
|
+
readonly type: "uint256";
|
|
1089
|
+
readonly name: "buyerAssets";
|
|
1090
|
+
}, {
|
|
1091
|
+
readonly type: "uint256";
|
|
1092
|
+
readonly name: "sellerAssets";
|
|
1093
|
+
}, {
|
|
1094
|
+
readonly type: "uint256";
|
|
1095
|
+
readonly name: "obligationUnits";
|
|
1096
|
+
}, {
|
|
1097
|
+
readonly type: "uint256";
|
|
1098
|
+
readonly name: "obligationShares";
|
|
1099
|
+
}, {
|
|
1100
|
+
readonly type: "bool";
|
|
1101
|
+
readonly name: "buyerIsLender";
|
|
1102
|
+
}, {
|
|
1103
|
+
readonly type: "bool";
|
|
1104
|
+
readonly name: "sellerIsBorrower";
|
|
1105
|
+
}, {
|
|
1106
|
+
readonly type: "bytes32";
|
|
1107
|
+
readonly name: "group";
|
|
1108
|
+
}, {
|
|
1109
|
+
readonly type: "uint256";
|
|
1110
|
+
readonly name: "consumed";
|
|
1111
|
+
}];
|
|
1112
|
+
}, {
|
|
1113
|
+
readonly name: "Withdraw";
|
|
1114
|
+
readonly type: "event";
|
|
1115
|
+
readonly inputs: readonly [{
|
|
1116
|
+
readonly type: "address";
|
|
1117
|
+
readonly name: "caller";
|
|
1118
|
+
readonly indexed: true;
|
|
1119
|
+
}, {
|
|
1120
|
+
readonly type: "bytes32";
|
|
1121
|
+
readonly name: "id";
|
|
1122
|
+
readonly indexed: true;
|
|
1123
|
+
}, {
|
|
1124
|
+
readonly type: "uint256";
|
|
1125
|
+
readonly name: "obligationUnits";
|
|
1126
|
+
}, {
|
|
1127
|
+
readonly type: "uint256";
|
|
1128
|
+
readonly name: "shares";
|
|
1129
|
+
}, {
|
|
1130
|
+
readonly type: "address";
|
|
1131
|
+
readonly name: "onBehalf";
|
|
1132
|
+
readonly indexed: true;
|
|
1133
|
+
}];
|
|
1134
|
+
}, {
|
|
1135
|
+
readonly name: "WithdrawCollateral";
|
|
1136
|
+
readonly type: "event";
|
|
1137
|
+
readonly inputs: readonly [{
|
|
1138
|
+
readonly type: "address";
|
|
1139
|
+
readonly name: "caller";
|
|
1140
|
+
}, {
|
|
1141
|
+
readonly type: "bytes32";
|
|
1142
|
+
readonly name: "id";
|
|
1143
|
+
readonly indexed: true;
|
|
1144
|
+
}, {
|
|
1145
|
+
readonly type: "address";
|
|
1146
|
+
readonly name: "collateral";
|
|
1147
|
+
readonly indexed: true;
|
|
123
1148
|
}, {
|
|
124
1149
|
readonly type: "uint256";
|
|
125
|
-
readonly name: "
|
|
1150
|
+
readonly name: "assets";
|
|
126
1151
|
}, {
|
|
127
1152
|
readonly type: "address";
|
|
128
|
-
readonly name: "
|
|
1153
|
+
readonly name: "onBehalf";
|
|
129
1154
|
readonly indexed: true;
|
|
130
|
-
}, {
|
|
131
|
-
readonly type: "string";
|
|
132
|
-
readonly name: "name";
|
|
133
|
-
}, {
|
|
134
|
-
readonly type: "string";
|
|
135
|
-
readonly name: "symbol";
|
|
136
|
-
}, {
|
|
137
|
-
readonly type: "bytes32";
|
|
138
|
-
readonly name: "salt";
|
|
139
|
-
}];
|
|
140
|
-
}, {
|
|
141
|
-
readonly name: "isMetaMorpho";
|
|
142
|
-
readonly type: "function";
|
|
143
|
-
readonly stateMutability: "view";
|
|
144
|
-
readonly inputs: readonly [{
|
|
145
|
-
readonly type: "address";
|
|
146
|
-
}];
|
|
147
|
-
readonly outputs: readonly [{
|
|
148
|
-
readonly type: "bool";
|
|
149
1155
|
}];
|
|
150
1156
|
}];
|
|
151
|
-
type
|
|
1157
|
+
type MorphoV2 = typeof MorphoV2;
|
|
152
1158
|
declare namespace index_d_exports {
|
|
153
|
-
export { ERC4626, MetaMorpho, MetaMorphoFactory, Morpho, Oracle$1 as Oracle };
|
|
1159
|
+
export { ERC4626, MetaMorpho, MetaMorphoFactory, Morpho, MorphoV2, Oracle$1 as Oracle };
|
|
154
1160
|
}
|
|
155
1161
|
declare const Oracle$1: readonly [{
|
|
156
1162
|
readonly type: "function";
|
|
@@ -273,94 +1279,19 @@ declare const Morpho: readonly [{
|
|
|
273
1279
|
}];
|
|
274
1280
|
readonly stateMutability: "view";
|
|
275
1281
|
}];
|
|
276
|
-
//#endregion
|
|
277
|
-
//#region src/core/types.d.ts
|
|
278
|
-
/** Combines members of an intersection into a readable type. */
|
|
279
|
-
type Compute<type> = { [key in keyof type]: type[key] } & unknown;
|
|
280
|
-
declare const BrandTypeId: unique symbol;
|
|
281
|
-
type Brand<in out ID extends string | symbol> = {
|
|
282
|
-
readonly [BrandTypeId]: { readonly [id in ID]: ID };
|
|
283
|
-
};
|
|
284
1282
|
declare namespace Callback_d_exports {
|
|
285
|
-
export {
|
|
1283
|
+
export { Callback, Type$1 as Type, isEmptyCallback };
|
|
286
1284
|
}
|
|
287
|
-
/** A position decoded from callback data. */
|
|
288
|
-
type CallbackPosition = {
|
|
289
|
-
/** The ERC20 token contract address. */contract: Address; /** The maximum amount available from this position. */
|
|
290
|
-
amount: bigint;
|
|
291
|
-
};
|
|
292
1285
|
type Callback = {
|
|
293
1286
|
type: Type$1.BuyWithEmptyCallback;
|
|
294
|
-
} |
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
} & {
|
|
298
|
-
type: Type$1.BuyERC20; /** The decoded callback inputs. */
|
|
299
|
-
inputs: {
|
|
300
|
-
/** The ERC20 positions available for the callback. */positions: CallbackPosition[];
|
|
301
|
-
};
|
|
302
|
-
}) & Brand<"Callback">);
|
|
1287
|
+
} | {
|
|
1288
|
+
type: Type$1.SellWithEmptyCallback;
|
|
1289
|
+
};
|
|
303
1290
|
declare enum Type$1 {
|
|
304
1291
|
BuyWithEmptyCallback = "buy_with_empty_callback",
|
|
305
|
-
|
|
306
|
-
BuyVaultV1Callback = "buy_vault_v1_callback",
|
|
307
|
-
SellERC20Callback = "sell_erc20_callback"
|
|
1292
|
+
SellWithEmptyCallback = "sell_with_empty_callback"
|
|
308
1293
|
}
|
|
309
1294
|
declare const isEmptyCallback: (offer: Offer) => boolean;
|
|
310
|
-
declare function decode$2(type: Type$1, data: Hex): {
|
|
311
|
-
contract: Address;
|
|
312
|
-
amount: bigint;
|
|
313
|
-
}[];
|
|
314
|
-
type BuyERC20Data = {
|
|
315
|
-
tokens: Address[];
|
|
316
|
-
amounts: bigint[];
|
|
317
|
-
};
|
|
318
|
-
type BuyVaultV1CallbackData = {
|
|
319
|
-
vaults: Address[];
|
|
320
|
-
amounts: bigint[];
|
|
321
|
-
};
|
|
322
|
-
type SellERC20CallbackData = {
|
|
323
|
-
collaterals: Address[];
|
|
324
|
-
amounts: bigint[];
|
|
325
|
-
};
|
|
326
|
-
declare function encode$2(type: Type$1.BuyERC20, data: BuyERC20Data): Hex;
|
|
327
|
-
declare function encode$2(type: Type$1.BuyVaultV1Callback, data: BuyVaultV1CallbackData): Hex;
|
|
328
|
-
declare function encode$2(type: Type$1.SellERC20Callback, data: SellERC20CallbackData): Hex;
|
|
329
|
-
/**
|
|
330
|
-
* Decodes BuyERC20 callback data into positions.
|
|
331
|
-
* @param data - The ABI-encoded callback data containing token addresses and amounts.
|
|
332
|
-
* @returns Array of positions with contract address and amount.
|
|
333
|
-
* @throws If data is empty, malformed, or arrays have mismatched lengths.
|
|
334
|
-
*/
|
|
335
|
-
declare function decodeBuyERC20(data: Hex): Array<{
|
|
336
|
-
contract: Address;
|
|
337
|
-
amount: bigint;
|
|
338
|
-
}>;
|
|
339
|
-
/**
|
|
340
|
-
* Encodes BuyERC20 callback parameters into ABI-encoded data.
|
|
341
|
-
* @param parameters - The tokens and amounts to encode.
|
|
342
|
-
* @returns ABI-encoded hex string.
|
|
343
|
-
*/
|
|
344
|
-
declare function encodeBuyERC20(parameters: {
|
|
345
|
-
tokens: Address[];
|
|
346
|
-
amounts: bigint[];
|
|
347
|
-
}): Hex;
|
|
348
|
-
declare function decodeBuyVaultV1Callback(data: Hex): Array<{
|
|
349
|
-
contract: Address;
|
|
350
|
-
amount: bigint;
|
|
351
|
-
}>;
|
|
352
|
-
declare function decodeSellERC20Callback(data: Hex): Array<{
|
|
353
|
-
contract: Address;
|
|
354
|
-
amount: bigint;
|
|
355
|
-
}>;
|
|
356
|
-
declare function encodeBuyVaultV1Callback(parameters: {
|
|
357
|
-
vaults: Address[];
|
|
358
|
-
amounts: bigint[];
|
|
359
|
-
}): Hex;
|
|
360
|
-
declare function encodeSellERC20Callback(parameters: {
|
|
361
|
-
collaterals: Address[];
|
|
362
|
-
amounts: bigint[];
|
|
363
|
-
}): Hex;
|
|
364
1295
|
declare namespace Errors_d_exports {
|
|
365
1296
|
export { BaseError, GlobalErrorType, ReorgError };
|
|
366
1297
|
}
|
|
@@ -480,6 +1411,14 @@ type ChainRegistry = {
|
|
|
480
1411
|
* @returns A registry for looking up chains by ID. {@link ChainRegistry}
|
|
481
1412
|
*/
|
|
482
1413
|
declare function create$6(chains: Chain$1[]): ChainRegistry;
|
|
1414
|
+
//#endregion
|
|
1415
|
+
//#region src/core/types.d.ts
|
|
1416
|
+
/** Combines members of an intersection into a readable type. */
|
|
1417
|
+
type Compute<type> = { [key in keyof type]: type[key] } & unknown;
|
|
1418
|
+
declare const BrandTypeId: unique symbol;
|
|
1419
|
+
type Brand<in out ID extends string | symbol> = {
|
|
1420
|
+
readonly [BrandTypeId]: { readonly [id in ID]: ID };
|
|
1421
|
+
};
|
|
483
1422
|
declare namespace LLTV_d_exports {
|
|
484
1423
|
export { InvalidLLTVError, InvalidOptionError$1 as InvalidOptionError, LLTV, LLTVSchema, Options, from$17 as from };
|
|
485
1424
|
}
|
|
@@ -626,7 +1565,7 @@ declare class DenominatorIsZeroError extends BaseError {
|
|
|
626
1565
|
constructor();
|
|
627
1566
|
}
|
|
628
1567
|
declare namespace Liquidity_d_exports {
|
|
629
|
-
export { LiquidityLink, LiquidityPool, OfferLiquidityPool, calculateMaxDebt, generateAllowancePoolId, generateBalancePoolId,
|
|
1568
|
+
export { LiquidityLink, LiquidityPool, OfferLiquidityPool, calculateMaxDebt, generateAllowancePoolId, generateBalancePoolId, generateDebtPoolId, generateMarketLiquidityPoolId, generateObligationCollateralPoolId, generateUserVaultPositionPoolId, generateVaultPositionPoolId };
|
|
630
1569
|
}
|
|
631
1570
|
/**
|
|
632
1571
|
* Represents a liquidity pool with a unique ID and amount.
|
|
@@ -651,10 +1590,7 @@ type OfferLiquidityPool = {
|
|
|
651
1590
|
poolId: string;
|
|
652
1591
|
/**
|
|
653
1592
|
* The available capacity/liquidity from this pool for this offer.
|
|
654
|
-
*
|
|
655
|
-
* - BuyWithEmptyCallback: Matches allowance amount from pool bellow
|
|
656
|
-
* - SellERC20Callback: Sell Callback/Predeposited -> Maximum debt capacity calculated from collateral (collateralAmount * oraclePrice * lltv)
|
|
657
|
-
* - SellERC20Callback: Existing debt as negative value (reduces available capacity)
|
|
1593
|
+
* Matches allowance amount from pool below.
|
|
658
1594
|
*/
|
|
659
1595
|
amount: bigint;
|
|
660
1596
|
};
|
|
@@ -682,17 +1618,6 @@ declare function generateAllowancePoolId(parameters: {
|
|
|
682
1618
|
chainId: Id;
|
|
683
1619
|
token: Address;
|
|
684
1620
|
}): string;
|
|
685
|
-
/**
|
|
686
|
-
* Generate pool ID for sell ERC20 callback pools.
|
|
687
|
-
* Each offer has its own callback pool to prevent liquidity conflicts.
|
|
688
|
-
*/
|
|
689
|
-
declare function generateSellERC20CallbackPoolId(parameters: {
|
|
690
|
-
user: Address;
|
|
691
|
-
chainId: Id;
|
|
692
|
-
obligationId: Hex;
|
|
693
|
-
token: Address;
|
|
694
|
-
offerHash: Hex;
|
|
695
|
-
}): string;
|
|
696
1621
|
/**
|
|
697
1622
|
* Generate pool ID for obligation collateral pools.
|
|
698
1623
|
* Obligation collateral pools represent collateral already deposited in the obligation.
|
|
@@ -704,15 +1629,6 @@ declare function generateObligationCollateralPoolId(parameters: {
|
|
|
704
1629
|
obligationId: Hex;
|
|
705
1630
|
token: Address;
|
|
706
1631
|
}): string;
|
|
707
|
-
/**
|
|
708
|
-
* Generate pool ID for buy vault callback pools.
|
|
709
|
-
*/
|
|
710
|
-
declare function generateBuyVaultCallbackPoolId(parameters: {
|
|
711
|
-
user: Address;
|
|
712
|
-
chainId: Id;
|
|
713
|
-
vault: Address;
|
|
714
|
-
offerHash: Hex;
|
|
715
|
-
}): string;
|
|
716
1632
|
/**
|
|
717
1633
|
* Generate pool ID for debt pools.
|
|
718
1634
|
*/
|
|
@@ -949,7 +1865,7 @@ declare class CollateralsAreNotSortedError extends BaseError {
|
|
|
949
1865
|
constructor();
|
|
950
1866
|
}
|
|
951
1867
|
declare namespace Offer_d_exports {
|
|
952
|
-
export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, domain, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, obligationId, random$1 as random, serialize, toSnakeCase, types };
|
|
1868
|
+
export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, domain, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, obligationId, random$1 as random, serialize, takeEvent, toSnakeCase, types };
|
|
953
1869
|
}
|
|
954
1870
|
type Offer = {
|
|
955
1871
|
/** The address that made the offer. */readonly maker: Address; /** The amount of assets offered. Mutually exclusive with obligationUnits and obligationShares. */
|
|
@@ -1206,6 +2122,80 @@ type OfferConsumed = {
|
|
|
1206
2122
|
amount: bigint;
|
|
1207
2123
|
blockNumber: number;
|
|
1208
2124
|
};
|
|
2125
|
+
/**
|
|
2126
|
+
* ABI for the Take event emitted by the Morpho V2 contract.
|
|
2127
|
+
*/
|
|
2128
|
+
declare const takeEvent: {
|
|
2129
|
+
readonly type: "event";
|
|
2130
|
+
readonly name: "Take";
|
|
2131
|
+
readonly inputs: readonly [{
|
|
2132
|
+
readonly name: "caller";
|
|
2133
|
+
readonly type: "address";
|
|
2134
|
+
readonly indexed: false;
|
|
2135
|
+
readonly internalType: "address";
|
|
2136
|
+
}, {
|
|
2137
|
+
readonly name: "id";
|
|
2138
|
+
readonly type: "bytes32";
|
|
2139
|
+
readonly indexed: true;
|
|
2140
|
+
readonly internalType: "bytes32";
|
|
2141
|
+
}, {
|
|
2142
|
+
readonly name: "maker";
|
|
2143
|
+
readonly type: "address";
|
|
2144
|
+
readonly indexed: true;
|
|
2145
|
+
readonly internalType: "address";
|
|
2146
|
+
}, {
|
|
2147
|
+
readonly name: "taker";
|
|
2148
|
+
readonly type: "address";
|
|
2149
|
+
readonly indexed: true;
|
|
2150
|
+
readonly internalType: "address";
|
|
2151
|
+
}, {
|
|
2152
|
+
readonly name: "offerIsBuy";
|
|
2153
|
+
readonly type: "bool";
|
|
2154
|
+
readonly indexed: false;
|
|
2155
|
+
readonly internalType: "bool";
|
|
2156
|
+
}, {
|
|
2157
|
+
readonly name: "buyerAssets";
|
|
2158
|
+
readonly type: "uint256";
|
|
2159
|
+
readonly indexed: false;
|
|
2160
|
+
readonly internalType: "uint256";
|
|
2161
|
+
}, {
|
|
2162
|
+
readonly name: "sellerAssets";
|
|
2163
|
+
readonly type: "uint256";
|
|
2164
|
+
readonly indexed: false;
|
|
2165
|
+
readonly internalType: "uint256";
|
|
2166
|
+
}, {
|
|
2167
|
+
readonly name: "obligationUnits";
|
|
2168
|
+
readonly type: "uint256";
|
|
2169
|
+
readonly indexed: false;
|
|
2170
|
+
readonly internalType: "uint256";
|
|
2171
|
+
}, {
|
|
2172
|
+
readonly name: "obligationShares";
|
|
2173
|
+
readonly type: "uint256";
|
|
2174
|
+
readonly indexed: false;
|
|
2175
|
+
readonly internalType: "uint256";
|
|
2176
|
+
}, {
|
|
2177
|
+
readonly name: "buyerIsLender";
|
|
2178
|
+
readonly type: "bool";
|
|
2179
|
+
readonly indexed: false;
|
|
2180
|
+
readonly internalType: "bool";
|
|
2181
|
+
}, {
|
|
2182
|
+
readonly name: "sellerIsBorrower";
|
|
2183
|
+
readonly type: "bool";
|
|
2184
|
+
readonly indexed: false;
|
|
2185
|
+
readonly internalType: "bool";
|
|
2186
|
+
}, {
|
|
2187
|
+
readonly name: "group";
|
|
2188
|
+
readonly type: "bytes32";
|
|
2189
|
+
readonly indexed: false;
|
|
2190
|
+
readonly internalType: "bytes32";
|
|
2191
|
+
}, {
|
|
2192
|
+
readonly name: "consumed";
|
|
2193
|
+
readonly type: "uint256";
|
|
2194
|
+
readonly indexed: false;
|
|
2195
|
+
readonly internalType: "uint256";
|
|
2196
|
+
}];
|
|
2197
|
+
readonly anonymous: false;
|
|
2198
|
+
};
|
|
1209
2199
|
/**
|
|
1210
2200
|
* ABI for the Consume event emitted by the Obligation contract.
|
|
1211
2201
|
*/
|
|
@@ -2411,16 +3401,6 @@ type ValidateOffersIssues = {
|
|
|
2411
3401
|
issues: ValidationIssue[];
|
|
2412
3402
|
};
|
|
2413
3403
|
type ValidateOffersData = ValidateOffersSuccess | ValidateOffersIssues;
|
|
2414
|
-
type CallbackType = Type$1 | "not_supported";
|
|
2415
|
-
type CallbackTypesRequest = {
|
|
2416
|
-
callbacks: Array<{
|
|
2417
|
-
chain_id: Id;
|
|
2418
|
-
addresses: Address[];
|
|
2419
|
-
}>;
|
|
2420
|
-
};
|
|
2421
|
-
type CallbackTypesResponse = Array<{
|
|
2422
|
-
chain_id: Id;
|
|
2423
|
-
} & Partial<Record<CallbackType, Address[]>>>;
|
|
2424
3404
|
type ConfigRulesPayload = SuccessPayload<ConfigRule[]> | ErrorPayload;
|
|
2425
3405
|
type SuccessPayload<T> = {
|
|
2426
3406
|
meta: {
|
|
@@ -2457,8 +3437,7 @@ type GatekeeperClient = {
|
|
|
2457
3437
|
statusCode: number;
|
|
2458
3438
|
body: ConfigRulesPayload;
|
|
2459
3439
|
}>; /** Validate offers and return decision results. */
|
|
2460
|
-
isAllowed: (offers: Offer[]) => Promise<Result<Offer, string>>; /**
|
|
2461
|
-
getCallbackTypes: (request: CallbackTypesRequest) => Promise<CallbackTypesResponse>; /** Base URL for the gatekeeper service. */
|
|
3440
|
+
isAllowed: (offers: Offer[]) => Promise<Result<Offer, string>>; /** Base URL for the gatekeeper service. */
|
|
2462
3441
|
baseUrl: string;
|
|
2463
3442
|
};
|
|
2464
3443
|
type ClientConfig = {
|
|
@@ -2780,7 +3759,7 @@ interface paths {
|
|
|
2780
3759
|
};
|
|
2781
3760
|
/**
|
|
2782
3761
|
* Get config rules
|
|
2783
|
-
* @description Returns configured rules for supported chains.
|
|
3762
|
+
* @description Returns configured rules (maturities, loan tokens, oracles) for supported chains.
|
|
2784
3763
|
*/
|
|
2785
3764
|
get: {
|
|
2786
3765
|
parameters: {
|
|
@@ -3237,7 +4216,7 @@ interface paths {
|
|
|
3237
4216
|
put?: never;
|
|
3238
4217
|
/**
|
|
3239
4218
|
* Validate offers
|
|
3240
|
-
* @description Validates offers against router validation rules. Returns unsigned payload + root on success, or issues only on validation failure.
|
|
4219
|
+
* @description Validates offers against router validation rules. Only empty callbacks (zero address, 0x data) are accepted. Returns unsigned payload + root on success, or issues only on validation failure.
|
|
3241
4220
|
*/
|
|
3242
4221
|
post: {
|
|
3243
4222
|
parameters: {
|
|
@@ -3276,56 +4255,6 @@ interface paths {
|
|
|
3276
4255
|
patch?: never;
|
|
3277
4256
|
trace?: never;
|
|
3278
4257
|
};
|
|
3279
|
-
"/v1/callbacks": {
|
|
3280
|
-
parameters: {
|
|
3281
|
-
query?: never;
|
|
3282
|
-
header?: never;
|
|
3283
|
-
path?: never;
|
|
3284
|
-
cookie?: never;
|
|
3285
|
-
};
|
|
3286
|
-
get?: never;
|
|
3287
|
-
put?: never;
|
|
3288
|
-
/**
|
|
3289
|
-
* Resolve callback types
|
|
3290
|
-
* @description Returns callback types for callback addresses grouped by chain.
|
|
3291
|
-
*/
|
|
3292
|
-
post: {
|
|
3293
|
-
parameters: {
|
|
3294
|
-
query?: never;
|
|
3295
|
-
header?: never;
|
|
3296
|
-
path?: never;
|
|
3297
|
-
cookie?: never;
|
|
3298
|
-
};
|
|
3299
|
-
requestBody?: {
|
|
3300
|
-
content: {
|
|
3301
|
-
"application/json": components["schemas"]["CallbackTypesRequest"];
|
|
3302
|
-
};
|
|
3303
|
-
};
|
|
3304
|
-
responses: {
|
|
3305
|
-
/** @description Success */200: {
|
|
3306
|
-
headers: {
|
|
3307
|
-
[name: string]: unknown;
|
|
3308
|
-
};
|
|
3309
|
-
content: {
|
|
3310
|
-
"application/json": components["schemas"]["CallbackTypesSuccessResponse"];
|
|
3311
|
-
};
|
|
3312
|
-
}; /** @description Bad Request */
|
|
3313
|
-
400: {
|
|
3314
|
-
headers: {
|
|
3315
|
-
[name: string]: unknown;
|
|
3316
|
-
};
|
|
3317
|
-
content: {
|
|
3318
|
-
"application/json": components["schemas"]["BadRequestResponse"];
|
|
3319
|
-
};
|
|
3320
|
-
};
|
|
3321
|
-
};
|
|
3322
|
-
};
|
|
3323
|
-
delete?: never;
|
|
3324
|
-
options?: never;
|
|
3325
|
-
head?: never;
|
|
3326
|
-
patch?: never;
|
|
3327
|
-
trace?: never;
|
|
3328
|
-
};
|
|
3329
4258
|
}
|
|
3330
4259
|
interface components {
|
|
3331
4260
|
schemas: {
|
|
@@ -3410,12 +4339,6 @@ interface components {
|
|
|
3410
4339
|
* "timestamp": 1730415600
|
|
3411
4340
|
* },
|
|
3412
4341
|
* {
|
|
3413
|
-
* "type": "callback",
|
|
3414
|
-
* "chain_id": 1,
|
|
3415
|
-
* "address": "0x1111111111111111111111111111111111111111",
|
|
3416
|
-
* "callback_type": "sell_erc20_callback"
|
|
3417
|
-
* },
|
|
3418
|
-
* {
|
|
3419
4342
|
* "type": "loan_token",
|
|
3420
4343
|
* "chain_id": 1,
|
|
3421
4344
|
* "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
|
|
@@ -3437,9 +4360,8 @@ interface components {
|
|
|
3437
4360
|
/** @example maturity */type: string; /** @example 1 */
|
|
3438
4361
|
chain_id: number; /** @example end_of_next_month */
|
|
3439
4362
|
name?: string; /** @example 1730415600 */
|
|
3440
|
-
timestamp?: number; /** @example
|
|
3441
|
-
address?: string;
|
|
3442
|
-
callback_type?: string;
|
|
4363
|
+
timestamp?: number; /** @example 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 */
|
|
4364
|
+
address?: string;
|
|
3443
4365
|
};
|
|
3444
4366
|
OfferListResponse: {
|
|
3445
4367
|
meta: components["schemas"]["Meta"];
|
|
@@ -3474,8 +4396,8 @@ interface components {
|
|
|
3474
4396
|
* "price": "2750000000000000000",
|
|
3475
4397
|
* "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
|
|
3476
4398
|
* "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
3477
|
-
* "callback": "
|
|
3478
|
-
* "callback_data": "
|
|
4399
|
+
* "callback": "0x0000000000000000000000000000000000000000",
|
|
4400
|
+
* "callback_data": "0x"
|
|
3479
4401
|
* },
|
|
3480
4402
|
* "offer_hash": "0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427",
|
|
3481
4403
|
* "obligation_id": "0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc",
|
|
@@ -3518,8 +4440,8 @@ interface components {
|
|
|
3518
4440
|
* "price": "2750000000000000000",
|
|
3519
4441
|
* "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
|
|
3520
4442
|
* "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
3521
|
-
* "callback": "
|
|
3522
|
-
* "callback_data": "
|
|
4443
|
+
* "callback": "0x0000000000000000000000000000000000000000",
|
|
4444
|
+
* "callback_data": "0x"
|
|
3523
4445
|
* }
|
|
3524
4446
|
*/
|
|
3525
4447
|
offer: components["schemas"]["OfferDataResponse"]; /** @example 0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427 */
|
|
@@ -3563,8 +4485,8 @@ interface components {
|
|
|
3563
4485
|
expiry: number; /** @example 2750000000000000000 */
|
|
3564
4486
|
price: string; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
|
|
3565
4487
|
group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
|
|
3566
|
-
session: string; /** @example
|
|
3567
|
-
callback: string; /** @example
|
|
4488
|
+
session: string; /** @example 0x0000000000000000000000000000000000000000 */
|
|
4489
|
+
callback: string; /** @example 0x */
|
|
3568
4490
|
callback_data: string;
|
|
3569
4491
|
};
|
|
3570
4492
|
ObligationOfferResponse: {
|
|
@@ -3753,8 +4675,8 @@ interface components {
|
|
|
3753
4675
|
collaterals: components["schemas"]["ValidateCollateralRequest"][];
|
|
3754
4676
|
/**
|
|
3755
4677
|
* @example {
|
|
3756
|
-
* "address": "
|
|
3757
|
-
* "data": "
|
|
4678
|
+
* "address": "0x0000000000000000000000000000000000000000",
|
|
4679
|
+
* "data": "0x"
|
|
3758
4680
|
* }
|
|
3759
4681
|
*/
|
|
3760
4682
|
callback: components["schemas"]["ValidateCallbackRequest"];
|
|
@@ -3765,7 +4687,7 @@ interface components {
|
|
|
3765
4687
|
lltv: string;
|
|
3766
4688
|
};
|
|
3767
4689
|
ValidateCallbackRequest: {
|
|
3768
|
-
/** @example
|
|
4690
|
+
/** @example 0x0000000000000000000000000000000000000000 */address: string; /** @example 0x */
|
|
3769
4691
|
data: string;
|
|
3770
4692
|
};
|
|
3771
4693
|
ValidationSuccessResponse: {
|
|
@@ -3785,84 +4707,6 @@ interface components {
|
|
|
3785
4707
|
*/
|
|
3786
4708
|
root: string;
|
|
3787
4709
|
};
|
|
3788
|
-
CallbackTypesRequest: {
|
|
3789
|
-
/**
|
|
3790
|
-
* @example [
|
|
3791
|
-
* {
|
|
3792
|
-
* "chain_id": 1,
|
|
3793
|
-
* "addresses": [
|
|
3794
|
-
* "0x1111111111111111111111111111111111111111",
|
|
3795
|
-
* "0x3333333333333333333333333333333333333333",
|
|
3796
|
-
* "0x9999999999999999999999999999999999999999"
|
|
3797
|
-
* ]
|
|
3798
|
-
* }
|
|
3799
|
-
* ]
|
|
3800
|
-
*/
|
|
3801
|
-
callbacks: components["schemas"]["CallbackTypesChainRequest"][];
|
|
3802
|
-
};
|
|
3803
|
-
CallbackTypesChainRequest: {
|
|
3804
|
-
/** @example 1 */chain_id: number;
|
|
3805
|
-
/**
|
|
3806
|
-
* @example [
|
|
3807
|
-
* "0x1111111111111111111111111111111111111111",
|
|
3808
|
-
* "0x3333333333333333333333333333333333333333",
|
|
3809
|
-
* "0x9999999999999999999999999999999999999999"
|
|
3810
|
-
* ]
|
|
3811
|
-
*/
|
|
3812
|
-
addresses: string[];
|
|
3813
|
-
};
|
|
3814
|
-
CallbackTypesSuccessResponse: {
|
|
3815
|
-
meta: components["schemas"]["Meta"]; /** @example maturity:1:1730415600:end_of_next_month */
|
|
3816
|
-
cursor: string | null;
|
|
3817
|
-
/**
|
|
3818
|
-
* @description Callback types grouped by chain.
|
|
3819
|
-
* @example [
|
|
3820
|
-
* {
|
|
3821
|
-
* "chain_id": 1,
|
|
3822
|
-
* "sell_erc20_callback": [
|
|
3823
|
-
* "0x1111111111111111111111111111111111111111"
|
|
3824
|
-
* ],
|
|
3825
|
-
* "buy_erc20": [
|
|
3826
|
-
* "0x5555555555555555555555555555555555555555"
|
|
3827
|
-
* ],
|
|
3828
|
-
* "buy_vault_v1_callback": [
|
|
3829
|
-
* "0x3333333333333333333333333333333333333333"
|
|
3830
|
-
* ],
|
|
3831
|
-
* "not_supported": [
|
|
3832
|
-
* "0x9999999999999999999999999999999999999999"
|
|
3833
|
-
* ]
|
|
3834
|
-
* }
|
|
3835
|
-
* ]
|
|
3836
|
-
*/
|
|
3837
|
-
data: components["schemas"]["CallbackTypesChainResponse"][];
|
|
3838
|
-
};
|
|
3839
|
-
CallbackTypesChainResponse: {
|
|
3840
|
-
/** @example 1 */chain_id: number;
|
|
3841
|
-
/**
|
|
3842
|
-
* @example [
|
|
3843
|
-
* "0x3333333333333333333333333333333333333333"
|
|
3844
|
-
* ]
|
|
3845
|
-
*/
|
|
3846
|
-
buy_vault_v1_callback?: string[];
|
|
3847
|
-
/**
|
|
3848
|
-
* @example [
|
|
3849
|
-
* "0x1111111111111111111111111111111111111111"
|
|
3850
|
-
* ]
|
|
3851
|
-
*/
|
|
3852
|
-
sell_erc20_callback?: string[];
|
|
3853
|
-
/**
|
|
3854
|
-
* @example [
|
|
3855
|
-
* "0x5555555555555555555555555555555555555555"
|
|
3856
|
-
* ]
|
|
3857
|
-
*/
|
|
3858
|
-
buy_erc20?: string[];
|
|
3859
|
-
/**
|
|
3860
|
-
* @example [
|
|
3861
|
-
* "0x9999999999999999999999999999999999999999"
|
|
3862
|
-
* ]
|
|
3863
|
-
*/
|
|
3864
|
-
not_supported: string[];
|
|
3865
|
-
};
|
|
3866
4710
|
};
|
|
3867
4711
|
responses: never;
|
|
3868
4712
|
parameters: never;
|
|
@@ -3931,9 +4775,6 @@ declare class BooksController {
|
|
|
3931
4775
|
declare class ValidateController {
|
|
3932
4776
|
validateOffers(): Promise<void>;
|
|
3933
4777
|
}
|
|
3934
|
-
declare class CallbacksController {
|
|
3935
|
-
resolveCallbackTypes(): Promise<void>;
|
|
3936
|
-
}
|
|
3937
4778
|
declare class OffersController {
|
|
3938
4779
|
getOffers(): Promise<void>;
|
|
3939
4780
|
}
|
|
@@ -3980,25 +4821,25 @@ declare const schemas: {
|
|
|
3980
4821
|
strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
|
|
3981
4822
|
0: "0";
|
|
3982
4823
|
1: "1";
|
|
3983
|
-
false: "false";
|
|
3984
4824
|
true: "true";
|
|
3985
|
-
|
|
4825
|
+
false: "false";
|
|
4826
|
+
}>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
|
|
3986
4827
|
}, z$1.core.$strip>;
|
|
3987
4828
|
readonly get_health_collectors: z$1.ZodObject<{
|
|
3988
4829
|
strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
|
|
3989
4830
|
0: "0";
|
|
3990
4831
|
1: "1";
|
|
3991
|
-
false: "false";
|
|
3992
4832
|
true: "true";
|
|
3993
|
-
|
|
4833
|
+
false: "false";
|
|
4834
|
+
}>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
|
|
3994
4835
|
}, z$1.core.$strip>;
|
|
3995
4836
|
readonly get_health_chains: z$1.ZodObject<{
|
|
3996
4837
|
strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
|
|
3997
4838
|
0: "0";
|
|
3998
4839
|
1: "1";
|
|
3999
|
-
false: "false";
|
|
4000
4840
|
true: "true";
|
|
4001
|
-
|
|
4841
|
+
false: "false";
|
|
4842
|
+
}>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
|
|
4002
4843
|
}, z$1.core.$strip>;
|
|
4003
4844
|
readonly get_config_contracts: z$1.ZodObject<{
|
|
4004
4845
|
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -4009,10 +4850,10 @@ declare const schemas: {
|
|
|
4009
4850
|
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
4010
4851
|
limit: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>, z$1.ZodNumber>>>;
|
|
4011
4852
|
types: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodEnum<{
|
|
4012
|
-
|
|
4853
|
+
oracle: "oracle";
|
|
4013
4854
|
maturity: "maturity";
|
|
4014
4855
|
callback: "callback";
|
|
4015
|
-
|
|
4856
|
+
loan_token: "loan_token";
|
|
4016
4857
|
}>>>>;
|
|
4017
4858
|
chains: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>>>>;
|
|
4018
4859
|
}, z$1.core.$strip>;
|
|
@@ -4061,12 +4902,6 @@ declare const schemas: {
|
|
|
4061
4902
|
readonly validate_offers: z$1.ZodObject<{
|
|
4062
4903
|
offers: z$1.ZodArray<z$1.ZodUnknown>;
|
|
4063
4904
|
}, z$1.core.$strict>;
|
|
4064
|
-
readonly callback_types: z$1.ZodObject<{
|
|
4065
|
-
callbacks: z$1.ZodArray<z$1.ZodObject<{
|
|
4066
|
-
chain_id: z$1.ZodNumber;
|
|
4067
|
-
addresses: z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>>;
|
|
4068
|
-
}, z$1.core.$strict>>;
|
|
4069
|
-
}, z$1.core.$strict>;
|
|
4070
4905
|
readonly get_user_positions: z$1.ZodObject<{
|
|
4071
4906
|
user_address: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
4072
4907
|
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -4174,16 +5009,17 @@ type GetOffersQueryParams = {
|
|
|
4174
5009
|
cursor?: string; /** Page size; defaults to {@link OffersDomain.DEFAULT_LIMIT} */
|
|
4175
5010
|
limit?: number;
|
|
4176
5011
|
};
|
|
5012
|
+
type OffersRowsResult = {
|
|
5013
|
+
rows: Row[];
|
|
5014
|
+
nextCursor: string | null;
|
|
5015
|
+
};
|
|
4177
5016
|
/**
|
|
4178
5017
|
* Query offers with computed consumed/available/takeable values.
|
|
4179
5018
|
* @param db - The database client. {@link Database.Core}
|
|
4180
5019
|
* @param parameters - {@link GetOffersQueryParams}
|
|
4181
5020
|
* @returns The offers with pagination cursor.
|
|
4182
5021
|
*/
|
|
4183
|
-
declare function getOffersQuery(db: Core, parameters?: GetOffersQueryParams): Promise<
|
|
4184
|
-
rows: Row[];
|
|
4185
|
-
nextCursor: string | null;
|
|
4186
|
-
}>;
|
|
5022
|
+
declare function getOffersQuery(db: Core, parameters?: GetOffersQueryParams): Promise<OffersRowsResult>;
|
|
4187
5023
|
declare function getOffers$1(queryParameters: object, db: Database): Promise<Payload<OfferResponse[]>>;
|
|
4188
5024
|
//#endregion
|
|
4189
5025
|
//#region src/api/Controllers/getUserPositions.d.ts
|
|
@@ -4194,16 +5030,6 @@ declare function getOffers$1(queryParameters: object, db: Database): Promise<Pay
|
|
|
4194
5030
|
* @returns Paginated list of positions with remaining balances.
|
|
4195
5031
|
*/
|
|
4196
5032
|
declare function getUserPositions(queryParameters: object, db: Database): Promise<Payload<PositionResponse[]>>;
|
|
4197
|
-
//#endregion
|
|
4198
|
-
//#region src/api/Controllers/resolveCallbackTypes.d.ts
|
|
4199
|
-
type CallbackTypesPayload = SuccessPayload$1<CallbackTypesResponse>;
|
|
4200
|
-
/**
|
|
4201
|
-
* Resolve callback types for a list of callback addresses grouped by chain.
|
|
4202
|
-
* @param body - Request body with callback addresses. {@link CallbackTypesRequest}
|
|
4203
|
-
* @param chains - Chains to resolve callback types against. {@link Chain.Chain}
|
|
4204
|
-
* @returns Callback types grouped by chain. {@link CallbackTypesPayload}
|
|
4205
|
-
*/
|
|
4206
|
-
declare function resolveCallbackTypes(body: object, chains: Chain$1[]): Promise<CallbackTypesPayload | ErrorPayload$1>;
|
|
4207
5033
|
declare namespace Gatekeeper_d_exports {
|
|
4208
5034
|
export { Gatekeeper, Rules, create };
|
|
4209
5035
|
}
|
|
@@ -4237,10 +5063,10 @@ type ValidateOffersIssuesPayload = SuccessPayload$1<{
|
|
|
4237
5063
|
type ValidateOffersResponse = ValidateOffersSuccessPayload | ValidateOffersIssuesPayload;
|
|
4238
5064
|
declare function validateOffers(body: object, gatekeeper: Gatekeeper): Promise<ValidateOffersResponse | ErrorPayload$1>;
|
|
4239
5065
|
declare namespace index_d_exports$4 {
|
|
4240
|
-
export { CONFIG_CONTRACT_NAMES, ConfigContract, ConfigContractName, GetOffersQueryParams, ValidationIssue$1 as ValidationIssue, getBook, getConfigContracts, getConfigRules, getDocsHtml, getHealth, getHealthChains, getHealthCollectors, getIntegratorDocsHtml, getObligation, getObligations$1 as getObligations, getOffers$1 as getOffers, getOffersQuery, getSwaggerJson, getUserPositions,
|
|
5066
|
+
export { CONFIG_CONTRACT_NAMES, ConfigContract, ConfigContractName, GetOffersQueryParams, ValidationIssue$1 as ValidationIssue, getBook, getConfigContracts, getConfigRules, getDocsHtml, getHealth, getHealthChains, getHealthCollectors, getIntegratorDocsHtml, getObligation, getObligations$1 as getObligations, getOffers$1 as getOffers, getOffersQuery, getSwaggerJson, getUserPositions, validateOffers };
|
|
4241
5067
|
}
|
|
4242
5068
|
declare namespace RouterApi_d_exports {
|
|
4243
|
-
export { ApiConfig, BookResponse_d_exports as BookResponse, BooksController,
|
|
5069
|
+
export { ApiConfig, BookResponse_d_exports as BookResponse, BooksController, ChainHealth, ChainsHealthResponse, CollectorHealth, CollectorsHealthResponse, ConfigContractsController, ConfigRulesController, index_d_exports$4 as Controllers, HealthController, ObligationResponse_d_exports as ObligationResponse, ObligationsController, OfferResponse_d_exports as OfferResponse, OffersController, OpenApi, PositionResponse_d_exports as PositionResponse, RouterApi, RouterStatusResponse, UsersController, ValidateController, create$1 as create, from$5 as from, parse, safeParse };
|
|
4244
5070
|
}
|
|
4245
5071
|
declare namespace Client_d_exports$1 {
|
|
4246
5072
|
export { Client$3 as Client, ConnectOptions, HttpForbiddenError, HttpGetApiFailedError, HttpRateLimitError, HttpUnauthorizedError, InvalidUrlError, connect$1 as connect, getObligations, getOffers };
|
|
@@ -6407,10 +7233,10 @@ type ValidityParameters = {
|
|
|
6407
7233
|
/**
|
|
6408
7234
|
* set of rules to validate offers.
|
|
6409
7235
|
*
|
|
6410
|
-
* @param
|
|
7236
|
+
* @param _parameters - Validity parameters with chain and client
|
|
6411
7237
|
* @returns Array of validation rules to evaluate against offers
|
|
6412
7238
|
*/
|
|
6413
|
-
declare function validity(
|
|
7239
|
+
declare function validity(_parameters: ValidityParameters): Rule<Offer, "expiry">[];
|
|
6414
7240
|
declare const chains: ({
|
|
6415
7241
|
chains
|
|
6416
7242
|
}: {
|
|
@@ -6422,8 +7248,7 @@ declare const maturity: ({
|
|
|
6422
7248
|
maturities: MaturityType[];
|
|
6423
7249
|
}) => Rule<Offer, "maturity">;
|
|
6424
7250
|
declare const callback: ({
|
|
6425
|
-
callbacks
|
|
6426
|
-
allowedAddresses
|
|
7251
|
+
callbacks
|
|
6427
7252
|
}: {
|
|
6428
7253
|
callbacks: Type$1[];
|
|
6429
7254
|
allowedAddresses: Address[];
|
|
@@ -6694,5 +7519,5 @@ declare namespace index_d_exports$3 {
|
|
|
6694
7519
|
export { BaseError, GlobalErrorType, Group_d_exports as Group, Random_d_exports as Random, ReorgError, Snake, time_d_exports as Time, atMostOneNonZero, batch, batchMulticall, fromSnakeCase$3 as fromSnakeCase, lazy, max$1 as max, min, poll, retry, stringifyBigint, toSnakeCase$1 as toSnakeCase, wait };
|
|
6695
7520
|
}
|
|
6696
7521
|
//#endregion
|
|
6697
|
-
export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback,
|
|
7522
|
+
export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, time_d_exports as Time, TradingFee_d_exports as TradingFee, Transfer_d_exports as Transfer, Tree_d_exports as Tree, UsersController, index_d_exports$3 as Utils, ValidateController, ValidateOffersData, ValidateOffersIssues, ValidateOffersSuccess, Gate_d_exports as Validation, ValidationIssue, morphoRules, parse, safeParse };
|
|
6698
7523
|
//# sourceMappingURL=index.node.d.mts.map
|