@compass-labs/api-sdk 0.5.62 → 0.5.63

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 (124) hide show
  1. package/README.md +4 -4
  2. package/bin/mcp-server.js +46 -17
  3. package/bin/mcp-server.js.map +17 -17
  4. package/dist/commonjs/funcs/pendleAddLiquidity.d.ts +8 -3
  5. package/dist/commonjs/funcs/pendleAddLiquidity.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/pendleAddLiquidity.js +8 -3
  7. package/dist/commonjs/funcs/pendleAddLiquidity.js.map +1 -1
  8. package/dist/commonjs/funcs/pendleBuyPt.d.ts +6 -1
  9. package/dist/commonjs/funcs/pendleBuyPt.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/pendleBuyPt.js +6 -1
  11. package/dist/commonjs/funcs/pendleBuyPt.js.map +1 -1
  12. package/dist/commonjs/funcs/pendleBuyYt.d.ts +6 -1
  13. package/dist/commonjs/funcs/pendleBuyYt.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/pendleBuyYt.js +6 -1
  15. package/dist/commonjs/funcs/pendleBuyYt.js.map +1 -1
  16. package/dist/commonjs/funcs/pendleRemoveLiquidity.d.ts +5 -4
  17. package/dist/commonjs/funcs/pendleRemoveLiquidity.d.ts.map +1 -1
  18. package/dist/commonjs/funcs/pendleRemoveLiquidity.js +5 -4
  19. package/dist/commonjs/funcs/pendleRemoveLiquidity.js.map +1 -1
  20. package/dist/commonjs/funcs/pendleSellPt.d.ts +6 -1
  21. package/dist/commonjs/funcs/pendleSellPt.d.ts.map +1 -1
  22. package/dist/commonjs/funcs/pendleSellPt.js +6 -1
  23. package/dist/commonjs/funcs/pendleSellPt.js.map +1 -1
  24. package/dist/commonjs/funcs/pendleSellYt.d.ts +9 -1
  25. package/dist/commonjs/funcs/pendleSellYt.d.ts.map +1 -1
  26. package/dist/commonjs/funcs/pendleSellYt.js +9 -1
  27. package/dist/commonjs/funcs/pendleSellYt.js.map +1 -1
  28. package/dist/commonjs/lib/config.d.ts +2 -2
  29. package/dist/commonjs/lib/config.js +2 -2
  30. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  31. package/dist/commonjs/mcp-server/server.js +2 -2
  32. package/dist/commonjs/mcp-server/server.js.map +1 -1
  33. package/dist/commonjs/mcp-server/tools/pendleAddLiquidity.d.ts.map +1 -1
  34. package/dist/commonjs/mcp-server/tools/pendleAddLiquidity.js +8 -3
  35. package/dist/commonjs/mcp-server/tools/pendleAddLiquidity.js.map +1 -1
  36. package/dist/commonjs/mcp-server/tools/pendleBuyPt.d.ts.map +1 -1
  37. package/dist/commonjs/mcp-server/tools/pendleBuyPt.js +6 -1
  38. package/dist/commonjs/mcp-server/tools/pendleBuyPt.js.map +1 -1
  39. package/dist/commonjs/mcp-server/tools/pendleBuyYt.d.ts.map +1 -1
  40. package/dist/commonjs/mcp-server/tools/pendleBuyYt.js +6 -1
  41. package/dist/commonjs/mcp-server/tools/pendleBuyYt.js.map +1 -1
  42. package/dist/commonjs/mcp-server/tools/pendleRemoveLiquidity.d.ts.map +1 -1
  43. package/dist/commonjs/mcp-server/tools/pendleRemoveLiquidity.js +5 -4
  44. package/dist/commonjs/mcp-server/tools/pendleRemoveLiquidity.js.map +1 -1
  45. package/dist/commonjs/mcp-server/tools/pendleSellPt.d.ts.map +1 -1
  46. package/dist/commonjs/mcp-server/tools/pendleSellPt.js +6 -1
  47. package/dist/commonjs/mcp-server/tools/pendleSellPt.js.map +1 -1
  48. package/dist/commonjs/mcp-server/tools/pendleSellYt.d.ts.map +1 -1
  49. package/dist/commonjs/mcp-server/tools/pendleSellYt.js +9 -1
  50. package/dist/commonjs/mcp-server/tools/pendleSellYt.js.map +1 -1
  51. package/dist/commonjs/sdk/pendle.d.ts +48 -19
  52. package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
  53. package/dist/commonjs/sdk/pendle.js +51 -22
  54. package/dist/commonjs/sdk/pendle.js.map +1 -1
  55. package/dist/esm/funcs/pendleAddLiquidity.d.ts +8 -3
  56. package/dist/esm/funcs/pendleAddLiquidity.d.ts.map +1 -1
  57. package/dist/esm/funcs/pendleAddLiquidity.js +8 -3
  58. package/dist/esm/funcs/pendleAddLiquidity.js.map +1 -1
  59. package/dist/esm/funcs/pendleBuyPt.d.ts +6 -1
  60. package/dist/esm/funcs/pendleBuyPt.d.ts.map +1 -1
  61. package/dist/esm/funcs/pendleBuyPt.js +6 -1
  62. package/dist/esm/funcs/pendleBuyPt.js.map +1 -1
  63. package/dist/esm/funcs/pendleBuyYt.d.ts +6 -1
  64. package/dist/esm/funcs/pendleBuyYt.d.ts.map +1 -1
  65. package/dist/esm/funcs/pendleBuyYt.js +6 -1
  66. package/dist/esm/funcs/pendleBuyYt.js.map +1 -1
  67. package/dist/esm/funcs/pendleRemoveLiquidity.d.ts +5 -4
  68. package/dist/esm/funcs/pendleRemoveLiquidity.d.ts.map +1 -1
  69. package/dist/esm/funcs/pendleRemoveLiquidity.js +5 -4
  70. package/dist/esm/funcs/pendleRemoveLiquidity.js.map +1 -1
  71. package/dist/esm/funcs/pendleSellPt.d.ts +6 -1
  72. package/dist/esm/funcs/pendleSellPt.d.ts.map +1 -1
  73. package/dist/esm/funcs/pendleSellPt.js +6 -1
  74. package/dist/esm/funcs/pendleSellPt.js.map +1 -1
  75. package/dist/esm/funcs/pendleSellYt.d.ts +9 -1
  76. package/dist/esm/funcs/pendleSellYt.d.ts.map +1 -1
  77. package/dist/esm/funcs/pendleSellYt.js +9 -1
  78. package/dist/esm/funcs/pendleSellYt.js.map +1 -1
  79. package/dist/esm/lib/config.d.ts +2 -2
  80. package/dist/esm/lib/config.js +2 -2
  81. package/dist/esm/mcp-server/mcp-server.js +1 -1
  82. package/dist/esm/mcp-server/server.js +2 -2
  83. package/dist/esm/mcp-server/server.js.map +1 -1
  84. package/dist/esm/mcp-server/tools/pendleAddLiquidity.d.ts.map +1 -1
  85. package/dist/esm/mcp-server/tools/pendleAddLiquidity.js +8 -3
  86. package/dist/esm/mcp-server/tools/pendleAddLiquidity.js.map +1 -1
  87. package/dist/esm/mcp-server/tools/pendleBuyPt.d.ts.map +1 -1
  88. package/dist/esm/mcp-server/tools/pendleBuyPt.js +6 -1
  89. package/dist/esm/mcp-server/tools/pendleBuyPt.js.map +1 -1
  90. package/dist/esm/mcp-server/tools/pendleBuyYt.d.ts.map +1 -1
  91. package/dist/esm/mcp-server/tools/pendleBuyYt.js +6 -1
  92. package/dist/esm/mcp-server/tools/pendleBuyYt.js.map +1 -1
  93. package/dist/esm/mcp-server/tools/pendleRemoveLiquidity.d.ts.map +1 -1
  94. package/dist/esm/mcp-server/tools/pendleRemoveLiquidity.js +5 -4
  95. package/dist/esm/mcp-server/tools/pendleRemoveLiquidity.js.map +1 -1
  96. package/dist/esm/mcp-server/tools/pendleSellPt.d.ts.map +1 -1
  97. package/dist/esm/mcp-server/tools/pendleSellPt.js +6 -1
  98. package/dist/esm/mcp-server/tools/pendleSellPt.js.map +1 -1
  99. package/dist/esm/mcp-server/tools/pendleSellYt.d.ts.map +1 -1
  100. package/dist/esm/mcp-server/tools/pendleSellYt.js +9 -1
  101. package/dist/esm/mcp-server/tools/pendleSellYt.js.map +1 -1
  102. package/dist/esm/sdk/pendle.d.ts +48 -19
  103. package/dist/esm/sdk/pendle.d.ts.map +1 -1
  104. package/dist/esm/sdk/pendle.js +51 -22
  105. package/dist/esm/sdk/pendle.js.map +1 -1
  106. package/docs/sdks/pendle/README.md +73 -44
  107. package/jsr.json +1 -1
  108. package/package.json +1 -1
  109. package/src/funcs/pendleAddLiquidity.ts +8 -3
  110. package/src/funcs/pendleBuyPt.ts +6 -1
  111. package/src/funcs/pendleBuyYt.ts +6 -1
  112. package/src/funcs/pendleRemoveLiquidity.ts +5 -4
  113. package/src/funcs/pendleSellPt.ts +6 -1
  114. package/src/funcs/pendleSellYt.ts +9 -1
  115. package/src/lib/config.ts +2 -2
  116. package/src/mcp-server/mcp-server.ts +1 -1
  117. package/src/mcp-server/server.ts +2 -2
  118. package/src/mcp-server/tools/pendleAddLiquidity.ts +8 -3
  119. package/src/mcp-server/tools/pendleBuyPt.ts +6 -1
  120. package/src/mcp-server/tools/pendleBuyYt.ts +6 -1
  121. package/src/mcp-server/tools/pendleRemoveLiquidity.ts +5 -4
  122. package/src/mcp-server/tools/pendleSellPt.ts +6 -1
  123. package/src/mcp-server/tools/pendleSellYt.ts +9 -1
  124. package/src/sdk/pendle.ts +54 -25
