@pearcurve/sdk 0.0.0-stage → 0.1.0

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 (113) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +122 -2
  3. package/dist/abis/json/collateralTokenRegistry.json +257 -0
  4. package/dist/abis/json/errors.json +1034 -0
  5. package/dist/abis/json/feeManager.json +668 -0
  6. package/dist/abis/json/intentRegistry.json +1169 -0
  7. package/dist/abis/json/intentRegistryViews.json +958 -0
  8. package/dist/abis/json/loanAssetRegistry.json +220 -0
  9. package/dist/abis/json/loanHealthViewer.json +176 -0
  10. package/dist/abis/json/loanManager.json +1404 -0
  11. package/dist/abis/json/loanMarketCaps.json +1642 -0
  12. package/dist/abis/json/loanPositionToken.json +650 -0
  13. package/dist/abis/json/main.json +1951 -0
  14. package/dist/abis/json/matchingEngine.json +2060 -0
  15. package/dist/abis/json/priceOracle.json +453 -0
  16. package/dist/abis/json/protocolViewer.json +959 -0
  17. package/dist/abis/json/secondaryMarket.json +1348 -0
  18. package/dist/abis/json/strategyRegistry.json +237 -0
  19. package/dist/abis/json/termCurveOracle.json +346 -0
  20. package/dist/abis/json/yieldSource.json +298 -0
  21. package/dist/abis/json/yieldSourceRegistry.json +295 -0
  22. package/dist/abis.d.ts +21 -0
  23. package/dist/abis.d.ts.map +1 -0
  24. package/dist/abis.js +39 -0
  25. package/dist/abis.js.map +1 -0
  26. package/dist/borrowerSubmitPreflight.d.ts +14 -0
  27. package/dist/borrowerSubmitPreflight.d.ts.map +1 -0
  28. package/dist/borrowerSubmitPreflight.js +28 -0
  29. package/dist/borrowerSubmitPreflight.js.map +1 -0
  30. package/dist/bps.d.ts +11 -0
  31. package/dist/bps.d.ts.map +1 -0
  32. package/dist/bps.js +25 -0
  33. package/dist/bps.js.map +1 -0
  34. package/dist/clients.d.ts +23 -0
  35. package/dist/clients.d.ts.map +1 -0
  36. package/dist/clients.js +59 -0
  37. package/dist/clients.js.map +1 -0
  38. package/dist/decodeError.d.ts +24 -0
  39. package/dist/decodeError.d.ts.map +1 -0
  40. package/dist/decodeError.js +358 -0
  41. package/dist/decodeError.js.map +1 -0
  42. package/dist/encoding.d.ts +18 -0
  43. package/dist/encoding.d.ts.map +1 -0
  44. package/dist/encoding.js +94 -0
  45. package/dist/encoding.js.map +1 -0
  46. package/dist/index.d.ts +18 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/index.js +18 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/lenderSubmitPreflight.d.ts +20 -0
  51. package/dist/lenderSubmitPreflight.d.ts.map +1 -0
  52. package/dist/lenderSubmitPreflight.js +42 -0
  53. package/dist/lenderSubmitPreflight.js.map +1 -0
  54. package/dist/loanPositions.d.ts +23 -0
  55. package/dist/loanPositions.d.ts.map +1 -0
  56. package/dist/loanPositions.js +37 -0
  57. package/dist/loanPositions.js.map +1 -0
  58. package/dist/marketStats.d.ts +70 -0
  59. package/dist/marketStats.d.ts.map +1 -0
  60. package/dist/marketStats.js +117 -0
  61. package/dist/marketStats.js.map +1 -0
  62. package/dist/networkConfig.d.ts +48 -0
  63. package/dist/networkConfig.d.ts.map +1 -0
  64. package/dist/networkConfig.js +48 -0
  65. package/dist/networkConfig.js.map +1 -0
  66. package/dist/pause.d.ts +20 -0
  67. package/dist/pause.d.ts.map +1 -0
  68. package/dist/pause.js +40 -0
  69. package/dist/pause.js.map +1 -0
  70. package/dist/reads.d.ts +187 -0
  71. package/dist/reads.d.ts.map +1 -0
  72. package/dist/reads.js +353 -0
  73. package/dist/reads.js.map +1 -0
  74. package/dist/strategies.d.ts +14 -0
  75. package/dist/strategies.d.ts.map +1 -0
  76. package/dist/strategies.js +49 -0
  77. package/dist/strategies.js.map +1 -0
  78. package/dist/txGas.d.ts +19 -0
  79. package/dist/txGas.d.ts.map +1 -0
  80. package/dist/txGas.js +37 -0
  81. package/dist/txGas.js.map +1 -0
  82. package/dist/types.d.ts +69 -0
  83. package/dist/types.d.ts.map +1 -0
  84. package/dist/types.js +11 -0
  85. package/dist/types.js.map +1 -0
  86. package/dist/yieldMigrationPreflight.d.ts +29 -0
  87. package/dist/yieldMigrationPreflight.d.ts.map +1 -0
  88. package/dist/yieldMigrationPreflight.js +61 -0
  89. package/dist/yieldMigrationPreflight.js.map +1 -0
  90. package/dist/yieldSources.d.ts +33 -0
  91. package/dist/yieldSources.d.ts.map +1 -0
  92. package/dist/yieldSources.js +106 -0
  93. package/dist/yieldSources.js.map +1 -0
  94. package/package.json +47 -4
  95. package/src/abis/json/collateralTokenRegistry.json +257 -0
  96. package/src/abis/json/errors.json +1034 -0
  97. package/src/abis/json/feeManager.json +668 -0
  98. package/src/abis/json/intentRegistry.json +1169 -0
  99. package/src/abis/json/intentRegistryViews.json +958 -0
  100. package/src/abis/json/loanAssetRegistry.json +220 -0
  101. package/src/abis/json/loanHealthViewer.json +176 -0
  102. package/src/abis/json/loanManager.json +1404 -0
  103. package/src/abis/json/loanMarketCaps.json +1642 -0
  104. package/src/abis/json/loanPositionToken.json +650 -0
  105. package/src/abis/json/main.json +1951 -0
  106. package/src/abis/json/matchingEngine.json +2060 -0
  107. package/src/abis/json/priceOracle.json +453 -0
  108. package/src/abis/json/protocolViewer.json +959 -0
  109. package/src/abis/json/secondaryMarket.json +1348 -0
  110. package/src/abis/json/strategyRegistry.json +237 -0
  111. package/src/abis/json/termCurveOracle.json +346 -0
  112. package/src/abis/json/yieldSource.json +298 -0
  113. package/src/abis/json/yieldSourceRegistry.json +295 -0
