@compass-labs/api-sdk 0.5.65 → 0.5.67
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 +0 -2
- package/bin/mcp-server.js +25 -210
- package/bin/mcp-server.js.map +11 -15
- 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 +1 -3
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/models/components/aavereserveoverviewresponse.d.ts +2 -2
- package/dist/commonjs/models/components/aavereserveoverviewresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/aavereserveoverviewresponse.js +2 -2
- package/dist/commonjs/models/components/aavereserveoverviewresponse.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +0 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +16 -54
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +5 -51
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +16 -54
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +5 -51
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.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/sdk/universal.d.ts +0 -11
- package/dist/commonjs/sdk/universal.d.ts.map +1 -1
- package/dist/commonjs/sdk/universal.js +0 -14
- package/dist/commonjs/sdk/universal.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 +1 -3
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/models/components/aavereserveoverviewresponse.d.ts +2 -2
- package/dist/esm/models/components/aavereserveoverviewresponse.d.ts.map +1 -1
- package/dist/esm/models/components/aavereserveoverviewresponse.js +2 -2
- package/dist/esm/models/components/aavereserveoverviewresponse.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +0 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +16 -54
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.js +4 -46
- package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +16 -54
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js +4 -46
- package/dist/esm/models/components/uniswapbuyexactlyrequest.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/sdk/universal.d.ts +0 -11
- package/dist/esm/sdk/universal.d.ts.map +1 -1
- package/dist/esm/sdk/universal.js +0 -14
- package/dist/esm/sdk/universal.js.map +1 -1
- package/docs/sdks/universal/README.md +0 -75
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -3
- package/src/models/components/aavereserveoverviewresponse.ts +4 -4
- package/src/models/components/index.ts +0 -1
- package/src/models/components/uniswapbuyexactlyparams.ts +20 -120
- package/src/models/components/uniswapbuyexactlyrequest.ts +20 -120
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/universal.ts +0 -22
- package/dist/commonjs/funcs/universalVisualizePortfolio.d.ts +0 -23
- package/dist/commonjs/funcs/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/commonjs/funcs/universalVisualizePortfolio.js +0 -127
- package/dist/commonjs/funcs/universalVisualizePortfolio.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.js +0 -68
- package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.js.map +0 -1
- package/dist/commonjs/models/components/image.d.ts +0 -32
- package/dist/commonjs/models/components/image.d.ts.map +0 -1
- package/dist/commonjs/models/components/image.js +0 -70
- package/dist/commonjs/models/components/image.js.map +0 -1
- package/dist/commonjs/models/operations/genericvisualizeportfolio.d.ts +0 -63
- package/dist/commonjs/models/operations/genericvisualizeportfolio.d.ts.map +0 -1
- package/dist/commonjs/models/operations/genericvisualizeportfolio.js +0 -91
- package/dist/commonjs/models/operations/genericvisualizeportfolio.js.map +0 -1
- package/dist/esm/funcs/universalVisualizePortfolio.d.ts +0 -23
- package/dist/esm/funcs/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/esm/funcs/universalVisualizePortfolio.js +0 -91
- package/dist/esm/funcs/universalVisualizePortfolio.js.map +0 -1
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.d.ts +0 -8
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.js +0 -32
- package/dist/esm/mcp-server/tools/universalVisualizePortfolio.js.map +0 -1
- package/dist/esm/models/components/image.d.ts +0 -32
- package/dist/esm/models/components/image.d.ts.map +0 -1
- package/dist/esm/models/components/image.js +0 -32
- package/dist/esm/models/components/image.js.map +0 -1
- package/dist/esm/models/operations/genericvisualizeportfolio.d.ts +0 -63
- package/dist/esm/models/operations/genericvisualizeportfolio.d.ts.map +0 -1
- package/dist/esm/models/operations/genericvisualizeportfolio.js +0 -53
- package/dist/esm/models/operations/genericvisualizeportfolio.js.map +0 -1
- package/src/funcs/universalVisualizePortfolio.ts +0 -180
- package/src/mcp-server/tools/universalVisualizePortfolio.ts +0 -41
- package/src/models/components/image.ts +0 -62
- package/src/models/operations/genericvisualizeportfolio.ts +0 -110
|
@@ -18,16 +18,6 @@ import {
|
|
|
18
18
|
TokenEnum$outboundSchema,
|
|
19
19
|
} from "./tokenenum.js";
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* The symbol of the token to swap from.
|
|
23
|
-
*/
|
|
24
|
-
export type UniswapBuyExactlyParamsTokenIn = TokenEnum | string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The symbol of the token to swap to.
|
|
28
|
-
*/
|
|
29
|
-
export type UniswapBuyExactlyParamsTokenOut = TokenEnum | string;
|
|
30
|
-
|
|
31
21
|
/**
|
|
32
22
|
* The amount of the token to swap to
|
|
33
23
|
*/
|
|
@@ -36,13 +26,23 @@ export type UniswapBuyExactlyParamsAmount = number | string;
|
|
|
36
26
|
export type UniswapBuyExactlyParams = {
|
|
37
27
|
actionType?: "UNISWAP_BUY_EXACTLY" | undefined;
|
|
38
28
|
/**
|
|
39
|
-
*
|
|
29
|
+
* A class representing the token.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
*
|
|
33
|
+
* This class is used to represent the token in the system. Notice individual
|
|
34
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
40
35
|
*/
|
|
41
|
-
tokenIn: TokenEnum
|
|
36
|
+
tokenIn: TokenEnum;
|
|
42
37
|
/**
|
|
43
|
-
*
|
|
38
|
+
* A class representing the token.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*
|
|
42
|
+
* This class is used to represent the token in the system. Notice individual
|
|
43
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
44
44
|
*/
|
|
45
|
-
tokenOut: TokenEnum
|
|
45
|
+
tokenOut: TokenEnum;
|
|
46
46
|
/**
|
|
47
47
|
* The transaction fee of a Uniswap pool in bips.
|
|
48
48
|
*
|
|
@@ -65,106 +65,6 @@ export type UniswapBuyExactlyParams = {
|
|
|
65
65
|
wrapEth?: boolean | undefined;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
/** @internal */
|
|
69
|
-
export const UniswapBuyExactlyParamsTokenIn$inboundSchema: z.ZodType<
|
|
70
|
-
UniswapBuyExactlyParamsTokenIn,
|
|
71
|
-
z.ZodTypeDef,
|
|
72
|
-
unknown
|
|
73
|
-
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
74
|
-
|
|
75
|
-
/** @internal */
|
|
76
|
-
export type UniswapBuyExactlyParamsTokenIn$Outbound = string | string;
|
|
77
|
-
|
|
78
|
-
/** @internal */
|
|
79
|
-
export const UniswapBuyExactlyParamsTokenIn$outboundSchema: z.ZodType<
|
|
80
|
-
UniswapBuyExactlyParamsTokenIn$Outbound,
|
|
81
|
-
z.ZodTypeDef,
|
|
82
|
-
UniswapBuyExactlyParamsTokenIn
|
|
83
|
-
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @internal
|
|
87
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
88
|
-
*/
|
|
89
|
-
export namespace UniswapBuyExactlyParamsTokenIn$ {
|
|
90
|
-
/** @deprecated use `UniswapBuyExactlyParamsTokenIn$inboundSchema` instead. */
|
|
91
|
-
export const inboundSchema = UniswapBuyExactlyParamsTokenIn$inboundSchema;
|
|
92
|
-
/** @deprecated use `UniswapBuyExactlyParamsTokenIn$outboundSchema` instead. */
|
|
93
|
-
export const outboundSchema = UniswapBuyExactlyParamsTokenIn$outboundSchema;
|
|
94
|
-
/** @deprecated use `UniswapBuyExactlyParamsTokenIn$Outbound` instead. */
|
|
95
|
-
export type Outbound = UniswapBuyExactlyParamsTokenIn$Outbound;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function uniswapBuyExactlyParamsTokenInToJSON(
|
|
99
|
-
uniswapBuyExactlyParamsTokenIn: UniswapBuyExactlyParamsTokenIn,
|
|
100
|
-
): string {
|
|
101
|
-
return JSON.stringify(
|
|
102
|
-
UniswapBuyExactlyParamsTokenIn$outboundSchema.parse(
|
|
103
|
-
uniswapBuyExactlyParamsTokenIn,
|
|
104
|
-
),
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export function uniswapBuyExactlyParamsTokenInFromJSON(
|
|
109
|
-
jsonString: string,
|
|
110
|
-
): SafeParseResult<UniswapBuyExactlyParamsTokenIn, SDKValidationError> {
|
|
111
|
-
return safeParse(
|
|
112
|
-
jsonString,
|
|
113
|
-
(x) => UniswapBuyExactlyParamsTokenIn$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
-
`Failed to parse 'UniswapBuyExactlyParamsTokenIn' from JSON`,
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/** @internal */
|
|
119
|
-
export const UniswapBuyExactlyParamsTokenOut$inboundSchema: z.ZodType<
|
|
120
|
-
UniswapBuyExactlyParamsTokenOut,
|
|
121
|
-
z.ZodTypeDef,
|
|
122
|
-
unknown
|
|
123
|
-
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
124
|
-
|
|
125
|
-
/** @internal */
|
|
126
|
-
export type UniswapBuyExactlyParamsTokenOut$Outbound = string | string;
|
|
127
|
-
|
|
128
|
-
/** @internal */
|
|
129
|
-
export const UniswapBuyExactlyParamsTokenOut$outboundSchema: z.ZodType<
|
|
130
|
-
UniswapBuyExactlyParamsTokenOut$Outbound,
|
|
131
|
-
z.ZodTypeDef,
|
|
132
|
-
UniswapBuyExactlyParamsTokenOut
|
|
133
|
-
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* @internal
|
|
137
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
138
|
-
*/
|
|
139
|
-
export namespace UniswapBuyExactlyParamsTokenOut$ {
|
|
140
|
-
/** @deprecated use `UniswapBuyExactlyParamsTokenOut$inboundSchema` instead. */
|
|
141
|
-
export const inboundSchema = UniswapBuyExactlyParamsTokenOut$inboundSchema;
|
|
142
|
-
/** @deprecated use `UniswapBuyExactlyParamsTokenOut$outboundSchema` instead. */
|
|
143
|
-
export const outboundSchema = UniswapBuyExactlyParamsTokenOut$outboundSchema;
|
|
144
|
-
/** @deprecated use `UniswapBuyExactlyParamsTokenOut$Outbound` instead. */
|
|
145
|
-
export type Outbound = UniswapBuyExactlyParamsTokenOut$Outbound;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export function uniswapBuyExactlyParamsTokenOutToJSON(
|
|
149
|
-
uniswapBuyExactlyParamsTokenOut: UniswapBuyExactlyParamsTokenOut,
|
|
150
|
-
): string {
|
|
151
|
-
return JSON.stringify(
|
|
152
|
-
UniswapBuyExactlyParamsTokenOut$outboundSchema.parse(
|
|
153
|
-
uniswapBuyExactlyParamsTokenOut,
|
|
154
|
-
),
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export function uniswapBuyExactlyParamsTokenOutFromJSON(
|
|
159
|
-
jsonString: string,
|
|
160
|
-
): SafeParseResult<UniswapBuyExactlyParamsTokenOut, SDKValidationError> {
|
|
161
|
-
return safeParse(
|
|
162
|
-
jsonString,
|
|
163
|
-
(x) => UniswapBuyExactlyParamsTokenOut$inboundSchema.parse(JSON.parse(x)),
|
|
164
|
-
`Failed to parse 'UniswapBuyExactlyParamsTokenOut' from JSON`,
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
68
|
/** @internal */
|
|
169
69
|
export const UniswapBuyExactlyParamsAmount$inboundSchema: z.ZodType<
|
|
170
70
|
UniswapBuyExactlyParamsAmount,
|
|
@@ -222,8 +122,8 @@ export const UniswapBuyExactlyParams$inboundSchema: z.ZodType<
|
|
|
222
122
|
unknown
|
|
223
123
|
> = z.object({
|
|
224
124
|
action_type: z.literal("UNISWAP_BUY_EXACTLY").default("UNISWAP_BUY_EXACTLY"),
|
|
225
|
-
token_in:
|
|
226
|
-
token_out:
|
|
125
|
+
token_in: TokenEnum$inboundSchema,
|
|
126
|
+
token_out: TokenEnum$inboundSchema,
|
|
227
127
|
fee: FeeEnum$inboundSchema,
|
|
228
128
|
amount: z.union([z.number(), z.string()]),
|
|
229
129
|
max_slippage_percent: z.number(),
|
|
@@ -241,8 +141,8 @@ export const UniswapBuyExactlyParams$inboundSchema: z.ZodType<
|
|
|
241
141
|
/** @internal */
|
|
242
142
|
export type UniswapBuyExactlyParams$Outbound = {
|
|
243
143
|
action_type: "UNISWAP_BUY_EXACTLY";
|
|
244
|
-
token_in: string
|
|
245
|
-
token_out: string
|
|
144
|
+
token_in: string;
|
|
145
|
+
token_out: string;
|
|
246
146
|
fee: string;
|
|
247
147
|
amount: number | string;
|
|
248
148
|
max_slippage_percent: number;
|
|
@@ -258,8 +158,8 @@ export const UniswapBuyExactlyParams$outboundSchema: z.ZodType<
|
|
|
258
158
|
actionType: z.literal("UNISWAP_BUY_EXACTLY").default(
|
|
259
159
|
"UNISWAP_BUY_EXACTLY" as const,
|
|
260
160
|
),
|
|
261
|
-
tokenIn:
|
|
262
|
-
tokenOut:
|
|
161
|
+
tokenIn: TokenEnum$outboundSchema,
|
|
162
|
+
tokenOut: TokenEnum$outboundSchema,
|
|
263
163
|
fee: FeeEnum$outboundSchema,
|
|
264
164
|
amount: z.union([z.number(), z.string()]),
|
|
265
165
|
maxSlippagePercent: z.number(),
|
|
@@ -19,16 +19,6 @@ 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
|
-
|
|
32
22
|
/**
|
|
33
23
|
* The amount of the token to swap to
|
|
34
24
|
*/
|
|
@@ -49,13 +39,23 @@ export type UniswapBuyExactlyRequestChain = ClosedEnum<
|
|
|
49
39
|
export type UniswapBuyExactlyRequest = {
|
|
50
40
|
actionType?: "UNISWAP_BUY_EXACTLY" | undefined;
|
|
51
41
|
/**
|
|
52
|
-
*
|
|
42
|
+
* A class representing the token.
|
|
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.
|
|
53
48
|
*/
|
|
54
|
-
tokenIn: TokenEnum
|
|
49
|
+
tokenIn: TokenEnum;
|
|
55
50
|
/**
|
|
56
|
-
*
|
|
51
|
+
* A class representing the token.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
*
|
|
55
|
+
* This class is used to represent the token in the system. Notice individual
|
|
56
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
57
57
|
*/
|
|
58
|
-
tokenOut: TokenEnum
|
|
58
|
+
tokenOut: TokenEnum;
|
|
59
59
|
/**
|
|
60
60
|
* The transaction fee of a Uniswap pool in bips.
|
|
61
61
|
*
|
|
@@ -83,106 +83,6 @@ export type UniswapBuyExactlyRequest = {
|
|
|
83
83
|
sender: string;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
/** @internal */
|
|
87
|
-
export const UniswapBuyExactlyRequestTokenIn$inboundSchema: z.ZodType<
|
|
88
|
-
UniswapBuyExactlyRequestTokenIn,
|
|
89
|
-
z.ZodTypeDef,
|
|
90
|
-
unknown
|
|
91
|
-
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
92
|
-
|
|
93
|
-
/** @internal */
|
|
94
|
-
export type UniswapBuyExactlyRequestTokenIn$Outbound = string | string;
|
|
95
|
-
|
|
96
|
-
/** @internal */
|
|
97
|
-
export const UniswapBuyExactlyRequestTokenIn$outboundSchema: z.ZodType<
|
|
98
|
-
UniswapBuyExactlyRequestTokenIn$Outbound,
|
|
99
|
-
z.ZodTypeDef,
|
|
100
|
-
UniswapBuyExactlyRequestTokenIn
|
|
101
|
-
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @internal
|
|
105
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
106
|
-
*/
|
|
107
|
-
export namespace UniswapBuyExactlyRequestTokenIn$ {
|
|
108
|
-
/** @deprecated use `UniswapBuyExactlyRequestTokenIn$inboundSchema` instead. */
|
|
109
|
-
export const inboundSchema = UniswapBuyExactlyRequestTokenIn$inboundSchema;
|
|
110
|
-
/** @deprecated use `UniswapBuyExactlyRequestTokenIn$outboundSchema` instead. */
|
|
111
|
-
export const outboundSchema = UniswapBuyExactlyRequestTokenIn$outboundSchema;
|
|
112
|
-
/** @deprecated use `UniswapBuyExactlyRequestTokenIn$Outbound` instead. */
|
|
113
|
-
export type Outbound = UniswapBuyExactlyRequestTokenIn$Outbound;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export function uniswapBuyExactlyRequestTokenInToJSON(
|
|
117
|
-
uniswapBuyExactlyRequestTokenIn: UniswapBuyExactlyRequestTokenIn,
|
|
118
|
-
): string {
|
|
119
|
-
return JSON.stringify(
|
|
120
|
-
UniswapBuyExactlyRequestTokenIn$outboundSchema.parse(
|
|
121
|
-
uniswapBuyExactlyRequestTokenIn,
|
|
122
|
-
),
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export function uniswapBuyExactlyRequestTokenInFromJSON(
|
|
127
|
-
jsonString: string,
|
|
128
|
-
): SafeParseResult<UniswapBuyExactlyRequestTokenIn, SDKValidationError> {
|
|
129
|
-
return safeParse(
|
|
130
|
-
jsonString,
|
|
131
|
-
(x) => UniswapBuyExactlyRequestTokenIn$inboundSchema.parse(JSON.parse(x)),
|
|
132
|
-
`Failed to parse 'UniswapBuyExactlyRequestTokenIn' from JSON`,
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** @internal */
|
|
137
|
-
export const UniswapBuyExactlyRequestTokenOut$inboundSchema: z.ZodType<
|
|
138
|
-
UniswapBuyExactlyRequestTokenOut,
|
|
139
|
-
z.ZodTypeDef,
|
|
140
|
-
unknown
|
|
141
|
-
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
142
|
-
|
|
143
|
-
/** @internal */
|
|
144
|
-
export type UniswapBuyExactlyRequestTokenOut$Outbound = string | string;
|
|
145
|
-
|
|
146
|
-
/** @internal */
|
|
147
|
-
export const UniswapBuyExactlyRequestTokenOut$outboundSchema: z.ZodType<
|
|
148
|
-
UniswapBuyExactlyRequestTokenOut$Outbound,
|
|
149
|
-
z.ZodTypeDef,
|
|
150
|
-
UniswapBuyExactlyRequestTokenOut
|
|
151
|
-
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @internal
|
|
155
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
156
|
-
*/
|
|
157
|
-
export namespace UniswapBuyExactlyRequestTokenOut$ {
|
|
158
|
-
/** @deprecated use `UniswapBuyExactlyRequestTokenOut$inboundSchema` instead. */
|
|
159
|
-
export const inboundSchema = UniswapBuyExactlyRequestTokenOut$inboundSchema;
|
|
160
|
-
/** @deprecated use `UniswapBuyExactlyRequestTokenOut$outboundSchema` instead. */
|
|
161
|
-
export const outboundSchema = UniswapBuyExactlyRequestTokenOut$outboundSchema;
|
|
162
|
-
/** @deprecated use `UniswapBuyExactlyRequestTokenOut$Outbound` instead. */
|
|
163
|
-
export type Outbound = UniswapBuyExactlyRequestTokenOut$Outbound;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export function uniswapBuyExactlyRequestTokenOutToJSON(
|
|
167
|
-
uniswapBuyExactlyRequestTokenOut: UniswapBuyExactlyRequestTokenOut,
|
|
168
|
-
): string {
|
|
169
|
-
return JSON.stringify(
|
|
170
|
-
UniswapBuyExactlyRequestTokenOut$outboundSchema.parse(
|
|
171
|
-
uniswapBuyExactlyRequestTokenOut,
|
|
172
|
-
),
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export function uniswapBuyExactlyRequestTokenOutFromJSON(
|
|
177
|
-
jsonString: string,
|
|
178
|
-
): SafeParseResult<UniswapBuyExactlyRequestTokenOut, SDKValidationError> {
|
|
179
|
-
return safeParse(
|
|
180
|
-
jsonString,
|
|
181
|
-
(x) => UniswapBuyExactlyRequestTokenOut$inboundSchema.parse(JSON.parse(x)),
|
|
182
|
-
`Failed to parse 'UniswapBuyExactlyRequestTokenOut' from JSON`,
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
86
|
/** @internal */
|
|
187
87
|
export const UniswapBuyExactlyRequestAmount$inboundSchema: z.ZodType<
|
|
188
88
|
UniswapBuyExactlyRequestAmount,
|
|
@@ -261,8 +161,8 @@ export const UniswapBuyExactlyRequest$inboundSchema: z.ZodType<
|
|
|
261
161
|
unknown
|
|
262
162
|
> = z.object({
|
|
263
163
|
action_type: z.literal("UNISWAP_BUY_EXACTLY").default("UNISWAP_BUY_EXACTLY"),
|
|
264
|
-
token_in:
|
|
265
|
-
token_out:
|
|
164
|
+
token_in: TokenEnum$inboundSchema,
|
|
165
|
+
token_out: TokenEnum$inboundSchema,
|
|
266
166
|
fee: FeeEnum$inboundSchema,
|
|
267
167
|
amount: z.union([z.number(), z.string()]),
|
|
268
168
|
max_slippage_percent: z.number(),
|
|
@@ -282,8 +182,8 @@ export const UniswapBuyExactlyRequest$inboundSchema: z.ZodType<
|
|
|
282
182
|
/** @internal */
|
|
283
183
|
export type UniswapBuyExactlyRequest$Outbound = {
|
|
284
184
|
action_type: "UNISWAP_BUY_EXACTLY";
|
|
285
|
-
token_in: string
|
|
286
|
-
token_out: string
|
|
185
|
+
token_in: string;
|
|
186
|
+
token_out: string;
|
|
287
187
|
fee: string;
|
|
288
188
|
amount: number | string;
|
|
289
189
|
max_slippage_percent: number;
|
|
@@ -301,8 +201,8 @@ export const UniswapBuyExactlyRequest$outboundSchema: z.ZodType<
|
|
|
301
201
|
actionType: z.literal("UNISWAP_BUY_EXACTLY").default(
|
|
302
202
|
"UNISWAP_BUY_EXACTLY" as const,
|
|
303
203
|
),
|
|
304
|
-
tokenIn:
|
|
305
|
-
tokenOut:
|
|
204
|
+
tokenIn: TokenEnum$outboundSchema,
|
|
205
|
+
tokenOut: TokenEnum$outboundSchema,
|
|
306
206
|
fee: FeeEnum$outboundSchema,
|
|
307
207
|
amount: z.union([z.number(), z.string()]),
|
|
308
208
|
maxSlippagePercent: z.number(),
|
|
@@ -19,7 +19,6 @@ export * from "./genericens.js";
|
|
|
19
19
|
export * from "./genericportfolio.js";
|
|
20
20
|
export * from "./genericsupportedchains.js";
|
|
21
21
|
export * from "./genericsupportedtokens.js";
|
|
22
|
-
export * from "./genericvisualizeportfolio.js";
|
|
23
22
|
export * from "./morphomarket.js";
|
|
24
23
|
export * from "./morphomarketposition.js";
|
|
25
24
|
export * from "./morphomarkets.js";
|
package/src/sdk/universal.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { universalPortfolio } from "../funcs/universalPortfolio.js";
|
|
|
9
9
|
import { universalSupportedChains } from "../funcs/universalSupportedChains.js";
|
|
10
10
|
import { universalSupportedTokens } from "../funcs/universalSupportedTokens.js";
|
|
11
11
|
import { universalUnwrapWeth } from "../funcs/universalUnwrapWeth.js";
|
|
12
|
-
import { universalVisualizePortfolio } from "../funcs/universalVisualizePortfolio.js";
|
|
13
12
|
import { universalWrapEth } from "../funcs/universalWrapEth.js";
|
|
14
13
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
15
14
|
import * as components from "../models/components/index.js";
|
|
@@ -37,27 +36,6 @@ export class Universal extends ClientSDK {
|
|
|
37
36
|
));
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
/**
|
|
41
|
-
* Visualize User Portfolio
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* Generate a visual representation of the token portfolio for a wallet address.
|
|
45
|
-
*
|
|
46
|
-
* The response is an SVG image of a pie chart depicting the relative distribution of
|
|
47
|
-
* tokens held, colored and labeled with token symbols, percentages and token values in
|
|
48
|
-
* USD.
|
|
49
|
-
*/
|
|
50
|
-
async visualizePortfolio(
|
|
51
|
-
request: operations.GenericVisualizePortfolioRequest,
|
|
52
|
-
options?: RequestOptions,
|
|
53
|
-
): Promise<components.Image> {
|
|
54
|
-
return unwrapAsync(universalVisualizePortfolio(
|
|
55
|
-
this,
|
|
56
|
-
request,
|
|
57
|
-
options,
|
|
58
|
-
));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
39
|
/**
|
|
62
40
|
* List Supported Tokens
|
|
63
41
|
*
|
|
@@ -1,23 +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
|
-
* Visualize User Portfolio
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* Generate a visual representation of the token portfolio for a wallet address.
|
|
17
|
-
*
|
|
18
|
-
* The response is an SVG image of a pie chart depicting the relative distribution of
|
|
19
|
-
* tokens held, colored and labeled with token symbols, percentages and token values in
|
|
20
|
-
* USD.
|
|
21
|
-
*/
|
|
22
|
-
export declare function universalVisualizePortfolio(client: CompassApiSDKCore, request: operations.GenericVisualizePortfolioRequest, options?: RequestOptions): APIPromise<Result<components.Image, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
23
|
-
//# sourceMappingURL=universalVisualizePortfolio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universalVisualizePortfolio.d.ts","sourceRoot":"","sources":["../../../src/funcs/universalVisualizePortfolio.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;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,KAAK,EACd,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -1,127 +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.universalVisualizePortfolio = universalVisualizePortfolio;
|
|
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
|
-
* Visualize User Portfolio
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Generate a visual representation of the token portfolio for a wallet address.
|
|
55
|
-
*
|
|
56
|
-
* The response is an SVG image of a pie chart depicting the relative distribution of
|
|
57
|
-
* tokens held, colored and labeled with token symbols, percentages and token values in
|
|
58
|
-
* USD.
|
|
59
|
-
*/
|
|
60
|
-
function universalVisualizePortfolio(client, request, options) {
|
|
61
|
-
return new async_js_1.APIPromise($do(client, request, options));
|
|
62
|
-
}
|
|
63
|
-
async function $do(client, request, options) {
|
|
64
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.GenericVisualizePortfolioRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65
|
-
if (!parsed.ok) {
|
|
66
|
-
return [parsed, { status: "invalid" }];
|
|
67
|
-
}
|
|
68
|
-
const payload = parsed.value;
|
|
69
|
-
const body = null;
|
|
70
|
-
const path = (0, url_js_1.pathToFunc)("/v0/generic/visualize_portfolio/get")();
|
|
71
|
-
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
72
|
-
"chain": payload.chain,
|
|
73
|
-
"user": payload.user,
|
|
74
|
-
});
|
|
75
|
-
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
76
|
-
Accept: "application/json",
|
|
77
|
-
}));
|
|
78
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyAuth);
|
|
79
|
-
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
80
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
81
|
-
const context = {
|
|
82
|
-
options: client._options,
|
|
83
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
84
|
-
operationID: "generic_visualize_portfolio",
|
|
85
|
-
oAuth2Scopes: [],
|
|
86
|
-
resolvedSecurity: requestSecurity,
|
|
87
|
-
securitySource: client._options.apiKeyAuth,
|
|
88
|
-
retryConfig: options?.retries
|
|
89
|
-
|| client._options.retryConfig
|
|
90
|
-
|| { strategy: "none" },
|
|
91
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
-
};
|
|
93
|
-
const requestRes = client._createRequest(context, {
|
|
94
|
-
security: requestSecurity,
|
|
95
|
-
method: "GET",
|
|
96
|
-
baseURL: options?.serverURL,
|
|
97
|
-
path: path,
|
|
98
|
-
headers: headers,
|
|
99
|
-
query: query,
|
|
100
|
-
body: body,
|
|
101
|
-
userAgent: client._options.userAgent,
|
|
102
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
103
|
-
}, options);
|
|
104
|
-
if (!requestRes.ok) {
|
|
105
|
-
return [requestRes, { status: "invalid" }];
|
|
106
|
-
}
|
|
107
|
-
const req = requestRes.value;
|
|
108
|
-
const doResult = await client._do(req, {
|
|
109
|
-
context,
|
|
110
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
111
|
-
retryConfig: context.retryConfig,
|
|
112
|
-
retryCodes: context.retryCodes,
|
|
113
|
-
});
|
|
114
|
-
if (!doResult.ok) {
|
|
115
|
-
return [doResult, { status: "request-error", request: req }];
|
|
116
|
-
}
|
|
117
|
-
const response = doResult.value;
|
|
118
|
-
const responseFields = {
|
|
119
|
-
HttpMeta: { Response: response, Request: req },
|
|
120
|
-
};
|
|
121
|
-
const [result] = await M.match(M.json(200, components.Image$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
122
|
-
if (!result.ok) {
|
|
123
|
-
return [result, { status: "complete", request: req, response }];
|
|
124
|
-
}
|
|
125
|
-
return [result, { status: "complete", request: req, response }];
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=universalVisualizePortfolio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universalVisualizePortfolio.js","sourceRoot":"","sources":["../../../src/funcs/universalVisualizePortfolio.ts"],"names":[],"mappings":"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"}
|
|
@@ -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.GenericVisualizePortfolioRequest, import("zod").ZodTypeDef, unknown>;
|
|
5
|
-
};
|
|
6
|
-
export declare const tool$universalVisualizePortfolio: ToolDefinition<typeof args>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=universalVisualizePortfolio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universalVisualizePortfolio.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/universalVisualizePortfolio.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,gCAAgC,EAAE,cAAc,CAAC,OAAO,IAAI,CA4BxE,CAAC"}
|
|
@@ -1,68 +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$universalVisualizePortfolio = void 0;
|
|
40
|
-
const universalVisualizePortfolio_js_1 = require("../../funcs/universalVisualizePortfolio.js");
|
|
41
|
-
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
-
const tools_js_1 = require("../tools.js");
|
|
43
|
-
const args = {
|
|
44
|
-
request: operations.GenericVisualizePortfolioRequest$inboundSchema,
|
|
45
|
-
};
|
|
46
|
-
exports.tool$universalVisualizePortfolio = {
|
|
47
|
-
name: "universal-visualize-portfolio",
|
|
48
|
-
description: `Visualize User Portfolio
|
|
49
|
-
|
|
50
|
-
Generate a visual representation of the token portfolio for a wallet address.
|
|
51
|
-
|
|
52
|
-
The response is an SVG image of a pie chart depicting the relative distribution of
|
|
53
|
-
tokens held, colored and labeled with token symbols, percentages and token values in
|
|
54
|
-
USD.`,
|
|
55
|
-
args,
|
|
56
|
-
tool: async (client, args, ctx) => {
|
|
57
|
-
const [result, apiCall] = await (0, universalVisualizePortfolio_js_1.universalVisualizePortfolio)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
58
|
-
if (!result.ok) {
|
|
59
|
-
return {
|
|
60
|
-
content: [{ type: "text", text: result.error.message }],
|
|
61
|
-
isError: true,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
const value = result.value;
|
|
65
|
-
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=universalVisualizePortfolio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universalVisualizePortfolio.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/universalVisualizePortfolio.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+FAAyF;AACzF,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,8CAA8C;CACnE,CAAC;AAEW,QAAA,gCAAgC,GAAgC;IAC3E,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE;;;;;;KAMV;IACH,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,4DAA2B,EACzD,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"}
|