@compass-labs/api-sdk 0.0.26 → 0.0.28

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 (180) hide show
  1. package/bin/mcp-server.js +490 -32
  2. package/bin/mcp-server.js.map +24 -13
  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/index.d.ts +11 -0
  8. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/index.js +11 -0
  10. package/dist/commonjs/models/components/index.js.map +1 -1
  11. package/dist/commonjs/models/components/morphoborrowparams.d.ts +71 -0
  12. package/dist/commonjs/models/components/morphoborrowparams.d.ts.map +1 -0
  13. package/dist/commonjs/models/components/morphoborrowparams.js +109 -0
  14. package/dist/commonjs/models/components/morphoborrowparams.js.map +1 -0
  15. package/dist/commonjs/models/components/morphodepositparams.d.ts +66 -0
  16. package/dist/commonjs/models/components/morphodepositparams.d.ts.map +1 -0
  17. package/dist/commonjs/models/components/morphodepositparams.js +105 -0
  18. package/dist/commonjs/models/components/morphodepositparams.js.map +1 -0
  19. package/dist/commonjs/models/components/morphorepayparams.d.ts +47 -0
  20. package/dist/commonjs/models/components/morphorepayparams.d.ts.map +1 -0
  21. package/dist/commonjs/models/components/morphorepayparams.js +89 -0
  22. package/dist/commonjs/models/components/morphorepayparams.js.map +1 -0
  23. package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts +61 -0
  24. package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
  25. package/dist/commonjs/models/components/morphosetvaultallowanceparams.js +103 -0
  26. package/dist/commonjs/models/components/morphosetvaultallowanceparams.js.map +1 -0
  27. package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts +71 -0
  28. package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts.map +1 -0
  29. package/dist/commonjs/models/components/morphosupplycollateralparams.js +112 -0
  30. package/dist/commonjs/models/components/morphosupplycollateralparams.js.map +1 -0
  31. package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts +71 -0
  32. package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
  33. package/dist/commonjs/models/components/morphowithdrawcollateralparams.js +109 -0
  34. package/dist/commonjs/models/components/morphowithdrawcollateralparams.js.map +1 -0
  35. package/dist/commonjs/models/components/morphowithdrawparams.d.ts +42 -0
  36. package/dist/commonjs/models/components/morphowithdrawparams.d.ts.map +1 -0
  37. package/dist/commonjs/models/components/morphowithdrawparams.js +82 -0
  38. package/dist/commonjs/models/components/morphowithdrawparams.js.map +1 -0
  39. package/dist/commonjs/models/components/multicallaction.d.ts +15 -4
  40. package/dist/commonjs/models/components/multicallaction.d.ts.map +1 -1
  41. package/dist/commonjs/models/components/multicallaction.js +55 -0
  42. package/dist/commonjs/models/components/multicallaction.js.map +1 -1
  43. package/dist/commonjs/models/components/multicallactiontype.d.ts +33 -0
  44. package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/multicallactiontype.js +11 -0
  46. package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
  47. package/dist/commonjs/models/components/skybuyparams.d.ts +93 -0
  48. package/dist/commonjs/models/components/skybuyparams.d.ts.map +1 -0
  49. package/dist/commonjs/models/components/skybuyparams.js +125 -0
  50. package/dist/commonjs/models/components/skybuyparams.js.map +1 -0
  51. package/dist/commonjs/models/components/skybuyrequest.d.ts +8 -8
  52. package/dist/commonjs/models/components/skybuyrequest.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/skybuyrequest.js +13 -14
  54. package/dist/commonjs/models/components/skybuyrequest.js.map +1 -1
  55. package/dist/commonjs/models/components/skydepositparams.d.ts +61 -0
  56. package/dist/commonjs/models/components/skydepositparams.d.ts.map +1 -0
  57. package/dist/commonjs/models/components/skydepositparams.js +94 -0
  58. package/dist/commonjs/models/components/skydepositparams.js.map +1 -0
  59. package/dist/commonjs/models/components/skysellparams.d.ts +93 -0
  60. package/dist/commonjs/models/components/skysellparams.d.ts.map +1 -0
  61. package/dist/commonjs/models/components/skysellparams.js +125 -0
  62. package/dist/commonjs/models/components/skysellparams.js.map +1 -0
  63. package/dist/commonjs/models/components/skysellrequest.d.ts +8 -8
  64. package/dist/commonjs/models/components/skysellrequest.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/skysellrequest.js +13 -14
  66. package/dist/commonjs/models/components/skysellrequest.js.map +1 -1
  67. package/dist/commonjs/models/components/skywithdrawparams.d.ts +37 -0
  68. package/dist/commonjs/models/components/skywithdrawparams.d.ts.map +1 -0
  69. package/dist/commonjs/models/components/skywithdrawparams.js +71 -0
  70. package/dist/commonjs/models/components/skywithdrawparams.js.map +1 -0
  71. package/dist/commonjs/models/operations/morphomarkets.d.ts +4 -4
  72. package/dist/commonjs/models/operations/morphomarkets.d.ts.map +1 -1
  73. package/dist/commonjs/models/operations/morphomarkets.js +4 -4
  74. package/dist/commonjs/models/operations/morphomarkets.js.map +1 -1
  75. package/dist/commonjs/models/operations/morphovaults.d.ts +2 -2
  76. package/dist/commonjs/models/operations/morphovaults.d.ts.map +1 -1
  77. package/dist/commonjs/models/operations/morphovaults.js +2 -2
  78. package/dist/commonjs/models/operations/morphovaults.js.map +1 -1
  79. package/dist/esm/lib/config.d.ts +3 -3
  80. package/dist/esm/lib/config.js +3 -3
  81. package/dist/esm/mcp-server/mcp-server.js +1 -1
  82. package/dist/esm/mcp-server/server.js +1 -1
  83. package/dist/esm/models/components/index.d.ts +11 -0
  84. package/dist/esm/models/components/index.d.ts.map +1 -1
  85. package/dist/esm/models/components/index.js +11 -0
  86. package/dist/esm/models/components/index.js.map +1 -1
  87. package/dist/esm/models/components/morphoborrowparams.d.ts +71 -0
  88. package/dist/esm/models/components/morphoborrowparams.d.ts.map +1 -0
  89. package/dist/esm/models/components/morphoborrowparams.js +69 -0
  90. package/dist/esm/models/components/morphoborrowparams.js.map +1 -0
  91. package/dist/esm/models/components/morphodepositparams.d.ts +66 -0
  92. package/dist/esm/models/components/morphodepositparams.d.ts.map +1 -0
  93. package/dist/esm/models/components/morphodepositparams.js +65 -0
  94. package/dist/esm/models/components/morphodepositparams.js.map +1 -0
  95. package/dist/esm/models/components/morphorepayparams.d.ts +47 -0
  96. package/dist/esm/models/components/morphorepayparams.d.ts.map +1 -0
  97. package/dist/esm/models/components/morphorepayparams.js +51 -0
  98. package/dist/esm/models/components/morphorepayparams.js.map +1 -0
  99. package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts +61 -0
  100. package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
  101. package/dist/esm/models/components/morphosetvaultallowanceparams.js +63 -0
  102. package/dist/esm/models/components/morphosetvaultallowanceparams.js.map +1 -0
  103. package/dist/esm/models/components/morphosupplycollateralparams.d.ts +71 -0
  104. package/dist/esm/models/components/morphosupplycollateralparams.d.ts.map +1 -0
  105. package/dist/esm/models/components/morphosupplycollateralparams.js +72 -0
  106. package/dist/esm/models/components/morphosupplycollateralparams.js.map +1 -0
  107. package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts +71 -0
  108. package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
  109. package/dist/esm/models/components/morphowithdrawcollateralparams.js +69 -0
  110. package/dist/esm/models/components/morphowithdrawcollateralparams.js.map +1 -0
  111. package/dist/esm/models/components/morphowithdrawparams.d.ts +42 -0
  112. package/dist/esm/models/components/morphowithdrawparams.d.ts.map +1 -0
  113. package/dist/esm/models/components/morphowithdrawparams.js +44 -0
  114. package/dist/esm/models/components/morphowithdrawparams.js.map +1 -0
  115. package/dist/esm/models/components/multicallaction.d.ts +15 -4
  116. package/dist/esm/models/components/multicallaction.d.ts.map +1 -1
  117. package/dist/esm/models/components/multicallaction.js +55 -0
  118. package/dist/esm/models/components/multicallaction.js.map +1 -1
  119. package/dist/esm/models/components/multicallactiontype.d.ts +33 -0
  120. package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
  121. package/dist/esm/models/components/multicallactiontype.js +11 -0
  122. package/dist/esm/models/components/multicallactiontype.js.map +1 -1
  123. package/dist/esm/models/components/skybuyparams.d.ts +93 -0
  124. package/dist/esm/models/components/skybuyparams.d.ts.map +1 -0
  125. package/dist/esm/models/components/skybuyparams.js +85 -0
  126. package/dist/esm/models/components/skybuyparams.js.map +1 -0
  127. package/dist/esm/models/components/skybuyrequest.d.ts +8 -8
  128. package/dist/esm/models/components/skybuyrequest.d.ts.map +1 -1
  129. package/dist/esm/models/components/skybuyrequest.js +12 -13
  130. package/dist/esm/models/components/skybuyrequest.js.map +1 -1
  131. package/dist/esm/models/components/skydepositparams.d.ts +61 -0
  132. package/dist/esm/models/components/skydepositparams.d.ts.map +1 -0
  133. package/dist/esm/models/components/skydepositparams.js +54 -0
  134. package/dist/esm/models/components/skydepositparams.js.map +1 -0
  135. package/dist/esm/models/components/skysellparams.d.ts +93 -0
  136. package/dist/esm/models/components/skysellparams.d.ts.map +1 -0
  137. package/dist/esm/models/components/skysellparams.js +85 -0
  138. package/dist/esm/models/components/skysellparams.js.map +1 -0
  139. package/dist/esm/models/components/skysellrequest.d.ts +8 -8
  140. package/dist/esm/models/components/skysellrequest.d.ts.map +1 -1
  141. package/dist/esm/models/components/skysellrequest.js +12 -13
  142. package/dist/esm/models/components/skysellrequest.js.map +1 -1
  143. package/dist/esm/models/components/skywithdrawparams.d.ts +37 -0
  144. package/dist/esm/models/components/skywithdrawparams.d.ts.map +1 -0
  145. package/dist/esm/models/components/skywithdrawparams.js +33 -0
  146. package/dist/esm/models/components/skywithdrawparams.js.map +1 -0
  147. package/dist/esm/models/operations/morphomarkets.d.ts +4 -4
  148. package/dist/esm/models/operations/morphomarkets.d.ts.map +1 -1
  149. package/dist/esm/models/operations/morphomarkets.js +4 -4
  150. package/dist/esm/models/operations/morphomarkets.js.map +1 -1
  151. package/dist/esm/models/operations/morphovaults.d.ts +2 -2
  152. package/dist/esm/models/operations/morphovaults.d.ts.map +1 -1
  153. package/dist/esm/models/operations/morphovaults.js +2 -2
  154. package/dist/esm/models/operations/morphovaults.js.map +1 -1
  155. package/docs/sdks/aerodromeslipstream/README.md +6 -6
  156. package/docs/sdks/morpho/README.md +26 -8
  157. package/docs/sdks/transactionbatching/README.md +18 -12
  158. package/jsr.json +1 -1
  159. package/package.json +1 -1
  160. package/src/lib/config.ts +3 -3
  161. package/src/mcp-server/mcp-server.ts +1 -1
  162. package/src/mcp-server/server.ts +1 -1
  163. package/src/models/components/index.ts +11 -0
  164. package/src/models/components/morphoborrowparams.ts +154 -0
  165. package/src/models/components/morphodepositparams.ts +145 -0
  166. package/src/models/components/morphorepayparams.ts +104 -0
  167. package/src/models/components/morphosetvaultallowanceparams.ts +145 -0
  168. package/src/models/components/morphosupplycollateralparams.ts +163 -0
  169. package/src/models/components/morphowithdrawcollateralparams.ts +161 -0
  170. package/src/models/components/morphowithdrawparams.ts +92 -0
  171. package/src/models/components/multicallaction.ts +154 -0
  172. package/src/models/components/multicallactiontype.ts +11 -0
  173. package/src/models/components/skybuyparams.ts +168 -0
  174. package/src/models/components/skybuyrequest.ts +16 -14
  175. package/src/models/components/skydepositparams.ts +129 -0
  176. package/src/models/components/skysellparams.ts +168 -0
  177. package/src/models/components/skysellrequest.ts +16 -14
  178. package/src/models/components/skywithdrawparams.ts +76 -0
  179. package/src/models/operations/morphomarkets.ts +8 -8
  180. package/src/models/operations/morphovaults.ts +4 -4
