@morpho-dev/router 0.0.12 → 0.0.14

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 (33) hide show
  1. package/README.md +15 -0
  2. package/dist/drizzle/0000_add-offers-table.sql +37 -0
  3. package/dist/drizzle/0001_create_offer_status_relation.sql +10 -0
  4. package/dist/drizzle/0002_add_created_at_in_offer_status_relation.sql +3 -0
  5. package/dist/drizzle/0003_add-cursor-indices-to-offers.sql +6 -0
  6. package/dist/drizzle/0004_offer-start.sql +1 -0
  7. package/dist/drizzle/0005_rename-price-token-buy.sql +8 -0
  8. package/dist/drizzle/0006_rename-buy.sql +3 -0
  9. package/dist/drizzle/0007_rename-offering.sql +3 -0
  10. package/dist/drizzle/0008_add-consumed-relation.sql +10 -0
  11. package/dist/drizzle/meta/0000_snapshot.json +344 -0
  12. package/dist/drizzle/meta/0001_snapshot.json +426 -0
  13. package/dist/drizzle/meta/0002_snapshot.json +439 -0
  14. package/dist/drizzle/meta/0003_snapshot.json +553 -0
  15. package/dist/drizzle/meta/0004_snapshot.json +559 -0
  16. package/dist/drizzle/meta/0005_snapshot.json +559 -0
  17. package/dist/drizzle/meta/0006_snapshot.json +559 -0
  18. package/dist/drizzle/meta/0007_snapshot.json +559 -0
  19. package/dist/drizzle/meta/0008_snapshot.json +635 -0
  20. package/dist/drizzle/meta/_journal.json +69 -0
  21. package/dist/index.browser.d.cts +116 -25
  22. package/dist/index.browser.d.ts +116 -25
  23. package/dist/index.browser.js +671 -70
  24. package/dist/index.browser.js.map +1 -1
  25. package/dist/index.browser.mjs +670 -72
  26. package/dist/index.browser.mjs.map +1 -1
  27. package/dist/index.node.d.cts +934 -7
  28. package/dist/index.node.d.ts +934 -7
  29. package/dist/index.node.js +2328 -4819
  30. package/dist/index.node.js.map +1 -1
  31. package/dist/index.node.mjs +2319 -4820
  32. package/dist/index.node.mjs.map +1 -1
  33. package/package.json +17 -3
