@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.
- package/bin/mcp-server.js +490 -32
- package/bin/mcp-server.js.map +24 -13
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/index.d.ts +11 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +11 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/morphoborrowparams.d.ts +71 -0
- package/dist/commonjs/models/components/morphoborrowparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphoborrowparams.js +109 -0
- package/dist/commonjs/models/components/morphoborrowparams.js.map +1 -0
- package/dist/commonjs/models/components/morphodepositparams.d.ts +66 -0
- package/dist/commonjs/models/components/morphodepositparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphodepositparams.js +105 -0
- package/dist/commonjs/models/components/morphodepositparams.js.map +1 -0
- package/dist/commonjs/models/components/morphorepayparams.d.ts +47 -0
- package/dist/commonjs/models/components/morphorepayparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphorepayparams.js +89 -0
- package/dist/commonjs/models/components/morphorepayparams.js.map +1 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts +61 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.js +103 -0
- package/dist/commonjs/models/components/morphosetvaultallowanceparams.js.map +1 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts +71 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.js +112 -0
- package/dist/commonjs/models/components/morphosupplycollateralparams.js.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts +71 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.js +109 -0
- package/dist/commonjs/models/components/morphowithdrawcollateralparams.js.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawparams.d.ts +42 -0
- package/dist/commonjs/models/components/morphowithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphowithdrawparams.js +82 -0
- package/dist/commonjs/models/components/morphowithdrawparams.js.map +1 -0
- package/dist/commonjs/models/components/multicallaction.d.ts +15 -4
- package/dist/commonjs/models/components/multicallaction.d.ts.map +1 -1
- package/dist/commonjs/models/components/multicallaction.js +55 -0
- package/dist/commonjs/models/components/multicallaction.js.map +1 -1
- package/dist/commonjs/models/components/multicallactiontype.d.ts +33 -0
- package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
- package/dist/commonjs/models/components/multicallactiontype.js +11 -0
- package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
- package/dist/commonjs/models/components/skybuyparams.d.ts +93 -0
- package/dist/commonjs/models/components/skybuyparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skybuyparams.js +125 -0
- package/dist/commonjs/models/components/skybuyparams.js.map +1 -0
- package/dist/commonjs/models/components/skybuyrequest.d.ts +8 -8
- package/dist/commonjs/models/components/skybuyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/skybuyrequest.js +13 -14
- package/dist/commonjs/models/components/skybuyrequest.js.map +1 -1
- package/dist/commonjs/models/components/skydepositparams.d.ts +61 -0
- package/dist/commonjs/models/components/skydepositparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skydepositparams.js +94 -0
- package/dist/commonjs/models/components/skydepositparams.js.map +1 -0
- package/dist/commonjs/models/components/skysellparams.d.ts +93 -0
- package/dist/commonjs/models/components/skysellparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skysellparams.js +125 -0
- package/dist/commonjs/models/components/skysellparams.js.map +1 -0
- package/dist/commonjs/models/components/skysellrequest.d.ts +8 -8
- package/dist/commonjs/models/components/skysellrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/skysellrequest.js +13 -14
- package/dist/commonjs/models/components/skysellrequest.js.map +1 -1
- package/dist/commonjs/models/components/skywithdrawparams.d.ts +37 -0
- package/dist/commonjs/models/components/skywithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/skywithdrawparams.js +71 -0
- package/dist/commonjs/models/components/skywithdrawparams.js.map +1 -0
- package/dist/commonjs/models/operations/morphomarkets.d.ts +4 -4
- package/dist/commonjs/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphomarkets.js +4 -4
- package/dist/commonjs/models/operations/morphomarkets.js.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.d.ts +2 -2
- package/dist/commonjs/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.js +2 -2
- package/dist/commonjs/models/operations/morphovaults.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/index.d.ts +11 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +11 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/morphoborrowparams.d.ts +71 -0
- package/dist/esm/models/components/morphoborrowparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphoborrowparams.js +69 -0
- package/dist/esm/models/components/morphoborrowparams.js.map +1 -0
- package/dist/esm/models/components/morphodepositparams.d.ts +66 -0
- package/dist/esm/models/components/morphodepositparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphodepositparams.js +65 -0
- package/dist/esm/models/components/morphodepositparams.js.map +1 -0
- package/dist/esm/models/components/morphorepayparams.d.ts +47 -0
- package/dist/esm/models/components/morphorepayparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphorepayparams.js +51 -0
- package/dist/esm/models/components/morphorepayparams.js.map +1 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts +61 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.js +63 -0
- package/dist/esm/models/components/morphosetvaultallowanceparams.js.map +1 -0
- package/dist/esm/models/components/morphosupplycollateralparams.d.ts +71 -0
- package/dist/esm/models/components/morphosupplycollateralparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphosupplycollateralparams.js +72 -0
- package/dist/esm/models/components/morphosupplycollateralparams.js.map +1 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts +71 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.js +69 -0
- package/dist/esm/models/components/morphowithdrawcollateralparams.js.map +1 -0
- package/dist/esm/models/components/morphowithdrawparams.d.ts +42 -0
- package/dist/esm/models/components/morphowithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/morphowithdrawparams.js +44 -0
- package/dist/esm/models/components/morphowithdrawparams.js.map +1 -0
- package/dist/esm/models/components/multicallaction.d.ts +15 -4
- package/dist/esm/models/components/multicallaction.d.ts.map +1 -1
- package/dist/esm/models/components/multicallaction.js +55 -0
- package/dist/esm/models/components/multicallaction.js.map +1 -1
- package/dist/esm/models/components/multicallactiontype.d.ts +33 -0
- package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
- package/dist/esm/models/components/multicallactiontype.js +11 -0
- package/dist/esm/models/components/multicallactiontype.js.map +1 -1
- package/dist/esm/models/components/skybuyparams.d.ts +93 -0
- package/dist/esm/models/components/skybuyparams.d.ts.map +1 -0
- package/dist/esm/models/components/skybuyparams.js +85 -0
- package/dist/esm/models/components/skybuyparams.js.map +1 -0
- package/dist/esm/models/components/skybuyrequest.d.ts +8 -8
- package/dist/esm/models/components/skybuyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/skybuyrequest.js +12 -13
- package/dist/esm/models/components/skybuyrequest.js.map +1 -1
- package/dist/esm/models/components/skydepositparams.d.ts +61 -0
- package/dist/esm/models/components/skydepositparams.d.ts.map +1 -0
- package/dist/esm/models/components/skydepositparams.js +54 -0
- package/dist/esm/models/components/skydepositparams.js.map +1 -0
- package/dist/esm/models/components/skysellparams.d.ts +93 -0
- package/dist/esm/models/components/skysellparams.d.ts.map +1 -0
- package/dist/esm/models/components/skysellparams.js +85 -0
- package/dist/esm/models/components/skysellparams.js.map +1 -0
- package/dist/esm/models/components/skysellrequest.d.ts +8 -8
- package/dist/esm/models/components/skysellrequest.d.ts.map +1 -1
- package/dist/esm/models/components/skysellrequest.js +12 -13
- package/dist/esm/models/components/skysellrequest.js.map +1 -1
- package/dist/esm/models/components/skywithdrawparams.d.ts +37 -0
- package/dist/esm/models/components/skywithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/skywithdrawparams.js +33 -0
- package/dist/esm/models/components/skywithdrawparams.js.map +1 -0
- package/dist/esm/models/operations/morphomarkets.d.ts +4 -4
- package/dist/esm/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/esm/models/operations/morphomarkets.js +4 -4
- package/dist/esm/models/operations/morphomarkets.js.map +1 -1
- package/dist/esm/models/operations/morphovaults.d.ts +2 -2
- package/dist/esm/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/esm/models/operations/morphovaults.js +2 -2
- package/dist/esm/models/operations/morphovaults.js.map +1 -1
- package/docs/sdks/aerodromeslipstream/README.md +6 -6
- package/docs/sdks/morpho/README.md +26 -8
- package/docs/sdks/transactionbatching/README.md +18 -12
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/index.ts +11 -0
- package/src/models/components/morphoborrowparams.ts +154 -0
- package/src/models/components/morphodepositparams.ts +145 -0
- package/src/models/components/morphorepayparams.ts +104 -0
- package/src/models/components/morphosetvaultallowanceparams.ts +145 -0
- package/src/models/components/morphosupplycollateralparams.ts +163 -0
- package/src/models/components/morphowithdrawcollateralparams.ts +161 -0
- package/src/models/components/morphowithdrawparams.ts +92 -0
- package/src/models/components/multicallaction.ts +154 -0
- package/src/models/components/multicallactiontype.ts +11 -0
- package/src/models/components/skybuyparams.ts +168 -0
- package/src/models/components/skybuyrequest.ts +16 -14
- package/src/models/components/skydepositparams.ts +129 -0
- package/src/models/components/skysellparams.ts +168 -0
- package/src/models/components/skysellrequest.ts +16 -14
- package/src/models/components/skywithdrawparams.ts +76 -0
- package/src/models/operations/morphomarkets.ts +8 -8
- 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
|
|
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
|
|
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:
|
|
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
|
|
47
|
-
|
|
46
|
+
export const SkySellRequestTokenOut$inboundSchema: z.ZodNativeEnum<
|
|
47
|
+
typeof SkySellRequestTokenOut
|
|
48
|
+
> = z.nativeEnum(SkySellRequestTokenOut);
|
|
48
49
|
|
|
49
50
|
/** @internal */
|
|
50
|
-
export const
|
|
51
|
-
|
|
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
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
export const inboundSchema =
|
|
60
|
-
/** @deprecated use `
|
|
61
|
-
export const 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:
|
|
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:
|
|
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
|
|
23
|
+
collateralToken: string | null;
|
|
24
24
|
/**
|
|
25
25
|
* Loan token to identify the market.
|
|
26
26
|
*/
|
|
27
|
-
loanToken
|
|
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())
|
|
59
|
-
loan_token: z.nullable(z.string())
|
|
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
|
|
71
|
-
loan_token
|
|
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())
|
|
82
|
-
loanToken: z.nullable(z.string())
|
|
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
|
|
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())
|
|
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
|
|
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())
|
|
74
|
+
depositToken: z.nullable(z.string()),
|
|
75
75
|
}).transform((v) => {
|
|
76
76
|
return remap$(v, {
|
|
77
77
|
depositToken: "deposit_token",
|