@@ -0,0 +1,668 @@
1
+ [
2
+ {
3
+ "type": "constructor",
4
+ "inputs": [
5
+ {
6
+ "name": "governor_",
7
+ "type": "address",
8
+ "internalType": "address"
9
+ },
10
+ {
11
+ "name": "initialFeeRecipient",
12
+ "type": "address",
13
+ "internalType": "address"
14
+ }
15
+ ],
16
+ "stateMutability": "nonpayable"
17
+ },
18
+ {
19
+ "type": "function",
20
+ "name": "HARD_MAX_SOLVER_TIP_BPS",
21
+ "inputs": [],
22
+ "outputs": [
23
+ {
24
+ "name": "",
25
+ "type": "uint256",
26
+ "internalType": "uint256"
27
+ }
28
+ ],
29
+ "stateMutability": "view"
30
+ },
31
+ {
32
+ "type": "function",
33
+ "name": "MAX_EARLY_REPAYMENT_PROTOCOL_FEE_BPS",
34
+ "inputs": [],
35
+ "outputs": [
36
+ {
37
+ "name": "",
38
+ "type": "uint256",
39
+ "internalType": "uint256"
40
+ }
41
+ ],
42
+ "stateMutability": "view"
43
+ },
44
+ {
45
+ "type": "function",
46
+ "name": "MAX_INTEREST_FEE_BPS",
47
+ "inputs": [],
48
+ "outputs": [
49
+ {
50
+ "name": "",
51
+ "type": "uint256",
52
+ "internalType": "uint256"
53
+ }
54
+ ],
55
+ "stateMutability": "view"
56
+ },
57
+ {
58
+ "type": "function",
59
+ "name": "MAX_KEEPER_SLICE_BPS",
60
+ "inputs": [],
61
+ "outputs": [
62
+ {
63
+ "name": "",
64
+ "type": "uint256",
65
+ "internalType": "uint256"
66
+ }
67
+ ],
68
+ "stateMutability": "view"
69
+ },
70
+ {
71
+ "type": "function",
72
+ "name": "MAX_ORIGINATION_FEE_BPS",
73
+ "inputs": [],
74
+ "outputs": [
75
+ {
76
+ "name": "",
77
+ "type": "uint256",
78
+ "internalType": "uint256"
79
+ }
80
+ ],
81
+ "stateMutability": "view"
82
+ },
83
+ {
84
+ "type": "function",
85
+ "name": "MAX_REFINANCING_FEE_BPS",
86
+ "inputs": [],
87
+ "outputs": [
88
+ {
89
+ "name": "",
90
+ "type": "uint256",
91
+ "internalType": "uint256"
92
+ }
93
+ ],
94
+ "stateMutability": "view"
95
+ },
96
+ {
97
+ "type": "function",
98
+ "name": "MAX_SECONDARY_MARKET_SALE_FEE_BPS",
99
+ "inputs": [],
100
+ "outputs": [
101
+ {
102
+ "name": "",
103
+ "type": "uint256",
104
+ "internalType": "uint256"
105
+ }
106
+ ],
107
+ "stateMutability": "view"
108
+ },
109
+ {
110
+ "type": "function",
111
+ "name": "MAX_SOLVER_TIP_PROTOCOL_SHARE_BPS",
112
+ "inputs": [],
113
+ "outputs": [
114
+ {
115
+ "name": "",
116
+ "type": "uint256",
117
+ "internalType": "uint256"
118
+ }
119
+ ],
120
+ "stateMutability": "view"
121
+ },
122
+ {
123
+ "type": "function",
124
+ "name": "acceptGovernance",
125
+ "inputs": [],
126
+ "outputs": [],
127
+ "stateMutability": "nonpayable"
128
+ },
129
+ {
130
+ "type": "function",
131
+ "name": "autoRefinanceKeeperSliceBps",
132
+ "inputs": [],
133
+ "outputs": [
134
+ {
135
+ "name": "",
136
+ "type": "uint256",
137
+ "internalType": "uint256"
138
+ }
139
+ ],
140
+ "stateMutability": "view"
141
+ },
142
+ {
143
+ "type": "function",
144
+ "name": "computeEarlyRepaymentProtocolFee",
145
+ "inputs": [
146
+ {
147
+ "name": "earlyPenalty",
148
+ "type": "uint256",
149
+ "internalType": "uint256"
150
+ }
151
+ ],
152
+ "outputs": [
153
+ {
154
+ "name": "",
155
+ "type": "uint256",
156
+ "internalType": "uint256"
157
+ }
158
+ ],
159
+ "stateMutability": "view"
160
+ },
161
+ {
162
+ "type": "function",
163
+ "name": "computeKeeperFee",
164
+ "inputs": [
165
+ {
166
+ "name": "principal",
167
+ "type": "uint256",
168
+ "internalType": "uint256"
169
+ }
170
+ ],
171
+ "outputs": [
172
+ {
173
+ "name": "keeperFee",
174
+ "type": "uint256",
175
+ "internalType": "uint256"
176
+ }
177
+ ],
178
+ "stateMutability": "view"
179
+ },
180
+ {
181
+ "type": "function",
182
+ "name": "computeLoanFees",
183
+ "inputs": [
184
+ {
185
+ "name": "principal",
186
+ "type": "uint256",
187
+ "internalType": "uint256"
188
+ },
189
+ {
190
+ "name": "grossInterest",
191
+ "type": "uint256",
192
+ "internalType": "uint256"
193
+ }
194
+ ],
195
+ "outputs": [
196
+ {
197
+ "name": "originFee",
198
+ "type": "uint256",
199
+ "internalType": "uint256"
200
+ },
201
+ {
202
+ "name": "interestFee",
203
+ "type": "uint256",
204
+ "internalType": "uint256"
205
+ }
206
+ ],
207
+ "stateMutability": "view"
208
+ },
209
+ {
210
+ "type": "function",
211
+ "name": "computeRefinancingFee",
212
+ "inputs": [
213
+ {
214
+ "name": "principal",
215
+ "type": "uint256",
216
+ "internalType": "uint256"
217
+ }
218
+ ],
219
+ "outputs": [
220
+ {
221
+ "name": "fee",
222
+ "type": "uint256",
223
+ "internalType": "uint256"
224
+ }
225
+ ],
226
+ "stateMutability": "view"
227
+ },
228
+ {
229
+ "type": "function",
230
+ "name": "computeSecondaryMarketSaleFee",
231
+ "inputs": [
232
+ {
233
+ "name": "saleAmount",
234
+ "type": "uint256",
235
+ "internalType": "uint256"
236
+ }
237
+ ],
238
+ "outputs": [
239
+ {
240
+ "name": "fee",
241
+ "type": "uint256",
242
+ "internalType": "uint256"
243
+ }
244
+ ],
245
+ "stateMutability": "view"
246
+ },
247
+ {
248
+ "type": "function",
249
+ "name": "computeSolverTip",
250
+ "inputs": [
251
+ {
252
+ "name": "fillAmount",
253
+ "type": "uint256",
254
+ "internalType": "uint256"
255
+ },
256
+ {
257
+ "name": "solverTipBps",
258
+ "type": "uint256",
259
+ "internalType": "uint256"
260
+ }
261
+ ],
262
+ "outputs": [
263
+ {
264
+ "name": "tipAmount",
265
+ "type": "uint256",
266
+ "internalType": "uint256"
267
+ }
268
+ ],
269
+ "stateMutability": "view"
270
+ },
271
+ {
272
+ "type": "function",
273
+ "name": "computeSolverTipProtocolShare",
274
+ "inputs": [
275
+ {
276
+ "name": "solverTipAmount",
277
+ "type": "uint256",
278
+ "internalType": "uint256"
279
+ }
280
+ ],
281
+ "outputs": [
282
+ {
283
+ "name": "protocolShare",
284
+ "type": "uint256",
285
+ "internalType": "uint256"
286
+ }
287
+ ],
288
+ "stateMutability": "view"
289
+ },
290
+ {
291
+ "type": "function",
292
+ "name": "earlyRepaymentProtocolFeeBps",
293
+ "inputs": [],
294
+ "outputs": [
295
+ {
296
+ "name": "",
297
+ "type": "uint256",
298
+ "internalType": "uint256"
299
+ }
300
+ ],
301
+ "stateMutability": "view"
302
+ },
303
+ {
304
+ "type": "function",
305
+ "name": "feeRecipient",
306
+ "inputs": [],
307
+ "outputs": [
308
+ {
309
+ "name": "",
310
+ "type": "address",
311
+ "internalType": "address"
312
+ }
313
+ ],
314
+ "stateMutability": "view"
315
+ },
316
+ {
317
+ "type": "function",
318
+ "name": "governor",
319
+ "inputs": [],
320
+ "outputs": [
321
+ {
322
+ "name": "",
323
+ "type": "address",
324
+ "internalType": "address"
325
+ }
326
+ ],
327
+ "stateMutability": "view"
328
+ },
329
+ {
330
+ "type": "function",
331
+ "name": "interestFeeBps",
332
+ "inputs": [],
333
+ "outputs": [
334
+ {
335
+ "name": "",
336
+ "type": "uint256",
337
+ "internalType": "uint256"
338
+ }
339
+ ],
340
+ "stateMutability": "view"
341
+ },
342
+ {
343
+ "type": "function",
344
+ "name": "maxSolverTipBps",
345
+ "inputs": [],
346
+ "outputs": [
347
+ {
348
+ "name": "",
349
+ "type": "uint256",
350
+ "internalType": "uint256"
351
+ }
352
+ ],
353
+ "stateMutability": "view"
354
+ },
355
+ {
356
+ "type": "function",
357
+ "name": "originationFeeBps",
358
+ "inputs": [],
359
+ "outputs": [
360
+ {
361
+ "name": "",
362
+ "type": "uint256",
363
+ "internalType": "uint256"
364
+ }
365
+ ],
366
+ "stateMutability": "view"
367
+ },
368
+ {
369
+ "type": "function",
370
+ "name": "pendingGovernor",
371
+ "inputs": [],
372
+ "outputs": [
373
+ {
374
+ "name": "",
375
+ "type": "address",
376
+ "internalType": "address"
377
+ }
378
+ ],
379
+ "stateMutability": "view"
380
+ },
381
+ {
382
+ "type": "function",
383
+ "name": "refinancingFeeBps",
384
+ "inputs": [],
385
+ "outputs": [
386
+ {
387
+ "name": "",
388
+ "type": "uint256",
389
+ "internalType": "uint256"
390
+ }
391
+ ],
392
+ "stateMutability": "view"
393
+ },
394
+ {
395
+ "type": "function",
396
+ "name": "secondaryMarketSaleFeeBps",
397
+ "inputs": [],
398
+ "outputs": [
399
+ {
400
+ "name": "",
401
+ "type": "uint256",
402
+ "internalType": "uint256"
403
+ }
404
+ ],
405
+ "stateMutability": "view"
406
+ },
407
+ {
408
+ "type": "function",
409
+ "name": "setAutoRefinanceKeeperSlice",
410
+ "inputs": [
411
+ {
412
+ "name": "bps",
413
+ "type": "uint256",
414
+ "internalType": "uint256"
415
+ }
416
+ ],
417
+ "outputs": [],
418
+ "stateMutability": "nonpayable"
419
+ },
420
+ {
421
+ "type": "function",
422
+ "name": "setEarlyRepaymentProtocolFee",
423
+ "inputs": [
424
+ {
425
+ "name": "bps",
426
+ "type": "uint256",
427
+ "internalType": "uint256"
428
+ }
429
+ ],
430
+ "outputs": [],
431
+ "stateMutability": "nonpayable"
432
+ },
433
+ {
434
+ "type": "function",
435
+ "name": "setFeeRecipient",
436
+ "inputs": [
437
+ {
438
+ "name": "recipient",
439
+ "type": "address",
440
+ "internalType": "address"
441
+ }
442
+ ],
443
+ "outputs": [],
444
+ "stateMutability": "nonpayable"
445
+ },
446
+ {
447
+ "type": "function",
448
+ "name": "setInterestFee",
449
+ "inputs": [
450
+ {
451
+ "name": "bps",
452
+ "type": "uint256",
453
+ "internalType": "uint256"
454
+ }
455
+ ],
456
+ "outputs": [],
457
+ "stateMutability": "nonpayable"
458
+ },
459
+ {
460
+ "type": "function",
461
+ "name": "setMaxSolverTipBps",
462
+ "inputs": [
463
+ {
464
+ "name": "bps",
465
+ "type": "uint256",
466
+ "internalType": "uint256"
467
+ }
468
+ ],
469
+ "outputs": [],
470
+ "stateMutability": "nonpayable"
471
+ },
472
+ {
473
+ "type": "function",
474
+ "name": "setOriginationFee",
475
+ "inputs": [
476
+ {
477
+ "name": "bps",
478
+ "type": "uint256",
479
+ "internalType": "uint256"
480
+ }
481
+ ],
482
+ "outputs": [],
483
+ "stateMutability": "nonpayable"
484
+ },
485
+ {
486
+ "type": "function",
487
+ "name": "setRefinancingFee",
488
+ "inputs": [
489
+ {
490
+ "name": "bps",
491
+ "type": "uint256",
492
+ "internalType": "uint256"
493
+ }
494
+ ],
495
+ "outputs": [],
496
+ "stateMutability": "nonpayable"
497
+ },
498
+ {
499
+ "type": "function",
500
+ "name": "setSecondaryMarketSaleFee",
501
+ "inputs": [
502
+ {
503
+ "name": "bps",
504
+ "type": "uint256",
505
+ "internalType": "uint256"
506
+ }
507
+ ],
508
+ "outputs": [],
509
+ "stateMutability": "nonpayable"
510
+ },
511
+ {
512
+ "type": "function",
513
+ "name": "setSolverTipProtocolShare",
514
+ "inputs": [
515
+ {
516
+ "name": "bps",
517
+ "type": "uint256",
518
+ "internalType": "uint256"
519
+ }
520
+ ],
521
+ "outputs": [],
522
+ "stateMutability": "nonpayable"
523
+ },
524
+ {
525
+ "type": "function",
526
+ "name": "solverTipProtocolShareBps",
527
+ "inputs": [],
528
+ "outputs": [
529
+ {
530
+ "name": "",
531
+ "type": "uint256",
532
+ "internalType": "uint256"
533
+ }
534
+ ],
535
+ "stateMutability": "view"
536
+ },
537
+ {
538
+ "type": "function",
539
+ "name": "transferGovernance",
540
+ "inputs": [
541
+ {
542
+ "name": "newGovernor",
543
+ "type": "address",
544
+ "internalType": "address"
545
+ }
546
+ ],
547
+ "outputs": [],
548
+ "stateMutability": "nonpayable"
549
+ },
550
+ {
551
+ "type": "event",
552
+ "name": "FeeRecipientUpdated",
553
+ "inputs": [
554
+ {
555
+ "name": "oldRecipient",
556
+ "type": "address",
557
+ "indexed": true,
558
+ "internalType": "address"
559
+ },
560
+ {
561
+ "name": "newRecipient",
562
+ "type": "address",
563
+ "indexed": true,
564
+ "internalType": "address"
565
+ }
566
+ ],
567
+ "anonymous": false
568
+ },
569
+ {
570
+ "type": "event",
571
+ "name": "FeeUpdated",
572
+ "inputs": [
573
+ {
574
+ "name": "feeType",
575
+ "type": "string",
576
+ "indexed": false,
577
+ "internalType": "string"
578
+ },
579
+ {
580
+ "name": "oldBps",
581
+ "type": "uint256",
582
+ "indexed": false,
583
+ "internalType": "uint256"
584
+ },
585
+ {
586
+ "name": "newBps",
587
+ "type": "uint256",
588
+ "indexed": false,
589
+ "internalType": "uint256"
590
+ }
591
+ ],
592
+ "anonymous": false
593
+ },
594
+ {
595
+ "type": "event",
596
+ "name": "GovernorTransferInitiated",
597
+ "inputs": [
598
+ {
599
+ "name": "currentGovernor",
600
+ "type": "address",
601
+ "indexed": true,
602
+ "internalType": "address"
603
+ },
604
+ {
605
+ "name": "pendingGovernor_",
606
+ "type": "address",
607
+ "indexed": true,
608
+ "internalType": "address"
609
+ }
610
+ ],
611
+ "anonymous": false
612
+ },
613
+ {
614
+ "type": "event",
615
+ "name": "GovernorUpdated",
616
+ "inputs": [
617
+ {
618
+ "name": "oldGovernor",
619
+ "type": "address",
620
+ "indexed": true,
621
+ "internalType": "address"
622
+ },
623
+ {
624
+ "name": "newGovernor",
625
+ "type": "address",
626
+ "indexed": true,
627
+ "internalType": "address"
628
+ }
629
+ ],
630
+ "anonymous": false
631
+ },
632
+ {
633
+ "type": "error",
634
+ "name": "CallerIsNotGovernor",
635
+ "inputs": []
636
+ },
637
+ {
638
+ "type": "error",
639
+ "name": "CallerIsNotPendingGovernor",
640
+ "inputs": []
641
+ },
642
+ {
643
+ "type": "error",
644
+ "name": "FeeExceedsMaximum",
645
+ "inputs": [
646
+ {
647
+ "name": "provided",
648
+ "type": "uint256",
649
+ "internalType": "uint256"
650
+ },
651
+ {
652
+ "name": "maximum",
653
+ "type": "uint256",
654
+ "internalType": "uint256"
655
+ }
656
+ ]
657
+ },
658
+ {
659
+ "type": "error",
660
+ "name": "InvalidFeeRecipient",
661
+ "inputs": []
662
+ },
663
+ {
664
+ "type": "error",
665
+ "name": "ZeroAddress",
666
+ "inputs": []
667
+ }
668
+ ]