@@ -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
+ }
@@ -20,11 +20,11 @@ export type MorphoMarketsRequest = {
20
20
  /**
21
21
  * Collateral token to identify the market.
22
22
  */
23
- collateralToken?: string | null | undefined;
23
+ collateralToken: string | null;
24
24
  /**
25
25
  * Loan token to identify the market.
26
26
  */
27
- loanToken?: string | null | undefined;
27
+ loanToken: string | null;
28
28
  };
29
29
 
30
30
  /** @internal */
@@ -55,8 +55,8 @@ export const MorphoMarketsRequest$inboundSchema: z.ZodType<
55
55
  unknown
56
56
  > = z.object({
57
57
  chain: MorphoMarketsChain$inboundSchema.default("ethereum:mainnet"),
58
- collateral_token: z.nullable(z.string()).optional(),
59
- loan_token: z.nullable(z.string()).optional(),
58
+ collateral_token: z.nullable(z.string()),
59
+ loan_token: z.nullable(z.string()),
60
60
  }).transform((v) => {
61
61
  return remap$(v, {
62
62
  "collateral_token": "collateralToken",
@@ -67,8 +67,8 @@ export const MorphoMarketsRequest$inboundSchema: z.ZodType<
67
67
  /** @internal */
68
68
  export type MorphoMarketsRequest$Outbound = {
69
69
  chain: string;
70
- collateral_token?: string | null | undefined;
71
- loan_token?: string | null | undefined;
70
+ collateral_token: string | null;
71
+ loan_token: string | null;
72
72
  };
73
73
 
74
74
  /** @internal */
@@ -78,8 +78,8 @@ export const MorphoMarketsRequest$outboundSchema: z.ZodType<
78
78
  MorphoMarketsRequest
79
79
  > = z.object({
80
80
  chain: MorphoMarketsChain$outboundSchema.default("ethereum:mainnet"),
81
- collateralToken: z.nullable(z.string()).optional(),
82
- loanToken: z.nullable(z.string()).optional(),
81
+ collateralToken: z.nullable(z.string()),
82
+ loanToken: z.nullable(z.string()),
83
83
  }).transform((v) => {
84
84
  return remap$(v, {
85
85
  collateralToken: "collateral_token",
@@ -20,7 +20,7 @@ export type MorphoVaultsRequest = {
20
20
  /**
21
21
  * Token address that will filter vaults by this deposit token.
22
22
  */
23
- depositToken?: string | null | undefined;
23
+ depositToken: string | null;
24
24
  };
25
25
 
26
26
  /** @internal */
@@ -51,7 +51,7 @@ export const MorphoVaultsRequest$inboundSchema: z.ZodType<
51
51
  unknown
52
52
  > = z.object({
53
53
  chain: MorphoVaultsChain$inboundSchema.default("ethereum:mainnet"),
54
- deposit_token: z.nullable(z.string()).optional(),
54
+ deposit_token: z.nullable(z.string()),
55
55
  }).transform((v) => {
56
56
  return remap$(v, {
57
57
  "deposit_token": "depositToken",
@@ -61,7 +61,7 @@ export const MorphoVaultsRequest$inboundSchema: z.ZodType<
61
61
  /** @internal */
62
62
  export type MorphoVaultsRequest$Outbound = {
63
63
  chain: string;
64
- deposit_token?: string | null | undefined;
64
+ deposit_token: string | null;
65
65
  };
66
66
 
67
67
  /** @internal */
@@ -71,7 +71,7 @@ export const MorphoVaultsRequest$outboundSchema: z.ZodType<
71
71
  MorphoVaultsRequest
72
72
  > = z.object({
73
73
  chain: MorphoVaultsChain$outboundSchema.default("ethereum:mainnet"),
74
- depositToken: z.nullable(z.string()).optional(),
74
+ depositToken: z.nullable(z.string()),
75
75
  }).transform((v) => {
76
76
  return remap$(v, {
77
77
  depositToken: "deposit_token",