@compass-labs/api-sdk 0.0.27 → 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 (159) hide show
  1. package/bin/mcp-server.js +484 -26
  2. package/bin/mcp-server.js.map +22 -11
  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/esm/lib/config.d.ts +3 -3
  72. package/dist/esm/lib/config.js +3 -3
  73. package/dist/esm/mcp-server/mcp-server.js +1 -1
  74. package/dist/esm/mcp-server/server.js +1 -1
  75. package/dist/esm/models/components/index.d.ts +11 -0
  76. package/dist/esm/models/components/index.d.ts.map +1 -1
  77. package/dist/esm/models/components/index.js +11 -0
  78. package/dist/esm/models/components/index.js.map +1 -1
  79. package/dist/esm/models/components/morphoborrowparams.d.ts +71 -0
  80. package/dist/esm/models/components/morphoborrowparams.d.ts.map +1 -0
  81. package/dist/esm/models/components/morphoborrowparams.js +69 -0
  82. package/dist/esm/models/components/morphoborrowparams.js.map +1 -0
  83. package/dist/esm/models/components/morphodepositparams.d.ts +66 -0
  84. package/dist/esm/models/components/morphodepositparams.d.ts.map +1 -0
  85. package/dist/esm/models/components/morphodepositparams.js +65 -0
  86. package/dist/esm/models/components/morphodepositparams.js.map +1 -0
  87. package/dist/esm/models/components/morphorepayparams.d.ts +47 -0
  88. package/dist/esm/models/components/morphorepayparams.d.ts.map +1 -0
  89. package/dist/esm/models/components/morphorepayparams.js +51 -0
  90. package/dist/esm/models/components/morphorepayparams.js.map +1 -0
  91. package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts +61 -0
  92. package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
  93. package/dist/esm/models/components/morphosetvaultallowanceparams.js +63 -0
  94. package/dist/esm/models/components/morphosetvaultallowanceparams.js.map +1 -0
  95. package/dist/esm/models/components/morphosupplycollateralparams.d.ts +71 -0
  96. package/dist/esm/models/components/morphosupplycollateralparams.d.ts.map +1 -0
  97. package/dist/esm/models/components/morphosupplycollateralparams.js +72 -0
  98. package/dist/esm/models/components/morphosupplycollateralparams.js.map +1 -0
  99. package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts +71 -0
  100. package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
  101. package/dist/esm/models/components/morphowithdrawcollateralparams.js +69 -0
  102. package/dist/esm/models/components/morphowithdrawcollateralparams.js.map +1 -0
  103. package/dist/esm/models/components/morphowithdrawparams.d.ts +42 -0
  104. package/dist/esm/models/components/morphowithdrawparams.d.ts.map +1 -0
  105. package/dist/esm/models/components/morphowithdrawparams.js +44 -0
  106. package/dist/esm/models/components/morphowithdrawparams.js.map +1 -0
  107. package/dist/esm/models/components/multicallaction.d.ts +15 -4
  108. package/dist/esm/models/components/multicallaction.d.ts.map +1 -1
  109. package/dist/esm/models/components/multicallaction.js +55 -0
  110. package/dist/esm/models/components/multicallaction.js.map +1 -1
  111. package/dist/esm/models/components/multicallactiontype.d.ts +33 -0
  112. package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
  113. package/dist/esm/models/components/multicallactiontype.js +11 -0
  114. package/dist/esm/models/components/multicallactiontype.js.map +1 -1
  115. package/dist/esm/models/components/skybuyparams.d.ts +93 -0
  116. package/dist/esm/models/components/skybuyparams.d.ts.map +1 -0
  117. package/dist/esm/models/components/skybuyparams.js +85 -0
  118. package/dist/esm/models/components/skybuyparams.js.map +1 -0
  119. package/dist/esm/models/components/skybuyrequest.d.ts +8 -8
  120. package/dist/esm/models/components/skybuyrequest.d.ts.map +1 -1
  121. package/dist/esm/models/components/skybuyrequest.js +12 -13
  122. package/dist/esm/models/components/skybuyrequest.js.map +1 -1
  123. package/dist/esm/models/components/skydepositparams.d.ts +61 -0
  124. package/dist/esm/models/components/skydepositparams.d.ts.map +1 -0
  125. package/dist/esm/models/components/skydepositparams.js +54 -0
  126. package/dist/esm/models/components/skydepositparams.js.map +1 -0
  127. package/dist/esm/models/components/skysellparams.d.ts +93 -0
  128. package/dist/esm/models/components/skysellparams.d.ts.map +1 -0
  129. package/dist/esm/models/components/skysellparams.js +85 -0
  130. package/dist/esm/models/components/skysellparams.js.map +1 -0
  131. package/dist/esm/models/components/skysellrequest.d.ts +8 -8
  132. package/dist/esm/models/components/skysellrequest.d.ts.map +1 -1
  133. package/dist/esm/models/components/skysellrequest.js +12 -13
  134. package/dist/esm/models/components/skysellrequest.js.map +1 -1
  135. package/dist/esm/models/components/skywithdrawparams.d.ts +37 -0
  136. package/dist/esm/models/components/skywithdrawparams.d.ts.map +1 -0
  137. package/dist/esm/models/components/skywithdrawparams.js +33 -0
  138. package/dist/esm/models/components/skywithdrawparams.js.map +1 -0
  139. package/jsr.json +1 -1
  140. package/package.json +1 -1
  141. package/src/lib/config.ts +3 -3
  142. package/src/mcp-server/mcp-server.ts +1 -1
  143. package/src/mcp-server/server.ts +1 -1
  144. package/src/models/components/index.ts +11 -0
  145. package/src/models/components/morphoborrowparams.ts +154 -0
  146. package/src/models/components/morphodepositparams.ts +145 -0
  147. package/src/models/components/morphorepayparams.ts +104 -0
  148. package/src/models/components/morphosetvaultallowanceparams.ts +145 -0
  149. package/src/models/components/morphosupplycollateralparams.ts +163 -0
  150. package/src/models/components/morphowithdrawcollateralparams.ts +161 -0
  151. package/src/models/components/morphowithdrawparams.ts +92 -0
  152. package/src/models/components/multicallaction.ts +154 -0
  153. package/src/models/components/multicallactiontype.ts +11 -0
  154. package/src/models/components/skybuyparams.ts +168 -0
  155. package/src/models/components/skybuyrequest.ts +16 -14
  156. package/src/models/components/skydepositparams.ts +129 -0
  157. package/src/models/components/skysellparams.ts +168 -0
  158. package/src/models/components/skysellrequest.ts +16 -14
  159. package/src/models/components/skywithdrawparams.ts +76 -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 for USDS. Choose from DAI or USDC.
