@compass-labs/api-sdk 0.0.27 → 0.0.29

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 (220) hide show
  1. package/FUNCTIONS.md +4 -3
  2. package/README.md +21 -13
  3. package/bin/mcp-server.js +1255 -558
  4. package/bin/mcp-server.js.map +30 -15
  5. package/dist/commonjs/funcs/aaveV3AvgRate.d.ts +18 -0
  6. package/dist/commonjs/funcs/aaveV3AvgRate.d.ts.map +1 -0
  7. package/dist/commonjs/funcs/aaveV3AvgRate.js +122 -0
  8. package/dist/commonjs/funcs/aaveV3AvgRate.js.map +1 -0
  9. package/dist/commonjs/lib/config.d.ts +3 -3
  10. package/dist/commonjs/lib/config.js +3 -3
  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/aaveV3AvgRate.d.ts +8 -0
  16. package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.d.ts.map +1 -0
  17. package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js +64 -0
  18. package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js.map +1 -0
  19. package/dist/commonjs/models/components/aaveavgrateresponse.d.ts +57 -0
  20. package/dist/commonjs/models/components/aaveavgrateresponse.d.ts.map +1 -0
  21. package/dist/commonjs/models/components/aaveavgrateresponse.js +98 -0
  22. package/dist/commonjs/models/components/aaveavgrateresponse.js.map +1 -0
  23. package/dist/commonjs/models/components/index.d.ts +12 -0
  24. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/index.js +12 -0
  26. package/dist/commonjs/models/components/index.js.map +1 -1
  27. package/dist/commonjs/models/components/morphoborrowparams.d.ts +71 -0
  28. package/dist/commonjs/models/components/morphoborrowparams.d.ts.map +1 -0
  29. package/dist/commonjs/models/components/morphoborrowparams.js +109 -0
  30. package/dist/commonjs/models/components/morphoborrowparams.js.map +1 -0
  31. package/dist/commonjs/models/components/morphodepositparams.d.ts +66 -0
  32. package/dist/commonjs/models/components/morphodepositparams.d.ts.map +1 -0
  33. package/dist/commonjs/models/components/morphodepositparams.js +105 -0
  34. package/dist/commonjs/models/components/morphodepositparams.js.map +1 -0
  35. package/dist/commonjs/models/components/morphorepayparams.d.ts +47 -0
  36. package/dist/commonjs/models/components/morphorepayparams.d.ts.map +1 -0
  37. package/dist/commonjs/models/components/morphorepayparams.js +89 -0
  38. package/dist/commonjs/models/components/morphorepayparams.js.map +1 -0
  39. package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts +61 -0
  40. package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
  41. package/dist/commonjs/models/components/morphosetvaultallowanceparams.js +103 -0
  42. package/dist/commonjs/models/components/morphosetvaultallowanceparams.js.map +1 -0
  43. package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts +71 -0
  44. package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts.map +1 -0
  45. package/dist/commonjs/models/components/morphosupplycollateralparams.js +112 -0
  46. package/dist/commonjs/models/components/morphosupplycollateralparams.js.map +1 -0
  47. package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts +71 -0
  48. package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
  49. package/dist/commonjs/models/components/morphowithdrawcollateralparams.js +109 -0
  50. package/dist/commonjs/models/components/morphowithdrawcollateralparams.js.map +1 -0
  51. package/dist/commonjs/models/components/morphowithdrawparams.d.ts +42 -0
  52. package/dist/commonjs/models/components/morphowithdrawparams.d.ts.map +1 -0
  53. package/dist/commonjs/models/components/morphowithdrawparams.js +82 -0
  54. package/dist/commonjs/models/components/morphowithdrawparams.js.map +1 -0
  55. package/dist/commonjs/models/components/multicallaction.d.ts +15 -4
  56. package/dist/commonjs/models/components/multicallaction.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/multicallaction.js +55 -0
  58. package/dist/commonjs/models/components/multicallaction.js.map +1 -1
  59. package/dist/commonjs/models/components/multicallactiontype.d.ts +33 -0
  60. package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
  61. package/dist/commonjs/models/components/multicallactiontype.js +11 -0
  62. package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
  63. package/dist/commonjs/models/components/skybuyparams.d.ts +93 -0
  64. package/dist/commonjs/models/components/skybuyparams.d.ts.map +1 -0
  65. package/dist/commonjs/models/components/skybuyparams.js +125 -0
  66. package/dist/commonjs/models/components/skybuyparams.js.map +1 -0
  67. package/dist/commonjs/models/components/skybuyrequest.d.ts +8 -8
  68. package/dist/commonjs/models/components/skybuyrequest.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/skybuyrequest.js +13 -14
  70. package/dist/commonjs/models/components/skybuyrequest.js.map +1 -1
  71. package/dist/commonjs/models/components/skydepositparams.d.ts +61 -0
  72. package/dist/commonjs/models/components/skydepositparams.d.ts.map +1 -0
  73. package/dist/commonjs/models/components/skydepositparams.js +94 -0
  74. package/dist/commonjs/models/components/skydepositparams.js.map +1 -0
  75. package/dist/commonjs/models/components/skysellparams.d.ts +93 -0
  76. package/dist/commonjs/models/components/skysellparams.d.ts.map +1 -0
  77. package/dist/commonjs/models/components/skysellparams.js +125 -0
  78. package/dist/commonjs/models/components/skysellparams.js.map +1 -0
  79. package/dist/commonjs/models/components/skysellrequest.d.ts +8 -8
  80. package/dist/commonjs/models/components/skysellrequest.d.ts.map +1 -1
  81. package/dist/commonjs/models/components/skysellrequest.js +13 -14
  82. package/dist/commonjs/models/components/skysellrequest.js.map +1 -1
  83. package/dist/commonjs/models/components/skywithdrawparams.d.ts +37 -0
  84. package/dist/commonjs/models/components/skywithdrawparams.d.ts.map +1 -0
  85. package/dist/commonjs/models/components/skywithdrawparams.js +71 -0
  86. package/dist/commonjs/models/components/skywithdrawparams.js.map +1 -0
  87. package/dist/commonjs/models/operations/aaveavgrate.d.ts +244 -0
  88. package/dist/commonjs/models/operations/aaveavgrate.d.ts.map +1 -0
  89. package/dist/commonjs/models/operations/aaveavgrate.js +165 -0
  90. package/dist/commonjs/models/operations/aaveavgrate.js.map +1 -0
  91. package/dist/commonjs/models/operations/index.d.ts +1 -0
  92. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  93. package/dist/commonjs/models/operations/index.js +1 -0
  94. package/dist/commonjs/models/operations/index.js.map +1 -1
  95. package/dist/commonjs/sdk/aavev3.d.ts +7 -0
  96. package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
  97. package/dist/commonjs/sdk/aavev3.js +10 -0
  98. package/dist/commonjs/sdk/aavev3.js.map +1 -1
  99. package/dist/esm/funcs/aaveV3AvgRate.d.ts +18 -0
  100. package/dist/esm/funcs/aaveV3AvgRate.d.ts.map +1 -0
  101. package/dist/esm/funcs/aaveV3AvgRate.js +86 -0
  102. package/dist/esm/funcs/aaveV3AvgRate.js.map +1 -0
  103. package/dist/esm/lib/config.d.ts +3 -3
  104. package/dist/esm/lib/config.js +3 -3
  105. package/dist/esm/mcp-server/mcp-server.js +1 -1
  106. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  107. package/dist/esm/mcp-server/server.js +3 -1
  108. package/dist/esm/mcp-server/server.js.map +1 -1
  109. package/dist/esm/mcp-server/tools/aaveV3AvgRate.d.ts +8 -0
  110. package/dist/esm/mcp-server/tools/aaveV3AvgRate.d.ts.map +1 -0
  111. package/dist/esm/mcp-server/tools/aaveV3AvgRate.js +28 -0
  112. package/dist/esm/mcp-server/tools/aaveV3AvgRate.js.map +1 -0
  113. package/dist/esm/models/components/aaveavgrateresponse.d.ts +57 -0
  114. package/dist/esm/models/components/aaveavgrateresponse.d.ts.map +1 -0
  115. package/dist/esm/models/components/aaveavgrateresponse.js +60 -0
  116. package/dist/esm/models/components/aaveavgrateresponse.js.map +1 -0
  117. package/dist/esm/models/components/index.d.ts +12 -0
  118. package/dist/esm/models/components/index.d.ts.map +1 -1
  119. package/dist/esm/models/components/index.js +12 -0
  120. package/dist/esm/models/components/index.js.map +1 -1
  121. package/dist/esm/models/components/morphoborrowparams.d.ts +71 -0
  122. package/dist/esm/models/components/morphoborrowparams.d.ts.map +1 -0
  123. package/dist/esm/models/components/morphoborrowparams.js +69 -0
  124. package/dist/esm/models/components/morphoborrowparams.js.map +1 -0
  125. package/dist/esm/models/components/morphodepositparams.d.ts +66 -0
  126. package/dist/esm/models/components/morphodepositparams.d.ts.map +1 -0
  127. package/dist/esm/models/components/morphodepositparams.js +65 -0
  128. package/dist/esm/models/components/morphodepositparams.js.map +1 -0
  129. package/dist/esm/models/components/morphorepayparams.d.ts +47 -0
  130. package/dist/esm/models/components/morphorepayparams.d.ts.map +1 -0
  131. package/dist/esm/models/components/morphorepayparams.js +51 -0
  132. package/dist/esm/models/components/morphorepayparams.js.map +1 -0
  133. package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts +61 -0
  134. package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
  135. package/dist/esm/models/components/morphosetvaultallowanceparams.js +63 -0
  136. package/dist/esm/models/components/morphosetvaultallowanceparams.js.map +1 -0
  137. package/dist/esm/models/components/morphosupplycollateralparams.d.ts +71 -0
  138. package/dist/esm/models/components/morphosupplycollateralparams.d.ts.map +1 -0
  139. package/dist/esm/models/components/morphosupplycollateralparams.js +72 -0
  140. package/dist/esm/models/components/morphosupplycollateralparams.js.map +1 -0
  141. package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts +71 -0
  142. package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
  143. package/dist/esm/models/components/morphowithdrawcollateralparams.js +69 -0
  144. package/dist/esm/models/components/morphowithdrawcollateralparams.js.map +1 -0
  145. package/dist/esm/models/components/morphowithdrawparams.d.ts +42 -0
  146. package/dist/esm/models/components/morphowithdrawparams.d.ts.map +1 -0
  147. package/dist/esm/models/components/morphowithdrawparams.js +44 -0
  148. package/dist/esm/models/components/morphowithdrawparams.js.map +1 -0
  149. package/dist/esm/models/components/multicallaction.d.ts +15 -4
  150. package/dist/esm/models/components/multicallaction.d.ts.map +1 -1
  151. package/dist/esm/models/components/multicallaction.js +55 -0
  152. package/dist/esm/models/components/multicallaction.js.map +1 -1
  153. package/dist/esm/models/components/multicallactiontype.d.ts +33 -0
  154. package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
  155. package/dist/esm/models/components/multicallactiontype.js +11 -0
  156. package/dist/esm/models/components/multicallactiontype.js.map +1 -1
  157. package/dist/esm/models/components/skybuyparams.d.ts +93 -0
  158. package/dist/esm/models/components/skybuyparams.d.ts.map +1 -0
  159. package/dist/esm/models/components/skybuyparams.js +85 -0
  160. package/dist/esm/models/components/skybuyparams.js.map +1 -0
  161. package/dist/esm/models/components/skybuyrequest.d.ts +8 -8
  162. package/dist/esm/models/components/skybuyrequest.d.ts.map +1 -1
  163. package/dist/esm/models/components/skybuyrequest.js +12 -13
  164. package/dist/esm/models/components/skybuyrequest.js.map +1 -1
  165. package/dist/esm/models/components/skydepositparams.d.ts +61 -0
  166. package/dist/esm/models/components/skydepositparams.d.ts.map +1 -0
  167. package/dist/esm/models/components/skydepositparams.js +54 -0
  168. package/dist/esm/models/components/skydepositparams.js.map +1 -0
  169. package/dist/esm/models/components/skysellparams.d.ts +93 -0
  170. package/dist/esm/models/components/skysellparams.d.ts.map +1 -0
  171. package/dist/esm/models/components/skysellparams.js +85 -0
  172. package/dist/esm/models/components/skysellparams.js.map +1 -0
  173. package/dist/esm/models/components/skysellrequest.d.ts +8 -8
  174. package/dist/esm/models/components/skysellrequest.d.ts.map +1 -1
  175. package/dist/esm/models/components/skysellrequest.js +12 -13
  176. package/dist/esm/models/components/skysellrequest.js.map +1 -1
  177. package/dist/esm/models/components/skywithdrawparams.d.ts +37 -0
  178. package/dist/esm/models/components/skywithdrawparams.d.ts.map +1 -0
  179. package/dist/esm/models/components/skywithdrawparams.js +33 -0
  180. package/dist/esm/models/components/skywithdrawparams.js.map +1 -0
  181. package/dist/esm/models/operations/aaveavgrate.d.ts +244 -0
  182. package/dist/esm/models/operations/aaveavgrate.d.ts.map +1 -0
  183. package/dist/esm/models/operations/aaveavgrate.js +127 -0
  184. package/dist/esm/models/operations/aaveavgrate.js.map +1 -0
  185. package/dist/esm/models/operations/index.d.ts +1 -0
  186. package/dist/esm/models/operations/index.d.ts.map +1 -1
  187. package/dist/esm/models/operations/index.js +1 -0
  188. package/dist/esm/models/operations/index.js.map +1 -1
  189. package/dist/esm/sdk/aavev3.d.ts +7 -0
  190. package/dist/esm/sdk/aavev3.d.ts.map +1 -1
  191. package/dist/esm/sdk/aavev3.js +10 -0
  192. package/dist/esm/sdk/aavev3.js.map +1 -1
  193. package/docs/sdks/aavev3/README.md +82 -0
  194. package/jsr.json +1 -1
  195. package/package.json +1 -1
  196. package/src/funcs/aaveV3AvgRate.ts +170 -0
  197. package/src/lib/config.ts +3 -3
  198. package/src/mcp-server/mcp-server.ts +1 -1
  199. package/src/mcp-server/server.ts +3 -1
  200. package/src/mcp-server/tools/aaveV3AvgRate.ts +37 -0
  201. package/src/models/components/aaveavgrateresponse.ts +123 -0
  202. package/src/models/components/index.ts +12 -0
  203. package/src/models/components/morphoborrowparams.ts +154 -0
  204. package/src/models/components/morphodepositparams.ts +145 -0
  205. package/src/models/components/morphorepayparams.ts +104 -0
  206. package/src/models/components/morphosetvaultallowanceparams.ts +145 -0
  207. package/src/models/components/morphosupplycollateralparams.ts +163 -0
  208. package/src/models/components/morphowithdrawcollateralparams.ts +161 -0
  209. package/src/models/components/morphowithdrawparams.ts +92 -0
  210. package/src/models/components/multicallaction.ts +154 -0
  211. package/src/models/components/multicallactiontype.ts +11 -0
  212. package/src/models/components/skybuyparams.ts +168 -0
  213. package/src/models/components/skybuyrequest.ts +16 -14
  214. package/src/models/components/skydepositparams.ts +129 -0
  215. package/src/models/components/skysellparams.ts +168 -0
  216. package/src/models/components/skysellrequest.ts +16 -14
  217. package/src/models/components/skywithdrawparams.ts +76 -0
  218. package/src/models/operations/aaveavgrate.ts +203 -0
  219. package/src/models/operations/index.ts +1 -0
  220. package/src/sdk/aavev3.ts +18 -0
