@compass-labs/api-sdk 0.5.42 → 0.5.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/bin/mcp-server.js +48 -20
  2. package/bin/mcp-server.js.map +8 -8
  3. package/dist/commonjs/lib/config.d.ts +3 -3
  4. package/dist/commonjs/lib/config.js +3 -3
  5. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  6. package/dist/commonjs/mcp-server/server.js +1 -1
  7. package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +54 -16
  8. package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +51 -5
  10. package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
  11. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +54 -16
  12. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +51 -5
  14. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js.map +1 -1
  15. package/dist/commonjs/models/components/uniswappositionssolidityresponse.d.ts +2 -0
  16. package/dist/commonjs/models/components/uniswappositionssolidityresponse.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/uniswappositionssolidityresponse.js +4 -0
  18. package/dist/commonjs/models/components/uniswappositionssolidityresponse.js.map +1 -1
  19. package/dist/esm/lib/config.d.ts +3 -3
  20. package/dist/esm/lib/config.js +3 -3
  21. package/dist/esm/mcp-server/mcp-server.js +1 -1
  22. package/dist/esm/mcp-server/server.js +1 -1
  23. package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +54 -16
  24. package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
  25. package/dist/esm/models/components/uniswapbuyexactlyparams.js +46 -4
  26. package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
  27. package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +54 -16
  28. package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
  29. package/dist/esm/models/components/uniswapbuyexactlyrequest.js +46 -4
  30. package/dist/esm/models/components/uniswapbuyexactlyrequest.js.map +1 -1
  31. package/dist/esm/models/components/uniswappositionssolidityresponse.d.ts +2 -0
  32. package/dist/esm/models/components/uniswappositionssolidityresponse.d.ts.map +1 -1
  33. package/dist/esm/models/components/uniswappositionssolidityresponse.js +4 -0
  34. package/dist/esm/models/components/uniswappositionssolidityresponse.js.map +1 -1
  35. package/docs/sdks/uniswapv3/README.md +4 -4
  36. package/jsr.json +1 -1
  37. package/package.json +2 -2
  38. package/src/lib/config.ts +3 -3
  39. package/src/mcp-server/mcp-server.ts +1 -1
  40. package/src/mcp-server/server.ts +1 -1
  41. package/src/models/components/uniswapbuyexactlyparams.ts +120 -20
  42. package/src/models/components/uniswapbuyexactlyrequest.ts +120 -20
  43. package/src/models/components/uniswappositionssolidityresponse.ts +6 -0
@@ -18,6 +18,16 @@ 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
+
21
31
  /**
22
32
  * The amount of the token to swap to
23
33
  */
