@compass-labs/api-sdk 0.5.2 → 0.5.4
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/README.md +2 -0
- package/bin/mcp-server.js +448 -261
- package/bin/mcp-server.js.map +14 -10
- package/dist/commonjs/funcs/pendleRedeemYield.d.ts +17 -0
- package/dist/commonjs/funcs/pendleRedeemYield.d.ts.map +1 -0
- package/dist/commonjs/funcs/pendleRedeemYield.js +118 -0
- package/dist/commonjs/funcs/pendleRedeemYield.js.map +1 -0
- package/dist/commonjs/index.d.ts +2 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +3 -1
- package/dist/commonjs/index.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/pendleRedeemYield.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/pendleRedeemYield.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleRedeemYield.js +64 -0
- package/dist/commonjs/mcp-server/tools/pendleRedeemYield.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/pendleredeemyieldparams.d.ts +34 -0
- package/dist/commonjs/models/components/pendleredeemyieldparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendleredeemyieldparams.js +82 -0
- package/dist/commonjs/models/components/pendleredeemyieldparams.js.map +1 -0
- package/dist/commonjs/models/components/pendleredeemyieldrequest.d.ts +45 -0
- package/dist/commonjs/models/components/pendleredeemyieldrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendleredeemyieldrequest.js +87 -0
- package/dist/commonjs/models/components/pendleredeemyieldrequest.js.map +1 -0
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.d.ts +2 -2
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.js +2 -2
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.d.ts +2 -2
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.js +2 -2
- package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.js.map +1 -1
- package/dist/commonjs/models/components/useroperation.d.ts +35 -188
- package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
- package/dist/commonjs/models/components/useroperation.js +39 -24
- package/dist/commonjs/models/components/useroperation.js.map +1 -1
- package/dist/commonjs/sdk/pendle.d.ts +7 -0
- package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
- package/dist/commonjs/sdk/pendle.js +10 -0
- package/dist/commonjs/sdk/pendle.js.map +1 -1
- package/dist/esm/funcs/pendleRedeemYield.d.ts +17 -0
- package/dist/esm/funcs/pendleRedeemYield.d.ts.map +1 -0
- package/dist/esm/funcs/pendleRedeemYield.js +82 -0
- package/dist/esm/funcs/pendleRedeemYield.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.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.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/pendleRedeemYield.d.ts +8 -0
- package/dist/esm/mcp-server/tools/pendleRedeemYield.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/pendleRedeemYield.js +28 -0
- package/dist/esm/mcp-server/tools/pendleRedeemYield.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/pendleredeemyieldparams.d.ts +34 -0
- package/dist/esm/models/components/pendleredeemyieldparams.d.ts.map +1 -0
- package/dist/esm/models/components/pendleredeemyieldparams.js +44 -0
- package/dist/esm/models/components/pendleredeemyieldparams.js.map +1 -0
- package/dist/esm/models/components/pendleredeemyieldrequest.d.ts +45 -0
- package/dist/esm/models/components/pendleredeemyieldrequest.d.ts.map +1 -0
- package/dist/esm/models/components/pendleredeemyieldrequest.js +49 -0
- package/dist/esm/models/components/pendleredeemyieldrequest.js.map +1 -0
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.d.ts +2 -2
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.js +2 -2
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.js.map +1 -1
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.d.ts +2 -2
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.js +2 -2
- package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.js.map +1 -1
- package/dist/esm/models/components/useroperation.d.ts +35 -188
- package/dist/esm/models/components/useroperation.d.ts.map +1 -1
- package/dist/esm/models/components/useroperation.js +39 -24
- package/dist/esm/models/components/useroperation.js.map +1 -1
- package/dist/esm/sdk/pendle.d.ts +7 -0
- package/dist/esm/sdk/pendle.d.ts.map +1 -1
- package/dist/esm/sdk/pendle.js +10 -0
- package/dist/esm/sdk/pendle.js.map +1 -1
- package/docs/sdks/pendle/README.md +82 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/pendleRedeemYield.ts +165 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/pendleRedeemYield.ts +37 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/pendleredeemyieldparams.ts +86 -0
- package/src/models/components/pendleredeemyieldrequest.ts +101 -0
- package/src/models/components/uniswapincreaseliquidityprovisionparams.ts +6 -6
- package/src/models/components/uniswapincreaseliquidityprovisionrequest.ts +6 -6
- package/src/models/components/useroperation.ts +104 -54
- package/src/sdk/pendle.ts +18 -0
|
@@ -120,6 +120,12 @@ import {
|
|
|
120
120
|
PendleBuyYtParams$Outbound,
|
|
121
121
|
PendleBuyYtParams$outboundSchema,
|
|
122
122
|
} from "./pendlebuyytparams.js";
|
|
123
|
+
import {
|
|
124
|
+
PendleRedeemYieldParams,
|
|
125
|
+
PendleRedeemYieldParams$inboundSchema,
|
|
126
|
+
PendleRedeemYieldParams$Outbound,
|
|
127
|
+
PendleRedeemYieldParams$outboundSchema,
|
|
128
|
+
} from "./pendleredeemyieldparams.js";
|
|
123
129
|
import {
|
|
124
130
|
PendleSellPtParams,
|
|
125
131
|
PendleSellPtParams$inboundSchema,
|
|
@@ -206,10 +212,11 @@ import {
|
|
|
206
212
|
} from "./wrapethparams.js";
|
|
207
213
|
|
|
208
214
|
export type Body =
|
|
215
|
+
| (PendleRedeemYieldParams & { actionType: "PENDLE_REDEEM_YIELD" })
|
|
209
216
|
| (UnwrapWethParams & { actionType: "UNWRAP_WETH" })
|
|
210
217
|
| (WrapEthParams & { actionType: "WRAP_ETH" })
|
|
211
218
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams & {
|
|
212
|
-
actionType: "
|
|
219
|
+
actionType: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
213
220
|
})
|
|
214
221
|
| (MorphoSetVaultAllowanceParams & {
|
|
215
222
|
actionType: "MORPHO_SET_VAULT_ALLOWANCE";
|
|
@@ -223,7 +230,7 @@ export type Body =
|
|
|
223
230
|
| (SkySellParams & { actionType: "SKY_SELL" })
|
|
224
231
|
| (SkyWithdrawParams & { actionType: "SKY_WITHDRAW" })
|
|
225
232
|
| (UniswapWithdrawLiquidityProvisionParams & {
|
|
226
|
-
actionType: "
|
|
233
|
+
actionType: "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION";
|
|
227
234
|
})
|
|
228
235
|
| (AaveSupplyParams & { actionType: "AAVE_SUPPLY" })
|
|
229
236
|
| (AaveWithdrawParams & { actionType: "AAVE_WITHDRAW" })
|
|
@@ -243,7 +250,7 @@ export type Body =
|
|
|
243
250
|
actionType: "AERODROME_SLIPSTREAM_BUY_EXACTLY";
|
|
244
251
|
})
|
|
245
252
|
| (AerodromeSlipstreamIncreaseLiquidityProvisionParams & {
|
|
246
|
-
actionType: "
|
|
253
|
+
actionType: "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION";
|
|
247
254
|
})
|
|
248
255
|
| (AerodromeSlipstreamSellExactlyParams & {
|
|
249
256
|
actionType: "AERODROME_SLIPSTREAM_SELL_EXACTLY";
|
|
@@ -254,18 +261,19 @@ export type Body =
|
|
|
254
261
|
| (UniswapBuyExactlyParams & { actionType: "UNISWAP_BUY_EXACTLY" })
|
|
255
262
|
| (UniswapSellExactlyParams & { actionType: "UNISWAP_SELL_EXACTLY" })
|
|
256
263
|
| (AerodromeSlipstreamMintLiquidityProvisionParams & {
|
|
257
|
-
actionType: "
|
|
264
|
+
actionType: "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION";
|
|
258
265
|
})
|
|
259
266
|
| (UniswapMintLiquidityProvisionParams & {
|
|
260
|
-
actionType: "
|
|
267
|
+
actionType: "UNISWAP_MINT_LIQUIDITY_PROVISION";
|
|
261
268
|
});
|
|
262
269
|
|
|
263
270
|
export type UserOperation = {
|
|
264
271
|
body:
|
|
272
|
+
| (PendleRedeemYieldParams & { actionType: "PENDLE_REDEEM_YIELD" })
|
|
265
273
|
| (UnwrapWethParams & { actionType: "UNWRAP_WETH" })
|
|
266
274
|
| (WrapEthParams & { actionType: "WRAP_ETH" })
|
|
267
275
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams & {
|
|
268
|
-
actionType: "
|
|
276
|
+
actionType: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
269
277
|
})
|
|
270
278
|
| (MorphoSetVaultAllowanceParams & {
|
|
271
279
|
actionType: "MORPHO_SET_VAULT_ALLOWANCE";
|
|
@@ -279,7 +287,7 @@ export type UserOperation = {
|
|
|
279
287
|
| (SkySellParams & { actionType: "SKY_SELL" })
|
|
280
288
|
| (SkyWithdrawParams & { actionType: "SKY_WITHDRAW" })
|
|
281
289
|
| (UniswapWithdrawLiquidityProvisionParams & {
|
|
282
|
-
actionType: "
|
|
290
|
+
actionType: "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION";
|
|
283
291
|
})
|
|
284
292
|
| (AaveSupplyParams & { actionType: "AAVE_SUPPLY" })
|
|
285
293
|
| (AaveWithdrawParams & { actionType: "AAVE_WITHDRAW" })
|
|
@@ -301,7 +309,7 @@ export type UserOperation = {
|
|
|
301
309
|
actionType: "AERODROME_SLIPSTREAM_BUY_EXACTLY";
|
|
302
310
|
})
|
|
303
311
|
| (AerodromeSlipstreamIncreaseLiquidityProvisionParams & {
|
|
304
|
-
actionType: "
|
|
312
|
+
actionType: "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION";
|
|
305
313
|
})
|
|
306
314
|
| (AerodromeSlipstreamSellExactlyParams & {
|
|
307
315
|
actionType: "AERODROME_SLIPSTREAM_SELL_EXACTLY";
|
|
@@ -312,16 +320,21 @@ export type UserOperation = {
|
|
|
312
320
|
| (UniswapBuyExactlyParams & { actionType: "UNISWAP_BUY_EXACTLY" })
|
|
313
321
|
| (UniswapSellExactlyParams & { actionType: "UNISWAP_SELL_EXACTLY" })
|
|
314
322
|
| (AerodromeSlipstreamMintLiquidityProvisionParams & {
|
|
315
|
-
actionType: "
|
|
323
|
+
actionType: "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION";
|
|
316
324
|
})
|
|
317
325
|
| (UniswapMintLiquidityProvisionParams & {
|
|
318
|
-
actionType: "
|
|
326
|
+
actionType: "UNISWAP_MINT_LIQUIDITY_PROVISION";
|
|
319
327
|
});
|
|
320
328
|
};
|
|
321
329
|
|
|
322
330
|
/** @internal */
|
|
323
331
|
export const Body$inboundSchema: z.ZodType<Body, z.ZodTypeDef, unknown> = z
|
|
324
332
|
.union([
|
|
333
|
+
PendleRedeemYieldParams$inboundSchema.and(
|
|
334
|
+
z.object({ action_type: z.literal("PENDLE_REDEEM_YIELD") }).transform((
|
|
335
|
+
v,
|
|
336
|
+
) => ({ actionType: v.action_type })),
|
|
337
|
+
),
|
|
325
338
|
UnwrapWethParams$inboundSchema.and(
|
|
326
339
|
z.object({ action_type: z.literal("UNWRAP_WETH") }).transform((v) => ({
|
|
327
340
|
actionType: v.action_type,
|
|
@@ -334,7 +347,9 @@ export const Body$inboundSchema: z.ZodType<Body, z.ZodTypeDef, unknown> = z
|
|
|
334
347
|
),
|
|
335
348
|
AerodromeSlipstreamWithdrawLiquidityProvisionParams$inboundSchema.and(
|
|
336
349
|
z.object({
|
|
337
|
-
action_type: z.literal(
|
|
350
|
+
action_type: z.literal(
|
|
351
|
+
"AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION",
|
|
352
|
+
),
|
|
338
353
|
}).transform((v) => ({ actionType: v.action_type })),
|
|
339
354
|
),
|
|
340
355
|
MorphoSetVaultAllowanceParams$inboundSchema.and(
|
|
@@ -382,8 +397,9 @@ export const Body$inboundSchema: z.ZodType<Body, z.ZodTypeDef, unknown> = z
|
|
|
382
397
|
})),
|
|
383
398
|
),
|
|
384
399
|
UniswapWithdrawLiquidityProvisionParams$inboundSchema.and(
|
|
385
|
-
z.object({
|
|
386
|
-
|
|
400
|
+
z.object({
|
|
401
|
+
action_type: z.literal("UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"),
|
|
402
|
+
}).transform((v) => ({ actionType: v.action_type })),
|
|
387
403
|
),
|
|
388
404
|
AaveSupplyParams$inboundSchema.and(
|
|
389
405
|
z.object({ action_type: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
@@ -449,7 +465,9 @@ export const Body$inboundSchema: z.ZodType<Body, z.ZodTypeDef, unknown> = z
|
|
|
449
465
|
),
|
|
450
466
|
AerodromeSlipstreamIncreaseLiquidityProvisionParams$inboundSchema.and(
|
|
451
467
|
z.object({
|
|
452
|
-
action_type: z.literal(
|
|
468
|
+
action_type: z.literal(
|
|
469
|
+
"AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION",
|
|
470
|
+
),
|
|
453
471
|
}).transform((v) => ({ actionType: v.action_type })),
|
|
454
472
|
),
|
|
455
473
|
AerodromeSlipstreamSellExactlyParams$inboundSchema.and(
|
|
@@ -473,22 +491,22 @@ export const Body$inboundSchema: z.ZodType<Body, z.ZodTypeDef, unknown> = z
|
|
|
473
491
|
),
|
|
474
492
|
AerodromeSlipstreamMintLiquidityProvisionParams$inboundSchema.and(
|
|
475
493
|
z.object({
|
|
476
|
-
action_type: z.literal("
|
|
494
|
+
action_type: z.literal("AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION"),
|
|
477
495
|
}).transform((v) => ({ actionType: v.action_type })),
|
|
478
496
|
),
|
|
479
497
|
UniswapMintLiquidityProvisionParams$inboundSchema.and(
|
|
480
|
-
z.object({ action_type: z.literal("
|
|
481
|
-
v,
|
|
482
|
-
) => ({ actionType: v.action_type })),
|
|
498
|
+
z.object({ action_type: z.literal("UNISWAP_MINT_LIQUIDITY_PROVISION") })
|
|
499
|
+
.transform((v) => ({ actionType: v.action_type })),
|
|
483
500
|
),
|
|
484
501
|
]);
|
|
485
502
|
|
|
486
503
|
/** @internal */
|
|
487
504
|
export type Body$Outbound =
|
|
505
|
+
| (PendleRedeemYieldParams$Outbound & { action_type: "PENDLE_REDEEM_YIELD" })
|
|
488
506
|
| (UnwrapWethParams$Outbound & { action_type: "UNWRAP_WETH" })
|
|
489
507
|
| (WrapEthParams$Outbound & { action_type: "WRAP_ETH" })
|
|
490
508
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams$Outbound & {
|
|
491
|
-
action_type: "
|
|
509
|
+
action_type: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
492
510
|
})
|
|
493
511
|
| (MorphoSetVaultAllowanceParams$Outbound & {
|
|
494
512
|
action_type: "MORPHO_SET_VAULT_ALLOWANCE";
|
|
@@ -502,7 +520,7 @@ export type Body$Outbound =
|
|
|
502
520
|
| (SkySellParams$Outbound & { action_type: "SKY_SELL" })
|
|
503
521
|
| (SkyWithdrawParams$Outbound & { action_type: "SKY_WITHDRAW" })
|
|
504
522
|
| (UniswapWithdrawLiquidityProvisionParams$Outbound & {
|
|
505
|
-
action_type: "
|
|
523
|
+
action_type: "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION";
|
|
506
524
|
})
|
|
507
525
|
| (AaveSupplyParams$Outbound & { action_type: "AAVE_SUPPLY" })
|
|
508
526
|
| (AaveWithdrawParams$Outbound & { action_type: "AAVE_WITHDRAW" })
|
|
@@ -526,7 +544,7 @@ export type Body$Outbound =
|
|
|
526
544
|
action_type: "AERODROME_SLIPSTREAM_BUY_EXACTLY";
|
|
527
545
|
})
|
|
528
546
|
| (AerodromeSlipstreamIncreaseLiquidityProvisionParams$Outbound & {
|
|
529
|
-
action_type: "
|
|
547
|
+
action_type: "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION";
|
|
530
548
|
})
|
|
531
549
|
| (AerodromeSlipstreamSellExactlyParams$Outbound & {
|
|
532
550
|
action_type: "AERODROME_SLIPSTREAM_SELL_EXACTLY";
|
|
@@ -539,15 +557,20 @@ export type Body$Outbound =
|
|
|
539
557
|
action_type: "UNISWAP_SELL_EXACTLY";
|
|
540
558
|
})
|
|
541
559
|
| (AerodromeSlipstreamMintLiquidityProvisionParams$Outbound & {
|
|
542
|
-
action_type: "
|
|
560
|
+
action_type: "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION";
|
|
543
561
|
})
|
|
544
562
|
| (UniswapMintLiquidityProvisionParams$Outbound & {
|
|
545
|
-
action_type: "
|
|
563
|
+
action_type: "UNISWAP_MINT_LIQUIDITY_PROVISION";
|
|
546
564
|
});
|
|
547
565
|
|
|
548
566
|
/** @internal */
|
|
549
567
|
export const Body$outboundSchema: z.ZodType<Body$Outbound, z.ZodTypeDef, Body> =
|
|
550
568
|
z.union([
|
|
569
|
+
PendleRedeemYieldParams$outboundSchema.and(
|
|
570
|
+
z.object({ actionType: z.literal("PENDLE_REDEEM_YIELD") }).transform((
|
|
571
|
+
v,
|
|
572
|
+
) => ({ action_type: v.actionType })),
|
|
573
|
+
),
|
|
551
574
|
UnwrapWethParams$outboundSchema.and(
|
|
552
575
|
z.object({ actionType: z.literal("UNWRAP_WETH") }).transform((v) => ({
|
|
553
576
|
action_type: v.actionType,
|
|
@@ -560,7 +583,9 @@ export const Body$outboundSchema: z.ZodType<Body$Outbound, z.ZodTypeDef, Body> =
|
|
|
560
583
|
),
|
|
561
584
|
AerodromeSlipstreamWithdrawLiquidityProvisionParams$outboundSchema.and(
|
|
562
585
|
z.object({
|
|
563
|
-
actionType: z.literal(
|
|
586
|
+
actionType: z.literal(
|
|
587
|
+
"AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION",
|
|
588
|
+
),
|
|
564
589
|
}).transform((v) => ({ action_type: v.actionType })),
|
|
565
590
|
),
|
|
566
591
|
MorphoSetVaultAllowanceParams$outboundSchema.and(
|
|
@@ -608,8 +633,9 @@ export const Body$outboundSchema: z.ZodType<Body$Outbound, z.ZodTypeDef, Body> =
|
|
|
608
633
|
})),
|
|
609
634
|
),
|
|
610
635
|
UniswapWithdrawLiquidityProvisionParams$outboundSchema.and(
|
|
611
|
-
z.object({
|
|
612
|
-
|
|
636
|
+
z.object({
|
|
637
|
+
actionType: z.literal("UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"),
|
|
638
|
+
}).transform((v) => ({ action_type: v.actionType })),
|
|
613
639
|
),
|
|
614
640
|
AaveSupplyParams$outboundSchema.and(
|
|
615
641
|
z.object({ actionType: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
@@ -676,7 +702,9 @@ export const Body$outboundSchema: z.ZodType<Body$Outbound, z.ZodTypeDef, Body> =
|
|
|
676
702
|
),
|
|
677
703
|
AerodromeSlipstreamIncreaseLiquidityProvisionParams$outboundSchema.and(
|
|
678
704
|
z.object({
|
|
679
|
-
actionType: z.literal(
|
|
705
|
+
actionType: z.literal(
|
|
706
|
+
"AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION",
|
|
707
|
+
),
|
|
680
708
|
}).transform((v) => ({ action_type: v.actionType })),
|
|
681
709
|
),
|
|
682
710
|
AerodromeSlipstreamSellExactlyParams$outboundSchema.and(
|
|
@@ -699,13 +727,13 @@ export const Body$outboundSchema: z.ZodType<Body$Outbound, z.ZodTypeDef, Body> =
|
|
|
699
727
|
) => ({ action_type: v.actionType })),
|
|
700
728
|
),
|
|
701
729
|
AerodromeSlipstreamMintLiquidityProvisionParams$outboundSchema.and(
|
|
702
|
-
z.object({
|
|
703
|
-
|
|
730
|
+
z.object({
|
|
731
|
+
actionType: z.literal("AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION"),
|
|
732
|
+
}).transform((v) => ({ action_type: v.actionType })),
|
|
704
733
|
),
|
|
705
734
|
UniswapMintLiquidityProvisionParams$outboundSchema.and(
|
|
706
|
-
z.object({ actionType: z.literal("
|
|
707
|
-
v,
|
|
708
|
-
) => ({ action_type: v.actionType })),
|
|
735
|
+
z.object({ actionType: z.literal("UNISWAP_MINT_LIQUIDITY_PROVISION") })
|
|
736
|
+
.transform((v) => ({ action_type: v.actionType })),
|
|
709
737
|
),
|
|
710
738
|
]);
|
|
711
739
|
|
|
@@ -743,6 +771,11 @@ export const UserOperation$inboundSchema: z.ZodType<
|
|
|
743
771
|
unknown
|
|
744
772
|
> = z.object({
|
|
745
773
|
body: z.union([
|
|
774
|
+
PendleRedeemYieldParams$inboundSchema.and(
|
|
775
|
+
z.object({ action_type: z.literal("PENDLE_REDEEM_YIELD") }).transform((
|
|
776
|
+
v,
|
|
777
|
+
) => ({ actionType: v.action_type })),
|
|
778
|
+
),
|
|
746
779
|
UnwrapWethParams$inboundSchema.and(
|
|
747
780
|
z.object({ action_type: z.literal("UNWRAP_WETH") }).transform((v) => ({
|
|
748
781
|
actionType: v.action_type,
|
|
@@ -755,7 +788,9 @@ export const UserOperation$inboundSchema: z.ZodType<
|
|
|
755
788
|
),
|
|
756
789
|
AerodromeSlipstreamWithdrawLiquidityProvisionParams$inboundSchema.and(
|
|
757
790
|
z.object({
|
|
758
|
-
action_type: z.literal(
|
|
791
|
+
action_type: z.literal(
|
|
792
|
+
"AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION",
|
|
793
|
+
),
|
|
759
794
|
}).transform((v) => ({ actionType: v.action_type })),
|
|
760
795
|
),
|
|
761
796
|
MorphoSetVaultAllowanceParams$inboundSchema.and(
|
|
@@ -803,8 +838,9 @@ export const UserOperation$inboundSchema: z.ZodType<
|
|
|
803
838
|
})),
|
|
804
839
|
),
|
|
805
840
|
UniswapWithdrawLiquidityProvisionParams$inboundSchema.and(
|
|
806
|
-
z.object({
|
|
807
|
-
|
|
841
|
+
z.object({
|
|
842
|
+
action_type: z.literal("UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"),
|
|
843
|
+
}).transform((v) => ({ actionType: v.action_type })),
|
|
808
844
|
),
|
|
809
845
|
AaveSupplyParams$inboundSchema.and(
|
|
810
846
|
z.object({ action_type: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
@@ -870,7 +906,9 @@ export const UserOperation$inboundSchema: z.ZodType<
|
|
|
870
906
|
),
|
|
871
907
|
AerodromeSlipstreamIncreaseLiquidityProvisionParams$inboundSchema.and(
|
|
872
908
|
z.object({
|
|
873
|
-
action_type: z.literal(
|
|
909
|
+
action_type: z.literal(
|
|
910
|
+
"AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION",
|
|
911
|
+
),
|
|
874
912
|
}).transform((v) => ({ actionType: v.action_type })),
|
|
875
913
|
),
|
|
876
914
|
AerodromeSlipstreamSellExactlyParams$inboundSchema.and(
|
|
@@ -894,13 +932,12 @@ export const UserOperation$inboundSchema: z.ZodType<
|
|
|
894
932
|
),
|
|
895
933
|
AerodromeSlipstreamMintLiquidityProvisionParams$inboundSchema.and(
|
|
896
934
|
z.object({
|
|
897
|
-
action_type: z.literal("
|
|
935
|
+
action_type: z.literal("AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION"),
|
|
898
936
|
}).transform((v) => ({ actionType: v.action_type })),
|
|
899
937
|
),
|
|
900
938
|
UniswapMintLiquidityProvisionParams$inboundSchema.and(
|
|
901
|
-
z.object({ action_type: z.literal("
|
|
902
|
-
v,
|
|
903
|
-
) => ({ actionType: v.action_type })),
|
|
939
|
+
z.object({ action_type: z.literal("UNISWAP_MINT_LIQUIDITY_PROVISION") })
|
|
940
|
+
.transform((v) => ({ actionType: v.action_type })),
|
|
904
941
|
),
|
|
905
942
|
]),
|
|
906
943
|
});
|
|
@@ -908,10 +945,13 @@ export const UserOperation$inboundSchema: z.ZodType<
|
|
|
908
945
|
/** @internal */
|
|
909
946
|
export type UserOperation$Outbound = {
|
|
910
947
|
body:
|
|
948
|
+
| (PendleRedeemYieldParams$Outbound & {
|
|
949
|
+
action_type: "PENDLE_REDEEM_YIELD";
|
|
950
|
+
})
|
|
911
951
|
| (UnwrapWethParams$Outbound & { action_type: "UNWRAP_WETH" })
|
|
912
952
|
| (WrapEthParams$Outbound & { action_type: "WRAP_ETH" })
|
|
913
953
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams$Outbound & {
|
|
914
|
-
action_type: "
|
|
954
|
+
action_type: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
915
955
|
})
|
|
916
956
|
| (MorphoSetVaultAllowanceParams$Outbound & {
|
|
917
957
|
action_type: "MORPHO_SET_VAULT_ALLOWANCE";
|
|
@@ -925,7 +965,7 @@ export type UserOperation$Outbound = {
|
|
|
925
965
|
| (SkySellParams$Outbound & { action_type: "SKY_SELL" })
|
|
926
966
|
| (SkyWithdrawParams$Outbound & { action_type: "SKY_WITHDRAW" })
|
|
927
967
|
| (UniswapWithdrawLiquidityProvisionParams$Outbound & {
|
|
928
|
-
action_type: "
|
|
968
|
+
action_type: "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION";
|
|
929
969
|
})
|
|
930
970
|
| (AaveSupplyParams$Outbound & { action_type: "AAVE_SUPPLY" })
|
|
931
971
|
| (AaveWithdrawParams$Outbound & { action_type: "AAVE_WITHDRAW" })
|
|
@@ -949,7 +989,7 @@ export type UserOperation$Outbound = {
|
|
|
949
989
|
action_type: "AERODROME_SLIPSTREAM_BUY_EXACTLY";
|
|
950
990
|
})
|
|
951
991
|
| (AerodromeSlipstreamIncreaseLiquidityProvisionParams$Outbound & {
|
|
952
|
-
action_type: "
|
|
992
|
+
action_type: "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION";
|
|
953
993
|
})
|
|
954
994
|
| (AerodromeSlipstreamSellExactlyParams$Outbound & {
|
|
955
995
|
action_type: "AERODROME_SLIPSTREAM_SELL_EXACTLY";
|
|
@@ -964,10 +1004,10 @@ export type UserOperation$Outbound = {
|
|
|
964
1004
|
action_type: "UNISWAP_SELL_EXACTLY";
|
|
965
1005
|
})
|
|
966
1006
|
| (AerodromeSlipstreamMintLiquidityProvisionParams$Outbound & {
|
|
967
|
-
action_type: "
|
|
1007
|
+
action_type: "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION";
|
|
968
1008
|
})
|
|
969
1009
|
| (UniswapMintLiquidityProvisionParams$Outbound & {
|
|
970
|
-
action_type: "
|
|
1010
|
+
action_type: "UNISWAP_MINT_LIQUIDITY_PROVISION";
|
|
971
1011
|
});
|
|
972
1012
|
};
|
|
973
1013
|
|
|
@@ -978,6 +1018,11 @@ export const UserOperation$outboundSchema: z.ZodType<
|
|
|
978
1018
|
UserOperation
|
|
979
1019
|
> = z.object({
|
|
980
1020
|
body: z.union([
|
|
1021
|
+
PendleRedeemYieldParams$outboundSchema.and(
|
|
1022
|
+
z.object({ actionType: z.literal("PENDLE_REDEEM_YIELD") }).transform((
|
|
1023
|
+
v,
|
|
1024
|
+
) => ({ action_type: v.actionType })),
|
|
1025
|
+
),
|
|
981
1026
|
UnwrapWethParams$outboundSchema.and(
|
|
982
1027
|
z.object({ actionType: z.literal("UNWRAP_WETH") }).transform((v) => ({
|
|
983
1028
|
action_type: v.actionType,
|
|
@@ -990,7 +1035,9 @@ export const UserOperation$outboundSchema: z.ZodType<
|
|
|
990
1035
|
),
|
|
991
1036
|
AerodromeSlipstreamWithdrawLiquidityProvisionParams$outboundSchema.and(
|
|
992
1037
|
z.object({
|
|
993
|
-
actionType: z.literal(
|
|
1038
|
+
actionType: z.literal(
|
|
1039
|
+
"AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION",
|
|
1040
|
+
),
|
|
994
1041
|
}).transform((v) => ({ action_type: v.actionType })),
|
|
995
1042
|
),
|
|
996
1043
|
MorphoSetVaultAllowanceParams$outboundSchema.and(
|
|
@@ -1038,8 +1085,9 @@ export const UserOperation$outboundSchema: z.ZodType<
|
|
|
1038
1085
|
})),
|
|
1039
1086
|
),
|
|
1040
1087
|
UniswapWithdrawLiquidityProvisionParams$outboundSchema.and(
|
|
1041
|
-
z.object({
|
|
1042
|
-
|
|
1088
|
+
z.object({
|
|
1089
|
+
actionType: z.literal("UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"),
|
|
1090
|
+
}).transform((v) => ({ action_type: v.actionType })),
|
|
1043
1091
|
),
|
|
1044
1092
|
AaveSupplyParams$outboundSchema.and(
|
|
1045
1093
|
z.object({ actionType: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
@@ -1106,7 +1154,9 @@ export const UserOperation$outboundSchema: z.ZodType<
|
|
|
1106
1154
|
),
|
|
1107
1155
|
AerodromeSlipstreamIncreaseLiquidityProvisionParams$outboundSchema.and(
|
|
1108
1156
|
z.object({
|
|
1109
|
-
actionType: z.literal(
|
|
1157
|
+
actionType: z.literal(
|
|
1158
|
+
"AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION",
|
|
1159
|
+
),
|
|
1110
1160
|
}).transform((v) => ({ action_type: v.actionType })),
|
|
1111
1161
|
),
|
|
1112
1162
|
AerodromeSlipstreamSellExactlyParams$outboundSchema.and(
|
|
@@ -1129,13 +1179,13 @@ export const UserOperation$outboundSchema: z.ZodType<
|
|
|
1129
1179
|
) => ({ action_type: v.actionType })),
|
|
1130
1180
|
),
|
|
1131
1181
|
AerodromeSlipstreamMintLiquidityProvisionParams$outboundSchema.and(
|
|
1132
|
-
z.object({
|
|
1133
|
-
|
|
1182
|
+
z.object({
|
|
1183
|
+
actionType: z.literal("AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION"),
|
|
1184
|
+
}).transform((v) => ({ action_type: v.actionType })),
|
|
1134
1185
|
),
|
|
1135
1186
|
UniswapMintLiquidityProvisionParams$outboundSchema.and(
|
|
1136
|
-
z.object({ actionType: z.literal("
|
|
1137
|
-
v,
|
|
1138
|
-
) => ({ action_type: v.actionType })),
|
|
1187
|
+
z.object({ actionType: z.literal("UNISWAP_MINT_LIQUIDITY_PROVISION") })
|
|
1188
|
+
.transform((v) => ({ action_type: v.actionType })),
|
|
1139
1189
|
),
|
|
1140
1190
|
]),
|
|
1141
1191
|
});
|
package/src/sdk/pendle.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { pendleMarket } from "../funcs/pendleMarket.js";
|
|
|
8
8
|
import { pendleMarkets } from "../funcs/pendleMarkets.js";
|
|
9
9
|
import { pendlePosition } from "../funcs/pendlePosition.js";
|
|
10
10
|
import { pendlePositions } from "../funcs/pendlePositions.js";
|
|
11
|
+
import { pendleRedeemYield } from "../funcs/pendleRedeemYield.js";
|
|
11
12
|
import { pendleSellPt } from "../funcs/pendleSellPt.js";
|
|
12
13
|
import { pendleSellYt } from "../funcs/pendleSellYt.js";
|
|
13
14
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -151,4 +152,21 @@ export class Pendle extends ClientSDK {
|
|
|
151
152
|
options,
|
|
152
153
|
));
|
|
153
154
|
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Redeem Claimable Yield
|
|
158
|
+
*
|
|
159
|
+
* @remarks
|
|
160
|
+
* Redeem claimable yield from the market's associated Yield Token (YT).
|
|
161
|
+
*/
|
|
162
|
+
async redeemYield(
|
|
163
|
+
request: components.PendleRedeemYieldRequest,
|
|
164
|
+
options?: RequestOptions,
|
|
165
|
+
): Promise<components.TxResponse> {
|
|
166
|
+
return unwrapAsync(pendleRedeemYield(
|
|
167
|
+
this,
|
|
168
|
+
request,
|
|
169
|
+
options,
|
|
170
|
+
));
|
|
171
|
+
}
|
|
154
172
|
}
|