@compass-labs/api-sdk 0.0.26 → 0.0.28
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/bin/mcp-server.js +490 -32
- package/bin/mcp-server.js.map +24 -13
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/index.d.ts +11 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +11 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/morphoborrowparams.d.ts +71 -0
- package/dist/commonjs/models/components/morphoborrowparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphoborrowparams.js +109 -0
- package/dist/commonjs/models/components/morphoborrowparams.js.map +1 -0
- package/dist/commonjs/models/components/morphodepositparams.d.ts +66 -0
- package/dist/commonjs/models/components/morphodepositparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphodepositparams.js +105 -0
- package/dist/commonjs/models/components/morphodepositparams.js.map +1 -0
- package/dist/commonjs/models/components/morphorepayparams.d.ts +47 -0
- package/dist/commonjs/models/components/morphorepayparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphorepayparams.js +89 -0
- package/dist/commonjs/models/components/morphorepayparams.js.map +1 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts +61 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.js +103 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.js.map +1 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts +71 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.js +112 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.js.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts +71 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.js +109 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.js.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawparams.d.ts +42 -0
- package/dist/commonjs/models/components/morphowithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawparams.js +82 -0
- package/dist/commonjs/models/components/morphowithdrawparams.js.map +1 -0
- package/dist/commonjs/models/components/multicallaction.d.ts +15 -4
- package/dist/commonjs/models/components/multicallaction.d.ts.map +1 -1
- package/dist/commonjs/models/components/multicallaction.js +55 -0
- package/dist/commonjs/models/components/multicallaction.js.map +1 -1
- package/dist/commonjs/models/components/multicallactiontype.d.ts +33 -0
- package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
- package/dist/commonjs/models/components/multicallactiontype.js +11 -0
- package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
- package/dist/commonjs/models/components/skybuyparams.d.ts +93 -0
- package/dist/commonjs/models/components/skybuyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skybuyparams.js +125 -0
- package/dist/commonjs/models/components/skybuyparams.js.map +1 -0
- package/dist/commonjs/models/components/skybuyrequest.d.ts +8 -8
- package/dist/commonjs/models/components/skybuyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/skybuyrequest.js +13 -14
- package/dist/commonjs/models/components/skybuyrequest.js.map +1 -1
- package/dist/commonjs/models/components/skydepositparams.d.ts +61 -0
- package/dist/commonjs/models/components/skydepositparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skydepositparams.js +94 -0
- package/dist/commonjs/models/components/skydepositparams.js.map +1 -0
- package/dist/commonjs/models/components/skysellparams.d.ts +93 -0
- package/dist/commonjs/models/components/skysellparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skysellparams.js +125 -0
- package/dist/commonjs/models/components/skysellparams.js.map +1 -0
- package/dist/commonjs/models/components/skysellrequest.d.ts +8 -8
- package/dist/commonjs/models/components/skysellrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/skysellrequest.js +13 -14
- package/dist/commonjs/models/components/skysellrequest.js.map +1 -1
- package/dist/commonjs/models/components/skywithdrawparams.d.ts +37 -0
- package/dist/commonjs/models/components/skywithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skywithdrawparams.js +71 -0
- package/dist/commonjs/models/components/skywithdrawparams.js.map +1 -0
- package/dist/commonjs/models/operations/morphomarkets.d.ts +4 -4
- package/dist/commonjs/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphomarkets.js +4 -4
- package/dist/commonjs/models/operations/morphomarkets.js.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.d.ts +2 -2
- package/dist/commonjs/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.js +2 -2
- package/dist/commonjs/models/operations/morphovaults.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/index.d.ts +11 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +11 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/morphoborrowparams.d.ts +71 -0
- package/dist/esm/models/components/morphoborrowparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphoborrowparams.js +69 -0
- package/dist/esm/models/components/morphoborrowparams.js.map +1 -0
- package/dist/esm/models/components/morphodepositparams.d.ts +66 -0
- package/dist/esm/models/components/morphodepositparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphodepositparams.js +65 -0
- package/dist/esm/models/components/morphodepositparams.js.map +1 -0
- package/dist/esm/models/components/morphorepayparams.d.ts +47 -0
- package/dist/esm/models/components/morphorepayparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphorepayparams.js +51 -0
- package/dist/esm/models/components/morphorepayparams.js.map +1 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts +61 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.js +63 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.js.map +1 -0
- package/dist/esm/models/components/morphosupplycollateralparams.d.ts +71 -0
- package/dist/esm/models/components/morphosupplycollateralparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphosupplycollateralparams.js +72 -0
- package/dist/esm/models/components/morphosupplycollateralparams.js.map +1 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts +71 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.js +69 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.js.map +1 -0
- package/dist/esm/models/components/morphowithdrawparams.d.ts +42 -0
- package/dist/esm/models/components/morphowithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphowithdrawparams.js +44 -0
- package/dist/esm/models/components/morphowithdrawparams.js.map +1 -0
- package/dist/esm/models/components/multicallaction.d.ts +15 -4
- package/dist/esm/models/components/multicallaction.d.ts.map +1 -1
- package/dist/esm/models/components/multicallaction.js +55 -0
- package/dist/esm/models/components/multicallaction.js.map +1 -1
- package/dist/esm/models/components/multicallactiontype.d.ts +33 -0
- package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
- package/dist/esm/models/components/multicallactiontype.js +11 -0
- package/dist/esm/models/components/multicallactiontype.js.map +1 -1
- package/dist/esm/models/components/skybuyparams.d.ts +93 -0
- package/dist/esm/models/components/skybuyparams.d.ts.map +1 -0
- package/dist/esm/models/components/skybuyparams.js +85 -0
- package/dist/esm/models/components/skybuyparams.js.map +1 -0
- package/dist/esm/models/components/skybuyrequest.d.ts +8 -8
- package/dist/esm/models/components/skybuyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/skybuyrequest.js +12 -13
- package/dist/esm/models/components/skybuyrequest.js.map +1 -1
- package/dist/esm/models/components/skydepositparams.d.ts +61 -0
- package/dist/esm/models/components/skydepositparams.d.ts.map +1 -0
- package/dist/esm/models/components/skydepositparams.js +54 -0
- package/dist/esm/models/components/skydepositparams.js.map +1 -0
- package/dist/esm/models/components/skysellparams.d.ts +93 -0
- package/dist/esm/models/components/skysellparams.d.ts.map +1 -0
- package/dist/esm/models/components/skysellparams.js +85 -0
- package/dist/esm/models/components/skysellparams.js.map +1 -0
- package/dist/esm/models/components/skysellrequest.d.ts +8 -8
- package/dist/esm/models/components/skysellrequest.d.ts.map +1 -1
- package/dist/esm/models/components/skysellrequest.js +12 -13
- package/dist/esm/models/components/skysellrequest.js.map +1 -1
- package/dist/esm/models/components/skywithdrawparams.d.ts +37 -0
- package/dist/esm/models/components/skywithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/skywithdrawparams.js +33 -0
- package/dist/esm/models/components/skywithdrawparams.js.map +1 -0
- package/dist/esm/models/operations/morphomarkets.d.ts +4 -4
- package/dist/esm/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/esm/models/operations/morphomarkets.js +4 -4
- package/dist/esm/models/operations/morphomarkets.js.map +1 -1
- package/dist/esm/models/operations/morphovaults.d.ts +2 -2
- package/dist/esm/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/esm/models/operations/morphovaults.js +2 -2
- package/dist/esm/models/operations/morphovaults.js.map +1 -1
- package/docs/sdks/aerodromeslipstream/README.md +6 -6
- package/docs/sdks/morpho/README.md +26 -8
- package/docs/sdks/transactionbatching/README.md +18 -12
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/index.ts +11 -0
- package/src/models/components/morphoborrowparams.ts +154 -0
- package/src/models/components/morphodepositparams.ts +145 -0
- package/src/models/components/morphorepayparams.ts +104 -0
- package/src/models/components/morphosetvaultallowanceparams.ts +145 -0
- package/src/models/components/morphosupplycollateralparams.ts +163 -0
- package/src/models/components/morphowithdrawcollateralparams.ts +161 -0
- package/src/models/components/morphowithdrawparams.ts +92 -0
- package/src/models/components/multicallaction.ts +154 -0
- package/src/models/components/multicallactiontype.ts +11 -0
- package/src/models/components/skybuyparams.ts +168 -0
- package/src/models/components/skybuyrequest.ts +16 -14
- package/src/models/components/skydepositparams.ts +129 -0
- package/src/models/components/skysellparams.ts +168 -0
- package/src/models/components/skysellrequest.ts +16 -14
- package/src/models/components/skywithdrawparams.ts +76 -0
- package/src/models/operations/morphomarkets.ts +8 -8
- package/src/models/operations/morphovaults.ts +4 -4
|
@@ -35,7 +35,10 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
async function run() {
|
|
38
|
-
const result = await compassApiSDK.morpho.vaults({
|
|
38
|
+
const result = await compassApiSDK.morpho.vaults({
|
|
39
|
+
chain: "ethereum:mainnet",
|
|
40
|
+
depositToken: "<value>",
|
|
41
|
+
});
|
|
39
42
|
|
|
40
43
|
// Handle the result
|
|
41
44
|
console.log(result);
|
|
@@ -59,7 +62,10 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
59
62
|
});
|
|
60
63
|
|
|
61
64
|
async function run() {
|
|
62
|
-
const res = await morphoVaults(compassApiSDK, {
|
|
65
|
+
const res = await morphoVaults(compassApiSDK, {
|
|
66
|
+
chain: "ethereum:mainnet",
|
|
67
|
+
depositToken: "<value>",
|
|
68
|
+
});
|
|
63
69
|
|
|
64
70
|
if (!res.ok) {
|
|
65
71
|
throw res.error;
|
|
@@ -110,6 +116,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
110
116
|
|
|
111
117
|
async function run() {
|
|
112
118
|
const result = await compassApiSDK.morpho.vaultPosition({
|
|
119
|
+
chain: "ethereum:mainnet",
|
|
113
120
|
userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
114
121
|
vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
115
122
|
});
|
|
@@ -137,6 +144,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
137
144
|
|
|
138
145
|
async function run() {
|
|
139
146
|
const res = await morphoVaultPosition(compassApiSDK, {
|
|
147
|
+
chain: "ethereum:mainnet",
|
|
140
148
|
userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
141
149
|
vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
142
150
|
});
|
|
@@ -191,7 +199,11 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
191
199
|
});
|
|
192
200
|
|
|
193
201
|
async function run() {
|
|
194
|
-
const result = await compassApiSDK.morpho.markets({
|
|
202
|
+
const result = await compassApiSDK.morpho.markets({
|
|
203
|
+
chain: "ethereum:mainnet",
|
|
204
|
+
collateralToken: "<value>",
|
|
205
|
+
loanToken: "<value>",
|
|
206
|
+
});
|
|
195
207
|
|
|
196
208
|
// Handle the result
|
|
197
209
|
console.log(result);
|
|
@@ -215,7 +227,11 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
215
227
|
});
|
|
216
228
|
|
|
217
229
|
async function run() {
|
|
218
|
-
const res = await morphoMarkets(compassApiSDK, {
|
|
230
|
+
const res = await morphoMarkets(compassApiSDK, {
|
|
231
|
+
chain: "ethereum:mainnet",
|
|
232
|
+
collateralToken: "<value>",
|
|
233
|
+
loanToken: "<value>",
|
|
234
|
+
});
|
|
219
235
|
|
|
220
236
|
if (!res.ok) {
|
|
221
237
|
throw res.error;
|
|
@@ -266,6 +282,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
266
282
|
|
|
267
283
|
async function run() {
|
|
268
284
|
const result = await compassApiSDK.morpho.marketPosition({
|
|
285
|
+
chain: "ethereum:mainnet",
|
|
269
286
|
userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
270
287
|
uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
271
288
|
});
|
|
@@ -293,6 +310,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
293
310
|
|
|
294
311
|
async function run() {
|
|
295
312
|
const res = await morphoMarketPosition(compassApiSDK, {
|
|
313
|
+
chain: "ethereum:mainnet",
|
|
296
314
|
userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
297
315
|
uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
298
316
|
});
|
|
@@ -536,7 +554,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
536
554
|
async function run() {
|
|
537
555
|
const result = await compassApiSDK.morpho.withdraw({
|
|
538
556
|
vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
539
|
-
amount: "
|
|
557
|
+
amount: "1.5",
|
|
540
558
|
chain: "ethereum:mainnet",
|
|
541
559
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
542
560
|
});
|
|
@@ -565,7 +583,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
565
583
|
async function run() {
|
|
566
584
|
const res = await morphoWithdraw(compassApiSDK, {
|
|
567
585
|
vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
568
|
-
amount: "
|
|
586
|
+
amount: "1.5",
|
|
569
587
|
chain: "ethereum:mainnet",
|
|
570
588
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
571
589
|
});
|
|
@@ -890,7 +908,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
890
908
|
|
|
891
909
|
async function run() {
|
|
892
910
|
const result = await compassApiSDK.morpho.repay({
|
|
893
|
-
amount: "
|
|
911
|
+
amount: "ALL",
|
|
894
912
|
uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
895
913
|
chain: "ethereum:mainnet",
|
|
896
914
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
@@ -919,7 +937,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
919
937
|
|
|
920
938
|
async function run() {
|
|
921
939
|
const res = await morphoRepay(compassApiSDK, {
|
|
922
|
-
amount: "
|
|
940
|
+
amount: "ALL",
|
|
923
941
|
uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
924
942
|
chain: "ethereum:mainnet",
|
|
925
943
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
@@ -125,11 +125,14 @@ async function run() {
|
|
|
125
125
|
},
|
|
126
126
|
actions: [
|
|
127
127
|
{
|
|
128
|
-
actionType: "
|
|
128
|
+
actionType: "UNISWAP_BUY_EXACTLY",
|
|
129
129
|
body: {
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
tokenIn: "WETH",
|
|
131
|
+
tokenOut: "USDC",
|
|
132
|
+
fee: "0.01",
|
|
132
133
|
amount: 1.5,
|
|
134
|
+
maxSlippagePercent: 0.5,
|
|
135
|
+
wrapEth: true,
|
|
133
136
|
},
|
|
134
137
|
},
|
|
135
138
|
],
|
|
@@ -170,11 +173,14 @@ async function run() {
|
|
|
170
173
|
},
|
|
171
174
|
actions: [
|
|
172
175
|
{
|
|
173
|
-
actionType: "
|
|
176
|
+
actionType: "UNISWAP_BUY_EXACTLY",
|
|
174
177
|
body: {
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
tokenIn: "WETH",
|
|
179
|
+
tokenOut: "USDC",
|
|
180
|
+
fee: "0.01",
|
|
177
181
|
amount: 1.5,
|
|
182
|
+
maxSlippagePercent: 0.5,
|
|
183
|
+
wrapEth: true,
|
|
178
184
|
},
|
|
179
185
|
},
|
|
180
186
|
],
|
|
@@ -251,9 +257,9 @@ async function run() {
|
|
|
251
257
|
collateralToken: "MKR",
|
|
252
258
|
borrowToken: "FXS",
|
|
253
259
|
collateralAmount: "1000",
|
|
254
|
-
loopCount:
|
|
255
|
-
maxSlippagePercent:
|
|
256
|
-
loanToValue:
|
|
260
|
+
loopCount: 2,
|
|
261
|
+
maxSlippagePercent: 2.5,
|
|
262
|
+
loanToValue: 50.6,
|
|
257
263
|
});
|
|
258
264
|
|
|
259
265
|
// Handle the result
|
|
@@ -292,9 +298,9 @@ async function run() {
|
|
|
292
298
|
collateralToken: "MKR",
|
|
293
299
|
borrowToken: "FXS",
|
|
294
300
|
collateralAmount: "1000",
|
|
295
|
-
loopCount:
|
|
296
|
-
maxSlippagePercent:
|
|
297
|
-
loanToValue:
|
|
301
|
+
loopCount: 2,
|
|
302
|
+
maxSlippagePercent: 2.5,
|
|
303
|
+
loanToValue: 50.6,
|
|
298
304
|
});
|
|
299
305
|
|
|
300
306
|
if (!res.ok) {
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.1",
|
|
60
|
-
sdkVersion: "0.0.
|
|
61
|
-
genVersion: "2.
|
|
60
|
+
sdkVersion: "0.0.28",
|
|
61
|
+
genVersion: "2.604.2",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.0.
|
|
63
|
+
"speakeasy-sdk/typescript 0.0.28 2.604.2 0.0.1 @compass-labs/api-sdk",
|
|
64
64
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -47,18 +47,25 @@ export * from "./increaseallowancerequest.js";
|
|
|
47
47
|
export * from "./interestratemode.js";
|
|
48
48
|
export * from "./liquidationcall.js";
|
|
49
49
|
export * from "./marketstate.js";
|
|
50
|
+
export * from "./morphoborrowparams.js";
|
|
50
51
|
export * from "./morphoborrowrequest.js";
|
|
51
52
|
export * from "./morphocheckmarketpositionresponse.js";
|
|
52
53
|
export * from "./morphocheckvaultpositionresponse.js";
|
|
54
|
+
export * from "./morphodepositparams.js";
|
|
53
55
|
export * from "./morphodepositrequest.js";
|
|
54
56
|
export * from "./morphogetmarketsresponse.js";
|
|
55
57
|
export * from "./morphogetvaultsresponse.js";
|
|
56
58
|
export * from "./morphomarket.js";
|
|
59
|
+
export * from "./morphorepayparams.js";
|
|
57
60
|
export * from "./morphorepayrequest.js";
|
|
61
|
+
export * from "./morphosetvaultallowanceparams.js";
|
|
58
62
|
export * from "./morphosetvaultallowancerequest.js";
|
|
63
|
+
export * from "./morphosupplycollateralparams.js";
|
|
59
64
|
export * from "./morphosupplycollateralrequest.js";
|
|
60
65
|
export * from "./morphovault.js";
|
|
66
|
+
export * from "./morphowithdrawcollateralparams.js";
|
|
61
67
|
export * from "./morphowithdrawcollateralrequest.js";
|
|
68
|
+
export * from "./morphowithdrawparams.js";
|
|
62
69
|
export * from "./morphowithdrawrequest.js";
|
|
63
70
|
export * from "./multicallaction.js";
|
|
64
71
|
export * from "./multicallactiontype.js";
|
|
@@ -71,10 +78,14 @@ export * from "./repay.js";
|
|
|
71
78
|
export * from "./reserve.js";
|
|
72
79
|
export * from "./security.js";
|
|
73
80
|
export * from "./signedauthorization.js";
|
|
81
|
+
export * from "./skybuyparams.js";
|
|
74
82
|
export * from "./skybuyrequest.js";
|
|
75
83
|
export * from "./skycheckpositionresponse.js";
|
|
84
|
+
export * from "./skydepositparams.js";
|
|
76
85
|
export * from "./skydepositrequest.js";
|
|
86
|
+
export * from "./skysellparams.js";
|
|
77
87
|
export * from "./skysellrequest.js";
|
|
88
|
+
export * from "./skywithdrawparams.js";
|
|
78
89
|
export * from "./skywithdrawrequest.js";
|
|
79
90
|
export * from "./supply.js";
|
|
80
91
|
export * from "./swapborrowrate.js";
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Amount of the token to borrow from the market.
|
|
13
|
+
*/
|
|
14
|
+
export type MorphoBorrowParamsAmount = number | string;
|
|
15
|
+
|
|
16
|
+
export type MorphoBorrowParams = {
|
|
17
|
+
/**
|
|
18
|
+
* Amount of the token to borrow from the market.
|
|
19
|
+
*/
|
|
20
|
+
amount: number | string;
|
|
21
|
+
/**
|
|
22
|
+
* The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
23
|
+
*/
|
|
24
|
+
uniqueMarketKey: string;
|
|
25
|
+
/**
|
|
26
|
+
* The address where the collateral is borrowed against. Defaults to sender.
|
|
27
|
+
*/
|
|
28
|
+
onBehalfOf?: string | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The address of the receiver of the tokens borrowed. Defaults to the transaction sender.
|
|
31
|
+
*/
|
|
32
|
+
receiver?: string | null | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const MorphoBorrowParamsAmount$inboundSchema: z.ZodType<
|
|
37
|
+
MorphoBorrowParamsAmount,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.union([z.number(), z.string()]);
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type MorphoBorrowParamsAmount$Outbound = number | string;
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const MorphoBorrowParamsAmount$outboundSchema: z.ZodType<
|
|
47
|
+
MorphoBorrowParamsAmount$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
MorphoBorrowParamsAmount
|
|
50
|
+
> = z.union([z.number(), z.string()]);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace MorphoBorrowParamsAmount$ {
|
|
57
|
+
/** @deprecated use `MorphoBorrowParamsAmount$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = MorphoBorrowParamsAmount$inboundSchema;
|
|
59
|
+
/** @deprecated use `MorphoBorrowParamsAmount$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = MorphoBorrowParamsAmount$outboundSchema;
|
|
61
|
+
/** @deprecated use `MorphoBorrowParamsAmount$Outbound` instead. */
|
|
62
|
+
export type Outbound = MorphoBorrowParamsAmount$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function morphoBorrowParamsAmountToJSON(
|
|
66
|
+
morphoBorrowParamsAmount: MorphoBorrowParamsAmount,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
MorphoBorrowParamsAmount$outboundSchema.parse(morphoBorrowParamsAmount),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function morphoBorrowParamsAmountFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<MorphoBorrowParamsAmount, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => MorphoBorrowParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'MorphoBorrowParamsAmount' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const MorphoBorrowParams$inboundSchema: z.ZodType<
|
|
85
|
+
MorphoBorrowParams,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
unknown
|
|
88
|
+
> = z.object({
|
|
89
|
+
amount: z.union([z.number(), z.string()]),
|
|
90
|
+
unique_market_key: z.string(),
|
|
91
|
+
on_behalf_of: z.nullable(z.string()).optional(),
|
|
92
|
+
receiver: z.nullable(z.string()).optional(),
|
|
93
|
+
}).transform((v) => {
|
|
94
|
+
return remap$(v, {
|
|
95
|
+
"unique_market_key": "uniqueMarketKey",
|
|
96
|
+
"on_behalf_of": "onBehalfOf",
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type MorphoBorrowParams$Outbound = {
|
|
102
|
+
amount: number | string;
|
|
103
|
+
unique_market_key: string;
|
|
104
|
+
on_behalf_of?: string | null | undefined;
|
|
105
|
+
receiver?: string | null | undefined;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const MorphoBorrowParams$outboundSchema: z.ZodType<
|
|
110
|
+
MorphoBorrowParams$Outbound,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
MorphoBorrowParams
|
|
113
|
+
> = z.object({
|
|
114
|
+
amount: z.union([z.number(), z.string()]),
|
|
115
|
+
uniqueMarketKey: z.string(),
|
|
116
|
+
onBehalfOf: z.nullable(z.string()).optional(),
|
|
117
|
+
receiver: z.nullable(z.string()).optional(),
|
|
118
|
+
}).transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
uniqueMarketKey: "unique_market_key",
|
|
121
|
+
onBehalfOf: "on_behalf_of",
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
|
+
*/
|
|
129
|
+
export namespace MorphoBorrowParams$ {
|
|
130
|
+
/** @deprecated use `MorphoBorrowParams$inboundSchema` instead. */
|
|
131
|
+
export const inboundSchema = MorphoBorrowParams$inboundSchema;
|
|
132
|
+
/** @deprecated use `MorphoBorrowParams$outboundSchema` instead. */
|
|
133
|
+
export const outboundSchema = MorphoBorrowParams$outboundSchema;
|
|
134
|
+
/** @deprecated use `MorphoBorrowParams$Outbound` instead. */
|
|
135
|
+
export type Outbound = MorphoBorrowParams$Outbound;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function morphoBorrowParamsToJSON(
|
|
139
|
+
morphoBorrowParams: MorphoBorrowParams,
|
|
140
|
+
): string {
|
|
141
|
+
return JSON.stringify(
|
|
142
|
+
MorphoBorrowParams$outboundSchema.parse(morphoBorrowParams),
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function morphoBorrowParamsFromJSON(
|
|
147
|
+
jsonString: string,
|
|
148
|
+
): SafeParseResult<MorphoBorrowParams, SDKValidationError> {
|
|
149
|
+
return safeParse(
|
|
150
|
+
jsonString,
|
|
151
|
+
(x) => MorphoBorrowParams$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'MorphoBorrowParams' from JSON`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The amount of tokens to deposit into the vault.
|
|
13
|
+
*/
|
|
14
|
+
export type MorphoDepositParamsAmount = number | string;
|
|
15
|
+
|
|
16
|
+
export type MorphoDepositParams = {
|
|
17
|
+
/**
|
|
18
|
+
* The vault address you are depositing to.
|
|
19
|
+
*/
|
|
20
|
+
vaultAddress: string;
|
|
21
|
+
/**
|
|
22
|
+
* The amount of tokens to deposit into the vault.
|
|
23
|
+
*/
|
|
24
|
+
amount: number | string;
|
|
25
|
+
/**
|
|
26
|
+
* The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
|
|
27
|
+
*/
|
|
28
|
+
receiver?: string | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const MorphoDepositParamsAmount$inboundSchema: z.ZodType<
|
|
33
|
+
MorphoDepositParamsAmount,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.union([z.number(), z.string()]);
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type MorphoDepositParamsAmount$Outbound = number | string;
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const MorphoDepositParamsAmount$outboundSchema: z.ZodType<
|
|
43
|
+
MorphoDepositParamsAmount$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
MorphoDepositParamsAmount
|
|
46
|
+
> = z.union([z.number(), z.string()]);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace MorphoDepositParamsAmount$ {
|
|
53
|
+
/** @deprecated use `MorphoDepositParamsAmount$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = MorphoDepositParamsAmount$inboundSchema;
|
|
55
|
+
/** @deprecated use `MorphoDepositParamsAmount$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = MorphoDepositParamsAmount$outboundSchema;
|
|
57
|
+
/** @deprecated use `MorphoDepositParamsAmount$Outbound` instead. */
|
|
58
|
+
export type Outbound = MorphoDepositParamsAmount$Outbound;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function morphoDepositParamsAmountToJSON(
|
|
62
|
+
morphoDepositParamsAmount: MorphoDepositParamsAmount,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
MorphoDepositParamsAmount$outboundSchema.parse(morphoDepositParamsAmount),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function morphoDepositParamsAmountFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<MorphoDepositParamsAmount, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => MorphoDepositParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'MorphoDepositParamsAmount' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const MorphoDepositParams$inboundSchema: z.ZodType<
|
|
81
|
+
MorphoDepositParams,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = z.object({
|
|
85
|
+
vault_address: z.string(),
|
|
86
|
+
amount: z.union([z.number(), z.string()]),
|
|
87
|
+
receiver: z.nullable(z.string()).optional(),
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
"vault_address": "vaultAddress",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type MorphoDepositParams$Outbound = {
|
|
96
|
+
vault_address: string;
|
|
97
|
+
amount: number | string;
|
|
98
|
+
receiver?: string | null | undefined;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const MorphoDepositParams$outboundSchema: z.ZodType<
|
|
103
|
+
MorphoDepositParams$Outbound,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
MorphoDepositParams
|
|
106
|
+
> = z.object({
|
|
107
|
+
vaultAddress: z.string(),
|
|
108
|
+
amount: z.union([z.number(), z.string()]),
|
|
109
|
+
receiver: z.nullable(z.string()).optional(),
|
|
110
|
+
}).transform((v) => {
|
|
111
|
+
return remap$(v, {
|
|
112
|
+
vaultAddress: "vault_address",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
119
|
+
*/
|
|
120
|
+
export namespace MorphoDepositParams$ {
|
|
121
|
+
/** @deprecated use `MorphoDepositParams$inboundSchema` instead. */
|
|
122
|
+
export const inboundSchema = MorphoDepositParams$inboundSchema;
|
|
123
|
+
/** @deprecated use `MorphoDepositParams$outboundSchema` instead. */
|
|
124
|
+
export const outboundSchema = MorphoDepositParams$outboundSchema;
|
|
125
|
+
/** @deprecated use `MorphoDepositParams$Outbound` instead. */
|
|
126
|
+
export type Outbound = MorphoDepositParams$Outbound;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function morphoDepositParamsToJSON(
|
|
130
|
+
morphoDepositParams: MorphoDepositParams,
|
|
131
|
+
): string {
|
|
132
|
+
return JSON.stringify(
|
|
133
|
+
MorphoDepositParams$outboundSchema.parse(morphoDepositParams),
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function morphoDepositParamsFromJSON(
|
|
138
|
+
jsonString: string,
|
|
139
|
+
): SafeParseResult<MorphoDepositParams, SDKValidationError> {
|
|
140
|
+
return safeParse(
|
|
141
|
+
jsonString,
|
|
142
|
+
(x) => MorphoDepositParams$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
+
`Failed to parse 'MorphoDepositParams' from JSON`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import * as b64$ from "../../lib/base64.js";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type MorphoRepayParams = {
|
|
13
|
+
/**
|
|
14
|
+
* Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet.
|
|
15
|
+
*/
|
|
16
|
+
amount?: any | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
19
|
+
*/
|
|
20
|
+
uniqueMarketKey: string;
|
|
21
|
+
/**
|
|
22
|
+
* The address on behalf of whom the repayment is made. Defaults to sender.
|
|
23
|
+
*/
|
|
24
|
+
onBehalfOf?: string | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* An optional field for callback byte data that will be triggered upon successful repaying of debt.
|
|
27
|
+
*/
|
|
28
|
+
callbackData?: Uint8Array | string | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const MorphoRepayParams$inboundSchema: z.ZodType<
|
|
33
|
+
MorphoRepayParams,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
amount: z.any().optional(),
|
|
38
|
+
unique_market_key: z.string(),
|
|
39
|
+
on_behalf_of: z.nullable(z.string()).optional(),
|
|
40
|
+
callback_data: z.nullable(b64$.zodInbound).optional(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"unique_market_key": "uniqueMarketKey",
|
|
44
|
+
"on_behalf_of": "onBehalfOf",
|
|
45
|
+
"callback_data": "callbackData",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type MorphoRepayParams$Outbound = {
|
|
51
|
+
amount?: any | undefined;
|
|
52
|
+
unique_market_key: string;
|
|
53
|
+
on_behalf_of?: string | null | undefined;
|
|
54
|
+
callback_data?: Uint8Array | null | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const MorphoRepayParams$outboundSchema: z.ZodType<
|
|
59
|
+
MorphoRepayParams$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
MorphoRepayParams
|
|
62
|
+
> = z.object({
|
|
63
|
+
amount: z.any().optional(),
|
|
64
|
+
uniqueMarketKey: z.string(),
|
|
65
|
+
onBehalfOf: z.nullable(z.string()).optional(),
|
|
66
|
+
callbackData: z.nullable(b64$.zodOutbound).optional(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
uniqueMarketKey: "unique_market_key",
|
|
70
|
+
onBehalfOf: "on_behalf_of",
|
|
71
|
+
callbackData: "callback_data",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
78
|
+
*/
|
|
79
|
+
export namespace MorphoRepayParams$ {
|
|
80
|
+
/** @deprecated use `MorphoRepayParams$inboundSchema` instead. */
|
|
81
|
+
export const inboundSchema = MorphoRepayParams$inboundSchema;
|
|
82
|
+
/** @deprecated use `MorphoRepayParams$outboundSchema` instead. */
|
|
83
|
+
export const outboundSchema = MorphoRepayParams$outboundSchema;
|
|
84
|
+
/** @deprecated use `MorphoRepayParams$Outbound` instead. */
|
|
85
|
+
export type Outbound = MorphoRepayParams$Outbound;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function morphoRepayParamsToJSON(
|
|
89
|
+
morphoRepayParams: MorphoRepayParams,
|
|
90
|
+
): string {
|
|
91
|
+
return JSON.stringify(
|
|
92
|
+
MorphoRepayParams$outboundSchema.parse(morphoRepayParams),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function morphoRepayParamsFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<MorphoRepayParams, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => MorphoRepayParams$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'MorphoRepayParams' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|