@compass-labs/api-sdk 0.5.39 → 0.5.40
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 +465 -251
- package/bin/mcp-server.js.map +12 -8
- package/dist/commonjs/funcs/pendleQuote.d.ts +24 -0
- package/dist/commonjs/funcs/pendleQuote.d.ts.map +1 -0
- package/dist/commonjs/funcs/pendleQuote.js +132 -0
- package/dist/commonjs/funcs/pendleQuote.js.map +1 -0
- 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/pendleQuote.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/pendleQuote.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleQuote.js +69 -0
- package/dist/commonjs/mcp-server/tools/pendleQuote.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/pendlegetquoteresponse.d.ts +32 -0
- package/dist/commonjs/models/components/pendlegetquoteresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlegetquoteresponse.js +69 -0
- package/dist/commonjs/models/components/pendlegetquoteresponse.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/pendlequote.d.ts +181 -0
- package/dist/commonjs/models/operations/pendlequote.d.ts.map +1 -0
- package/dist/commonjs/models/operations/pendlequote.js +186 -0
- package/dist/commonjs/models/operations/pendlequote.js.map +1 -0
- package/dist/commonjs/sdk/pendle.d.ts +12 -0
- package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
- package/dist/commonjs/sdk/pendle.js +15 -0
- package/dist/commonjs/sdk/pendle.js.map +1 -1
- package/dist/esm/funcs/pendleQuote.d.ts +24 -0
- package/dist/esm/funcs/pendleQuote.d.ts.map +1 -0
- package/dist/esm/funcs/pendleQuote.js +96 -0
- package/dist/esm/funcs/pendleQuote.js.map +1 -0
- 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/pendleQuote.d.ts +8 -0
- package/dist/esm/mcp-server/tools/pendleQuote.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/pendleQuote.js +33 -0
- package/dist/esm/mcp-server/tools/pendleQuote.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/pendlegetquoteresponse.d.ts +32 -0
- package/dist/esm/models/components/pendlegetquoteresponse.d.ts.map +1 -0
- package/dist/esm/models/components/pendlegetquoteresponse.js +31 -0
- package/dist/esm/models/components/pendlegetquoteresponse.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/pendlequote.d.ts +181 -0
- package/dist/esm/models/operations/pendlequote.d.ts.map +1 -0
- package/dist/esm/models/operations/pendlequote.js +146 -0
- package/dist/esm/models/operations/pendlequote.js.map +1 -0
- package/dist/esm/sdk/pendle.d.ts +12 -0
- package/dist/esm/sdk/pendle.d.ts.map +1 -1
- package/dist/esm/sdk/pendle.js +15 -0
- package/dist/esm/sdk/pendle.js.map +1 -1
- package/docs/sdks/pendle/README.md +79 -0
- package/docs/sdks/smartaccount/README.md +2 -0
- package/docs/sdks/transactionbundler/README.md +2 -0
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/pendleQuote.ts +184 -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/pendleQuote.ts +42 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/pendlegetquoteresponse.ts +69 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/pendlequote.ts +265 -0
- package/src/sdk/pendle.ts +23 -0
package/dist/esm/sdk/pendle.d.ts
CHANGED
|
@@ -30,6 +30,18 @@ export declare class Pendle extends ClientSDK {
|
|
|
30
30
|
* Get a list of active markets.
|
|
31
31
|
*/
|
|
32
32
|
markets(request: operations.PendleMarketsRequest, options?: RequestOptions): Promise<components.PendleListMarketsResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Get Quote
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Retrieve a quote for trading Principal Token (PT), Yield Token (YT), or Liquidity
|
|
38
|
+
* Provider Token (LP) on Pendle.
|
|
39
|
+
*
|
|
40
|
+
* For `BUY`, `amount` is the quantity of the Underlying Token to spend, and the quote returns the amount of `token_type` received.
|
|
41
|
+
*
|
|
42
|
+
* For `SELL`, `amount` is the quantity of `token_type` to sell, and the quote returns the amount of Underlying Token received.
|
|
43
|
+
*/
|
|
44
|
+
quote(request: operations.PendleQuoteRequest, options?: RequestOptions): Promise<components.PendleGetQuoteResponse>;
|
|
33
45
|
/**
|
|
34
46
|
* Buy Principal Token (PT)
|
|
35
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pendle.d.ts","sourceRoot":"","sources":["../../../src/sdk/pendle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pendle.d.ts","sourceRoot":"","sources":["../../../src/sdk/pendle.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,MAAO,SAAQ,SAAS;IACnC;;;;;OAKG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAQpD;;;;;OAKG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAQ9C;;;;;OAKG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQhD;;;;;;;;;;OAUG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;OAKG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;OAKG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;;;;OAQG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;;;;;OASG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;CAOlC"}
|
package/dist/esm/sdk/pendle.js
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 { pendleQuote } from "../funcs/pendleQuote.js";
|
|
11
12
|
import { pendleRedeemYield } from "../funcs/pendleRedeemYield.js";
|
|
12
13
|
import { pendleRemoveLiquidity } from "../funcs/pendleRemoveLiquidity.js";
|
|
13
14
|
import { pendleSellPt } from "../funcs/pendleSellPt.js";
|
|
@@ -51,6 +52,20 @@ export class Pendle extends ClientSDK {
|
|
|
51
52
|
async markets(request, options) {
|
|
52
53
|
return unwrapAsync(pendleMarkets(this, request, options));
|
|
53
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Get Quote
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Retrieve a quote for trading Principal Token (PT), Yield Token (YT), or Liquidity
|
|
60
|
+
* Provider Token (LP) on Pendle.
|
|
61
|
+
*
|
|
62
|
+
* For `BUY`, `amount` is the quantity of the Underlying Token to spend, and the quote returns the amount of `token_type` received.
|
|
63
|
+
*
|
|
64
|
+
* For `SELL`, `amount` is the quantity of `token_type` to sell, and the quote returns the amount of Underlying Token received.
|
|
65
|
+
*/
|
|
66
|
+
async quote(request, options) {
|
|
67
|
+
return unwrapAsync(pendleQuote(this, request, options));
|
|
68
|
+
}
|
|
54
69
|
/**
|
|
55
70
|
* Buy Principal Token (PT)
|
|
56
71
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pendle.js","sourceRoot":"","sources":["../../../src/sdk/pendle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD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C5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CACT,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,WAAW,CAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAA4C,EAC5C,OAAwB;QAExB,OAAO,WAAW,CAAC,iBAAiB,CAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAChB,OAA6C,EAC7C,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,eAAe,CACnB,OAAgD,EAChD,OAAwB;QAExB,OAAO,WAAW,CAAC,qBAAqB,CACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* [positions](#positions) - List User's Market Positions
|
|
10
10
|
* [market](#market) - Get Market Data
|
|
11
11
|
* [markets](#markets) - List Market Data
|
|
12
|
+
* [quote](#quote) - Get Quote
|
|
12
13
|
* [buyPt](#buypt) - Buy Principal Token (PT)
|
|
13
14
|
* [sellPt](#sellpt) - Sell Principal Token (PT)
|
|
14
15
|
* [buyYt](#buyyt) - Buy Yield Token (YT)
|
|
@@ -293,6 +294,84 @@ run();
|
|
|
293
294
|
| errors.HTTPValidationError | 422 | application/json |
|
|
294
295
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
295
296
|
|
|
297
|
+
## quote
|
|
298
|
+
|
|
299
|
+
Retrieve a quote for trading Principal Token (PT), Yield Token (YT), or Liquidity
|
|
300
|
+
Provider Token (LP) on Pendle.
|
|
301
|
+
|
|
302
|
+
For `BUY`, `amount` is the quantity of the Underlying Token to spend, and the quote returns the amount of `token_type` received.
|
|
303
|
+
|
|
304
|
+
For `SELL`, `amount` is the quantity of `token_type` to sell, and the quote returns the amount of Underlying Token received.
|
|
305
|
+
|
|
306
|
+
### Example Usage
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
310
|
+
|
|
311
|
+
const compassApiSDK = new CompassApiSDK({
|
|
312
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
async function run() {
|
|
316
|
+
const result = await compassApiSDK.pendle.quote({
|
|
317
|
+
amount: "82.33",
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
console.log(result);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
run();
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Standalone function
|
|
327
|
+
|
|
328
|
+
The standalone function version of this method:
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
332
|
+
import { pendleQuote } from "@compass-labs/api-sdk/funcs/pendleQuote.js";
|
|
333
|
+
|
|
334
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
335
|
+
// You can create one instance of it to use across an application.
|
|
336
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
337
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
async function run() {
|
|
341
|
+
const res = await pendleQuote(compassApiSDK, {
|
|
342
|
+
amount: "82.33",
|
|
343
|
+
});
|
|
344
|
+
if (res.ok) {
|
|
345
|
+
const { value: result } = res;
|
|
346
|
+
console.log(result);
|
|
347
|
+
} else {
|
|
348
|
+
console.log("pendleQuote failed:", res.error);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
run();
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Parameters
|
|
356
|
+
|
|
357
|
+
| Parameter | Type | Required | Description |
|
|
358
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
359
|
+
| `request` | [operations.PendleQuoteRequest](../../models/operations/pendlequoterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
360
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
361
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
362
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
363
|
+
|
|
364
|
+
### Response
|
|
365
|
+
|
|
366
|
+
**Promise\<[components.PendleGetQuoteResponse](../../models/components/pendlegetquoteresponse.md)\>**
|
|
367
|
+
|
|
368
|
+
### Errors
|
|
369
|
+
|
|
370
|
+
| Error Type | Status Code | Content Type |
|
|
371
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
372
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
373
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
374
|
+
|
|
296
375
|
## buyPt
|
|
297
376
|
|
|
298
377
|
Buy Principal Token (PT) with market's Underlying Token.
|
|
@@ -27,6 +27,7 @@ async function run() {
|
|
|
27
27
|
operations: [
|
|
28
28
|
{
|
|
29
29
|
body: {
|
|
30
|
+
actionType: "SET_ALLOWANCE",
|
|
30
31
|
token: "WETH",
|
|
31
32
|
contract: "UniswapV3Router",
|
|
32
33
|
amount: "1000",
|
|
@@ -62,6 +63,7 @@ async function run() {
|
|
|
62
63
|
operations: [
|
|
63
64
|
{
|
|
64
65
|
body: {
|
|
66
|
+
actionType: "SET_ALLOWANCE",
|
|
65
67
|
token: "WETH",
|
|
66
68
|
contract: "UniswapV3Router",
|
|
67
69
|
amount: "1000",
|
|
@@ -123,6 +123,7 @@ async function run() {
|
|
|
123
123
|
actions: [
|
|
124
124
|
{
|
|
125
125
|
body: {
|
|
126
|
+
actionType: "SET_ALLOWANCE",
|
|
126
127
|
token: "WETH",
|
|
127
128
|
contract: "UniswapV3Router",
|
|
128
129
|
amount: "1000",
|
|
@@ -166,6 +167,7 @@ async function run() {
|
|
|
166
167
|
actions: [
|
|
167
168
|
{
|
|
168
169
|
body: {
|
|
170
|
+
actionType: "SET_ALLOWANCE",
|
|
169
171
|
token: "WETH",
|
|
170
172
|
contract: "UniswapV3Router",
|
|
171
173
|
amount: "1000",
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compass-labs/api-sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.40",
|
|
4
4
|
"author": "royalnine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0",
|
|
48
48
|
"@stricli/core": "^1.1.1",
|
|
49
49
|
"@types/express": "^4.17.21",
|
|
50
|
-
"bun": "
|
|
51
|
-
"bun-types": "
|
|
50
|
+
"bun": "1.2.17",
|
|
51
|
+
"bun-types": "1.2.17",
|
|
52
52
|
"eslint": "^9.19.0",
|
|
53
53
|
"express": "^4.21.2",
|
|
54
54
|
"globals": "^15.14.0",
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { CompassApiSDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get Quote
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Retrieve a quote for trading Principal Token (PT), Yield Token (YT), or Liquidity
|
|
34
|
+
* Provider Token (LP) on Pendle.
|
|
35
|
+
*
|
|
36
|
+
* For `BUY`, `amount` is the quantity of the Underlying Token to spend, and the quote returns the amount of `token_type` received.
|
|
37
|
+
*
|
|
38
|
+
* For `SELL`, `amount` is the quantity of `token_type` to sell, and the quote returns the amount of Underlying Token received.
|
|
39
|
+
*/
|
|
40
|
+
export function pendleQuote(
|
|
41
|
+
client: CompassApiSDKCore,
|
|
42
|
+
request: operations.PendleQuoteRequest,
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): APIPromise<
|
|
45
|
+
Result<
|
|
46
|
+
components.PendleGetQuoteResponse,
|
|
47
|
+
| errors.HTTPValidationError
|
|
48
|
+
| CompassAPISDKError
|
|
49
|
+
| ResponseValidationError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| InvalidRequestError
|
|
54
|
+
| UnexpectedClientError
|
|
55
|
+
| SDKValidationError
|
|
56
|
+
>
|
|
57
|
+
> {
|
|
58
|
+
return new APIPromise($do(
|
|
59
|
+
client,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: CompassApiSDKCore,
|
|
67
|
+
request: operations.PendleQuoteRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<
|
|
70
|
+
[
|
|
71
|
+
Result<
|
|
72
|
+
components.PendleGetQuoteResponse,
|
|
73
|
+
| errors.HTTPValidationError
|
|
74
|
+
| CompassAPISDKError
|
|
75
|
+
| ResponseValidationError
|
|
76
|
+
| ConnectionError
|
|
77
|
+
| RequestAbortedError
|
|
78
|
+
| RequestTimeoutError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
>,
|
|
83
|
+
APICall,
|
|
84
|
+
]
|
|
85
|
+
> {
|
|
86
|
+
const parsed = safeParse(
|
|
87
|
+
request,
|
|
88
|
+
(value) => operations.PendleQuoteRequest$outboundSchema.parse(value),
|
|
89
|
+
"Input validation failed",
|
|
90
|
+
);
|
|
91
|
+
if (!parsed.ok) {
|
|
92
|
+
return [parsed, { status: "invalid" }];
|
|
93
|
+
}
|
|
94
|
+
const payload = parsed.value;
|
|
95
|
+
const body = null;
|
|
96
|
+
|
|
97
|
+
const path = pathToFunc("/v0/pendle/quote")();
|
|
98
|
+
|
|
99
|
+
const query = encodeFormQuery({
|
|
100
|
+
"amount": payload.amount,
|
|
101
|
+
"block": payload.block,
|
|
102
|
+
"chain": payload.chain,
|
|
103
|
+
"market_address": payload.market_address,
|
|
104
|
+
"token_type": payload.token_type,
|
|
105
|
+
"trade_type": payload.trade_type,
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const headers = new Headers(compactMap({
|
|
109
|
+
Accept: "application/json",
|
|
110
|
+
}));
|
|
111
|
+
|
|
112
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
113
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
114
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
115
|
+
|
|
116
|
+
const context = {
|
|
117
|
+
options: client._options,
|
|
118
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
119
|
+
operationID: "pendle_quote",
|
|
120
|
+
oAuth2Scopes: [],
|
|
121
|
+
|
|
122
|
+
resolvedSecurity: requestSecurity,
|
|
123
|
+
|
|
124
|
+
securitySource: client._options.apiKeyAuth,
|
|
125
|
+
retryConfig: options?.retries
|
|
126
|
+
|| client._options.retryConfig
|
|
127
|
+
|| { strategy: "none" },
|
|
128
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const requestRes = client._createRequest(context, {
|
|
132
|
+
security: requestSecurity,
|
|
133
|
+
method: "GET",
|
|
134
|
+
baseURL: options?.serverURL,
|
|
135
|
+
path: path,
|
|
136
|
+
headers: headers,
|
|
137
|
+
query: query,
|
|
138
|
+
body: body,
|
|
139
|
+
userAgent: client._options.userAgent,
|
|
140
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
141
|
+
}, options);
|
|
142
|
+
if (!requestRes.ok) {
|
|
143
|
+
return [requestRes, { status: "invalid" }];
|
|
144
|
+
}
|
|
145
|
+
const req = requestRes.value;
|
|
146
|
+
|
|
147
|
+
const doResult = await client._do(req, {
|
|
148
|
+
context,
|
|
149
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
150
|
+
retryConfig: context.retryConfig,
|
|
151
|
+
retryCodes: context.retryCodes,
|
|
152
|
+
});
|
|
153
|
+
if (!doResult.ok) {
|
|
154
|
+
return [doResult, { status: "request-error", request: req }];
|
|
155
|
+
}
|
|
156
|
+
const response = doResult.value;
|
|
157
|
+
|
|
158
|
+
const responseFields = {
|
|
159
|
+
HttpMeta: { Response: response, Request: req },
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const [result] = await M.match<
|
|
163
|
+
components.PendleGetQuoteResponse,
|
|
164
|
+
| errors.HTTPValidationError
|
|
165
|
+
| CompassAPISDKError
|
|
166
|
+
| ResponseValidationError
|
|
167
|
+
| ConnectionError
|
|
168
|
+
| RequestAbortedError
|
|
169
|
+
| RequestTimeoutError
|
|
170
|
+
| InvalidRequestError
|
|
171
|
+
| UnexpectedClientError
|
|
172
|
+
| SDKValidationError
|
|
173
|
+
>(
|
|
174
|
+
M.json(200, components.PendleGetQuoteResponse$inboundSchema),
|
|
175
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
176
|
+
M.fail("4XX"),
|
|
177
|
+
M.fail("5XX"),
|
|
178
|
+
)(response, req, { extraFields: responseFields });
|
|
179
|
+
if (!result.ok) {
|
|
180
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return [result, { status: "complete", request: req, response }];
|
|
184
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "0.5.
|
|
65
|
-
genVersion: "2.648.
|
|
64
|
+
sdkVersion: "0.5.40",
|
|
65
|
+
genVersion: "2.648.7",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.5.
|
|
67
|
+
"speakeasy-sdk/typescript 0.5.40 2.648.7 0.0.1 @compass-labs/api-sdk",
|
|
68
68
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -55,6 +55,7 @@ import { tool$pendleMarket } from "./tools/pendleMarket.js";
|
|
|
55
55
|
import { tool$pendleMarkets } from "./tools/pendleMarkets.js";
|
|
56
56
|
import { tool$pendlePosition } from "./tools/pendlePosition.js";
|
|
57
57
|
import { tool$pendlePositions } from "./tools/pendlePositions.js";
|
|
58
|
+
import { tool$pendleQuote } from "./tools/pendleQuote.js";
|
|
58
59
|
import { tool$pendleRedeemYield } from "./tools/pendleRedeemYield.js";
|
|
59
60
|
import { tool$pendleRemoveLiquidity } from "./tools/pendleRemoveLiquidity.js";
|
|
60
61
|
import { tool$pendleSellPt } from "./tools/pendleSellPt.js";
|
|
@@ -101,7 +102,7 @@ export function createMCPServer(deps: {
|
|
|
101
102
|
}) {
|
|
102
103
|
const server = new McpServer({
|
|
103
104
|
name: "CompassApiSDK",
|
|
104
|
-
version: "0.5.
|
|
105
|
+
version: "0.5.40",
|
|
105
106
|
});
|
|
106
107
|
|
|
107
108
|
const client = new CompassApiSDKCore({
|
|
@@ -194,6 +195,7 @@ export function createMCPServer(deps: {
|
|
|
194
195
|
tool(tool$pendlePositions);
|
|
195
196
|
tool(tool$pendleMarket);
|
|
196
197
|
tool(tool$pendleMarkets);
|
|
198
|
+
tool(tool$pendleQuote);
|
|
197
199
|
tool(tool$pendleBuyPt);
|
|
198
200
|
tool(tool$pendleSellPt);
|
|
199
201
|
tool(tool$pendleBuyYt);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { pendleQuote } from "../../funcs/pendleQuote.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.PendleQuoteRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$pendleQuote: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "pendle-quote",
|
|
15
|
+
description: `Get Quote
|
|
16
|
+
|
|
17
|
+
Retrieve a quote for trading Principal Token (PT), Yield Token (YT), or Liquidity
|
|
18
|
+
Provider Token (LP) on Pendle.
|
|
19
|
+
|
|
20
|
+
For \`BUY\`, \`amount\` is the quantity of the Underlying Token to spend, and the quote returns the amount of \`token_type\` received.
|
|
21
|
+
|
|
22
|
+
For \`SELL\`, \`amount\` is the quantity of \`token_type\` to sell, and the quote returns the amount of Underlying Token received.`,
|
|
23
|
+
args,
|
|
24
|
+
tool: async (client, args, ctx) => {
|
|
25
|
+
const [result, apiCall] = await pendleQuote(
|
|
26
|
+
client,
|
|
27
|
+
args.request,
|
|
28
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
29
|
+
).$inspect();
|
|
30
|
+
|
|
31
|
+
if (!result.ok) {
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: "text", text: result.error.message }],
|
|
34
|
+
isError: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const value = result.value;
|
|
39
|
+
|
|
40
|
+
return formatResult(value, apiCall);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -96,6 +96,7 @@ export * from "./pendlebuyptrequest.js";
|
|
|
96
96
|
export * from "./pendlebuyytparams.js";
|
|
97
97
|
export * from "./pendlebuyytrequest.js";
|
|
98
98
|
export * from "./pendlegetmarketresponse.js";
|
|
99
|
+
export * from "./pendlegetquoteresponse.js";
|
|
99
100
|
export * from "./pendlegetuserpositionresponse.js";
|
|
100
101
|
export * from "./pendlelistmarketsresponse.js";
|
|
101
102
|
export * from "./pendlelistuserpositionsresponse.js";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type PendleGetQuoteResponse = {
|
|
11
|
+
/**
|
|
12
|
+
* A quote for the specified trade, detailing the expected amount of tokens received based on the `trade_type` and `token_type`.
|
|
13
|
+
*/
|
|
14
|
+
quote: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const PendleGetQuoteResponse$inboundSchema: z.ZodType<
|
|
19
|
+
PendleGetQuoteResponse,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
quote: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type PendleGetQuoteResponse$Outbound = {
|
|
28
|
+
quote: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const PendleGetQuoteResponse$outboundSchema: z.ZodType<
|
|
33
|
+
PendleGetQuoteResponse$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
PendleGetQuoteResponse
|
|
36
|
+
> = z.object({
|
|
37
|
+
quote: z.string(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export namespace PendleGetQuoteResponse$ {
|
|
45
|
+
/** @deprecated use `PendleGetQuoteResponse$inboundSchema` instead. */
|
|
46
|
+
export const inboundSchema = PendleGetQuoteResponse$inboundSchema;
|
|
47
|
+
/** @deprecated use `PendleGetQuoteResponse$outboundSchema` instead. */
|
|
48
|
+
export const outboundSchema = PendleGetQuoteResponse$outboundSchema;
|
|
49
|
+
/** @deprecated use `PendleGetQuoteResponse$Outbound` instead. */
|
|
50
|
+
export type Outbound = PendleGetQuoteResponse$Outbound;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function pendleGetQuoteResponseToJSON(
|
|
54
|
+
pendleGetQuoteResponse: PendleGetQuoteResponse,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
PendleGetQuoteResponse$outboundSchema.parse(pendleGetQuoteResponse),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function pendleGetQuoteResponseFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<PendleGetQuoteResponse, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => PendleGetQuoteResponse$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'PendleGetQuoteResponse' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -28,6 +28,7 @@ export * from "./pendlemarket.js";
|
|
|
28
28
|
export * from "./pendlemarkets.js";
|
|
29
29
|
export * from "./pendleposition.js";
|
|
30
30
|
export * from "./pendlepositions.js";
|
|
31
|
+
export * from "./pendlequote.js";
|
|
31
32
|
export * from "./skyposition.js";
|
|
32
33
|
export * from "./tokenaddress.js";
|
|
33
34
|
export * from "./tokenbalance.js";
|