@@ -12,12 +12,17 @@ const args = {
12
12
 
13
13
  export const tool$pendleAddLiquidity: ToolDefinition<typeof args> = {
14
14
  name: "pendle-add-liquidity",
15
- description: `Add Liquidity
15
+ description: `Add Liquidity (LP)
16
16
 
17
17
  Add liquidity to a Pendle Market to earn yield.
18
18
 
19
- Liquidity is added in the form of the market's Underlying Token. Representation of
20
- the liquidity received is the market's Liquidity Provider Token (LP).
19
+ Liquidity is added to the market with a token of the user's choice.
20
+
21
+ Representation of the liquidity provided is in the form of market's Liquidity
22
+ Provider Token (LP) received by the user.
23
+
24
+ An appropriate allowance for the Pendle Router on the token_in contract must be set
25
+ beforehand.
21
26
  <Info>
22
27
  **Required Allowances**
23
28
 
@@ -14,7 +14,12 @@ export const tool$pendleBuyPt: ToolDefinition<typeof args> = {
14
14
  name: "pendle-buy-pt",
15
15
  description: `Buy Principal Token (PT)
16
16
 
17
- Buy Principal Token (PT) with market's Underlying Token.
17
+ Buy market's Principal Token (PT) for fixed yield.
18
+
19
+ PT is bought with a token of the user's choice.
20
+
21
+ An appropriate allowance for the Pendle Router on the token_in contract must be set
22
+ beforehand.
18
23
  <Info>
19
24
  **Required Allowances**
20
25
 
@@ -14,7 +14,12 @@ export const tool$pendleBuyYt: ToolDefinition<typeof args> = {
14
14
  name: "pendle-buy-yt",
15
15
  description: `Buy Yield Token (YT)
16
16
 
17
- Buy Yield Token (YT) with market's Underlying Token.
17
+ Buy Yield Token (YT) to go long yield and earn variable yield.
18
+
19
+ YT is bought with a token of the user's choice.
20
+
21
+ An appropriate allowance for the Pendle Router on the token_in contract must be set
22
+ beforehand.
18
23
  <Info>
19
24
  **Required Allowances**
20
25
 
@@ -12,13 +12,14 @@ const args = {
12
12
 
13
13
  export const tool$pendleRemoveLiquidity: ToolDefinition<typeof args> = {
14
14
  name: "pendle-remove-liquidity",
15
- description: `Remove Liquidity
15
+ description: `Remove Liquidity (LP)
16
16
 
17
17
  Remove liquidity from a Pendle Market.
18
18
 
19
- Liquidity is removed in the form of the market's Liquidity Provider Token (LP) into
20
- the market's Underlying Token. An appropriate allowance for the Pendle Router on the
21
- market contract must be set beforehand
19
+ Liquidity is removed from the market into a token of the user's choice.
20
+
21
+ An appropriate allowance for the Pendle Router on the market contract (LP) must be
22
+ set beforehand.
22
23
  <Info>
23
24
  **Required Allowances**
24
25
 
@@ -14,7 +14,12 @@ export const tool$pendleSellPt: ToolDefinition<typeof args> = {
14
14
  name: "pendle-sell-pt",
15
15
  description: `Sell Principal Token (PT)
16
16
 
17
- Sell Principal Token (PT) for the market's Underlying Token.
17
+ Sell Principal Token (PT) to redeem the fixed yield you have earned thus far.
18
+
19
+ PT is sold for a token of the user's choice.
20
+
21
+ An appropriate allowance for the Pendle Router on the market's PT token contract
22
+ must be set beforehand.
18
23
  <Info>
19
24
  **Required Allowances**
20
25
 
@@ -14,7 +14,15 @@ export const tool$pendleSellYt: ToolDefinition<typeof args> = {
14
14
  name: "pendle-sell-yt",
15
15
  description: `Sell Yield Token (YT)
16
16
 
17
- Sell Yield Token (YT) for the market's Underlying Token.
17
+ Sell Yield Token (YT) to stop earning variable yield.
18
+
19
+ YT is sold for a token of the user's choice.
20
+
21
+ An appropriate allowance for the Pendle Router on the market's YT token contract
22
+ must be set beforehand.
23
+
24
+ Make sure to redeem yield earned thus far by calling the 'Redeem Claimable Yield'
25
+ before selling YT.
18
26
  <Info>
19
27
  **Required Allowances**
20
28
 
package/src/sdk/pendle.ts CHANGED
@@ -98,7 +98,12 @@ export class Pendle extends ClientSDK {
98
98
  * Buy Principal Token (PT)
99
99
  *
100
100
  * @remarks
101
- * Buy Principal Token (PT) with market's Underlying Token.
101
+ * Buy market's Principal Token (PT) for fixed yield.
102
+ *
103
+ * PT is bought with a token of the user's choice.
104
+ *
105
+ * An appropriate allowance for the Pendle Router on the token_in contract must be set
106
+ * beforehand.
102
107
  * <Info>
103
108
  * **Required Allowances**
104
109
  *
@@ -122,7 +127,12 @@ export class Pendle extends ClientSDK {
122
127
  * Sell Principal Token (PT)
123
128
  *
124
129
  * @remarks
125
- * Sell Principal Token (PT) for the market's Underlying Token.
130
+ * Sell Principal Token (PT) to redeem the fixed yield you have earned thus far.
131
+ *
132
+ * PT is sold for a token of the user's choice.
133
+ *
134
+ * An appropriate allowance for the Pendle Router on the market's PT token contract
135
+ * must be set beforehand.
126
136
  * <Info>
127
137
  * **Required Allowances**
128
138
  *
@@ -146,7 +156,12 @@ export class Pendle extends ClientSDK {
146
156
  * Buy Yield Token (YT)
147
157
  *
148
158
  * @remarks
149
- * Buy Yield Token (YT) with market's Underlying Token.
159
+ * Buy Yield Token (YT) to go long yield and earn variable yield.
160
+ *
161
+ * YT is bought with a token of the user's choice.
162
+ *
163
+ * An appropriate allowance for the Pendle Router on the token_in contract must be set
164
+ * beforehand.
150
165
  * <Info>
151
166
  * **Required Allowances**
152
167
  *
@@ -170,7 +185,15 @@ export class Pendle extends ClientSDK {
170
185
  * Sell Yield Token (YT)
171
186
  *
172
187
  * @remarks
173
- * Sell Yield Token (YT) for the market's Underlying Token.
188
+ * Sell Yield Token (YT) to stop earning variable yield.
189
+ *
190
+ * YT is sold for a token of the user's choice.
191
+ *
192
+ * An appropriate allowance for the Pendle Router on the market's YT token contract
193
+ * must be set beforehand.
194
+ *
195
+ * Make sure to redeem yield earned thus far by calling the 'Redeem Claimable Yield'
196
+ * before selling YT.
174
197
  * <Info>
175
198
  * **Required Allowances**
176
199
  *
@@ -191,10 +214,18 @@ export class Pendle extends ClientSDK {
191
214
  }
192
215
 
193
216
  /**
194
- * Redeem Claimable Yield
217
+ * Add Liquidity (LP)
195
218
  *
196
219
  * @remarks
197
- * Redeem claimable yield from the market's associated Yield Token (YT).
220
+ * Add liquidity to a Pendle Market to earn yield.
221
+ *
222
+ * Liquidity is added to the market with a token of the user's choice.
223
+ *
224
+ * Representation of the liquidity provided is in the form of market's Liquidity
225
+ * Provider Token (LP) received by the user.
226
+ *
227
+ * An appropriate allowance for the Pendle Router on the token_in contract must be set
228
+ * beforehand.
198
229
  * <Info>
199
230
  * **Required Allowances**
200
231
  *
@@ -203,11 +234,11 @@ export class Pendle extends ClientSDK {
203
234
  * - `PendleRouter`
204
235
  * </Info>
205
236
  */
206
- async redeemYield(
207
- request: components.PendleRedeemYieldRequest,
237
+ async addLiquidity(
238
+ request: components.PendleAddLiquidityRequest,
208
239
  options?: RequestOptions,
209
240
  ): Promise<components.TxResponse> {
210
- return unwrapAsync(pendleRedeemYield(
241
+ return unwrapAsync(pendleAddLiquidity(
211
242
  this,
212
243
  request,
213
244
  options,
@@ -215,13 +246,15 @@ export class Pendle extends ClientSDK {
215
246
  }
216
247
 
217
248
  /**
218
- * Add Liquidity
249
+ * Remove Liquidity (LP)
219
250
  *
220
251
  * @remarks
221
- * Add liquidity to a Pendle Market to earn yield.
252
+ * Remove liquidity from a Pendle Market.
222
253
  *
223
- * Liquidity is added in the form of the market's Underlying Token. Representation of
224
- * the liquidity received is the market's Liquidity Provider Token (LP).
254
+ * Liquidity is removed from the market into a token of the user's choice.
255
+ *
256
+ * An appropriate allowance for the Pendle Router on the market contract (LP) must be
257
+ * set beforehand.
225
258
  * <Info>
226
259
  * **Required Allowances**
227
260
  *
@@ -230,11 +263,11 @@ export class Pendle extends ClientSDK {
230
263
  * - `PendleRouter`
231
264
  * </Info>
232
265
  */
233
- async addLiquidity(
234
- request: components.PendleAddLiquidityRequest,
266
+ async removeLiquidity(
267
+ request: components.PendleRemoveLiquidityRequest,
235
268
  options?: RequestOptions,
236
269
  ): Promise<components.TxResponse> {
237
- return unwrapAsync(pendleAddLiquidity(
270
+ return unwrapAsync(pendleRemoveLiquidity(
238
271
  this,
239
272
  request,
240
273
  options,
@@ -242,14 +275,10 @@ export class Pendle extends ClientSDK {
242
275
  }
243
276
 
244
277
  /**
245
- * Remove Liquidity
278
+ * Redeem Claimable Yield
246
279
  *
247
280
  * @remarks
248
- * Remove liquidity from a Pendle Market.
249
- *
250
- * Liquidity is removed in the form of the market's Liquidity Provider Token (LP) into
251
- * the market's Underlying Token. An appropriate allowance for the Pendle Router on the
252
- * market contract must be set beforehand
281
+ * Redeem claimable yield from the market's associated Yield Token (YT).
253
282
  * <Info>
254
283
  * **Required Allowances**
255
284
  *
@@ -258,11 +287,11 @@ export class Pendle extends ClientSDK {
258
287
  * - `PendleRouter`
259
288
  * </Info>
260
289
  */
261
- async removeLiquidity(
262
- request: components.PendleRemoveLiquidityRequest,
290
+ async redeemYield(
291
+ request: components.PendleRedeemYieldRequest,
263
292
  options?: RequestOptions,
264
293
  ): Promise<components.TxResponse> {
265
- return unwrapAsync(pendleRemoveLiquidity(
294
+ return unwrapAsync(pendleRedeemYield(
266
295
  this,
267
296
  request,
268
297
  options,