@@ -0,0 +1,559 @@
1
+ {
2
+ "id": "14bbdbf8-24af-4e13-8386-c84c405615b6",
3
+ "prevId": "540ff674-3d06-4648-ad83-63c05d8b1818",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.offer_collaterals": {
8
+ "name": "offer_collaterals",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "serial",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "offer_hash": {
18
+ "name": "offer_hash",
19
+ "type": "varchar(66)",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "asset": {
24
+ "name": "asset",
25
+ "type": "varchar(42)",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "oracle": {
30
+ "name": "oracle",
31
+ "type": "varchar(42)",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "lltv": {
36
+ "name": "lltv",
37
+ "type": "bigint",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ }
41
+ },
42
+ "indexes": {
43
+ "offer_collaterals_offer_hash_idx": {
44
+ "name": "offer_collaterals_offer_hash_idx",
45
+ "columns": [
46
+ {
47
+ "expression": "offer_hash",
48
+ "isExpression": false,
49
+ "asc": true,
50
+ "nulls": "last"
51
+ }
52
+ ],
53
+ "isUnique": false,
54
+ "concurrently": false,
55
+ "method": "btree",
56
+ "with": {}
57
+ },
58
+ "offer_collaterals_asset_idx": {
59
+ "name": "offer_collaterals_asset_idx",
60
+ "columns": [
61
+ {
62
+ "expression": "asset",
63
+ "isExpression": false,
64
+ "asc": true,
65
+ "nulls": "last"
66
+ }
67
+ ],
68
+ "isUnique": false,
69
+ "concurrently": false,
70
+ "method": "btree",
71
+ "with": {}
72
+ },
73
+ "offer_collaterals_oracle_idx": {
74
+ "name": "offer_collaterals_oracle_idx",
75
+ "columns": [
76
+ {
77
+ "expression": "oracle",
78
+ "isExpression": false,
79
+ "asc": true,
80
+ "nulls": "last"
81
+ }
82
+ ],
83
+ "isUnique": false,
84
+ "concurrently": false,
85
+ "method": "btree",
86
+ "with": {}
87
+ },
88
+ "offer_collaterals_tuple_idx": {
89
+ "name": "offer_collaterals_tuple_idx",
90
+ "columns": [
91
+ {
92
+ "expression": "asset",
93
+ "isExpression": false,
94
+ "asc": true,
95
+ "nulls": "last"
96
+ },
97
+ {
98
+ "expression": "oracle",
99
+ "isExpression": false,
100
+ "asc": true,
101
+ "nulls": "last"
102
+ },
103
+ {
104
+ "expression": "lltv",
105
+ "isExpression": false,
106
+ "asc": true,
107
+ "nulls": "last"
108
+ }
109
+ ],
110
+ "isUnique": false,
111
+ "concurrently": false,
112
+ "method": "btree",
113
+ "with": {}
114
+ }
115
+ },
116
+ "foreignKeys": {
117
+ "offer_collaterals_offer_hash_offers_hash_fk": {
118
+ "name": "offer_collaterals_offer_hash_offers_hash_fk",
119
+ "tableFrom": "offer_collaterals",
120
+ "tableTo": "offers",
121
+ "columnsFrom": [
122
+ "offer_hash"
123
+ ],
124
+ "columnsTo": [
125
+ "hash"
126
+ ],
127
+ "onDelete": "cascade",
128
+ "onUpdate": "no action"
129
+ }
130
+ },
131
+ "compositePrimaryKeys": {},
132
+ "uniqueConstraints": {},
133
+ "policies": {},
134
+ "checkConstraints": {},
135
+ "isRLSEnabled": false
136
+ },
137
+ "public.offer_status": {
138
+ "name": "offer_status",
139
+ "schema": "",
140
+ "columns": {
141
+ "id": {
142
+ "name": "id",
143
+ "type": "serial",
144
+ "primaryKey": true,
145
+ "notNull": true
146
+ },
147
+ "offer_hash": {
148
+ "name": "offer_hash",
149
+ "type": "varchar(66)",
150
+ "primaryKey": false,
151
+ "notNull": true
152
+ },
153
+ "status": {
154
+ "name": "status",
155
+ "type": "text",
156
+ "primaryKey": false,
157
+ "notNull": true
158
+ },
159
+ "metadata": {
160
+ "name": "metadata",
161
+ "type": "jsonb",
162
+ "primaryKey": false,
163
+ "notNull": false
164
+ },
165
+ "created_at": {
166
+ "name": "created_at",
167
+ "type": "timestamp",
168
+ "primaryKey": false,
169
+ "notNull": true,
170
+ "default": "now()"
171
+ }
172
+ },
173
+ "indexes": {
174
+ "offer_status_offer_hash_created_at_idx": {
175
+ "name": "offer_status_offer_hash_created_at_idx",
176
+ "columns": [
177
+ {
178
+ "expression": "offer_hash",
179
+ "isExpression": false,
180
+ "asc": true,
181
+ "nulls": "last"
182
+ },
183
+ {
184
+ "expression": "\"created_at\" desc",
185
+ "asc": true,
186
+ "isExpression": true,
187
+ "nulls": "last"
188
+ }
189
+ ],
190
+ "isUnique": false,
191
+ "concurrently": false,
192
+ "method": "btree",
193
+ "with": {}
194
+ },
195
+ "offer_status_status_idx": {
196
+ "name": "offer_status_status_idx",
197
+ "columns": [
198
+ {
199
+ "expression": "status",
200
+ "isExpression": false,
201
+ "asc": true,
202
+ "nulls": "last"
203
+ }
204
+ ],
205
+ "isUnique": false,
206
+ "concurrently": false,
207
+ "method": "btree",
208
+ "with": {}
209
+ }
210
+ },
211
+ "foreignKeys": {
212
+ "offer_status_offer_hash_offers_hash_fk": {
213
+ "name": "offer_status_offer_hash_offers_hash_fk",
214
+ "tableFrom": "offer_status",
215
+ "tableTo": "offers",
216
+ "columnsFrom": [
217
+ "offer_hash"
218
+ ],
219
+ "columnsTo": [
220
+ "hash"
221
+ ],
222
+ "onDelete": "cascade",
223
+ "onUpdate": "no action"
224
+ }
225
+ },
226
+ "compositePrimaryKeys": {},
227
+ "uniqueConstraints": {},
228
+ "policies": {},
229
+ "checkConstraints": {},
230
+ "isRLSEnabled": false
231
+ },
232
+ "public.offers": {
233
+ "name": "offers",
234
+ "schema": "",
235
+ "columns": {
236
+ "hash": {
237
+ "name": "hash",
238
+ "type": "varchar(66)",
239
+ "primaryKey": true,
240
+ "notNull": true
241
+ },
242
+ "address": {
243
+ "name": "address",
244
+ "type": "varchar(42)",
245
+ "primaryKey": false,
246
+ "notNull": true
247
+ },
248
+ "assets": {
249
+ "name": "assets",
250
+ "type": "bigint",
251
+ "primaryKey": false,
252
+ "notNull": true
253
+ },
254
+ "price": {
255
+ "name": "price",
256
+ "type": "bigint",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "maturity": {
261
+ "name": "maturity",
262
+ "type": "integer",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "expiry": {
267
+ "name": "expiry",
268
+ "type": "integer",
269
+ "primaryKey": false,
270
+ "notNull": true
271
+ },
272
+ "start": {
273
+ "name": "start",
274
+ "type": "integer",
275
+ "primaryKey": false,
276
+ "notNull": true
277
+ },
278
+ "nonce": {
279
+ "name": "nonce",
280
+ "type": "bigint",
281
+ "primaryKey": false,
282
+ "notNull": true
283
+ },
284
+ "is_buy": {
285
+ "name": "is_buy",
286
+ "type": "boolean",
287
+ "primaryKey": false,
288
+ "notNull": true
289
+ },
290
+ "chain_id": {
291
+ "name": "chain_id",
292
+ "type": "bigint",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "loan_asset": {
297
+ "name": "loan_asset",
298
+ "type": "varchar(42)",
299
+ "primaryKey": false,
300
+ "notNull": true
301
+ },
302
+ "callback_address": {
303
+ "name": "callback_address",
304
+ "type": "varchar(42)",
305
+ "primaryKey": false,
306
+ "notNull": true
307
+ },
308
+ "callback_data": {
309
+ "name": "callback_data",
310
+ "type": "text",
311
+ "primaryKey": false,
312
+ "notNull": true
313
+ },
314
+ "callback_gas_limit": {
315
+ "name": "callback_gas_limit",
316
+ "type": "bigint",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ },
320
+ "signature": {
321
+ "name": "signature",
322
+ "type": "varchar(132)",
323
+ "primaryKey": false,
324
+ "notNull": false
325
+ },
326
+ "created_at": {
327
+ "name": "created_at",
328
+ "type": "timestamp",
329
+ "primaryKey": false,
330
+ "notNull": true,
331
+ "default": "now()"
332
+ }
333
+ },
334
+ "indexes": {
335
+ "offers_address_idx": {
336
+ "name": "offers_address_idx",
337
+ "columns": [
338
+ {
339
+ "expression": "address",
340
+ "isExpression": false,
341
+ "asc": true,
342
+ "nulls": "last"
343
+ }
344
+ ],
345
+ "isUnique": false,
346
+ "concurrently": false,
347
+ "method": "btree",
348
+ "with": {}
349
+ },
350
+ "offers_is_buy_idx": {
351
+ "name": "offers_is_buy_idx",
352
+ "columns": [
353
+ {
354
+ "expression": "is_buy",
355
+ "isExpression": false,
356
+ "asc": true,
357
+ "nulls": "last"
358
+ }
359
+ ],
360
+ "isUnique": false,
361
+ "concurrently": false,
362
+ "method": "btree",
363
+ "with": {}
364
+ },
365
+ "offers_chain_id_idx": {
366
+ "name": "offers_chain_id_idx",
367
+ "columns": [
368
+ {
369
+ "expression": "chain_id",
370
+ "isExpression": false,
371
+ "asc": true,
372
+ "nulls": "last"
373
+ }
374
+ ],
375
+ "isUnique": false,
376
+ "concurrently": false,
377
+ "method": "btree",
378
+ "with": {}
379
+ },
380
+ "offers_loan_asset_idx": {
381
+ "name": "offers_loan_asset_idx",
382
+ "columns": [
383
+ {
384
+ "expression": "loan_asset",
385
+ "isExpression": false,
386
+ "asc": true,
387
+ "nulls": "last"
388
+ }
389
+ ],
390
+ "isUnique": false,
391
+ "concurrently": false,
392
+ "method": "btree",
393
+ "with": {}
394
+ },
395
+ "offers_maturity_idx": {
396
+ "name": "offers_maturity_idx",
397
+ "columns": [
398
+ {
399
+ "expression": "maturity",
400
+ "isExpression": false,
401
+ "asc": true,
402
+ "nulls": "last"
403
+ }
404
+ ],
405
+ "isUnique": false,
406
+ "concurrently": false,
407
+ "method": "btree",
408
+ "with": {}
409
+ },
410
+ "offers_expiry_idx": {
411
+ "name": "offers_expiry_idx",
412
+ "columns": [
413
+ {
414
+ "expression": "expiry",
415
+ "isExpression": false,
416
+ "asc": true,
417
+ "nulls": "last"
418
+ }
419
+ ],
420
+ "isUnique": false,
421
+ "concurrently": false,
422
+ "method": "btree",
423
+ "with": {}
424
+ },
425
+ "offers_price_idx": {
426
+ "name": "offers_price_idx",
427
+ "columns": [
428
+ {
429
+ "expression": "price",
430
+ "isExpression": false,
431
+ "asc": true,
432
+ "nulls": "last"
433
+ }
434
+ ],
435
+ "isUnique": false,
436
+ "concurrently": false,
437
+ "method": "btree",
438
+ "with": {}
439
+ },
440
+ "offers_assets_idx": {
441
+ "name": "offers_assets_idx",
442
+ "columns": [
443
+ {
444
+ "expression": "assets",
445
+ "isExpression": false,
446
+ "asc": true,
447
+ "nulls": "last"
448
+ }
449
+ ],
450
+ "isUnique": false,
451
+ "concurrently": false,
452
+ "method": "btree",
453
+ "with": {}
454
+ },
455
+ "offers_price_hash_idx": {
456
+ "name": "offers_price_hash_idx",
457
+ "columns": [
458
+ {
459
+ "expression": "price",
460
+ "isExpression": false,
461
+ "asc": true,
462
+ "nulls": "last"
463
+ },
464
+ {
465
+ "expression": "hash",
466
+ "isExpression": false,
467
+ "asc": true,
468
+ "nulls": "last"
469
+ }
470
+ ],
471
+ "isUnique": false,
472
+ "concurrently": false,
473
+ "method": "btree",
474
+ "with": {}
475
+ },
476
+ "offers_maturity_hash_idx": {
477
+ "name": "offers_maturity_hash_idx",
478
+ "columns": [
479
+ {
480
+ "expression": "maturity",
481
+ "isExpression": false,
482
+ "asc": true,
483
+ "nulls": "last"
484
+ },
485
+ {
486
+ "expression": "hash",
487
+ "isExpression": false,
488
+ "asc": true,
489
+ "nulls": "last"
490
+ }
491
+ ],
492
+ "isUnique": false,
493
+ "concurrently": false,
494
+ "method": "btree",
495
+ "with": {}
496
+ },
497
+ "offers_expiry_hash_idx": {
498
+ "name": "offers_expiry_hash_idx",
499
+ "columns": [
500
+ {
501
+ "expression": "expiry",
502
+ "isExpression": false,
503
+ "asc": true,
504
+ "nulls": "last"
505
+ },
506
+ {
507
+ "expression": "hash",
508
+ "isExpression": false,
509
+ "asc": true,
510
+ "nulls": "last"
511
+ }
512
+ ],
513
+ "isUnique": false,
514
+ "concurrently": false,
515
+ "method": "btree",
516
+ "with": {}
517
+ },
518
+ "offers_assets_hash_idx": {
519
+ "name": "offers_assets_hash_idx",
520
+ "columns": [
521
+ {
522
+ "expression": "assets",
523
+ "isExpression": false,
524
+ "asc": true,
525
+ "nulls": "last"
526
+ },
527
+ {
528
+ "expression": "hash",
529
+ "isExpression": false,
530
+ "asc": true,
531
+ "nulls": "last"
532
+ }
533
+ ],
534
+ "isUnique": false,
535
+ "concurrently": false,
536
+ "method": "btree",
537
+ "with": {}
538
+ }
539
+ },
540
+ "foreignKeys": {},
541
+ "compositePrimaryKeys": {},
542
+ "uniqueConstraints": {},
543
+ "policies": {},
544
+ "checkConstraints": {},
545
+ "isRLSEnabled": false
546
+ }
547
+ },
548
+ "enums": {},
549
+ "schemas": {},
550
+ "sequences": {},
551
+ "roles": {},
552
+ "policies": {},
553
+ "views": {},
554
+ "_meta": {
555
+ "columns": {},
556
+ "schemas": {},
557
+ "tables": {}
558
+ }
559
+ }