@compass-labs/api-sdk 0.0.21 → 0.0.23

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 (166) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/README.md +9 -7
  3. package/bin/mcp-server.js +631 -885
  4. package/bin/mcp-server.js.map +14 -17
  5. package/dist/commonjs/funcs/aaveV3ReserveOverview.d.ts +23 -0
  6. package/dist/commonjs/funcs/aaveV3ReserveOverview.d.ts.map +1 -0
  7. package/dist/commonjs/funcs/aaveV3ReserveOverview.js +126 -0
  8. package/dist/commonjs/funcs/aaveV3ReserveOverview.js.map +1 -0
  9. package/dist/commonjs/lib/config.d.ts +2 -2
  10. package/dist/commonjs/lib/config.js +2 -2
  11. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  12. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  13. package/dist/commonjs/mcp-server/server.js +3 -1
  14. package/dist/commonjs/mcp-server/server.js.map +1 -1
  15. package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.d.ts +8 -0
  16. package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.d.ts.map +1 -0
  17. package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.js +69 -0
  18. package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.js.map +1 -0
  19. package/dist/commonjs/models/components/aavereserveoverviewresponse.d.ts +42 -0
  20. package/dist/commonjs/models/components/aavereserveoverviewresponse.d.ts.map +1 -0
  21. package/dist/commonjs/models/components/aavereserveoverviewresponse.js +84 -0
  22. package/dist/commonjs/models/components/aavereserveoverviewresponse.js.map +1 -0
  23. package/dist/commonjs/models/components/index.d.ts +1 -7
  24. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/index.js +1 -7
  26. package/dist/commonjs/models/components/index.js.map +1 -1
  27. package/dist/commonjs/models/components/multicallaction.d.ts +4 -11
  28. package/dist/commonjs/models/components/multicallaction.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/multicallaction.js +0 -35
  30. package/dist/commonjs/models/components/multicallaction.js.map +1 -1
  31. package/dist/commonjs/models/components/multicallactiontype.d.ts +0 -21
  32. package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/multicallactiontype.js +0 -7
  34. package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
  35. package/dist/commonjs/models/operations/aavereserveoverview.d.ts +244 -0
  36. package/dist/commonjs/models/operations/aavereserveoverview.d.ts.map +1 -0
  37. package/dist/commonjs/models/operations/aavereserveoverview.js +163 -0
  38. package/dist/commonjs/models/operations/aavereserveoverview.js.map +1 -0
  39. package/dist/commonjs/models/operations/index.d.ts +1 -0
  40. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  41. package/dist/commonjs/models/operations/index.js +1 -0
  42. package/dist/commonjs/models/operations/index.js.map +1 -1
  43. package/dist/commonjs/sdk/aavev3.d.ts +12 -0
  44. package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
  45. package/dist/commonjs/sdk/aavev3.js +15 -0
  46. package/dist/commonjs/sdk/aavev3.js.map +1 -1
  47. package/dist/esm/funcs/aaveV3ReserveOverview.d.ts +23 -0
  48. package/dist/esm/funcs/aaveV3ReserveOverview.d.ts.map +1 -0
  49. package/dist/esm/funcs/aaveV3ReserveOverview.js +90 -0
  50. package/dist/esm/funcs/aaveV3ReserveOverview.js.map +1 -0
  51. package/dist/esm/lib/config.d.ts +2 -2
  52. package/dist/esm/lib/config.js +2 -2
  53. package/dist/esm/mcp-server/mcp-server.js +1 -1
  54. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  55. package/dist/esm/mcp-server/server.js +3 -1
  56. package/dist/esm/mcp-server/server.js.map +1 -1
  57. package/dist/esm/mcp-server/tools/aaveV3ReserveOverview.d.ts +8 -0
  58. package/dist/esm/mcp-server/tools/aaveV3ReserveOverview.d.ts.map +1 -0
  59. package/dist/esm/mcp-server/tools/aaveV3ReserveOverview.js +33 -0
  60. package/dist/esm/mcp-server/tools/aaveV3ReserveOverview.js.map +1 -0
  61. package/dist/esm/models/components/aavereserveoverviewresponse.d.ts +42 -0
  62. package/dist/esm/models/components/aavereserveoverviewresponse.d.ts.map +1 -0
  63. package/dist/esm/models/components/aavereserveoverviewresponse.js +46 -0
  64. package/dist/esm/models/components/aavereserveoverviewresponse.js.map +1 -0
  65. package/dist/esm/models/components/index.d.ts +1 -7
  66. package/dist/esm/models/components/index.d.ts.map +1 -1
  67. package/dist/esm/models/components/index.js +1 -7
  68. package/dist/esm/models/components/index.js.map +1 -1
  69. package/dist/esm/models/components/multicallaction.d.ts +4 -11
  70. package/dist/esm/models/components/multicallaction.d.ts.map +1 -1
  71. package/dist/esm/models/components/multicallaction.js +0 -35
  72. package/dist/esm/models/components/multicallaction.js.map +1 -1
  73. package/dist/esm/models/components/multicallactiontype.d.ts +0 -21
  74. package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
  75. package/dist/esm/models/components/multicallactiontype.js +0 -7
  76. package/dist/esm/models/components/multicallactiontype.js.map +1 -1
  77. package/dist/esm/models/operations/aavereserveoverview.d.ts +244 -0
  78. package/dist/esm/models/operations/aavereserveoverview.d.ts.map +1 -0
  79. package/dist/esm/models/operations/aavereserveoverview.js +125 -0
  80. package/dist/esm/models/operations/aavereserveoverview.js.map +1 -0
  81. package/dist/esm/models/operations/index.d.ts +1 -0
  82. package/dist/esm/models/operations/index.d.ts.map +1 -1
  83. package/dist/esm/models/operations/index.js +1 -0
  84. package/dist/esm/models/operations/index.js.map +1 -1
  85. package/dist/esm/sdk/aavev3.d.ts +12 -0
  86. package/dist/esm/sdk/aavev3.d.ts.map +1 -1
  87. package/dist/esm/sdk/aavev3.js +15 -0
  88. package/dist/esm/sdk/aavev3.js.map +1 -1
  89. package/docs/sdks/aavev3/README.md +85 -0
  90. package/jsr.json +1 -1
  91. package/package.json +1 -1
  92. package/src/funcs/aaveV3ReserveOverview.ts +175 -0
  93. package/src/lib/config.ts +2 -2
  94. package/src/mcp-server/mcp-server.ts +1 -1
  95. package/src/mcp-server/server.ts +3 -1
  96. package/src/mcp-server/tools/aaveV3ReserveOverview.ts +42 -0
  97. package/src/models/components/aavereserveoverviewresponse.ts +96 -0
  98. package/src/models/components/index.ts +1 -7
  99. package/src/models/components/multicallaction.ts +0 -98
  100. package/src/models/components/multicallactiontype.ts +0 -7
  101. package/src/models/operations/aavereserveoverview.ts +205 -0
  102. package/src/models/operations/index.ts +1 -0
  103. package/src/sdk/aavev3.ts +23 -0
  104. package/dist/commonjs/models/components/aerodromeaddliquidityethparams.d.ts +0 -177
  105. package/dist/commonjs/models/components/aerodromeaddliquidityethparams.d.ts.map +0 -1
  106. package/dist/commonjs/models/components/aerodromeaddliquidityethparams.js +0 -191
  107. package/dist/commonjs/models/components/aerodromeaddliquidityethparams.js.map +0 -1
  108. package/dist/commonjs/models/components/aerodromeaddliquidityparams.d.ts +0 -186
  109. package/dist/commonjs/models/components/aerodromeaddliquidityparams.d.ts.map +0 -1
  110. package/dist/commonjs/models/components/aerodromeaddliquidityparams.js +0 -197
  111. package/dist/commonjs/models/components/aerodromeaddliquidityparams.js.map +0 -1
  112. package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.d.ts +0 -151
  113. package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.d.ts.map +0 -1
  114. package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.js +0 -167
  115. package/dist/commonjs/models/components/aerodromeremoveliquidityethrequest.js.map +0 -1
  116. package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.d.ts +0 -161
  117. package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.d.ts.map +0 -1
  118. package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.js +0 -173
  119. package/dist/commonjs/models/components/aerodromeremoveliquidityrequest.js.map +0 -1
  120. package/dist/commonjs/models/components/aerodromeswapethfortokenparams.d.ts +0 -109
  121. package/dist/commonjs/models/components/aerodromeswapethfortokenparams.d.ts.map +0 -1
  122. package/dist/commonjs/models/components/aerodromeswapethfortokenparams.js +0 -137
  123. package/dist/commonjs/models/components/aerodromeswapethfortokenparams.js.map +0 -1
  124. package/dist/commonjs/models/components/aerodromeswaptokenforethparams.d.ts +0 -109
  125. package/dist/commonjs/models/components/aerodromeswaptokenforethparams.d.ts.map +0 -1
  126. package/dist/commonjs/models/components/aerodromeswaptokenforethparams.js +0 -137
  127. package/dist/commonjs/models/components/aerodromeswaptokenforethparams.js.map +0 -1
  128. package/dist/commonjs/models/components/aerodromeswaptokensparams.d.ts +0 -128
  129. package/dist/commonjs/models/components/aerodromeswaptokensparams.d.ts.map +0 -1
  130. package/dist/commonjs/models/components/aerodromeswaptokensparams.js +0 -141
  131. package/dist/commonjs/models/components/aerodromeswaptokensparams.js.map +0 -1
  132. package/dist/esm/models/components/aerodromeaddliquidityethparams.d.ts +0 -177
  133. package/dist/esm/models/components/aerodromeaddliquidityethparams.d.ts.map +0 -1
  134. package/dist/esm/models/components/aerodromeaddliquidityethparams.js +0 -145
  135. package/dist/esm/models/components/aerodromeaddliquidityethparams.js.map +0 -1
  136. package/dist/esm/models/components/aerodromeaddliquidityparams.d.ts +0 -186
  137. package/dist/esm/models/components/aerodromeaddliquidityparams.d.ts.map +0 -1
  138. package/dist/esm/models/components/aerodromeaddliquidityparams.js +0 -151
  139. package/dist/esm/models/components/aerodromeaddliquidityparams.js.map +0 -1
  140. package/dist/esm/models/components/aerodromeremoveliquidityethrequest.d.ts +0 -151
  141. package/dist/esm/models/components/aerodromeremoveliquidityethrequest.d.ts.map +0 -1
  142. package/dist/esm/models/components/aerodromeremoveliquidityethrequest.js +0 -123
  143. package/dist/esm/models/components/aerodromeremoveliquidityethrequest.js.map +0 -1
  144. package/dist/esm/models/components/aerodromeremoveliquidityrequest.d.ts +0 -161
  145. package/dist/esm/models/components/aerodromeremoveliquidityrequest.d.ts.map +0 -1
  146. package/dist/esm/models/components/aerodromeremoveliquidityrequest.js +0 -129
  147. package/dist/esm/models/components/aerodromeremoveliquidityrequest.js.map +0 -1
  148. package/dist/esm/models/components/aerodromeswapethfortokenparams.d.ts +0 -109
  149. package/dist/esm/models/components/aerodromeswapethfortokenparams.d.ts.map +0 -1
  150. package/dist/esm/models/components/aerodromeswapethfortokenparams.js +0 -95
  151. package/dist/esm/models/components/aerodromeswapethfortokenparams.js.map +0 -1
  152. package/dist/esm/models/components/aerodromeswaptokenforethparams.d.ts +0 -109
  153. package/dist/esm/models/components/aerodromeswaptokenforethparams.d.ts.map +0 -1
  154. package/dist/esm/models/components/aerodromeswaptokenforethparams.js +0 -95
  155. package/dist/esm/models/components/aerodromeswaptokenforethparams.js.map +0 -1
  156. package/dist/esm/models/components/aerodromeswaptokensparams.d.ts +0 -128
  157. package/dist/esm/models/components/aerodromeswaptokensparams.d.ts.map +0 -1
  158. package/dist/esm/models/components/aerodromeswaptokensparams.js +0 -99
  159. package/dist/esm/models/components/aerodromeswaptokensparams.js.map +0 -1
  160. package/src/models/components/aerodromeaddliquidityethparams.ts +0 -392
  161. package/src/models/components/aerodromeaddliquidityparams.ts +0 -382
  162. package/src/models/components/aerodromeremoveliquidityethrequest.ts +0 -357
  163. package/src/models/components/aerodromeremoveliquidityrequest.ts +0 -363
  164. package/src/models/components/aerodromeswapethfortokenparams.ts +0 -249
  165. package/src/models/components/aerodromeswaptokenforethparams.ts +0 -249
  166. package/src/models/components/aerodromeswaptokensparams.ts +0 -260