14
+ */
15
+ export const SkyBuyParamsTokenIn = {
16
+ Dai: "DAI",
17
+ Usdc: "USDC",
18
+ } as const;
19
+ /**
20
+ * The token you would like to swap 1:1 for USDS. Choose from DAI or USDC.
21
+ */
22
+ export type SkyBuyParamsTokenIn = ClosedEnum<typeof SkyBuyParamsTokenIn>;
23
+
24
+ /**
25
+ * The amount of USDS you would like to buy 1:1 with 'token_in'.
26
+ */
27
+ export type SkyBuyParamsAmount = number | string;
28
+
29
+ export type SkyBuyParams = {
30
+ /**
31
+ * The token you would like to swap 1:1 for USDS. Choose from DAI or USDC.
32
+ */
33
+ tokenIn: SkyBuyParamsTokenIn;
34
+ /**
35
+ * The amount of USDS you would like to buy 1:1 with 'token_in'.
36
+ */
37
+ amount: number | string;
38
+ };
39
+
40
+ /** @internal */
41
+ export const SkyBuyParamsTokenIn$inboundSchema: z.ZodNativeEnum<
42
+ typeof SkyBuyParamsTokenIn
43
+ > = z.nativeEnum(SkyBuyParamsTokenIn);
44
+
45
+ /** @internal */
46
+ export const SkyBuyParamsTokenIn$outboundSchema: z.ZodNativeEnum<
47
+ typeof SkyBuyParamsTokenIn
48
+ > = SkyBuyParamsTokenIn$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 SkyBuyParamsTokenIn$ {
55
+ /** @deprecated use `SkyBuyParamsTokenIn$inboundSchema` instead. */
56
+ export const inboundSchema = SkyBuyParamsTokenIn$inboundSchema;
57
+ /** @deprecated use `SkyBuyParamsTokenIn$outboundSchema` instead. */
58
+ export const outboundSchema = SkyBuyParamsTokenIn$outboundSchema;
59
+ }
60
+
61
+ /** @internal */
62
+ export const SkyBuyParamsAmount$inboundSchema: z.ZodType<
63
+ SkyBuyParamsAmount,
64
+ z.ZodTypeDef,
65
+ unknown
66
+ > = z.union([z.number(), z.string()]);
67
+
68
+ /** @internal */
69
+ export type SkyBuyParamsAmount$Outbound = number | string;
70
+
71
+ /** @internal */
72
+ export const SkyBuyParamsAmount$outboundSchema: z.ZodType<
73
+ SkyBuyParamsAmount$Outbound,
74
+ z.ZodTypeDef,
75
+ SkyBuyParamsAmount
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 SkyBuyParamsAmount$ {
83
+ /** @deprecated use `SkyBuyParamsAmount$inboundSchema` instead. */
84
+ export const inboundSchema = SkyBuyParamsAmount$inboundSchema;
85
+ /** @deprecated use `SkyBuyParamsAmount$outboundSchema` instead. */
86
+ export const outboundSchema = SkyBuyParamsAmount$outboundSchema;
87
+ /** @deprecated use `SkyBuyParamsAmount$Outbound` instead. */
88
+ export type Outbound = SkyBuyParamsAmount$Outbound;
89
+ }
90
+
91
+ export function skyBuyParamsAmountToJSON(
92
+ skyBuyParamsAmount: SkyBuyParamsAmount,
93
+ ): string {
94
+ return JSON.stringify(
95
+ SkyBuyParamsAmount$outboundSchema.parse(skyBuyParamsAmount),
96
+ );
97
+ }
98
+
99
+ export function skyBuyParamsAmountFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<SkyBuyParamsAmount, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => SkyBuyParamsAmount$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'SkyBuyParamsAmount' from JSON`,
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const SkyBuyParams$inboundSchema: z.ZodType<
111
+ SkyBuyParams,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ token_in: SkyBuyParamsTokenIn$inboundSchema,
116
+ amount: z.union([z.number(), z.string()]),
117
+ }).transform((v) => {
118
+ return remap$(v, {
119
+ "token_in": "tokenIn",
120
+ });
121
+ });
122
+
123
+ /** @internal */
124
+ export type SkyBuyParams$Outbound = {
125
+ token_in: string;
126
+ amount: number | string;
127
+ };
128
+
129
+ /** @internal */
130
+ export const SkyBuyParams$outboundSchema: z.ZodType<
131
+ SkyBuyParams$Outbound,
132
+ z.ZodTypeDef,
133
+ SkyBuyParams
134
+ > = z.object({
135
+ tokenIn: SkyBuyParamsTokenIn$outboundSchema,
136
+ amount: z.union([z.number(), z.string()]),
137
+ }).transform((v) => {
138
+ return remap$(v, {
139
+ tokenIn: "token_in",
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 SkyBuyParams$ {
148
+ /** @deprecated use `SkyBuyParams$inboundSchema` instead. */
149
+ export const inboundSchema = SkyBuyParams$inboundSchema;
150
+ /** @deprecated use `SkyBuyParams$outboundSchema` instead. */
151
+ export const outboundSchema = SkyBuyParams$outboundSchema;
152
+ /** @deprecated use `SkyBuyParams$Outbound` instead. */
153
+ export type Outbound = SkyBuyParams$Outbound;
154
+ }
155
+
156
+ export function skyBuyParamsToJSON(skyBuyParams: SkyBuyParams): string {
157
+ return JSON.stringify(SkyBuyParams$outboundSchema.parse(skyBuyParams));
158
+ }
159
+
160
+ export function skyBuyParamsFromJSON(
161
+ jsonString: string,
162
+ ): SafeParseResult<SkyBuyParams, SDKValidationError> {
163
+ return safeParse(
164
+ jsonString,
165
+ (x) => SkyBuyParams$inboundSchema.parse(JSON.parse(x)),
166
+ `Failed to parse 'SkyBuyParams' 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 for USDS. Choose from DAI or USDC.
14
14
  */