@@ -26,23 +36,13 @@ export type UniswapBuyExactlyParamsAmount = number | string;
26
36
  export type UniswapBuyExactlyParams = {
27
37
  actionType?: "UNISWAP_BUY_EXACTLY" | undefined;
28
38
  /**
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.
39
+ * The symbol of the token to swap from.
35
40
  */
36
- tokenIn: TokenEnum;
41
+ tokenIn: TokenEnum | string;
37
42
  /**
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.
43
+ * The symbol of the token to swap to.
44
44
  */
45
- tokenOut: TokenEnum;
45
+ tokenOut: TokenEnum | string;
46
46
  /**
47
47
  * The transaction fee of a Uniswap pool in bips.
48
48
  *
@@ -65,6 +65,106 @@ 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
+
68
168
  /** @internal */
69
169
  export const UniswapBuyExactlyParamsAmount$inboundSchema: z.ZodType<
70
170
  UniswapBuyExactlyParamsAmount,
@@ -122,8 +222,8 @@ export const UniswapBuyExactlyParams$inboundSchema: z.ZodType<
122
222
  unknown
123
223
  > = z.object({
124
224
  action_type: z.literal("UNISWAP_BUY_EXACTLY").default("UNISWAP_BUY_EXACTLY"),
125
- token_in: TokenEnum$inboundSchema,
126
- token_out: TokenEnum$inboundSchema,
225
+ token_in: z.union([TokenEnum$inboundSchema, z.string()]),
226
+ token_out: z.union([TokenEnum$inboundSchema, z.string()]),
127
227
  fee: FeeEnum$inboundSchema,
128
228
  amount: z.union([z.number(), z.string()]),
129
229
  max_slippage_percent: z.number(),
@@ -141,8 +241,8 @@ export const UniswapBuyExactlyParams$inboundSchema: z.ZodType<
141
241
  /** @internal */
142
242
  export type UniswapBuyExactlyParams$Outbound = {
143
243
  action_type: "UNISWAP_BUY_EXACTLY";
144
- token_in: string;
145
- token_out: string;
244
+ token_in: string | string;
245
+ token_out: string | string;
146
246
  fee: string;
147
247
  amount: number | string;
148
248
  max_slippage_percent: number;
@@ -158,8 +258,8 @@ export const UniswapBuyExactlyParams$outboundSchema: z.ZodType<
158
258
  actionType: z.literal("UNISWAP_BUY_EXACTLY").default(
159
259
  "UNISWAP_BUY_EXACTLY" as const,
160
260
  ),
161
- tokenIn: TokenEnum$outboundSchema,
162
- tokenOut: TokenEnum$outboundSchema,
261
+ tokenIn: z.union([TokenEnum$outboundSchema, z.string()]),
262
+ tokenOut: z.union([TokenEnum$outboundSchema, z.string()]),
163
263
  fee: FeeEnum$outboundSchema,
164
264
  amount: z.union([z.number(), z.string()]),
165
265
  maxSlippagePercent: z.number(),
@@ -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
- * A class representing the token.
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
- * 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.
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(),
@@ -21,6 +21,7 @@ export type UniswapPositionsSolidityResponse = {
21
21
  feeGrowthInside1LastX128: number;
22
22
  tokensOwed0: number;
23
23
  tokensOwed1: number;
24
+ lpTokenAddress?: string | null | undefined;
24
25
  };
25
26
 
26
27
  /** @internal */
@@ -41,6 +42,7 @@ export const UniswapPositionsSolidityResponse$inboundSchema: z.ZodType<
41
42
  fee_growth_inside1_last_x128: z.number().int(),
42
43
  tokens_owed0: z.number().int(),
43
44
  tokens_owed1: z.number().int(),
45
+ lp_token_address: z.nullable(z.string()).optional(),
44
46
  }).transform((v) => {
45
47
  return remap$(v, {
46
48
  "tick_lower": "tickLower",
@@ -49,6 +51,7 @@ export const UniswapPositionsSolidityResponse$inboundSchema: z.ZodType<
49
51
  "fee_growth_inside1_last_x128": "feeGrowthInside1LastX128",
50
52
  "tokens_owed0": "tokensOwed0",
51
53
  "tokens_owed1": "tokensOwed1",
54
+ "lp_token_address": "lpTokenAddress",
52
55
  });
53
56
  });
54
57
 
@@ -66,6 +69,7 @@ export type UniswapPositionsSolidityResponse$Outbound = {
66
69
  fee_growth_inside1_last_x128: number;
67
70
  tokens_owed0: number;
68
71
  tokens_owed1: number;
72
+ lp_token_address?: string | null | undefined;
69
73
  };
70
74
 
71
75
  /** @internal */
@@ -86,6 +90,7 @@ export const UniswapPositionsSolidityResponse$outboundSchema: z.ZodType<
86
90
  feeGrowthInside1LastX128: z.number().int(),
87
91
  tokensOwed0: z.number().int(),
88
92
  tokensOwed1: z.number().int(),
93
+ lpTokenAddress: z.nullable(z.string()).optional(),
89
94
  }).transform((v) => {
90
95
  return remap$(v, {
91
96
  tickLower: "tick_lower",
@@ -94,6 +99,7 @@ export const UniswapPositionsSolidityResponse$outboundSchema: z.ZodType<
94
99
  feeGrowthInside1LastX128: "fee_growth_inside1_last_x128",
95
100
  tokensOwed0: "tokens_owed0",
96
101
  tokensOwed1: "tokens_owed1",
102
+ lpTokenAddress: "lp_token_address",
97
103
  });
98
104
  });
99
105