@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,298 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "balanceOf",
5
+ "inputs": [
6
+ {
7
+ "name": "owner",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ },
11
+ {
12
+ "name": "asset",
13
+ "type": "address",
14
+ "internalType": "address"
15
+ }
16
+ ],
17
+ "outputs": [
18
+ {
19
+ "name": "assets",
20
+ "type": "uint256",
21
+ "internalType": "uint256"
22
+ }
23
+ ],
24
+ "stateMutability": "view"
25
+ },
26
+ {
27
+ "type": "function",
28
+ "name": "convertToAssets",
29
+ "inputs": [
30
+ {
31
+ "name": "shares",
32
+ "type": "uint256",
33
+ "internalType": "uint256"
34
+ },
35
+ {
36
+ "name": "asset",
37
+ "type": "address",
38
+ "internalType": "address"
39
+ }
40
+ ],
41
+ "outputs": [
42
+ {
43
+ "name": "assets",
44
+ "type": "uint256",
45
+ "internalType": "uint256"
46
+ }
47
+ ],
48
+ "stateMutability": "view"
49
+ },
50
+ {
51
+ "type": "function",
52
+ "name": "convertToShares",
53
+ "inputs": [
54
+ {
55
+ "name": "assets",
56
+ "type": "uint256",
57
+ "internalType": "uint256"
58
+ },
59
+ {
60
+ "name": "asset",
61
+ "type": "address",
62
+ "internalType": "address"
63
+ }
64
+ ],
65
+ "outputs": [
66
+ {
67
+ "name": "shares",
68
+ "type": "uint256",
69
+ "internalType": "uint256"
70
+ }
71
+ ],
72
+ "stateMutability": "view"
73
+ },
74
+ {
75
+ "type": "function",
76
+ "name": "currentApy",
77
+ "inputs": [
78
+ {
79
+ "name": "asset",
80
+ "type": "address",
81
+ "internalType": "address"
82
+ }
83
+ ],
84
+ "outputs": [
85
+ {
86
+ "name": "bps",
87
+ "type": "uint256",
88
+ "internalType": "uint256"
89
+ }
90
+ ],
91
+ "stateMutability": "view"
92
+ },
93
+ {
94
+ "type": "function",
95
+ "name": "deposit",
96
+ "inputs": [
97
+ {
98
+ "name": "owner",
99
+ "type": "address",
100
+ "internalType": "address"
101
+ },
102
+ {
103
+ "name": "asset",
104
+ "type": "address",
105
+ "internalType": "address"
106
+ },
107
+ {
108
+ "name": "amount",
109
+ "type": "uint256",
110
+ "internalType": "uint256"
111
+ }
112
+ ],
113
+ "outputs": [
114
+ {
115
+ "name": "shares",
116
+ "type": "uint256",
117
+ "internalType": "uint256"
118
+ }
119
+ ],
120
+ "stateMutability": "nonpayable"
121
+ },
122
+ {
123
+ "type": "function",
124
+ "name": "name",
125
+ "inputs": [],
126
+ "outputs": [
127
+ {
128
+ "name": "",
129
+ "type": "string",
130
+ "internalType": "string"
131
+ }
132
+ ],
133
+ "stateMutability": "view"
134
+ },
135
+ {
136
+ "type": "function",
137
+ "name": "sharesOf",
138
+ "inputs": [
139
+ {
140
+ "name": "owner",
141
+ "type": "address",
142
+ "internalType": "address"
143
+ },
144
+ {
145
+ "name": "asset",
146
+ "type": "address",
147
+ "internalType": "address"
148
+ }
149
+ ],
150
+ "outputs": [
151
+ {
152
+ "name": "shares",
153
+ "type": "uint256",
154
+ "internalType": "uint256"
155
+ }
156
+ ],
157
+ "stateMutability": "view"
158
+ },
159
+ {
160
+ "type": "function",
161
+ "name": "totalAssets",
162
+ "inputs": [
163
+ {
164
+ "name": "asset",
165
+ "type": "address",
166
+ "internalType": "address"
167
+ }
168
+ ],
169
+ "outputs": [
170
+ {
171
+ "name": "",
172
+ "type": "uint256",
173
+ "internalType": "uint256"
174
+ }
175
+ ],
176
+ "stateMutability": "view"
177
+ },
178
+ {
179
+ "type": "function",
180
+ "name": "withdraw",
181
+ "inputs": [
182
+ {
183
+ "name": "owner",
184
+ "type": "address",
185
+ "internalType": "address"
186
+ },
187
+ {
188
+ "name": "asset",
189
+ "type": "address",
190
+ "internalType": "address"
191
+ },
192
+ {
193
+ "name": "shares",
194
+ "type": "uint256",
195
+ "internalType": "uint256"
196
+ }
197
+ ],
198
+ "outputs": [
199
+ {
200
+ "name": "assets",
201
+ "type": "uint256",
202
+ "internalType": "uint256"
203
+ }
204
+ ],
205
+ "stateMutability": "nonpayable"
206
+ },
207
+ {
208
+ "type": "function",
209
+ "name": "withdrawAssets",
210
+ "inputs": [
211
+ {
212
+ "name": "owner",
213
+ "type": "address",
214
+ "internalType": "address"
215
+ },
216
+ {
217
+ "name": "asset",
218
+ "type": "address",
219
+ "internalType": "address"
220
+ },
221
+ {
222
+ "name": "assetAmount",
223
+ "type": "uint256",
224
+ "internalType": "uint256"
225
+ }
226
+ ],
227
+ "outputs": [
228
+ {
229
+ "name": "shares",
230
+ "type": "uint256",
231
+ "internalType": "uint256"
232
+ }
233
+ ],
234
+ "stateMutability": "nonpayable"
235
+ },
236
+ {
237
+ "type": "event",
238
+ "name": "Deposited",
239
+ "inputs": [
240
+ {
241
+ "name": "owner",
242
+ "type": "address",
243
+ "indexed": true,
244
+ "internalType": "address"
245
+ },
246
+ {
247
+ "name": "asset",
248
+ "type": "address",
249
+ "indexed": true,
250
+ "internalType": "address"
251
+ },
252
+ {
253
+ "name": "amount",
254
+ "type": "uint256",
255
+ "indexed": false,
256
+ "internalType": "uint256"
257
+ },
258
+ {
259
+ "name": "shares",
260
+ "type": "uint256",
261
+ "indexed": false,
262
+ "internalType": "uint256"
263
+ }
264
+ ],
265
+ "anonymous": false
266
+ },
267
+ {
268
+ "type": "event",
269
+ "name": "Withdrawn",
270
+ "inputs": [
271
+ {
272
+ "name": "owner",
273
+ "type": "address",
274
+ "indexed": true,
275
+ "internalType": "address"
276
+ },
277
+ {
278
+ "name": "asset",
279
+ "type": "address",
280
+ "indexed": true,
281
+ "internalType": "address"
282
+ },
283
+ {
284
+ "name": "shares",
285
+ "type": "uint256",
286
+ "indexed": false,
287
+ "internalType": "uint256"
288
+ },
289
+ {
290
+ "name": "assets",
291
+ "type": "uint256",
292
+ "indexed": false,
293
+ "internalType": "uint256"
294
+ }
295
+ ],
296
+ "anonymous": false
297
+ }
298
+ ]
@@ -0,0 +1,295 @@
1
+ [
2
+ {
3
+ "type": "constructor",
4
+ "inputs": [
5
+ {
6
+ "name": "governor_",
7
+ "type": "address",
8
+ "internalType": "address"
9
+ }
10
+ ],
11
+ "stateMutability": "nonpayable"
12
+ },
13
+ {
14
+ "type": "function",
15
+ "name": "acceptGovernance",
16
+ "inputs": [],
17
+ "outputs": [],
18
+ "stateMutability": "nonpayable"
19
+ },
20
+ {
21
+ "type": "function",
22
+ "name": "approvedSources",
23
+ "inputs": [
24
+ {
25
+ "name": "",
26
+ "type": "address",
27
+ "internalType": "address"
28
+ }
29
+ ],
30
+ "outputs": [
31
+ {
32
+ "name": "",
33
+ "type": "bool",
34
+ "internalType": "bool"
35
+ }
36
+ ],
37
+ "stateMutability": "view"
38
+ },
39
+ {
40
+ "type": "function",
41
+ "name": "getAllBalances",
42
+ "inputs": [
43
+ {
44
+ "name": "owner",
45
+ "type": "address",
46
+ "internalType": "address"
47
+ },
48
+ {
49
+ "name": "asset",
50
+ "type": "address",
51
+ "internalType": "address"
52
+ }
53
+ ],
54
+ "outputs": [
55
+ {
56
+ "name": "sources",
57
+ "type": "address[]",
58
+ "internalType": "address[]"
59
+ },
60
+ {
61
+ "name": "balances",
62
+ "type": "uint256[]",
63
+ "internalType": "uint256[]"
64
+ }
65
+ ],
66
+ "stateMutability": "view"
67
+ },
68
+ {
69
+ "type": "function",
70
+ "name": "getApprovedSources",
71
+ "inputs": [],
72
+ "outputs": [
73
+ {
74
+ "name": "",
75
+ "type": "address[]",
76
+ "internalType": "address[]"
77
+ }
78
+ ],
79
+ "stateMutability": "view"
80
+ },
81
+ {
82
+ "type": "function",
83
+ "name": "getBalance",
84
+ "inputs": [
85
+ {
86
+ "name": "owner",
87
+ "type": "address",
88
+ "internalType": "address"
89
+ },
90
+ {
91
+ "name": "asset",
92
+ "type": "address",
93
+ "internalType": "address"
94
+ },
95
+ {
96
+ "name": "source",
97
+ "type": "address",
98
+ "internalType": "address"
99
+ }
100
+ ],
101
+ "outputs": [
102
+ {
103
+ "name": "",
104
+ "type": "uint256",
105
+ "internalType": "uint256"
106
+ }
107
+ ],
108
+ "stateMutability": "view"
109
+ },
110
+ {
111
+ "type": "function",
112
+ "name": "governor",
113
+ "inputs": [],
114
+ "outputs": [
115
+ {
116
+ "name": "",
117
+ "type": "address",
118
+ "internalType": "address"
119
+ }
120
+ ],
121
+ "stateMutability": "view"
122
+ },
123
+ {
124
+ "type": "function",
125
+ "name": "pendingGovernor",
126
+ "inputs": [],
127
+ "outputs": [
128
+ {
129
+ "name": "",
130
+ "type": "address",
131
+ "internalType": "address"
132
+ }
133
+ ],
134
+ "stateMutability": "view"
135
+ },
136
+ {
137
+ "type": "function",
138
+ "name": "registerSource",
139
+ "inputs": [
140
+ {
141
+ "name": "source",
142
+ "type": "address",
143
+ "internalType": "address"
144
+ }
145
+ ],
146
+ "outputs": [],
147
+ "stateMutability": "nonpayable"
148
+ },
149
+ {
150
+ "type": "function",
151
+ "name": "removeSource",
152
+ "inputs": [
153
+ {
154
+ "name": "source",
155
+ "type": "address",
156
+ "internalType": "address"
157
+ }
158
+ ],
159
+ "outputs": [],
160
+ "stateMutability": "nonpayable"
161
+ },
162
+ {
163
+ "type": "function",
164
+ "name": "requireApproved",
165
+ "inputs": [
166
+ {
167
+ "name": "source",
168
+ "type": "address",
169
+ "internalType": "address"
170
+ }
171
+ ],
172
+ "outputs": [],
173
+ "stateMutability": "view"
174
+ },
175
+ {
176
+ "type": "function",
177
+ "name": "transferGovernance",
178
+ "inputs": [
179
+ {
180
+ "name": "newGovernor",
181
+ "type": "address",
182
+ "internalType": "address"
183
+ }
184
+ ],
185
+ "outputs": [],
186
+ "stateMutability": "nonpayable"
187
+ },
188
+ {
189
+ "type": "event",
190
+ "name": "GovernorTransferInitiated",
191
+ "inputs": [
192
+ {
193
+ "name": "currentGovernor",
194
+ "type": "address",
195
+ "indexed": true,
196
+ "internalType": "address"
197
+ },
198
+ {
199
+ "name": "pendingGovernor_",
200
+ "type": "address",
201
+ "indexed": true,
202
+ "internalType": "address"
203
+ }
204
+ ],
205
+ "anonymous": false
206
+ },
207
+ {
208
+ "type": "event",
209
+ "name": "GovernorUpdated",
210
+ "inputs": [
211
+ {
212
+ "name": "oldGovernor",
213
+ "type": "address",
214
+ "indexed": true,
215
+ "internalType": "address"
216
+ },
217
+ {
218
+ "name": "newGovernor",
219
+ "type": "address",
220
+ "indexed": true,
221
+ "internalType": "address"
222
+ }
223
+ ],
224
+ "anonymous": false
225
+ },
226
+ {
227
+ "type": "event",
228
+ "name": "SourceRegistered",
229
+ "inputs": [
230
+ {
231
+ "name": "source",
232
+ "type": "address",
233
+ "indexed": true,
234
+ "internalType": "address"
235
+ },
236
+ {
237
+ "name": "name",
238
+ "type": "string",
239
+ "indexed": false,
240
+ "internalType": "string"
241
+ }
242
+ ],
243
+ "anonymous": false
244
+ },
245
+ {
246
+ "type": "event",
247
+ "name": "SourceRemoved",
248
+ "inputs": [
249
+ {
250
+ "name": "source",
251
+ "type": "address",
252
+ "indexed": true,
253
+ "internalType": "address"
254
+ }
255
+ ],
256
+ "anonymous": false
257
+ },
258
+ {
259
+ "type": "error",
260
+ "name": "CallerIsNotGovernor",
261
+ "inputs": []
262
+ },
263
+ {
264
+ "type": "error",
265
+ "name": "CallerIsNotPendingGovernor",
266
+ "inputs": []
267
+ },
268
+ {
269
+ "type": "error",
270
+ "name": "YieldSourceAlreadyRegistered",
271
+ "inputs": [
272
+ {
273
+ "name": "source",
274
+ "type": "address",
275
+ "internalType": "address"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "type": "error",
281
+ "name": "YieldSourceNotApproved",
282
+ "inputs": [
283
+ {
284
+ "name": "source",
285
+ "type": "address",
286
+ "internalType": "address"
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "type": "error",
292
+ "name": "ZeroAddress",
293
+ "inputs": []
294
+ }
295
+ ]
package/dist/abis.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import type { InterfaceAbi } from 'ethers';
2
+ export declare const protocolErrorsAbi: InterfaceAbi;
3
+ export declare const mainAbi: InterfaceAbi;
4
+ export declare const matchingEngineAbi: InterfaceAbi;
5
+ export declare const intentRegistryAbi: InterfaceAbi;
6
+ export declare const intentRegistryViewsAbi: InterfaceAbi;
7
+ export declare const loanManagerAbi: InterfaceAbi;
8
+ export declare const loanPositionTokenAbi: InterfaceAbi;
9
+ export declare const loanHealthViewerAbi: InterfaceAbi;
10
+ export declare const protocolViewerAbi: InterfaceAbi;
11
+ export declare const loanMarketCapsAbi: InterfaceAbi;
12
+ export declare const yieldSourceAbi: InterfaceAbi;
13
+ export declare const yieldSourceRegistryAbi: InterfaceAbi;
14
+ export declare const feeManagerAbi: InterfaceAbi;
15
+ export declare const secondaryMarketAbi: InterfaceAbi;
16
+ export declare const loanAssetRegistryAbi: InterfaceAbi;
17
+ export declare const collateralTokenRegistryAbi: InterfaceAbi;
18
+ export declare const strategyRegistryAbi: InterfaceAbi;
19
+ export declare const priceOracleAbi: InterfaceAbi;
20
+ export declare const termCurveOracleAbi: InterfaceAbi;
21
+ //# sourceMappingURL=abis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../src/abis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAsB1C,eAAO,MAAM,iBAAiB,EAAiB,YAAY,CAAA;AAC3D,eAAO,MAAM,OAAO,EAAe,YAAY,CAAA;AAC/C,eAAO,MAAM,iBAAiB,EAAyB,YAAY,CAAA;AACnE,eAAO,MAAM,iBAAiB,EAAyB,YAAY,CAAA;AACnE,eAAO,MAAM,sBAAsB,EAA8B,YAAY,CAAA;AAC7E,eAAO,MAAM,cAAc,EAAsB,YAAY,CAAA;AAC7D,eAAO,MAAM,oBAAoB,EAA4B,YAAY,CAAA;AACzE,eAAO,MAAM,mBAAmB,EAA2B,YAAY,CAAA;AACvE,eAAO,MAAM,iBAAiB,EAAyB,YAAY,CAAA;AACnE,eAAO,MAAM,iBAAiB,EAAyB,YAAY,CAAA;AACnE,eAAO,MAAM,cAAc,EAAsB,YAAY,CAAA;AAC7D,eAAO,MAAM,sBAAsB,EAA8B,YAAY,CAAA;AAC7E,eAAO,MAAM,aAAa,EAAqB,YAAY,CAAA;AAC3D,eAAO,MAAM,kBAAkB,EAA0B,YAAY,CAAA;AACrE,eAAO,MAAM,oBAAoB,EAA4B,YAAY,CAAA;AACzE,eAAO,MAAM,0BAA0B,EAAkC,YAAY,CAAA;AACrF,eAAO,MAAM,mBAAmB,EAA2B,YAAY,CAAA;AACvE,eAAO,MAAM,cAAc,EAAsB,YAAY,CAAA;AAC7D,eAAO,MAAM,kBAAkB,EAA0B,YAAY,CAAA"}
package/dist/abis.js ADDED
@@ -0,0 +1,39 @@
1
+ import collateralTokenRegistryJson from './abis/json/collateralTokenRegistry.json' with { type: 'json' };
2
+ import errorsJson from './abis/json/errors.json' with { type: 'json' };
3
+ import feeManagerJson from './abis/json/feeManager.json' with { type: 'json' };
4
+ import intentRegistryJson from './abis/json/intentRegistry.json' with { type: 'json' };
5
+ import intentRegistryViewsJson from './abis/json/intentRegistryViews.json' with { type: 'json' };
6
+ import loanAssetRegistryJson from './abis/json/loanAssetRegistry.json' with { type: 'json' };
7
+ import loanHealthViewerJson from './abis/json/loanHealthViewer.json' with { type: 'json' };
8
+ import protocolViewerJson from './abis/json/protocolViewer.json' with { type: 'json' };
9
+ import loanManagerJson from './abis/json/loanManager.json' with { type: 'json' };
10
+ import loanMarketCapsJson from './abis/json/loanMarketCaps.json' with { type: 'json' };
11
+ import loanPositionTokenJson from './abis/json/loanPositionToken.json' with { type: 'json' };
12
+ import mainJson from './abis/json/main.json' with { type: 'json' };
13
+ import matchingEngineJson from './abis/json/matchingEngine.json' with { type: 'json' };
14
+ import priceOracleJson from './abis/json/priceOracle.json' with { type: 'json' };
15
+ import secondaryMarketJson from './abis/json/secondaryMarket.json' with { type: 'json' };
16
+ import strategyRegistryJson from './abis/json/strategyRegistry.json' with { type: 'json' };
17
+ import termCurveOracleJson from './abis/json/termCurveOracle.json' with { type: 'json' };
18
+ import yieldSourceJson from './abis/json/yieldSource.json' with { type: 'json' };
19
+ import yieldSourceRegistryJson from './abis/json/yieldSourceRegistry.json' with { type: 'json' };
20
+ export const protocolErrorsAbi = errorsJson;
21
+ export const mainAbi = mainJson;
22
+ export const matchingEngineAbi = matchingEngineJson;
23
+ export const intentRegistryAbi = intentRegistryJson;
24
+ export const intentRegistryViewsAbi = intentRegistryViewsJson;
25
+ export const loanManagerAbi = loanManagerJson;
26
+ export const loanPositionTokenAbi = loanPositionTokenJson;
27
+ export const loanHealthViewerAbi = loanHealthViewerJson;
28
+ export const protocolViewerAbi = protocolViewerJson;
29
+ export const loanMarketCapsAbi = loanMarketCapsJson;
30
+ export const yieldSourceAbi = yieldSourceJson;
31
+ export const yieldSourceRegistryAbi = yieldSourceRegistryJson;
32
+ export const feeManagerAbi = feeManagerJson;
33
+ export const secondaryMarketAbi = secondaryMarketJson;
34
+ export const loanAssetRegistryAbi = loanAssetRegistryJson;
35
+ export const collateralTokenRegistryAbi = collateralTokenRegistryJson;
36
+ export const strategyRegistryAbi = strategyRegistryJson;
37
+ export const priceOracleAbi = priceOracleJson;
38
+ export const termCurveOracleAbi = termCurveOracleJson;
39
+ //# sourceMappingURL=abis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abis.js","sourceRoot":"","sources":["../src/abis.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,14 @@
1
+ import type { Provider } from 'ethers';
2
+ export type AssertBorrowerSubmitCollateralParams = {
3
+ intentRegistry: string;
4
+ loanManager: string;
5
+ owner: string;
6
+ collateral: string;
7
+ maxCollateralAmount: bigint;
8
+ };
9
+ /**
10
+ * Client-side guard mirroring `IntentValidation.validateBorrowerParams` collateral booking:
11
+ * `min(balance, allowance) >= committedCollateral(owner, collateral) + maxCollateralAmount`.
12
+ */
13
+ export declare function assertBorrowerSubmitCollateral(provider: Provider, p: AssertBorrowerSubmitCollateralParams): Promise<void>;
14
+ //# sourceMappingURL=borrowerSubmitPreflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"borrowerSubmitPreflight.d.ts","sourceRoot":"","sources":["../src/borrowerSubmitPreflight.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAQtC,MAAM,MAAM,oCAAoC,GAAG;IACjD,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,QAAQ,EAAE,QAAQ,EAClB,CAAC,EAAE,oCAAoC,GACtC,OAAO,CAAC,IAAI,CAAC,CAmBf"}