@compass-labs/api-sdk 0.5.41 → 0.5.43
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 -4
- package/bin/mcp-server.js +603 -852
- package/bin/mcp-server.js.map +18 -22
- package/dist/commonjs/funcs/pendleMarket.d.ts +3 -1
- package/dist/commonjs/funcs/pendleMarket.d.ts.map +1 -1
- package/dist/commonjs/funcs/pendleMarket.js +4 -1
- package/dist/commonjs/funcs/pendleMarket.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 +2 -4
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/pendleMarket.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/pendleMarket.js +4 -2
- package/dist/commonjs/mcp-server/tools/pendleMarket.js.map +1 -1
- package/dist/commonjs/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.d.ts +62 -0
- package/dist/commonjs/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.d.ts.map +1 -0
- package/dist/commonjs/models/components/{pendlegetuserpositionresponse.js → compassapibackendmodelspendlereadresponsemarketuserposition.js} +23 -29
- package/dist/commonjs/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.js.map +1 -0
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts +31 -0
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts.map +1 -0
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js +82 -0
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -2
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -2
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/pendlegetmarketresponse.d.ts +6 -0
- package/dist/commonjs/models/components/pendlegetmarketresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/pendlegetmarketresponse.js +5 -0
- package/dist/commonjs/models/components/pendlegetmarketresponse.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +54 -16
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +51 -5
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +54 -16
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +51 -5
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/commonjs/models/components/vaultgetvaultresponse.d.ts +3 -3
- package/dist/commonjs/models/components/vaultgetvaultresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/vaultgetvaultresponse.js +3 -3
- package/dist/commonjs/models/components/vaultgetvaultresponse.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/pendlemarket.d.ts +5 -0
- package/dist/commonjs/models/operations/pendlemarket.d.ts.map +1 -1
- package/dist/commonjs/models/operations/pendlemarket.js +4 -0
- package/dist/commonjs/models/operations/pendlemarket.js.map +1 -1
- package/dist/commonjs/sdk/pendle.d.ts +5 -10
- package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
- package/dist/commonjs/sdk/pendle.js +6 -14
- package/dist/commonjs/sdk/pendle.js.map +1 -1
- package/dist/esm/funcs/pendleMarket.d.ts +3 -1
- package/dist/esm/funcs/pendleMarket.d.ts.map +1 -1
- package/dist/esm/funcs/pendleMarket.js +4 -1
- package/dist/esm/funcs/pendleMarket.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 +2 -4
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/pendleMarket.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/pendleMarket.js +4 -2
- package/dist/esm/mcp-server/tools/pendleMarket.js.map +1 -1
- package/dist/esm/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.d.ts +62 -0
- package/dist/esm/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.d.ts.map +1 -0
- package/dist/esm/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.js +66 -0
- package/dist/esm/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.js.map +1 -0
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts +31 -0
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts.map +1 -0
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js +44 -0
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -2
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -2
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/pendlegetmarketresponse.d.ts +6 -0
- package/dist/esm/models/components/pendlegetmarketresponse.d.ts.map +1 -1
- package/dist/esm/models/components/pendlegetmarketresponse.js +5 -0
- package/dist/esm/models/components/pendlegetmarketresponse.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +54 -16
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.js +46 -4
- package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +54 -16
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js +46 -4
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/esm/models/components/vaultgetvaultresponse.d.ts +3 -3
- package/dist/esm/models/components/vaultgetvaultresponse.d.ts.map +1 -1
- package/dist/esm/models/components/vaultgetvaultresponse.js +3 -3
- package/dist/esm/models/components/vaultgetvaultresponse.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/pendlemarket.d.ts +5 -0
- package/dist/esm/models/operations/pendlemarket.d.ts.map +1 -1
- package/dist/esm/models/operations/pendlemarket.js +4 -0
- package/dist/esm/models/operations/pendlemarket.js.map +1 -1
- package/dist/esm/sdk/pendle.d.ts +5 -10
- package/dist/esm/sdk/pendle.d.ts.map +1 -1
- package/dist/esm/sdk/pendle.js +6 -14
- package/dist/esm/sdk/pendle.js.map +1 -1
- package/docs/sdks/pendle/README.md +15 -79
- package/docs/sdks/uniswapv3/README.md +4 -4
- package/examples/README.md +26 -0
- package/examples/aaveV3Rate.example.ts +24 -0
- package/examples/package.json +18 -0
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/pendleMarket.ts +4 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +2 -4
- package/src/mcp-server/tools/pendleMarket.ts +4 -2
- package/src/models/components/compassapibackendmodelspendlereadresponsemarketuserposition.ts +145 -0
- package/src/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.ts +92 -0
- package/src/models/components/index.ts +2 -2
- package/src/models/components/pendlegetmarketresponse.ts +25 -0
- package/src/models/components/uniswapbuyexactlyparams.ts +120 -20
- package/src/models/components/uniswapbuyexactlyrequest.ts +120 -20
- package/src/models/components/vaultgetvaultresponse.ts +19 -9
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/pendlemarket.ts +9 -0
- package/src/sdk/pendle.ts +8 -24
- package/dist/commonjs/funcs/pendlePosition.d.ts +0 -19
- package/dist/commonjs/funcs/pendlePosition.d.ts.map +0 -1
- package/dist/commonjs/funcs/pendlePosition.js +0 -125
- package/dist/commonjs/funcs/pendlePosition.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/pendlePosition.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/pendlePosition.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/pendlePosition.js +0 -64
- package/dist/commonjs/mcp-server/tools/pendlePosition.js.map +0 -1
- package/dist/commonjs/models/components/pendlegetuserpositionresponse.d.ts +0 -72
- package/dist/commonjs/models/components/pendlegetuserpositionresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/pendlegetuserpositionresponse.js.map +0 -1
- package/dist/commonjs/models/components/userposition.d.ts +0 -31
- package/dist/commonjs/models/components/userposition.d.ts.map +0 -1
- package/dist/commonjs/models/components/userposition.js +0 -80
- package/dist/commonjs/models/components/userposition.js.map +0 -1
- package/dist/commonjs/models/operations/pendleposition.d.ts +0 -82
- package/dist/commonjs/models/operations/pendleposition.d.ts.map +0 -1
- package/dist/commonjs/models/operations/pendleposition.js +0 -109
- package/dist/commonjs/models/operations/pendleposition.js.map +0 -1
- package/dist/esm/funcs/pendlePosition.d.ts +0 -19
- package/dist/esm/funcs/pendlePosition.d.ts.map +0 -1
- package/dist/esm/funcs/pendlePosition.js +0 -89
- package/dist/esm/funcs/pendlePosition.js.map +0 -1
- package/dist/esm/mcp-server/tools/pendlePosition.d.ts +0 -8
- package/dist/esm/mcp-server/tools/pendlePosition.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/pendlePosition.js +0 -28
- package/dist/esm/mcp-server/tools/pendlePosition.js.map +0 -1
- package/dist/esm/models/components/pendlegetuserpositionresponse.d.ts +0 -72
- package/dist/esm/models/components/pendlegetuserpositionresponse.d.ts.map +0 -1
- package/dist/esm/models/components/pendlegetuserpositionresponse.js +0 -72
- package/dist/esm/models/components/pendlegetuserpositionresponse.js.map +0 -1
- package/dist/esm/models/components/userposition.d.ts +0 -31
- package/dist/esm/models/components/userposition.d.ts.map +0 -1
- package/dist/esm/models/components/userposition.js +0 -42
- package/dist/esm/models/components/userposition.js.map +0 -1
- package/dist/esm/models/operations/pendleposition.d.ts +0 -82
- package/dist/esm/models/operations/pendleposition.d.ts.map +0 -1
- package/dist/esm/models/operations/pendleposition.js +0 -71
- package/dist/esm/models/operations/pendleposition.js.map +0 -1
- package/src/funcs/pendlePosition.ts +0 -177
- package/src/mcp-server/tools/pendlePosition.ts +0 -37
- package/src/models/components/pendlegetuserpositionresponse.ts +0 -154
- package/src/models/components/userposition.ts +0 -75
- package/src/models/operations/pendleposition.ts +0 -142
|
@@ -19,6 +19,16 @@ import {
|
|
|
19
19
|
TokenEnum$outboundSchema,
|
|
20
20
|
} from "./tokenenum.js";
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* The symbol of the token to swap from.
|
|
24
|
+
*/
|
|
25
|
+
export type UniswapBuyExactlyRequestTokenIn = TokenEnum | string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The symbol of the token to swap to.
|
|
29
|
+
*/
|
|
30
|
+
export type UniswapBuyExactlyRequestTokenOut = TokenEnum | string;
|
|
31
|
+
|
|
22
32
|
/**
|
|
23
33
|
* The amount of the token to swap to
|
|
24
34
|
*/
|
|
@@ -30,23 +40,13 @@ export type UniswapBuyExactlyRequestAmount = number | string;
|
|
|
30
40
|
export type UniswapBuyExactlyRequest = {
|
|
31
41
|
actionType?: "UNISWAP_BUY_EXACTLY" | undefined;
|
|
32
42
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @remarks
|
|
36
|
-
*
|
|
37
|
-
* This class is used to represent the token in the system. Notice individual
|
|
38
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
43
|
+
* The symbol of the token to swap from.
|
|
39
44
|
*/
|
|
40
|
-
tokenIn: TokenEnum;
|
|
45
|
+
tokenIn: TokenEnum | string;
|
|
41
46
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
*
|
|
46
|
-
* This class is used to represent the token in the system. Notice individual
|
|
47
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
47
|
+
* The symbol of the token to swap to.
|
|
48
48
|
*/
|
|
49
|
-
tokenOut: TokenEnum;
|
|
49
|
+
tokenOut: TokenEnum | string;
|
|
50
50
|
/**
|
|
51
51
|
* The transaction fee of a Uniswap pool in bips.
|
|
52
52
|
*
|
|
@@ -77,6 +77,106 @@ export type UniswapBuyExactlyRequest = {
|
|
|
77
77
|
sender: string;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const UniswapBuyExactlyRequestTokenIn$inboundSchema: z.ZodType<
|
|
82
|
+
UniswapBuyExactlyRequestTokenIn,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
unknown
|
|
85
|
+
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export type UniswapBuyExactlyRequestTokenIn$Outbound = string | string;
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const UniswapBuyExactlyRequestTokenIn$outboundSchema: z.ZodType<
|
|
92
|
+
UniswapBuyExactlyRequestTokenIn$Outbound,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
UniswapBuyExactlyRequestTokenIn
|
|
95
|
+
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
100
|
+
*/
|
|
101
|
+
export namespace UniswapBuyExactlyRequestTokenIn$ {
|
|
102
|
+
/** @deprecated use `UniswapBuyExactlyRequestTokenIn$inboundSchema` instead. */
|
|
103
|
+
export const inboundSchema = UniswapBuyExactlyRequestTokenIn$inboundSchema;
|
|
104
|
+
/** @deprecated use `UniswapBuyExactlyRequestTokenIn$outboundSchema` instead. */
|
|
105
|
+
export const outboundSchema = UniswapBuyExactlyRequestTokenIn$outboundSchema;
|
|
106
|
+
/** @deprecated use `UniswapBuyExactlyRequestTokenIn$Outbound` instead. */
|
|
107
|
+
export type Outbound = UniswapBuyExactlyRequestTokenIn$Outbound;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function uniswapBuyExactlyRequestTokenInToJSON(
|
|
111
|
+
uniswapBuyExactlyRequestTokenIn: UniswapBuyExactlyRequestTokenIn,
|
|
112
|
+
): string {
|
|
113
|
+
return JSON.stringify(
|
|
114
|
+
UniswapBuyExactlyRequestTokenIn$outboundSchema.parse(
|
|
115
|
+
uniswapBuyExactlyRequestTokenIn,
|
|
116
|
+
),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function uniswapBuyExactlyRequestTokenInFromJSON(
|
|
121
|
+
jsonString: string,
|
|
122
|
+
): SafeParseResult<UniswapBuyExactlyRequestTokenIn, SDKValidationError> {
|
|
123
|
+
return safeParse(
|
|
124
|
+
jsonString,
|
|
125
|
+
(x) => UniswapBuyExactlyRequestTokenIn$inboundSchema.parse(JSON.parse(x)),
|
|
126
|
+
`Failed to parse 'UniswapBuyExactlyRequestTokenIn' from JSON`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const UniswapBuyExactlyRequestTokenOut$inboundSchema: z.ZodType<
|
|
132
|
+
UniswapBuyExactlyRequestTokenOut,
|
|
133
|
+
z.ZodTypeDef,
|
|
134
|
+
unknown
|
|
135
|
+
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export type UniswapBuyExactlyRequestTokenOut$Outbound = string | string;
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export const UniswapBuyExactlyRequestTokenOut$outboundSchema: z.ZodType<
|
|
142
|
+
UniswapBuyExactlyRequestTokenOut$Outbound,
|
|
143
|
+
z.ZodTypeDef,
|
|
144
|
+
UniswapBuyExactlyRequestTokenOut
|
|
145
|
+
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @internal
|
|
149
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
150
|
+
*/
|
|
151
|
+
export namespace UniswapBuyExactlyRequestTokenOut$ {
|
|
152
|
+
/** @deprecated use `UniswapBuyExactlyRequestTokenOut$inboundSchema` instead. */
|
|
153
|
+
export const inboundSchema = UniswapBuyExactlyRequestTokenOut$inboundSchema;
|
|
154
|
+
/** @deprecated use `UniswapBuyExactlyRequestTokenOut$outboundSchema` instead. */
|
|
155
|
+
export const outboundSchema = UniswapBuyExactlyRequestTokenOut$outboundSchema;
|
|
156
|
+
/** @deprecated use `UniswapBuyExactlyRequestTokenOut$Outbound` instead. */
|
|
157
|
+
export type Outbound = UniswapBuyExactlyRequestTokenOut$Outbound;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function uniswapBuyExactlyRequestTokenOutToJSON(
|
|
161
|
+
uniswapBuyExactlyRequestTokenOut: UniswapBuyExactlyRequestTokenOut,
|
|
162
|
+
): string {
|
|
163
|
+
return JSON.stringify(
|
|
164
|
+
UniswapBuyExactlyRequestTokenOut$outboundSchema.parse(
|
|
165
|
+
uniswapBuyExactlyRequestTokenOut,
|
|
166
|
+
),
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function uniswapBuyExactlyRequestTokenOutFromJSON(
|
|
171
|
+
jsonString: string,
|
|
172
|
+
): SafeParseResult<UniswapBuyExactlyRequestTokenOut, SDKValidationError> {
|
|
173
|
+
return safeParse(
|
|
174
|
+
jsonString,
|
|
175
|
+
(x) => UniswapBuyExactlyRequestTokenOut$inboundSchema.parse(JSON.parse(x)),
|
|
176
|
+
`Failed to parse 'UniswapBuyExactlyRequestTokenOut' from JSON`,
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
80
180
|
/** @internal */
|
|
81
181
|
export const UniswapBuyExactlyRequestAmount$inboundSchema: z.ZodType<
|
|
82
182
|
UniswapBuyExactlyRequestAmount,
|
|
@@ -134,8 +234,8 @@ export const UniswapBuyExactlyRequest$inboundSchema: z.ZodType<
|
|
|
134
234
|
unknown
|
|
135
235
|
> = z.object({
|
|
136
236
|
action_type: z.literal("UNISWAP_BUY_EXACTLY").default("UNISWAP_BUY_EXACTLY"),
|
|
137
|
-
token_in: TokenEnum$inboundSchema,
|
|
138
|
-
token_out: TokenEnum$inboundSchema,
|
|
237
|
+
token_in: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
238
|
+
token_out: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
139
239
|
fee: FeeEnum$inboundSchema,
|
|
140
240
|
amount: z.union([z.number(), z.string()]),
|
|
141
241
|
max_slippage_percent: z.number(),
|
|
@@ -155,8 +255,8 @@ export const UniswapBuyExactlyRequest$inboundSchema: z.ZodType<
|
|
|
155
255
|
/** @internal */
|
|
156
256
|
export type UniswapBuyExactlyRequest$Outbound = {
|
|
157
257
|
action_type: "UNISWAP_BUY_EXACTLY";
|
|
158
|
-
token_in: string;
|
|
159
|
-
token_out: string;
|
|
258
|
+
token_in: string | string;
|
|
259
|
+
token_out: string | string;
|
|
160
260
|
fee: string;
|
|
161
261
|
amount: number | string;
|
|
162
262
|
max_slippage_percent: number;
|
|
@@ -174,8 +274,8 @@ export const UniswapBuyExactlyRequest$outboundSchema: z.ZodType<
|
|
|
174
274
|
actionType: z.literal("UNISWAP_BUY_EXACTLY").default(
|
|
175
275
|
"UNISWAP_BUY_EXACTLY" as const,
|
|
176
276
|
),
|
|
177
|
-
tokenIn: TokenEnum$outboundSchema,
|
|
178
|
-
tokenOut: TokenEnum$outboundSchema,
|
|
277
|
+
tokenIn: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
278
|
+
tokenOut: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
179
279
|
fee: FeeEnum$outboundSchema,
|
|
180
280
|
amount: z.union([z.number(), z.string()]),
|
|
181
281
|
maxSlippagePercent: z.number(),
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
CompassApiBackendModelsVaultsReadResponseVaultAsset$outboundSchema,
|
|
21
21
|
} from "./compassapibackendmodelsvaultsreadresponsevaultasset.js";
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} from "./
|
|
23
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition,
|
|
24
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$inboundSchema,
|
|
25
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$Outbound,
|
|
26
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$outboundSchema,
|
|
27
|
+
} from "./compassapibackendmodelsvaultsreadresponsevaultuserposition.js";
|
|
28
28
|
|
|
29
29
|
export type VaultGetVaultResponse = {
|
|
30
30
|
/**
|
|
@@ -56,7 +56,10 @@ export type VaultGetVaultResponse = {
|
|
|
56
56
|
/**
|
|
57
57
|
* The user's position in the vault.
|
|
58
58
|
*/
|
|
59
|
-
userPosition?:
|
|
59
|
+
userPosition?:
|
|
60
|
+
| CompassApiBackendModelsVaultsReadResponseVaultUserPosition
|
|
61
|
+
| null
|
|
62
|
+
| undefined;
|
|
60
63
|
};
|
|
61
64
|
|
|
62
65
|
/** @internal */
|
|
@@ -73,7 +76,9 @@ export const VaultGetVaultResponse$inboundSchema: z.ZodType<
|
|
|
73
76
|
share_price: z.string(),
|
|
74
77
|
asset: CompassApiBackendModelsVaultsReadResponseVaultAsset$inboundSchema,
|
|
75
78
|
apy: Apy$inboundSchema,
|
|
76
|
-
user_position: z.nullable(
|
|
79
|
+
user_position: z.nullable(
|
|
80
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$inboundSchema,
|
|
81
|
+
).optional(),
|
|
77
82
|
}).transform((v) => {
|
|
78
83
|
return remap$(v, {
|
|
79
84
|
"total_assets": "totalAssets",
|
|
@@ -93,7 +98,10 @@ export type VaultGetVaultResponse$Outbound = {
|
|
|
93
98
|
share_price: string;
|
|
94
99
|
asset: CompassApiBackendModelsVaultsReadResponseVaultAsset$Outbound;
|
|
95
100
|
apy: Apy$Outbound;
|
|
96
|
-
user_position?:
|
|
101
|
+
user_position?:
|
|
102
|
+
| CompassApiBackendModelsVaultsReadResponseVaultUserPosition$Outbound
|
|
103
|
+
| null
|
|
104
|
+
| undefined;
|
|
97
105
|
};
|
|
98
106
|
|
|
99
107
|
/** @internal */
|
|
@@ -110,7 +118,9 @@ export const VaultGetVaultResponse$outboundSchema: z.ZodType<
|
|
|
110
118
|
sharePrice: z.string(),
|
|
111
119
|
asset: CompassApiBackendModelsVaultsReadResponseVaultAsset$outboundSchema,
|
|
112
120
|
apy: Apy$outboundSchema,
|
|
113
|
-
userPosition: z.nullable(
|
|
121
|
+
userPosition: z.nullable(
|
|
122
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$outboundSchema,
|
|
123
|
+
).optional(),
|
|
114
124
|
}).transform((v) => {
|
|
115
125
|
return remap$(v, {
|
|
116
126
|
totalAssets: "total_assets",
|
|
@@ -26,7 +26,6 @@ export * from "./morphovault.js";
|
|
|
26
26
|
export * from "./morphovaults.js";
|
|
27
27
|
export * from "./pendlemarket.js";
|
|
28
28
|
export * from "./pendlemarkets.js";
|
|
29
|
-
export * from "./pendleposition.js";
|
|
30
29
|
export * from "./pendlepositions.js";
|
|
31
30
|
export * from "./pendlequote.js";
|
|
32
31
|
export * from "./skyposition.js";
|
|
@@ -35,6 +35,10 @@ export type PendleMarketRequest = {
|
|
|
35
35
|
* The market address of the desired position.
|
|
36
36
|
*/
|
|
37
37
|
marketAddress?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The user address of the desired market position. Only include if you would like the user position included in the response. Defaults to `None`.
|
|
40
|
+
*/
|
|
41
|
+
userAddress?: string | null | undefined;
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
/** @internal */
|
|
@@ -69,9 +73,11 @@ export const PendleMarketRequest$inboundSchema: z.ZodType<
|
|
|
69
73
|
market_address: z.string().default(
|
|
70
74
|
"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538",
|
|
71
75
|
),
|
|
76
|
+
user_address: z.nullable(z.string()).optional(),
|
|
72
77
|
}).transform((v) => {
|
|
73
78
|
return remap$(v, {
|
|
74
79
|
"market_address": "marketAddress",
|
|
80
|
+
"user_address": "userAddress",
|
|
75
81
|
});
|
|
76
82
|
});
|
|
77
83
|
|
|
@@ -80,6 +86,7 @@ export type PendleMarketRequest$Outbound = {
|
|
|
80
86
|
chain: string;
|
|
81
87
|
block?: number | null | undefined;
|
|
82
88
|
market_address: string;
|
|
89
|
+
user_address?: string | null | undefined;
|
|
83
90
|
};
|
|
84
91
|
|
|
85
92
|
/** @internal */
|
|
@@ -93,9 +100,11 @@ export const PendleMarketRequest$outboundSchema: z.ZodType<
|
|
|
93
100
|
marketAddress: z.string().default(
|
|
94
101
|
"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538",
|
|
95
102
|
),
|
|
103
|
+
userAddress: z.nullable(z.string()).optional(),
|
|
96
104
|
}).transform((v) => {
|
|
97
105
|
return remap$(v, {
|
|
98
106
|
marketAddress: "market_address",
|
|
107
|
+
userAddress: "user_address",
|
|
99
108
|
});
|
|
100
109
|
});
|
|
101
110
|
|
package/src/sdk/pendle.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { pendleBuyPt } from "../funcs/pendleBuyPt.js";
|
|
|
7
7
|
import { pendleBuyYt } from "../funcs/pendleBuyYt.js";
|
|
8
8
|
import { pendleMarket } from "../funcs/pendleMarket.js";
|
|
9
9
|
import { pendleMarkets } from "../funcs/pendleMarkets.js";
|
|
10
|
-
import { pendlePosition } from "../funcs/pendlePosition.js";
|
|
11
10
|
import { pendlePositions } from "../funcs/pendlePositions.js";
|
|
12
11
|
import { pendleQuote } from "../funcs/pendleQuote.js";
|
|
13
12
|
import { pendleRedeemYield } from "../funcs/pendleRedeemYield.js";
|
|
@@ -21,16 +20,18 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
21
20
|
|
|
22
21
|
export class Pendle extends ClientSDK {
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
23
|
+
* Get Market & User Position
|
|
25
24
|
*
|
|
26
25
|
* @remarks
|
|
27
|
-
*
|
|
26
|
+
* Get the market's implied APY, maturity date and the associated token data.
|
|
27
|
+
*
|
|
28
|
+
* The user position is only included if 'user_address' parameter is included.
|
|
28
29
|
*/
|
|
29
|
-
async
|
|
30
|
-
request: operations.
|
|
30
|
+
async market(
|
|
31
|
+
request: operations.PendleMarketRequest,
|
|
31
32
|
options?: RequestOptions,
|
|
32
|
-
): Promise<components.
|
|
33
|
-
return unwrapAsync(
|
|
33
|
+
): Promise<components.PendleGetMarketResponse> {
|
|
34
|
+
return unwrapAsync(pendleMarket(
|
|
34
35
|
this,
|
|
35
36
|
request,
|
|
36
37
|
options,
|
|
@@ -54,23 +55,6 @@ export class Pendle extends ClientSDK {
|
|
|
54
55
|
));
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
/**
|
|
58
|
-
* Get Market Data
|
|
59
|
-
*
|
|
60
|
-
* @remarks
|
|
61
|
-
* Get the market's implied APY, maturity date and the associated token data.
|
|
62
|
-
*/
|
|
63
|
-
async market(
|
|
64
|
-
request: operations.PendleMarketRequest,
|
|
65
|
-
options?: RequestOptions,
|
|
66
|
-
): Promise<components.PendleGetMarketResponse> {
|
|
67
|
-
return unwrapAsync(pendleMarket(
|
|
68
|
-
this,
|
|
69
|
-
request,
|
|
70
|
-
options,
|
|
71
|
-
));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
58
|
/**
|
|
75
59
|
* List Market Data
|
|
76
60
|
*
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CompassApiSDKCore } from "../core.js";
|
|
2
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import * as components from "../models/components/index.js";
|
|
4
|
-
import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
|
|
5
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
6
|
-
import * as errors from "../models/errors/index.js";
|
|
7
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
8
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
9
|
-
import * as operations from "../models/operations/index.js";
|
|
10
|
-
import { APIPromise } from "../types/async.js";
|
|
11
|
-
import { Result } from "../types/fp.js";
|
|
12
|
-
/**
|
|
13
|
-
* Check User's Market Position
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* Check the SY, PT, YT and Underlying Token positions for a given market.
|
|
17
|
-
*/
|
|
18
|
-
export declare function pendlePosition(client: CompassApiSDKCore, request: operations.PendlePositionRequest, options?: RequestOptions): APIPromise<Result<components.PendleGetUserPositionResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
-
//# sourceMappingURL=pendlePosition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pendlePosition.d.ts","sourceRoot":"","sources":["../../../src/funcs/pendlePosition.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,6BAA6B,EACtC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.pendlePosition = pendlePosition;
|
|
40
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
-
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
-
const security_js_1 = require("../lib/security.js");
|
|
45
|
-
const url_js_1 = require("../lib/url.js");
|
|
46
|
-
const components = __importStar(require("../models/components/index.js"));
|
|
47
|
-
const errors = __importStar(require("../models/errors/index.js"));
|
|
48
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
-
const async_js_1 = require("../types/async.js");
|
|
50
|
-
/**
|
|
51
|
-
* Check User's Market Position
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Check the SY, PT, YT and Underlying Token positions for a given market.
|
|
55
|
-
*/
|
|
56
|
-
function pendlePosition(client, request, options) {
|
|
57
|
-
return new async_js_1.APIPromise($do(client, request, options));
|
|
58
|
-
}
|
|
59
|
-
async function $do(client, request, options) {
|
|
60
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.PendlePositionRequest$outboundSchema.parse(value), "Input validation failed");
|
|
61
|
-
if (!parsed.ok) {
|
|
62
|
-
return [parsed, { status: "invalid" }];
|
|
63
|
-
}
|
|
64
|
-
const payload = parsed.value;
|
|
65
|
-
const body = null;
|
|
66
|
-
const path = (0, url_js_1.pathToFunc)("/v0/pendle/position")();
|
|
67
|
-
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
68
|
-
"block": payload.block,
|
|
69
|
-
"chain": payload.chain,
|
|
70
|
-
"market_address": payload.market_address,
|
|
71
|
-
"user_address": payload.user_address,
|
|
72
|
-
});
|
|
73
|
-
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
74
|
-
Accept: "application/json",
|
|
75
|
-
}));
|
|
76
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyAuth);
|
|
77
|
-
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
78
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
79
|
-
const context = {
|
|
80
|
-
options: client._options,
|
|
81
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
-
operationID: "pendle_position",
|
|
83
|
-
oAuth2Scopes: [],
|
|
84
|
-
resolvedSecurity: requestSecurity,
|
|
85
|
-
securitySource: client._options.apiKeyAuth,
|
|
86
|
-
retryConfig: options?.retries
|
|
87
|
-
|| client._options.retryConfig
|
|
88
|
-
|| { strategy: "none" },
|
|
89
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
90
|
-
};
|
|
91
|
-
const requestRes = client._createRequest(context, {
|
|
92
|
-
security: requestSecurity,
|
|
93
|
-
method: "GET",
|
|
94
|
-
baseURL: options?.serverURL,
|
|
95
|
-
path: path,
|
|
96
|
-
headers: headers,
|
|
97
|
-
query: query,
|
|
98
|
-
body: body,
|
|
99
|
-
userAgent: client._options.userAgent,
|
|
100
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
101
|
-
}, options);
|
|
102
|
-
if (!requestRes.ok) {
|
|
103
|
-
return [requestRes, { status: "invalid" }];
|
|
104
|
-
}
|
|
105
|
-
const req = requestRes.value;
|
|
106
|
-
const doResult = await client._do(req, {
|
|
107
|
-
context,
|
|
108
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
109
|
-
retryConfig: context.retryConfig,
|
|
110
|
-
retryCodes: context.retryCodes,
|
|
111
|
-
});
|
|
112
|
-
if (!doResult.ok) {
|
|
113
|
-
return [doResult, { status: "request-error", request: req }];
|
|
114
|
-
}
|
|
115
|
-
const response = doResult.value;
|
|
116
|
-
const responseFields = {
|
|
117
|
-
HttpMeta: { Response: response, Request: req },
|
|
118
|
-
};
|
|
119
|
-
const [result] = await M.match(M.json(200, components.PendleGetUserPositionResponse$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
120
|
-
if (!result.ok) {
|
|
121
|
-
return [result, { status: "complete", request: req, response }];
|
|
122
|
-
}
|
|
123
|
-
return [result, { status: "complete", request: req, response }];
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=pendlePosition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version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EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as operations from "../../models/operations/index.js";
|
|
2
|
-
import { ToolDefinition } from "../tools.js";
|
|
3
|
-
declare const args: {
|
|
4
|
-
request: import("zod").ZodType<operations.PendlePositionRequest, import("zod").ZodTypeDef, unknown>;
|
|
5
|
-
};
|
|
6
|
-
export declare const tool$pendlePosition: ToolDefinition<typeof args>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=pendlePosition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pendlePosition.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pendlePosition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,cAAc,CAAC,OAAO,IAAI,CAwB3D,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.tool$pendlePosition = void 0;
|
|
40
|
-
const pendlePosition_js_1 = require("../../funcs/pendlePosition.js");
|
|
41
|
-
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
-
const tools_js_1 = require("../tools.js");
|
|
43
|
-
const args = {
|
|
44
|
-
request: operations.PendlePositionRequest$inboundSchema,
|
|
45
|
-
};
|
|
46
|
-
exports.tool$pendlePosition = {
|
|
47
|
-
name: "pendle-position",
|
|
48
|
-
description: `Check User's Market Position
|
|
49
|
-
|
|
50
|
-
Check the SY, PT, YT and Underlying Token positions for a given market.`,
|
|
51
|
-
args,
|
|
52
|
-
tool: async (client, args, ctx) => {
|
|
53
|
-
const [result, apiCall] = await (0, pendlePosition_js_1.pendlePosition)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54
|
-
if (!result.ok) {
|
|
55
|
-
return {
|
|
56
|
-
content: [{ type: "text", text: result.error.message }],
|
|
57
|
-
isError: true,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
const value = result.value;
|
|
61
|
-
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=pendlePosition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pendlePosition.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/pendlePosition.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qEAA+D;AAC/D,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,mCAAmC;CACxD,CAAC;AAEW,QAAA,mBAAmB,GAAgC;IAC9D,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;;wEAEyD;IACtE,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,kCAAc,EAC5C,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type PendleGetUserPositionResponse = {
|
|
5
|
-
/**
|
|
6
|
-
* The amount of yield that can be claimed in the underlying token.
|
|
7
|
-
*/
|
|
8
|
-
claimableYield: string;
|
|
9
|
-
/**
|
|
10
|
-
* The amount of SY tokens the user currently holds.
|
|
11
|
-
*/
|
|
12
|
-
syBalance: string;
|
|
13
|
-
/**
|
|
14
|
-
* The amount of PT tokens the user currently holds.
|
|
15
|
-
*/
|
|
16
|
-
ptBalance: string;
|
|
17
|
-
/**
|
|
18
|
-
* The amount of YT tokens the user currently holds.
|
|
19
|
-
*/
|
|
20
|
-
ytBalance: string;
|
|
21
|
-
/**
|
|
22
|
-
* The amount of LP tokens the user currently holds.
|
|
23
|
-
*/
|
|
24
|
-
lpBalance: string;
|
|
25
|
-
/**
|
|
26
|
-
* The amount of underlying tokens the user currently holds.
|
|
27
|
-
*/
|
|
28
|
-
underlyingTokenBalance: string;
|
|
29
|
-
/**
|
|
30
|
-
* The name of the underlying token.
|
|
31
|
-
*/
|
|
32
|
-
underlyingTokenName: string;
|
|
33
|
-
/**
|
|
34
|
-
* The symbol of the underlying token.
|
|
35
|
-
*/
|
|
36
|
-
underlyingTokenSymbol: string;
|
|
37
|
-
/**
|
|
38
|
-
* The maturity date of the market. ISO 8601 format. UTC timezone.
|
|
39
|
-
*/
|
|
40
|
-
maturityDate: Date;
|
|
41
|
-
};
|
|
42
|
-
/** @internal */
|
|
43
|
-
export declare const PendleGetUserPositionResponse$inboundSchema: z.ZodType<PendleGetUserPositionResponse, z.ZodTypeDef, unknown>;
|
|
44
|
-
/** @internal */
|
|
45
|
-
export type PendleGetUserPositionResponse$Outbound = {
|
|
46
|
-
claimable_yield: string;
|
|
47
|
-
sy_balance: string;
|
|
48
|
-
pt_balance: string;
|
|
49
|
-
yt_balance: string;
|
|
50
|
-
lp_balance: string;
|
|
51
|
-
underlying_token_balance: string;
|
|
52
|
-
underlying_token_name: string;
|
|
53
|
-
underlying_token_symbol: string;
|
|
54
|
-
maturity_date: string;
|
|
55
|
-
};
|
|
56
|
-
/** @internal */
|
|
57
|
-
export declare const PendleGetUserPositionResponse$outboundSchema: z.ZodType<PendleGetUserPositionResponse$Outbound, z.ZodTypeDef, PendleGetUserPositionResponse>;
|
|
58
|
-
/**
|
|
59
|
-
* @internal
|
|
60
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
-
*/
|
|
62
|
-
export declare namespace PendleGetUserPositionResponse$ {
|
|
63
|
-
/** @deprecated use `PendleGetUserPositionResponse$inboundSchema` instead. */
|
|
64
|
-
const inboundSchema: z.ZodType<PendleGetUserPositionResponse, z.ZodTypeDef, unknown>;
|
|
65
|
-
/** @deprecated use `PendleGetUserPositionResponse$outboundSchema` instead. */
|
|
66
|
-
const outboundSchema: z.ZodType<PendleGetUserPositionResponse$Outbound, z.ZodTypeDef, PendleGetUserPositionResponse>;
|
|
67
|
-
/** @deprecated use `PendleGetUserPositionResponse$Outbound` instead. */
|
|
68
|
-
type Outbound = PendleGetUserPositionResponse$Outbound;
|
|
69
|
-
}
|
|
70
|
-
export declare function pendleGetUserPositionResponseToJSON(pendleGetUserPositionResponse: PendleGetUserPositionResponse): string;
|
|
71
|
-
export declare function pendleGetUserPositionResponseFromJSON(jsonString: string): SafeParseResult<PendleGetUserPositionResponse, SDKValidationError>;
|
|
72
|
-
//# sourceMappingURL=pendlegetuserpositionresponse.d.ts.map
|