15
- export const TokenIn = {
15
+ export const SkyBuyRequestTokenIn = {
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 for USDS. Choose from DAI or USDC.
21
21
  */
22
- export type TokenIn = ClosedEnum<typeof TokenIn>;
22
+ export type SkyBuyRequestTokenIn = ClosedEnum<typeof SkyBuyRequestTokenIn>;
23
23
 
24
24
  /**
25
25
  * The amount of USDS you would like to buy 1:1 with 'token_in'.
@@ -30,7 +30,7 @@ export type SkyBuyRequest = {
30
30
  /**
31
31
  * The token you would like to swap 1:1 for USDS. Choose from DAI or USDC.
32
32
  */
33
- tokenIn: TokenIn;
33
+ tokenIn: SkyBuyRequestTokenIn;
34
34
  /**
35
35
  * The amount of USDS you would like to buy 1:1 with 'token_in'.
36
36
  */
@@ -43,22 +43,24 @@ export type SkyBuyRequest = {
43
43
  };
44
44
 
45
45
  /** @internal */
46
- export const TokenIn$inboundSchema: z.ZodNativeEnum<typeof TokenIn> = z
47
- .nativeEnum(TokenIn);
46
+ export const SkyBuyRequestTokenIn$inboundSchema: z.ZodNativeEnum<
47
+ typeof SkyBuyRequestTokenIn
48
+ > = z.nativeEnum(SkyBuyRequestTokenIn);
48
49
 
49
50
  /** @internal */
50
- export const TokenIn$outboundSchema: z.ZodNativeEnum<typeof TokenIn> =
51
- TokenIn$inboundSchema;
51
+ export const SkyBuyRequestTokenIn$outboundSchema: z.ZodNativeEnum<
52
+ typeof SkyBuyRequestTokenIn
53
+ > = SkyBuyRequestTokenIn$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 TokenIn$ {
58
- /** @deprecated use `TokenIn$inboundSchema` instead. */
59
- export const inboundSchema = TokenIn$inboundSchema;
60
- /** @deprecated use `TokenIn$outboundSchema` instead. */
61
- export const outboundSchema = TokenIn$outboundSchema;
59
+ export namespace SkyBuyRequestTokenIn$ {
60
+ /** @deprecated use `SkyBuyRequestTokenIn$inboundSchema` instead. */
61
+ export const inboundSchema = SkyBuyRequestTokenIn$inboundSchema;
62
+ /** @deprecated use `SkyBuyRequestTokenIn$outboundSchema` instead. */
63
+ export const outboundSchema = SkyBuyRequestTokenIn$outboundSchema;
62
64
  }
63
65
 
64
66
  /** @internal */
@@ -115,7 +117,7 @@ export const SkyBuyRequest$inboundSchema: z.ZodType<
115
117
  z.ZodTypeDef,
116
118
  unknown
117
119
  > = z.object({
118
- token_in: TokenIn$inboundSchema,
120
+ token_in: SkyBuyRequestTokenIn$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 SkyBuyRequest$outboundSchema: z.ZodType<
139
141
  z.ZodTypeDef,
140
142
  SkyBuyRequest
141
143
  > = z.object({
142
- tokenIn: TokenIn$outboundSchema,
144
+ tokenIn: SkyBuyRequestTokenIn$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,129 @@
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
+ /**
11
+ * The amount of USDS you would like to deposit for sUSDS to earn yield.
12
+ */
13
+ export type SkyDepositParamsAmount = number | string;
14
+
15
+ export type SkyDepositParams = {
16
+ /**
17
+ * The amount of USDS you would like to deposit for sUSDS to earn yield.
18
+ */
19
+ amount: number | string;
20
+ /**
21
+ * The address which will receive the sUSDS. Defaults to the sender.
22
+ */
23
+ receiver?: string | null | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const SkyDepositParamsAmount$inboundSchema: z.ZodType<
28
+ SkyDepositParamsAmount,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.union([z.number(), z.string()]);
32
+
33
+ /** @internal */
34
+ export type SkyDepositParamsAmount$Outbound = number | string;
35
+
36
+ /** @internal */
37
+ export const SkyDepositParamsAmount$outboundSchema: z.ZodType<
38
+ SkyDepositParamsAmount$Outbound,
39
+ z.ZodTypeDef,
40
+ SkyDepositParamsAmount
41
+ > = z.union([z.number(), z.string()]);
42
+
43
+ /**
44
+ * @internal
45
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
46
+ */
47
+ export namespace SkyDepositParamsAmount$ {
48
+ /** @deprecated use `SkyDepositParamsAmount$inboundSchema` instead. */
49
+ export const inboundSchema = SkyDepositParamsAmount$inboundSchema;
50
+ /** @deprecated use `SkyDepositParamsAmount$outboundSchema` instead. */
51
+ export const outboundSchema = SkyDepositParamsAmount$outboundSchema;
52
+ /** @deprecated use `SkyDepositParamsAmount$Outbound` instead. */
53
+ export type Outbound = SkyDepositParamsAmount$Outbound;
54
+ }
55
+
56
+ export function skyDepositParamsAmountToJSON(
57
+ skyDepositParamsAmount: SkyDepositParamsAmount,
58
+ ): string {
59
+ return JSON.stringify(
60
+ SkyDepositParamsAmount$outboundSchema.parse(skyDepositParamsAmount),
61
+ );
62
+ }
63
+
64
+ export function skyDepositParamsAmountFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<SkyDepositParamsAmount, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => SkyDepositParamsAmount$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'SkyDepositParamsAmount' from JSON`,
71
+ );
72
+ }
73
+
74
+ /** @internal */
75
+ export const SkyDepositParams$inboundSchema: z.ZodType<
76
+ SkyDepositParams,
77
+ z.ZodTypeDef,
78
+ unknown
79
+ > = z.object({
80
+ amount: z.union([z.number(), z.string()]),
81
+ receiver: z.nullable(z.string()).optional(),
82
+ });
83
+
84
+ /** @internal */
85
+ export type SkyDepositParams$Outbound = {
86
+ amount: number | string;
87
+ receiver?: string | null | undefined;
88
+ };
89
+
90
+ /** @internal */
91
+ export const SkyDepositParams$outboundSchema: z.ZodType<
92
+ SkyDepositParams$Outbound,
93
+ z.ZodTypeDef,
94
+ SkyDepositParams
95
+ > = z.object({
96
+ amount: z.union([z.number(), z.string()]),
97
+ receiver: z.nullable(z.string()).optional(),
98
+ });
99
+
100
+ /**
101
+ * @internal
102
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
103
+ */
104
+ export namespace SkyDepositParams$ {
105
+ /** @deprecated use `SkyDepositParams$inboundSchema` instead. */
106
+ export const inboundSchema = SkyDepositParams$inboundSchema;
107
+ /** @deprecated use `SkyDepositParams$outboundSchema` instead. */
108
+ export const outboundSchema = SkyDepositParams$outboundSchema;
109
+ /** @deprecated use `SkyDepositParams$Outbound` instead. */
110
+ export type Outbound = SkyDepositParams$Outbound;
111
+ }
112
+
113
+ export function skyDepositParamsToJSON(
114
+ skyDepositParams: SkyDepositParams,
115
+ ): string {
116
+ return JSON.stringify(
117
+ SkyDepositParams$outboundSchema.parse(skyDepositParams),
118
+ );
119
+ }
120
+
121
+ export function skyDepositParamsFromJSON(
122
+ jsonString: string,
123
+ ): SafeParseResult<SkyDepositParams, SDKValidationError> {
124
+ return safeParse(
125
+ jsonString,
126
+ (x) => SkyDepositParams$inboundSchema.parse(JSON.parse(x)),
127
+ `Failed to parse 'SkyDepositParams' from JSON`,
128
+ );
129
+ }
@@ -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
+ }