@@ -0,0 +1,168 @@
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 { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
14
+ */
15
+ export const SkySellParamsTokenOut = {
16
+ Dai: "DAI",
17
+ Usdc: "USDC",
18
+ } as const;
19
+ /**
20
+ * The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
21
+ */
22
+ export type SkySellParamsTokenOut = ClosedEnum<typeof SkySellParamsTokenOut>;
23
+
24
+ /**
25
+ * The amount of USDS you would like to sell 1:1 for 'token_out'.
26
+ */
27
+ export type SkySellParamsAmount = number | string;
28
+
29
+ export type SkySellParams = {
30
+ /**
31
+ * The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
32
+ */
33
+ tokenOut: SkySellParamsTokenOut;
34
+ /**
35
+ * The amount of USDS you would like to sell 1:1 for 'token_out'.
36
+ */
37
+ amount: number | string;
38
+ };
39
+
40
+ /** @internal */
41
+ export const SkySellParamsTokenOut$inboundSchema: z.ZodNativeEnum<
42
+ typeof SkySellParamsTokenOut
43
+ > = z.nativeEnum(SkySellParamsTokenOut);
44
+
45
+ /** @internal */
46
+ export const SkySellParamsTokenOut$outboundSchema: z.ZodNativeEnum<
47
+ typeof SkySellParamsTokenOut
48
+ > = SkySellParamsTokenOut$inboundSchema;
49
+
50
+ /**
51
+ * @internal
52
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
53
+ */
54
+ export namespace SkySellParamsTokenOut$ {
55
+ /** @deprecated use `SkySellParamsTokenOut$inboundSchema` instead. */
56
+ export const inboundSchema = SkySellParamsTokenOut$inboundSchema;
57
+ /** @deprecated use `SkySellParamsTokenOut$outboundSchema` instead. */
58
+ export const outboundSchema = SkySellParamsTokenOut$outboundSchema;
59
+ }
60
+
61
+ /** @internal */
62
+ export const SkySellParamsAmount$inboundSchema: z.ZodType<
63
+ SkySellParamsAmount,
64
+ z.ZodTypeDef,
65
+ unknown
66
+ > = z.union([z.number(), z.string()]);
67
+
68
+ /** @internal */
69
+ export type SkySellParamsAmount$Outbound = number | string;
70
+
71
+ /** @internal */
72
+ export const SkySellParamsAmount$outboundSchema: z.ZodType<
73
+ SkySellParamsAmount$Outbound,
74
+ z.ZodTypeDef,
75
+ SkySellParamsAmount
76
+ > = z.union([z.number(), z.string()]);
77
+
78
+ /**
79
+ * @internal
80
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
+ */
82
+ export namespace SkySellParamsAmount$ {
83
+ /** @deprecated use `SkySellParamsAmount$inboundSchema` instead. */
84
+ export const inboundSchema = SkySellParamsAmount$inboundSchema;
85
+ /** @deprecated use `SkySellParamsAmount$outboundSchema` instead. */
86
+ export const outboundSchema = SkySellParamsAmount$outboundSchema;
87
+ /** @deprecated use `SkySellParamsAmount$Outbound` instead. */
88
+ export type Outbound = SkySellParamsAmount$Outbound;
89
+ }
90
+
91
+ export function skySellParamsAmountToJSON(
92
+ skySellParamsAmount: SkySellParamsAmount,
93
+ ): string {
94
+ return JSON.stringify(
95
+ SkySellParamsAmount$outboundSchema.parse(skySellParamsAmount),
96
+ );
97
+ }
98
+
99
+ export function skySellParamsAmountFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<SkySellParamsAmount, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => SkySellParamsAmount$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'SkySellParamsAmount' from JSON`,
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const SkySellParams$inboundSchema: z.ZodType<
111
+ SkySellParams,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ token_out: SkySellParamsTokenOut$inboundSchema,
116
+ amount: z.union([z.number(), z.string()]),
117
+ }).transform((v) => {
118
+ return remap$(v, {
119
+ "token_out": "tokenOut",
120
+ });
121
+ });
122
+
123
+ /** @internal */
124
+ export type SkySellParams$Outbound = {
125
+ token_out: string;
126
+ amount: number | string;
127
+ };
128
+
129
+ /** @internal */
130
+ export const SkySellParams$outboundSchema: z.ZodType<
131
+ SkySellParams$Outbound,
132
+ z.ZodTypeDef,
133
+ SkySellParams
134
+ > = z.object({
135
+ tokenOut: SkySellParamsTokenOut$outboundSchema,
136
+ amount: z.union([z.number(), z.string()]),
137
+ }).transform((v) => {
138
+ return remap$(v, {
139
+ tokenOut: "token_out",
140
+ });
141
+ });
142
+
143
+ /**
144
+ * @internal
145
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
146
+ */
147
+ export namespace SkySellParams$ {
148
+ /** @deprecated use `SkySellParams$inboundSchema` instead. */
149
+ export const inboundSchema = SkySellParams$inboundSchema;
150
+ /** @deprecated use `SkySellParams$outboundSchema` instead. */
151
+ export const outboundSchema = SkySellParams$outboundSchema;
152
+ /** @deprecated use `SkySellParams$Outbound` instead. */
153
+ export type Outbound = SkySellParams$Outbound;
154
+ }
155
+
156
+ export function skySellParamsToJSON(skySellParams: SkySellParams): string {
157
+ return JSON.stringify(SkySellParams$outboundSchema.parse(skySellParams));
158
+ }
159
+
160
+ export function skySellParamsFromJSON(
161
+ jsonString: string,
162
+ ): SafeParseResult<SkySellParams, SDKValidationError> {
163
+ return safeParse(
164
+ jsonString,
165
+ (x) => SkySellParams$inboundSchema.parse(JSON.parse(x)),
166
+ `Failed to parse 'SkySellParams' from JSON`,
167
+ );
168
+ }
@@ -12,14 +12,14 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
  /**
13
13
  * The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
14
14
  */
15
- export const TokenOut = {
15
+ export const SkySellRequestTokenOut = {
16
16
  Dai: "DAI",
17
17
  Usdc: "USDC",
18
18
  } as const;
19
19
  /**
20
20
  * The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
21
21
  */
22
- export type TokenOut = ClosedEnum<typeof TokenOut>;
22
+ export type SkySellRequestTokenOut = ClosedEnum<typeof SkySellRequestTokenOut>;
23
23
 
24
24
  /**
25
25
  * The amount of USDS you would like to sell 1:1 for 'token_out'.
@@ -30,7 +30,7 @@ export type SkySellRequest = {
30
30
  /**
31
31
  * The token you would like to swap 1:1 with USDS. Choose from DAI or USDC.
32
32
  */
33
- tokenOut: TokenOut;
33
+ tokenOut: SkySellRequestTokenOut;
34
34
  /**
35
35
  * The amount of USDS you would like to sell 1:1 for 'token_out'.
36
36
  */
@@ -43,22 +43,24 @@ export type SkySellRequest = {
43
43
  };
44
44
 
45
45
  /** @internal */
46
- export const TokenOut$inboundSchema: z.ZodNativeEnum<typeof TokenOut> = z
47
- .nativeEnum(TokenOut);
46
+ export const SkySellRequestTokenOut$inboundSchema: z.ZodNativeEnum<
47
+ typeof SkySellRequestTokenOut
48
+ > = z.nativeEnum(SkySellRequestTokenOut);
48
49
 
49
50
  /** @internal */
50
- export const TokenOut$outboundSchema: z.ZodNativeEnum<typeof TokenOut> =
51
- TokenOut$inboundSchema;
51
+ export const SkySellRequestTokenOut$outboundSchema: z.ZodNativeEnum<
52
+ typeof SkySellRequestTokenOut
53
+ > = SkySellRequestTokenOut$inboundSchema;
52
54
 
53
55
  /**
54
56
  * @internal
55
57
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
58
  */
57
- export namespace TokenOut$ {
58
- /** @deprecated use `TokenOut$inboundSchema` instead. */
59
- export const inboundSchema = TokenOut$inboundSchema;
60
- /** @deprecated use `TokenOut$outboundSchema` instead. */
61
- export const outboundSchema = TokenOut$outboundSchema;
59
+ export namespace SkySellRequestTokenOut$ {
60
+ /** @deprecated use `SkySellRequestTokenOut$inboundSchema` instead. */
61
+ export const inboundSchema = SkySellRequestTokenOut$inboundSchema;
62
+ /** @deprecated use `SkySellRequestTokenOut$outboundSchema` instead. */
63
+ export const outboundSchema = SkySellRequestTokenOut$outboundSchema;
62
64
  }
63
65
 
64
66
  /** @internal */
@@ -115,7 +117,7 @@ export const SkySellRequest$inboundSchema: z.ZodType<
115
117
  z.ZodTypeDef,
116
118
  unknown
117
119
  > = z.object({
118
- token_out: TokenOut$inboundSchema,
120
+ token_out: SkySellRequestTokenOut$inboundSchema,
119
121
  amount: z.union([z.number(), z.string()]),
120
122
  chain: z.literal("ethereum:mainnet").default("ethereum:mainnet"),
121
123
  sender: z.string(),
@@ -139,7 +141,7 @@ export const SkySellRequest$outboundSchema: z.ZodType<
139
141
  z.ZodTypeDef,
140
142
  SkySellRequest
141
143
  > = z.object({
142
- tokenOut: TokenOut$outboundSchema,
144
+ tokenOut: SkySellRequestTokenOut$outboundSchema,
143
145
  amount: z.union([z.number(), z.string()]),
144
146
  chain: z.literal("ethereum:mainnet").default("ethereum:mainnet" as const),
145
147
  sender: z.string(),
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type SkyWithdrawParams = {
11
+ /**
12
+ * The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn.
13
+ */
14
+ amount?: any | undefined;
15
+ /**
16
+ * The address which will receive the withdrawn USDS. Defaults to the sender.
17
+ */
18
+ receiver?: string | null | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export const SkyWithdrawParams$inboundSchema: z.ZodType<
23
+ SkyWithdrawParams,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ amount: z.any().optional(),
28
+ receiver: z.nullable(z.string()).optional(),
29
+ });
30
+
31
+ /** @internal */
32
+ export type SkyWithdrawParams$Outbound = {
33
+ amount?: any | undefined;
34
+ receiver?: string | null | undefined;
35
+ };
36
+
37
+ /** @internal */
38
+ export const SkyWithdrawParams$outboundSchema: z.ZodType<
39
+ SkyWithdrawParams$Outbound,
40
+ z.ZodTypeDef,
41
+ SkyWithdrawParams
42
+ > = z.object({
43
+ amount: z.any().optional(),
44
+ receiver: z.nullable(z.string()).optional(),
45
+ });
46
+
47
+ /**
48
+ * @internal
49
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
+ */
51
+ export namespace SkyWithdrawParams$ {
52
+ /** @deprecated use `SkyWithdrawParams$inboundSchema` instead. */
53
+ export const inboundSchema = SkyWithdrawParams$inboundSchema;
54
+ /** @deprecated use `SkyWithdrawParams$outboundSchema` instead. */
55
+ export const outboundSchema = SkyWithdrawParams$outboundSchema;
56
+ /** @deprecated use `SkyWithdrawParams$Outbound` instead. */
57
+ export type Outbound = SkyWithdrawParams$Outbound;
58
+ }
59
+
60
+ export function skyWithdrawParamsToJSON(
61
+ skyWithdrawParams: SkyWithdrawParams,
62
+ ): string {
63
+ return JSON.stringify(
64
+ SkyWithdrawParams$outboundSchema.parse(skyWithdrawParams),
65
+ );
66
+ }
67
+
68
+ export function skyWithdrawParamsFromJSON(
69
+ jsonString: string,
70
+ ): SafeParseResult<SkyWithdrawParams, SDKValidationError> {
71
+ return safeParse(
72
+ jsonString,
73
+ (x) => SkyWithdrawParams$inboundSchema.parse(JSON.parse(x)),
74
+ `Failed to parse 'SkyWithdrawParams' from JSON`,
75
+ );
76
+ }
@@ -0,0 +1,203 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The chain to use.
13
+ */
14
+ export const AaveAvgRateChain = {
15
+ BaseMainnet: "base:mainnet",
16
+ EthereumMainnet: "ethereum:mainnet",
17
+ ArbitrumMainnet: "arbitrum:mainnet",
18
+ } as const;
19
+ /**
20
+ * The chain to use.
21
+ */
22
+ export type AaveAvgRateChain = ClosedEnum<typeof AaveAvgRateChain>;
23
+
24
+ /**
25
+ * A class representing the token.
26
+ *
27
+ * @remarks
28
+ *
29
+ * This class is used to represent the token in the system. Notice individual
30
+ * endpoints' documentation where per chain tokens are presented.
31
+ */
32
+ export const AaveAvgRateToken = {
33
+ OneINCH: "1INCH",
34
+ Aave: "AAVE",
35
+ Bal: "BAL",
36
+ CbBTC: "cbBTC",
37
+ CbETH: "cbETH",
38
+ Crv: "CRV",
39
+ CrvUSD: "crvUSD",
40
+ Dai: "DAI",
41
+ Ens: "ENS",
42
+ ETHx: "ETHx",
43
+ Frax: "FRAX",
44
+ Fxs: "FXS",
45
+ Gho: "GHO",
46
+ Knc: "KNC",
47
+ Ldo: "LDO",
48
+ Link: "LINK",
49
+ Lusd: "LUSD",
50
+ Mkr: "MKR",
51
+ OsETH: "osETH",
52
+ Pyusd: "PYUSD",
53
+ RETH: "rETH",
54
+ Rpl: "RPL",
55
+ RsETH: "rsETH",
56
+ SDAI: "sDAI",
57
+ Snx: "SNX",
58
+ Stg: "STG",
59
+ SUSDe: "sUSDe",
60
+ TBTC: "tBTC",
61
+ Uni: "UNI",
62
+ Usdc: "USDC",
63
+ USDe: "USDe",
64
+ Usds: "USDS",
65
+ Usdt: "USDT",
66
+ Wbtc: "WBTC",
67
+ WeETH: "weETH",
68
+ Weth: "WETH",
69
+ WstETH: "wstETH",
70
+ Arb: "ARB",
71
+ Eurs: "EURS",
72
+ Mai: "MAI",
73
+ USDCe: "USDCe",
74
+ Aero: "AERO",
75
+ Eur: "EUR",
76
+ Virtual: "VIRTUAL",
77
+ } as const;
78
+ /**
79
+ * A class representing the token.
80
+ *
81
+ * @remarks
82
+ *
83
+ * This class is used to represent the token in the system. Notice individual
84
+ * endpoints' documentation where per chain tokens are presented.
85
+ */
86
+ export type AaveAvgRateToken = ClosedEnum<typeof AaveAvgRateToken>;
87
+
88
+ export type AaveAvgRateRequest = {
89
+ /**
90
+ * The chain to use.
91
+ */
92
+ chain?: AaveAvgRateChain | undefined;
93
+ /**
94
+ * The symbol of the asset to fetch the user's position on..
95
+ */
96
+ token?: AaveAvgRateToken | undefined;
97
+ /**
98
+ * The number of days to fetch the user's position on.
99
+ */
100
+ days?: number | undefined;
101
+ };
102
+
103
+ /** @internal */
104
+ export const AaveAvgRateChain$inboundSchema: z.ZodNativeEnum<
105
+ typeof AaveAvgRateChain
106
+ > = z.nativeEnum(AaveAvgRateChain);
107
+
108
+ /** @internal */
109
+ export const AaveAvgRateChain$outboundSchema: z.ZodNativeEnum<
110
+ typeof AaveAvgRateChain
111
+ > = AaveAvgRateChain$inboundSchema;
112
+
113
+ /**
114
+ * @internal
115
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
116
+ */
117
+ export namespace AaveAvgRateChain$ {
118
+ /** @deprecated use `AaveAvgRateChain$inboundSchema` instead. */
119
+ export const inboundSchema = AaveAvgRateChain$inboundSchema;
120
+ /** @deprecated use `AaveAvgRateChain$outboundSchema` instead. */
121
+ export const outboundSchema = AaveAvgRateChain$outboundSchema;
122
+ }
123
+
124
+ /** @internal */
125
+ export const AaveAvgRateToken$inboundSchema: z.ZodNativeEnum<
126
+ typeof AaveAvgRateToken
127
+ > = z.nativeEnum(AaveAvgRateToken);
128
+
129
+ /** @internal */
130
+ export const AaveAvgRateToken$outboundSchema: z.ZodNativeEnum<
131
+ typeof AaveAvgRateToken
132
+ > = AaveAvgRateToken$inboundSchema;
133
+
134
+ /**
135
+ * @internal
136
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
137
+ */
138
+ export namespace AaveAvgRateToken$ {
139
+ /** @deprecated use `AaveAvgRateToken$inboundSchema` instead. */
140
+ export const inboundSchema = AaveAvgRateToken$inboundSchema;
141
+ /** @deprecated use `AaveAvgRateToken$outboundSchema` instead. */
142
+ export const outboundSchema = AaveAvgRateToken$outboundSchema;
143
+ }
144
+
145
+ /** @internal */
146
+ export const AaveAvgRateRequest$inboundSchema: z.ZodType<
147
+ AaveAvgRateRequest,
148
+ z.ZodTypeDef,
149
+ unknown
150
+ > = z.object({
151
+ chain: AaveAvgRateChain$inboundSchema.default("ethereum:mainnet"),
152
+ token: AaveAvgRateToken$inboundSchema.default("USDC"),
153
+ days: z.number().int().default(7),
154
+ });
155
+
156
+ /** @internal */
157
+ export type AaveAvgRateRequest$Outbound = {
158
+ chain: string;
159
+ token: string;
160
+ days: number;
161
+ };
162
+
163
+ /** @internal */
164
+ export const AaveAvgRateRequest$outboundSchema: z.ZodType<
165
+ AaveAvgRateRequest$Outbound,
166
+ z.ZodTypeDef,
167
+ AaveAvgRateRequest
168
+ > = z.object({
169
+ chain: AaveAvgRateChain$outboundSchema.default("ethereum:mainnet"),
170
+ token: AaveAvgRateToken$outboundSchema.default("USDC"),
171
+ days: z.number().int().default(7),
172
+ });
173
+
174
+ /**
175
+ * @internal
176
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
177
+ */
178
+ export namespace AaveAvgRateRequest$ {
179
+ /** @deprecated use `AaveAvgRateRequest$inboundSchema` instead. */
180
+ export const inboundSchema = AaveAvgRateRequest$inboundSchema;
181
+ /** @deprecated use `AaveAvgRateRequest$outboundSchema` instead. */
182
+ export const outboundSchema = AaveAvgRateRequest$outboundSchema;
183
+ /** @deprecated use `AaveAvgRateRequest$Outbound` instead. */
184
+ export type Outbound = AaveAvgRateRequest$Outbound;
185
+ }
186
+
187
+ export function aaveAvgRateRequestToJSON(
188
+ aaveAvgRateRequest: AaveAvgRateRequest,
189
+ ): string {
190
+ return JSON.stringify(
191
+ AaveAvgRateRequest$outboundSchema.parse(aaveAvgRateRequest),
192
+ );
193
+ }
194
+
195
+ export function aaveAvgRateRequestFromJSON(
196
+ jsonString: string,
197
+ ): SafeParseResult<AaveAvgRateRequest, SDKValidationError> {
198
+ return safeParse(
199
+ jsonString,
200
+ (x) => AaveAvgRateRequest$inboundSchema.parse(JSON.parse(x)),
201
+ `Failed to parse 'AaveAvgRateRequest' from JSON`,
202
+ );
203
+ }
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./aaveavgrate.js";
5
6
  export * from "./aavehistoricaltransactions.js";
6
7
  export * from "./aaveliquiditychange.js";
7
8
  export * from "./aaverate.js";
package/src/sdk/aavev3.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { aaveV3AvgRate } from "../funcs/aaveV3AvgRate.js";
5
6
  import { aaveV3Borrow } from "../funcs/aaveV3Borrow.js";
6
7
  import { aaveV3HistoricalTransactions } from "../funcs/aaveV3HistoricalTransactions.js";
7
8
  import { aaveV3LiquidityChange } from "../funcs/aaveV3LiquidityChange.js";
@@ -19,6 +20,23 @@ import * as operations from "../models/operations/index.js";
19
20
  import { unwrapAsync } from "../types/fp.js";
20
21
 
21
22
  export class AaveV3 extends ClientSDK {
23
+ /**
24
+ * Average interest rates
25
+ *
26
+ * @remarks
27
+ * Returns time averaged Interest Rates for Aave Reserves:
28
+ */
29
+ async avgRate(
30
+ request: operations.AaveAvgRateRequest,
31
+ options?: RequestOptions,
32
+ ): Promise<components.AaveAvgRateResponse> {
33
+ return unwrapAsync(aaveV3AvgRate(
34
+ this,
35
+ request,
36
+ options,
37
+ ));
38
+ }
39
+
22
40
  /**
23
41
  * Reserve overview
24
42
  *