@@ -1,363 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
- import {
12
- TokenEnum,
13
- TokenEnum$inboundSchema,
14
- TokenEnum$outboundSchema,
15
- } from "./tokenenum.js";
16
-
17
- /**
18
- * The amount of liquidity you want to remove
19
- */
20
- export type AerodromeRemoveLiquidityRequestLiquidity = number | string;
21
-
22
- /**
23
- * The minimal amount of token A you are willing to receive
24
- */
25
- export type AerodromeRemoveLiquidityRequestAmountAMin = number | string;
26
-
27
- /**
28
- * The minimal amount of token B you are willing to receive
29
- */
30
- export type AerodromeRemoveLiquidityRequestAmountBMin = number | string;
31
-
32
- export type AerodromeRemoveLiquidityRequest = {
33
- /**
34
- * The chain to use.
35
- */
36
- chain: Chain;
37
- /**
38
- * The address of the transaction sender.
39
- */
40
- sender: string;
41
- /**
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.
48
- */
49
- tokenA: TokenEnum;
50
- /**
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
- */
58
- tokenB: TokenEnum;
59
- /**
60
- * If true, try to remove liquidity from a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to remove liquidity from a volatile pool with a bonding curve of K=xy
61
- */
62
- stable: boolean;
63
- /**
64
- * The amount of liquidity you want to remove
65
- */
66
- liquidity: number | string;
67
- /**
68
- * The minimal amount of token A you are willing to receive
69
- */
70
- amountAMin: number | string;
71
- /**
72
- * The minimal amount of token B you are willing to receive
73
- */
74
- amountBMin: number | string;
75
- /**
76
- * The receiver of the tokens from this liquidity removal, default to sender
77
- */
78
- to?: string | null | undefined;
79
- /**
80
- * The deadline for this transaction in seconds since epoch
81
- */
82
- deadline: number | null;
83
- };
84
-
85
- /** @internal */
86
- export const AerodromeRemoveLiquidityRequestLiquidity$inboundSchema: z.ZodType<
87
- AerodromeRemoveLiquidityRequestLiquidity,
88
- z.ZodTypeDef,
89
- unknown
90
- > = z.union([z.number(), z.string()]);
91
-
92
- /** @internal */
93
- export type AerodromeRemoveLiquidityRequestLiquidity$Outbound = number | string;
94
-
95
- /** @internal */
96
- export const AerodromeRemoveLiquidityRequestLiquidity$outboundSchema: z.ZodType<
97
- AerodromeRemoveLiquidityRequestLiquidity$Outbound,
98
- z.ZodTypeDef,
99
- AerodromeRemoveLiquidityRequestLiquidity
100
- > = z.union([z.number(), z.string()]);
101
-
102
- /**
103
- * @internal
104
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
105
- */
106
- export namespace AerodromeRemoveLiquidityRequestLiquidity$ {
107
- /** @deprecated use `AerodromeRemoveLiquidityRequestLiquidity$inboundSchema` instead. */
108
- export const inboundSchema =
109
- AerodromeRemoveLiquidityRequestLiquidity$inboundSchema;
110
- /** @deprecated use `AerodromeRemoveLiquidityRequestLiquidity$outboundSchema` instead. */
111
- export const outboundSchema =
112
- AerodromeRemoveLiquidityRequestLiquidity$outboundSchema;
113
- /** @deprecated use `AerodromeRemoveLiquidityRequestLiquidity$Outbound` instead. */
114
- export type Outbound = AerodromeRemoveLiquidityRequestLiquidity$Outbound;
115
- }
116
-
117
- export function aerodromeRemoveLiquidityRequestLiquidityToJSON(
118
- aerodromeRemoveLiquidityRequestLiquidity:
119
- AerodromeRemoveLiquidityRequestLiquidity,
120
- ): string {
121
- return JSON.stringify(
122
- AerodromeRemoveLiquidityRequestLiquidity$outboundSchema.parse(
123
- aerodromeRemoveLiquidityRequestLiquidity,
124
- ),
125
- );
126
- }
127
-
128
- export function aerodromeRemoveLiquidityRequestLiquidityFromJSON(
129
- jsonString: string,
130
- ): SafeParseResult<
131
- AerodromeRemoveLiquidityRequestLiquidity,
132
- SDKValidationError
133
- > {
134
- return safeParse(
135
- jsonString,
136
- (x) =>
137
- AerodromeRemoveLiquidityRequestLiquidity$inboundSchema.parse(
138
- JSON.parse(x),
139
- ),
140
- `Failed to parse 'AerodromeRemoveLiquidityRequestLiquidity' from JSON`,
141
- );
142
- }
143
-
144
- /** @internal */
145
- export const AerodromeRemoveLiquidityRequestAmountAMin$inboundSchema: z.ZodType<
146
- AerodromeRemoveLiquidityRequestAmountAMin,
147
- z.ZodTypeDef,
148
- unknown
149
- > = z.union([z.number(), z.string()]);
150
-
151
- /** @internal */
152
- export type AerodromeRemoveLiquidityRequestAmountAMin$Outbound =
153
- | number
154
- | string;
155
-
156
- /** @internal */
157
- export const AerodromeRemoveLiquidityRequestAmountAMin$outboundSchema:
158
- z.ZodType<
159
- AerodromeRemoveLiquidityRequestAmountAMin$Outbound,
160
- z.ZodTypeDef,
161
- AerodromeRemoveLiquidityRequestAmountAMin
162
- > = z.union([z.number(), z.string()]);
163
-
164
- /**
165
- * @internal
166
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
167
- */
168
- export namespace AerodromeRemoveLiquidityRequestAmountAMin$ {
169
- /** @deprecated use `AerodromeRemoveLiquidityRequestAmountAMin$inboundSchema` instead. */
170
- export const inboundSchema =
171
- AerodromeRemoveLiquidityRequestAmountAMin$inboundSchema;
172
- /** @deprecated use `AerodromeRemoveLiquidityRequestAmountAMin$outboundSchema` instead. */
173
- export const outboundSchema =
174
- AerodromeRemoveLiquidityRequestAmountAMin$outboundSchema;
175
- /** @deprecated use `AerodromeRemoveLiquidityRequestAmountAMin$Outbound` instead. */
176
- export type Outbound = AerodromeRemoveLiquidityRequestAmountAMin$Outbound;
177
- }
178
-
179
- export function aerodromeRemoveLiquidityRequestAmountAMinToJSON(
180
- aerodromeRemoveLiquidityRequestAmountAMin:
181
- AerodromeRemoveLiquidityRequestAmountAMin,
182
- ): string {
183
- return JSON.stringify(
184
- AerodromeRemoveLiquidityRequestAmountAMin$outboundSchema.parse(
185
- aerodromeRemoveLiquidityRequestAmountAMin,
186
- ),
187
- );
188
- }
189
-
190
- export function aerodromeRemoveLiquidityRequestAmountAMinFromJSON(
191
- jsonString: string,
192
- ): SafeParseResult<
193
- AerodromeRemoveLiquidityRequestAmountAMin,
194
- SDKValidationError
195
- > {
196
- return safeParse(
197
- jsonString,
198
- (x) =>
199
- AerodromeRemoveLiquidityRequestAmountAMin$inboundSchema.parse(
200
- JSON.parse(x),
201
- ),
202
- `Failed to parse 'AerodromeRemoveLiquidityRequestAmountAMin' from JSON`,
203
- );
204
- }
205
-
206
- /** @internal */
207
- export const AerodromeRemoveLiquidityRequestAmountBMin$inboundSchema: z.ZodType<
208
- AerodromeRemoveLiquidityRequestAmountBMin,
209
- z.ZodTypeDef,
210
- unknown
211
- > = z.union([z.number(), z.string()]);
212
-
213
- /** @internal */
214
- export type AerodromeRemoveLiquidityRequestAmountBMin$Outbound =
215
- | number
216
- | string;
217
-
218
- /** @internal */
219
- export const AerodromeRemoveLiquidityRequestAmountBMin$outboundSchema:
220
- z.ZodType<
221
- AerodromeRemoveLiquidityRequestAmountBMin$Outbound,
222
- z.ZodTypeDef,
223
- AerodromeRemoveLiquidityRequestAmountBMin
224
- > = z.union([z.number(), z.string()]);
225
-
226
- /**
227
- * @internal
228
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
229
- */
230
- export namespace AerodromeRemoveLiquidityRequestAmountBMin$ {
231
- /** @deprecated use `AerodromeRemoveLiquidityRequestAmountBMin$inboundSchema` instead. */
232
- export const inboundSchema =
233
- AerodromeRemoveLiquidityRequestAmountBMin$inboundSchema;
234
- /** @deprecated use `AerodromeRemoveLiquidityRequestAmountBMin$outboundSchema` instead. */
235
- export const outboundSchema =
236
- AerodromeRemoveLiquidityRequestAmountBMin$outboundSchema;
237
- /** @deprecated use `AerodromeRemoveLiquidityRequestAmountBMin$Outbound` instead. */
238
- export type Outbound = AerodromeRemoveLiquidityRequestAmountBMin$Outbound;
239
- }
240
-
241
- export function aerodromeRemoveLiquidityRequestAmountBMinToJSON(
242
- aerodromeRemoveLiquidityRequestAmountBMin:
243
- AerodromeRemoveLiquidityRequestAmountBMin,
244
- ): string {
245
- return JSON.stringify(
246
- AerodromeRemoveLiquidityRequestAmountBMin$outboundSchema.parse(
247
- aerodromeRemoveLiquidityRequestAmountBMin,
248
- ),
249
- );
250
- }
251
-
252
- export function aerodromeRemoveLiquidityRequestAmountBMinFromJSON(
253
- jsonString: string,
254
- ): SafeParseResult<
255
- AerodromeRemoveLiquidityRequestAmountBMin,
256
- SDKValidationError
257
- > {
258
- return safeParse(
259
- jsonString,
260
- (x) =>
261
- AerodromeRemoveLiquidityRequestAmountBMin$inboundSchema.parse(
262
- JSON.parse(x),
263
- ),
264
- `Failed to parse 'AerodromeRemoveLiquidityRequestAmountBMin' from JSON`,
265
- );
266
- }
267
-
268
- /** @internal */
269
- export const AerodromeRemoveLiquidityRequest$inboundSchema: z.ZodType<
270
- AerodromeRemoveLiquidityRequest,
271
- z.ZodTypeDef,
272
- unknown
273
- > = z.object({
274
- chain: Chain$inboundSchema,
275
- sender: z.string(),
276
- token_a: TokenEnum$inboundSchema,
277
- token_b: TokenEnum$inboundSchema,
278
- stable: z.boolean(),
279
- liquidity: z.union([z.number(), z.string()]),
280
- amount_a_min: z.union([z.number(), z.string()]),
281
- amount_b_min: z.union([z.number(), z.string()]),
282
- to: z.nullable(z.string()).optional(),
283
- deadline: z.nullable(z.number().int()),
284
- }).transform((v) => {
285
- return remap$(v, {
286
- "token_a": "tokenA",
287
- "token_b": "tokenB",
288
- "amount_a_min": "amountAMin",
289
- "amount_b_min": "amountBMin",
290
- });
291
- });
292
-
293
- /** @internal */
294
- export type AerodromeRemoveLiquidityRequest$Outbound = {
295
- chain: string;
296
- sender: string;
297
- token_a: string;
298
- token_b: string;
299
- stable: boolean;
300
- liquidity: number | string;
301
- amount_a_min: number | string;
302
- amount_b_min: number | string;
303
- to?: string | null | undefined;
304
- deadline: number | null;
305
- };
306
-
307
- /** @internal */
308
- export const AerodromeRemoveLiquidityRequest$outboundSchema: z.ZodType<
309
- AerodromeRemoveLiquidityRequest$Outbound,
310
- z.ZodTypeDef,
311
- AerodromeRemoveLiquidityRequest
312
- > = z.object({
313
- chain: Chain$outboundSchema,
314
- sender: z.string(),
315
- tokenA: TokenEnum$outboundSchema,
316
- tokenB: TokenEnum$outboundSchema,
317
- stable: z.boolean(),
318
- liquidity: z.union([z.number(), z.string()]),
319
- amountAMin: z.union([z.number(), z.string()]),
320
- amountBMin: z.union([z.number(), z.string()]),
321
- to: z.nullable(z.string()).optional(),
322
- deadline: z.nullable(z.number().int()),
323
- }).transform((v) => {
324
- return remap$(v, {
325
- tokenA: "token_a",
326
- tokenB: "token_b",
327
- amountAMin: "amount_a_min",
328
- amountBMin: "amount_b_min",
329
- });
330
- });
331
-
332
- /**
333
- * @internal
334
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
335
- */
336
- export namespace AerodromeRemoveLiquidityRequest$ {
337
- /** @deprecated use `AerodromeRemoveLiquidityRequest$inboundSchema` instead. */
338
- export const inboundSchema = AerodromeRemoveLiquidityRequest$inboundSchema;
339
- /** @deprecated use `AerodromeRemoveLiquidityRequest$outboundSchema` instead. */
340
- export const outboundSchema = AerodromeRemoveLiquidityRequest$outboundSchema;
341
- /** @deprecated use `AerodromeRemoveLiquidityRequest$Outbound` instead. */
342
- export type Outbound = AerodromeRemoveLiquidityRequest$Outbound;
343
- }
344
-
345
- export function aerodromeRemoveLiquidityRequestToJSON(
346
- aerodromeRemoveLiquidityRequest: AerodromeRemoveLiquidityRequest,
347
- ): string {
348
- return JSON.stringify(
349
- AerodromeRemoveLiquidityRequest$outboundSchema.parse(
350
- aerodromeRemoveLiquidityRequest,
351
- ),
352
- );
353
- }
354
-
355
- export function aerodromeRemoveLiquidityRequestFromJSON(
356
- jsonString: string,
357
- ): SafeParseResult<AerodromeRemoveLiquidityRequest, SDKValidationError> {
358
- return safeParse(
359
- jsonString,
360
- (x) => AerodromeRemoveLiquidityRequest$inboundSchema.parse(JSON.parse(x)),
361
- `Failed to parse 'AerodromeRemoveLiquidityRequest' from JSON`,
362
- );
363
- }
@@ -1,249 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- TokenEnum,
12
- TokenEnum$inboundSchema,
13
- TokenEnum$outboundSchema,
14
- } from "./tokenenum.js";
15
-
16
- /**
17
- * The amount of ETH you will give to aerodrome_basic for this trade
18
- */
19
- export type AerodromeSwapEthForTokenParamsAmountIn = number | string;
20
-
21
- /**
22
- * The minimal amount of token you are willing to receive (will revert if the swap gives you less)
23
- */
24
- export type AerodromeSwapEthForTokenParamsAmountOutMin = number | string;
25
-
26
- /**
27
- * Parameters model for swapping ETH for tokens.
28
- */
29
- export type AerodromeSwapEthForTokenParams = {
30
- /**
31
- * A class representing the token.
32
- *
33
- * @remarks
34
- *
35
- * This class is used to represent the token in the system. Notice individual
36
- * endpoints' documentation where per chain tokens are presented.
37
- */
38
- tokenOut: TokenEnum;
39
- /**
40
- * The amount of ETH you will give to aerodrome_basic for this trade
41
- */
42
- amountIn: number | string;
43
- /**
44
- * The minimal amount of token you are willing to receive (will revert if the swap gives you less)
45
- */
46
- amountOutMin: number | string;
47
- /**
48
- * If true, try to trade on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to trade on a volatile pool with a bonding curve of K=xy
49
- */
50
- stable: boolean;
51
- /**
52
- * The receiver of the funds from this trade, default to sender
53
- */
54
- to?: string | null | undefined;
55
- };
56
-
57
- /** @internal */
58
- export const AerodromeSwapEthForTokenParamsAmountIn$inboundSchema: z.ZodType<
59
- AerodromeSwapEthForTokenParamsAmountIn,
60
- z.ZodTypeDef,
61
- unknown
62
- > = z.union([z.number(), z.string()]);
63
-
64
- /** @internal */
65
- export type AerodromeSwapEthForTokenParamsAmountIn$Outbound = number | string;
66
-
67
- /** @internal */
68
- export const AerodromeSwapEthForTokenParamsAmountIn$outboundSchema: z.ZodType<
69
- AerodromeSwapEthForTokenParamsAmountIn$Outbound,
70
- z.ZodTypeDef,
71
- AerodromeSwapEthForTokenParamsAmountIn
72
- > = z.union([z.number(), z.string()]);
73
-
74
- /**
75
- * @internal
76
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
77
- */
78
- export namespace AerodromeSwapEthForTokenParamsAmountIn$ {
79
- /** @deprecated use `AerodromeSwapEthForTokenParamsAmountIn$inboundSchema` instead. */
80
- export const inboundSchema =
81
- AerodromeSwapEthForTokenParamsAmountIn$inboundSchema;
82
- /** @deprecated use `AerodromeSwapEthForTokenParamsAmountIn$outboundSchema` instead. */
83
- export const outboundSchema =
84
- AerodromeSwapEthForTokenParamsAmountIn$outboundSchema;
85
- /** @deprecated use `AerodromeSwapEthForTokenParamsAmountIn$Outbound` instead. */
86
- export type Outbound = AerodromeSwapEthForTokenParamsAmountIn$Outbound;
87
- }
88
-
89
- export function aerodromeSwapEthForTokenParamsAmountInToJSON(
90
- aerodromeSwapEthForTokenParamsAmountIn:
91
- AerodromeSwapEthForTokenParamsAmountIn,
92
- ): string {
93
- return JSON.stringify(
94
- AerodromeSwapEthForTokenParamsAmountIn$outboundSchema.parse(
95
- aerodromeSwapEthForTokenParamsAmountIn,
96
- ),
97
- );
98
- }
99
-
100
- export function aerodromeSwapEthForTokenParamsAmountInFromJSON(
101
- jsonString: string,
102
- ): SafeParseResult<AerodromeSwapEthForTokenParamsAmountIn, SDKValidationError> {
103
- return safeParse(
104
- jsonString,
105
- (x) =>
106
- AerodromeSwapEthForTokenParamsAmountIn$inboundSchema.parse(JSON.parse(x)),
107
- `Failed to parse 'AerodromeSwapEthForTokenParamsAmountIn' from JSON`,
108
- );
109
- }
110
-
111
- /** @internal */
112
- export const AerodromeSwapEthForTokenParamsAmountOutMin$inboundSchema:
113
- z.ZodType<AerodromeSwapEthForTokenParamsAmountOutMin, z.ZodTypeDef, unknown> =
114
- z.union([z.number(), z.string()]);
115
-
116
- /** @internal */
117
- export type AerodromeSwapEthForTokenParamsAmountOutMin$Outbound =
118
- | number
119
- | string;
120
-
121
- /** @internal */
122
- export const AerodromeSwapEthForTokenParamsAmountOutMin$outboundSchema:
123
- z.ZodType<
124
- AerodromeSwapEthForTokenParamsAmountOutMin$Outbound,
125
- z.ZodTypeDef,
126
- AerodromeSwapEthForTokenParamsAmountOutMin
127
- > = z.union([z.number(), z.string()]);
128
-
129
- /**
130
- * @internal
131
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
132
- */
133
- export namespace AerodromeSwapEthForTokenParamsAmountOutMin$ {
134
- /** @deprecated use `AerodromeSwapEthForTokenParamsAmountOutMin$inboundSchema` instead. */
135
- export const inboundSchema =
136
- AerodromeSwapEthForTokenParamsAmountOutMin$inboundSchema;
137
- /** @deprecated use `AerodromeSwapEthForTokenParamsAmountOutMin$outboundSchema` instead. */
138
- export const outboundSchema =
139
- AerodromeSwapEthForTokenParamsAmountOutMin$outboundSchema;
140
- /** @deprecated use `AerodromeSwapEthForTokenParamsAmountOutMin$Outbound` instead. */
141
- export type Outbound = AerodromeSwapEthForTokenParamsAmountOutMin$Outbound;
142
- }
143
-
144
- export function aerodromeSwapEthForTokenParamsAmountOutMinToJSON(
145
- aerodromeSwapEthForTokenParamsAmountOutMin:
146
- AerodromeSwapEthForTokenParamsAmountOutMin,
147
- ): string {
148
- return JSON.stringify(
149
- AerodromeSwapEthForTokenParamsAmountOutMin$outboundSchema.parse(
150
- aerodromeSwapEthForTokenParamsAmountOutMin,
151
- ),
152
- );
153
- }
154
-
155
- export function aerodromeSwapEthForTokenParamsAmountOutMinFromJSON(
156
- jsonString: string,
157
- ): SafeParseResult<
158
- AerodromeSwapEthForTokenParamsAmountOutMin,
159
- SDKValidationError
160
- > {
161
- return safeParse(
162
- jsonString,
163
- (x) =>
164
- AerodromeSwapEthForTokenParamsAmountOutMin$inboundSchema.parse(
165
- JSON.parse(x),
166
- ),
167
- `Failed to parse 'AerodromeSwapEthForTokenParamsAmountOutMin' from JSON`,
168
- );
169
- }
170
-
171
- /** @internal */
172
- export const AerodromeSwapEthForTokenParams$inboundSchema: z.ZodType<
173
- AerodromeSwapEthForTokenParams,
174
- z.ZodTypeDef,
175
- unknown
176
- > = z.object({
177
- token_out: TokenEnum$inboundSchema,
178
- amount_in: z.union([z.number(), z.string()]),
179
- amount_out_min: z.union([z.number(), z.string()]),
180
- stable: z.boolean(),
181
- to: z.nullable(z.string()).optional(),
182
- }).transform((v) => {
183
- return remap$(v, {
184
- "token_out": "tokenOut",
185
- "amount_in": "amountIn",
186
- "amount_out_min": "amountOutMin",
187
- });
188
- });
189
-
190
- /** @internal */
191
- export type AerodromeSwapEthForTokenParams$Outbound = {
192
- token_out: string;
193
- amount_in: number | string;
194
- amount_out_min: number | string;
195
- stable: boolean;
196
- to?: string | null | undefined;
197
- };
198
-
199
- /** @internal */
200
- export const AerodromeSwapEthForTokenParams$outboundSchema: z.ZodType<
201
- AerodromeSwapEthForTokenParams$Outbound,
202
- z.ZodTypeDef,
203
- AerodromeSwapEthForTokenParams
204
- > = z.object({
205
- tokenOut: TokenEnum$outboundSchema,
206
- amountIn: z.union([z.number(), z.string()]),
207
- amountOutMin: z.union([z.number(), z.string()]),
208
- stable: z.boolean(),
209
- to: z.nullable(z.string()).optional(),
210
- }).transform((v) => {
211
- return remap$(v, {
212
- tokenOut: "token_out",
213
- amountIn: "amount_in",
214
- amountOutMin: "amount_out_min",
215
- });
216
- });
217
-
218
- /**
219
- * @internal
220
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
221
- */
222
- export namespace AerodromeSwapEthForTokenParams$ {
223
- /** @deprecated use `AerodromeSwapEthForTokenParams$inboundSchema` instead. */
224
- export const inboundSchema = AerodromeSwapEthForTokenParams$inboundSchema;
225
- /** @deprecated use `AerodromeSwapEthForTokenParams$outboundSchema` instead. */
226
- export const outboundSchema = AerodromeSwapEthForTokenParams$outboundSchema;
227
- /** @deprecated use `AerodromeSwapEthForTokenParams$Outbound` instead. */
228
- export type Outbound = AerodromeSwapEthForTokenParams$Outbound;
229
- }
230
-
231
- export function aerodromeSwapEthForTokenParamsToJSON(
232
- aerodromeSwapEthForTokenParams: AerodromeSwapEthForTokenParams,
233
- ): string {
234
- return JSON.stringify(
235
- AerodromeSwapEthForTokenParams$outboundSchema.parse(
236
- aerodromeSwapEthForTokenParams,
237
- ),
238
- );
239
- }
240
-
241
- export function aerodromeSwapEthForTokenParamsFromJSON(
242
- jsonString: string,
243
- ): SafeParseResult<AerodromeSwapEthForTokenParams, SDKValidationError> {
244
- return safeParse(
245
- jsonString,
246
- (x) => AerodromeSwapEthForTokenParams$inboundSchema.parse(JSON.parse(x)),
247
- `Failed to parse 'AerodromeSwapEthForTokenParams' from JSON`,
248
- );
249
- }