@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,145 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The amount of tokens to increase the allowance by.
|
|
13
|
+
*/
|
|
14
|
+
export type MorphoSetVaultAllowanceParamsAmount = number | string;
|
|
15
|
+
|
|
16
|
+
export type MorphoSetVaultAllowanceParams = {
|
|
17
|
+
/**
|
|
18
|
+
* The vault address you are increasing the allowance for.
|
|
19
|
+
*/
|
|
20
|
+
vaultAddress: string;
|
|
21
|
+
/**
|
|
22
|
+
* The amount of tokens to increase the allowance by.
|
|
23
|
+
*/
|
|
24
|
+
amount: number | string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const MorphoSetVaultAllowanceParamsAmount$inboundSchema: z.ZodType<
|
|
29
|
+
MorphoSetVaultAllowanceParamsAmount,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.union([z.number(), z.string()]);
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type MorphoSetVaultAllowanceParamsAmount$Outbound = number | string;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const MorphoSetVaultAllowanceParamsAmount$outboundSchema: z.ZodType<
|
|
39
|
+
MorphoSetVaultAllowanceParamsAmount$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
MorphoSetVaultAllowanceParamsAmount
|
|
42
|
+
> = z.union([z.number(), z.string()]);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
|
+
*/
|
|
48
|
+
export namespace MorphoSetVaultAllowanceParamsAmount$ {
|
|
49
|
+
/** @deprecated use `MorphoSetVaultAllowanceParamsAmount$inboundSchema` instead. */
|
|
50
|
+
export const inboundSchema =
|
|
51
|
+
MorphoSetVaultAllowanceParamsAmount$inboundSchema;
|
|
52
|
+
/** @deprecated use `MorphoSetVaultAllowanceParamsAmount$outboundSchema` instead. */
|
|
53
|
+
export const outboundSchema =
|
|
54
|
+
MorphoSetVaultAllowanceParamsAmount$outboundSchema;
|
|
55
|
+
/** @deprecated use `MorphoSetVaultAllowanceParamsAmount$Outbound` instead. */
|
|
56
|
+
export type Outbound = MorphoSetVaultAllowanceParamsAmount$Outbound;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function morphoSetVaultAllowanceParamsAmountToJSON(
|
|
60
|
+
morphoSetVaultAllowanceParamsAmount: MorphoSetVaultAllowanceParamsAmount,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
MorphoSetVaultAllowanceParamsAmount$outboundSchema.parse(
|
|
64
|
+
morphoSetVaultAllowanceParamsAmount,
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function morphoSetVaultAllowanceParamsAmountFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<MorphoSetVaultAllowanceParamsAmount, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) =>
|
|
75
|
+
MorphoSetVaultAllowanceParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'MorphoSetVaultAllowanceParamsAmount' from JSON`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const MorphoSetVaultAllowanceParams$inboundSchema: z.ZodType<
|
|
82
|
+
MorphoSetVaultAllowanceParams,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
unknown
|
|
85
|
+
> = z.object({
|
|
86
|
+
vault_address: z.string(),
|
|
87
|
+
amount: z.union([z.number(), z.string()]),
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
"vault_address": "vaultAddress",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type MorphoSetVaultAllowanceParams$Outbound = {
|
|
96
|
+
vault_address: string;
|
|
97
|
+
amount: number | string;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const MorphoSetVaultAllowanceParams$outboundSchema: z.ZodType<
|
|
102
|
+
MorphoSetVaultAllowanceParams$Outbound,
|
|
103
|
+
z.ZodTypeDef,
|
|
104
|
+
MorphoSetVaultAllowanceParams
|
|
105
|
+
> = z.object({
|
|
106
|
+
vaultAddress: z.string(),
|
|
107
|
+
amount: z.union([z.number(), z.string()]),
|
|
108
|
+
}).transform((v) => {
|
|
109
|
+
return remap$(v, {
|
|
110
|
+
vaultAddress: "vault_address",
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
117
|
+
*/
|
|
118
|
+
export namespace MorphoSetVaultAllowanceParams$ {
|
|
119
|
+
/** @deprecated use `MorphoSetVaultAllowanceParams$inboundSchema` instead. */
|
|
120
|
+
export const inboundSchema = MorphoSetVaultAllowanceParams$inboundSchema;
|
|
121
|
+
/** @deprecated use `MorphoSetVaultAllowanceParams$outboundSchema` instead. */
|
|
122
|
+
export const outboundSchema = MorphoSetVaultAllowanceParams$outboundSchema;
|
|
123
|
+
/** @deprecated use `MorphoSetVaultAllowanceParams$Outbound` instead. */
|
|
124
|
+
export type Outbound = MorphoSetVaultAllowanceParams$Outbound;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function morphoSetVaultAllowanceParamsToJSON(
|
|
128
|
+
morphoSetVaultAllowanceParams: MorphoSetVaultAllowanceParams,
|
|
129
|
+
): string {
|
|
130
|
+
return JSON.stringify(
|
|
131
|
+
MorphoSetVaultAllowanceParams$outboundSchema.parse(
|
|
132
|
+
morphoSetVaultAllowanceParams,
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function morphoSetVaultAllowanceParamsFromJSON(
|
|
138
|
+
jsonString: string,
|
|
139
|
+
): SafeParseResult<MorphoSetVaultAllowanceParams, SDKValidationError> {
|
|
140
|
+
return safeParse(
|
|
141
|
+
jsonString,
|
|
142
|
+
(x) => MorphoSetVaultAllowanceParams$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
+
`Failed to parse 'MorphoSetVaultAllowanceParams' from JSON`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import * as b64$ from "../../lib/base64.js";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Amount of the token to supply to the market as collateral.
|
|
14
|
+
*/
|
|
15
|
+
export type MorphoSupplyCollateralParamsAmount = number | string;
|
|
16
|
+
|
|
17
|
+
export type MorphoSupplyCollateralParams = {
|
|
18
|
+
/**
|
|
19
|
+
* Amount of the token to supply to the market as collateral.
|
|
20
|
+
*/
|
|
21
|
+
amount: number | string;
|
|
22
|
+
/**
|
|
23
|
+
* The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
24
|
+
*/
|
|
25
|
+
uniqueMarketKey: string;
|
|
26
|
+
/**
|
|
27
|
+
* The address on behalf of whom the supplied collateral is made. Defaults to sender.
|
|
28
|
+
*/
|
|
29
|
+
onBehalfOf?: string | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* An optional field for callback byte data that will be triggered upon successful supplying of collateral.
|
|
32
|
+
*/
|
|
33
|
+
callbackData?: Uint8Array | string | null | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const MorphoSupplyCollateralParamsAmount$inboundSchema: z.ZodType<
|
|
38
|
+
MorphoSupplyCollateralParamsAmount,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.union([z.number(), z.string()]);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type MorphoSupplyCollateralParamsAmount$Outbound = number | string;
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const MorphoSupplyCollateralParamsAmount$outboundSchema: z.ZodType<
|
|
48
|
+
MorphoSupplyCollateralParamsAmount$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
MorphoSupplyCollateralParamsAmount
|
|
51
|
+
> = z.union([z.number(), z.string()]);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace MorphoSupplyCollateralParamsAmount$ {
|
|
58
|
+
/** @deprecated use `MorphoSupplyCollateralParamsAmount$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = MorphoSupplyCollateralParamsAmount$inboundSchema;
|
|
60
|
+
/** @deprecated use `MorphoSupplyCollateralParamsAmount$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema =
|
|
62
|
+
MorphoSupplyCollateralParamsAmount$outboundSchema;
|
|
63
|
+
/** @deprecated use `MorphoSupplyCollateralParamsAmount$Outbound` instead. */
|
|
64
|
+
export type Outbound = MorphoSupplyCollateralParamsAmount$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function morphoSupplyCollateralParamsAmountToJSON(
|
|
68
|
+
morphoSupplyCollateralParamsAmount: MorphoSupplyCollateralParamsAmount,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
MorphoSupplyCollateralParamsAmount$outboundSchema.parse(
|
|
72
|
+
morphoSupplyCollateralParamsAmount,
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function morphoSupplyCollateralParamsAmountFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<MorphoSupplyCollateralParamsAmount, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) =>
|
|
83
|
+
MorphoSupplyCollateralParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'MorphoSupplyCollateralParamsAmount' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const MorphoSupplyCollateralParams$inboundSchema: z.ZodType<
|
|
90
|
+
MorphoSupplyCollateralParams,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
amount: z.union([z.number(), z.string()]),
|
|
95
|
+
unique_market_key: z.string(),
|
|
96
|
+
on_behalf_of: z.nullable(z.string()).optional(),
|
|
97
|
+
callback_data: z.nullable(b64$.zodInbound).optional(),
|
|
98
|
+
}).transform((v) => {
|
|
99
|
+
return remap$(v, {
|
|
100
|
+
"unique_market_key": "uniqueMarketKey",
|
|
101
|
+
"on_behalf_of": "onBehalfOf",
|
|
102
|
+
"callback_data": "callbackData",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export type MorphoSupplyCollateralParams$Outbound = {
|
|
108
|
+
amount: number | string;
|
|
109
|
+
unique_market_key: string;
|
|
110
|
+
on_behalf_of?: string | null | undefined;
|
|
111
|
+
callback_data?: Uint8Array | null | undefined;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const MorphoSupplyCollateralParams$outboundSchema: z.ZodType<
|
|
116
|
+
MorphoSupplyCollateralParams$Outbound,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
MorphoSupplyCollateralParams
|
|
119
|
+
> = z.object({
|
|
120
|
+
amount: z.union([z.number(), z.string()]),
|
|
121
|
+
uniqueMarketKey: z.string(),
|
|
122
|
+
onBehalfOf: z.nullable(z.string()).optional(),
|
|
123
|
+
callbackData: z.nullable(b64$.zodOutbound).optional(),
|
|
124
|
+
}).transform((v) => {
|
|
125
|
+
return remap$(v, {
|
|
126
|
+
uniqueMarketKey: "unique_market_key",
|
|
127
|
+
onBehalfOf: "on_behalf_of",
|
|
128
|
+
callbackData: "callback_data",
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
135
|
+
*/
|
|
136
|
+
export namespace MorphoSupplyCollateralParams$ {
|
|
137
|
+
/** @deprecated use `MorphoSupplyCollateralParams$inboundSchema` instead. */
|
|
138
|
+
export const inboundSchema = MorphoSupplyCollateralParams$inboundSchema;
|
|
139
|
+
/** @deprecated use `MorphoSupplyCollateralParams$outboundSchema` instead. */
|
|
140
|
+
export const outboundSchema = MorphoSupplyCollateralParams$outboundSchema;
|
|
141
|
+
/** @deprecated use `MorphoSupplyCollateralParams$Outbound` instead. */
|
|
142
|
+
export type Outbound = MorphoSupplyCollateralParams$Outbound;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function morphoSupplyCollateralParamsToJSON(
|
|
146
|
+
morphoSupplyCollateralParams: MorphoSupplyCollateralParams,
|
|
147
|
+
): string {
|
|
148
|
+
return JSON.stringify(
|
|
149
|
+
MorphoSupplyCollateralParams$outboundSchema.parse(
|
|
150
|
+
morphoSupplyCollateralParams,
|
|
151
|
+
),
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function morphoSupplyCollateralParamsFromJSON(
|
|
156
|
+
jsonString: string,
|
|
157
|
+
): SafeParseResult<MorphoSupplyCollateralParams, SDKValidationError> {
|
|
158
|
+
return safeParse(
|
|
159
|
+
jsonString,
|
|
160
|
+
(x) => MorphoSupplyCollateralParams$inboundSchema.parse(JSON.parse(x)),
|
|
161
|
+
`Failed to parse 'MorphoSupplyCollateralParams' from JSON`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Amount of the token to supply to the market as collateral.
|
|
13
|
+
*/
|
|
14
|
+
export type MorphoWithdrawCollateralParamsAmount = number | string;
|
|
15
|
+
|
|
16
|
+
export type MorphoWithdrawCollateralParams = {
|
|
17
|
+
/**
|
|
18
|
+
* Amount of the token to supply to the market as collateral.
|
|
19
|
+
*/
|
|
20
|
+
amount: number | string;
|
|
21
|
+
/**
|
|
22
|
+
* The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.
|
|
23
|
+
*/
|
|
24
|
+
uniqueMarketKey: string;
|
|
25
|
+
/**
|
|
26
|
+
* The address on behalf of whom the withdraw is made. Defaults to sender.
|
|
27
|
+
*/
|
|
28
|
+
onBehalfOf?: string | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The address where the withdrawn collateral will be received. Defaults to sender.
|
|
31
|
+
*/
|
|
32
|
+
receiver?: string | null | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const MorphoWithdrawCollateralParamsAmount$inboundSchema: z.ZodType<
|
|
37
|
+
MorphoWithdrawCollateralParamsAmount,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.union([z.number(), z.string()]);
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type MorphoWithdrawCollateralParamsAmount$Outbound = number | string;
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const MorphoWithdrawCollateralParamsAmount$outboundSchema: z.ZodType<
|
|
47
|
+
MorphoWithdrawCollateralParamsAmount$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
MorphoWithdrawCollateralParamsAmount
|
|
50
|
+
> = z.union([z.number(), z.string()]);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace MorphoWithdrawCollateralParamsAmount$ {
|
|
57
|
+
/** @deprecated use `MorphoWithdrawCollateralParamsAmount$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema =
|
|
59
|
+
MorphoWithdrawCollateralParamsAmount$inboundSchema;
|
|
60
|
+
/** @deprecated use `MorphoWithdrawCollateralParamsAmount$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema =
|
|
62
|
+
MorphoWithdrawCollateralParamsAmount$outboundSchema;
|
|
63
|
+
/** @deprecated use `MorphoWithdrawCollateralParamsAmount$Outbound` instead. */
|
|
64
|
+
export type Outbound = MorphoWithdrawCollateralParamsAmount$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function morphoWithdrawCollateralParamsAmountToJSON(
|
|
68
|
+
morphoWithdrawCollateralParamsAmount: MorphoWithdrawCollateralParamsAmount,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
MorphoWithdrawCollateralParamsAmount$outboundSchema.parse(
|
|
72
|
+
morphoWithdrawCollateralParamsAmount,
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function morphoWithdrawCollateralParamsAmountFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<MorphoWithdrawCollateralParamsAmount, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) =>
|
|
83
|
+
MorphoWithdrawCollateralParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'MorphoWithdrawCollateralParamsAmount' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const MorphoWithdrawCollateralParams$inboundSchema: z.ZodType<
|
|
90
|
+
MorphoWithdrawCollateralParams,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
amount: z.union([z.number(), z.string()]),
|
|
95
|
+
unique_market_key: z.string(),
|
|
96
|
+
on_behalf_of: z.nullable(z.string()).optional(),
|
|
97
|
+
receiver: z.nullable(z.string()).optional(),
|
|
98
|
+
}).transform((v) => {
|
|
99
|
+
return remap$(v, {
|
|
100
|
+
"unique_market_key": "uniqueMarketKey",
|
|
101
|
+
"on_behalf_of": "onBehalfOf",
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export type MorphoWithdrawCollateralParams$Outbound = {
|
|
107
|
+
amount: number | string;
|
|
108
|
+
unique_market_key: string;
|
|
109
|
+
on_behalf_of?: string | null | undefined;
|
|
110
|
+
receiver?: string | null | undefined;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const MorphoWithdrawCollateralParams$outboundSchema: z.ZodType<
|
|
115
|
+
MorphoWithdrawCollateralParams$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
MorphoWithdrawCollateralParams
|
|
118
|
+
> = z.object({
|
|
119
|
+
amount: z.union([z.number(), z.string()]),
|
|
120
|
+
uniqueMarketKey: z.string(),
|
|
121
|
+
onBehalfOf: z.nullable(z.string()).optional(),
|
|
122
|
+
receiver: z.nullable(z.string()).optional(),
|
|
123
|
+
}).transform((v) => {
|
|
124
|
+
return remap$(v, {
|
|
125
|
+
uniqueMarketKey: "unique_market_key",
|
|
126
|
+
onBehalfOf: "on_behalf_of",
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
133
|
+
*/
|
|
134
|
+
export namespace MorphoWithdrawCollateralParams$ {
|
|
135
|
+
/** @deprecated use `MorphoWithdrawCollateralParams$inboundSchema` instead. */
|
|
136
|
+
export const inboundSchema = MorphoWithdrawCollateralParams$inboundSchema;
|
|
137
|
+
/** @deprecated use `MorphoWithdrawCollateralParams$outboundSchema` instead. */
|
|
138
|
+
export const outboundSchema = MorphoWithdrawCollateralParams$outboundSchema;
|
|
139
|
+
/** @deprecated use `MorphoWithdrawCollateralParams$Outbound` instead. */
|
|
140
|
+
export type Outbound = MorphoWithdrawCollateralParams$Outbound;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function morphoWithdrawCollateralParamsToJSON(
|
|
144
|
+
morphoWithdrawCollateralParams: MorphoWithdrawCollateralParams,
|
|
145
|
+
): string {
|
|
146
|
+
return JSON.stringify(
|
|
147
|
+
MorphoWithdrawCollateralParams$outboundSchema.parse(
|
|
148
|
+
morphoWithdrawCollateralParams,
|
|
149
|
+
),
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function morphoWithdrawCollateralParamsFromJSON(
|
|
154
|
+
jsonString: string,
|
|
155
|
+
): SafeParseResult<MorphoWithdrawCollateralParams, SDKValidationError> {
|
|
156
|
+
return safeParse(
|
|
157
|
+
jsonString,
|
|
158
|
+
(x) => MorphoWithdrawCollateralParams$inboundSchema.parse(JSON.parse(x)),
|
|
159
|
+
`Failed to parse 'MorphoWithdrawCollateralParams' from JSON`,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type MorphoWithdrawParams = {
|
|
12
|
+
/**
|
|
13
|
+
* The vault address you are withdrawing from.
|
|
14
|
+
*/
|
|
15
|
+
vaultAddress: string;
|
|
16
|
+
/**
|
|
17
|
+
* The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn.
|
|
18
|
+
*/
|
|
19
|
+
amount?: any | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The address which will receive the tokens withdrawn. Defaults to the sender.
|
|
22
|
+
*/
|
|
23
|
+
receiver?: string | null | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const MorphoWithdrawParams$inboundSchema: z.ZodType<
|
|
28
|
+
MorphoWithdrawParams,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
vault_address: z.string(),
|
|
33
|
+
amount: z.any().optional(),
|
|
34
|
+
receiver: z.nullable(z.string()).optional(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"vault_address": "vaultAddress",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type MorphoWithdrawParams$Outbound = {
|
|
43
|
+
vault_address: string;
|
|
44
|
+
amount?: any | undefined;
|
|
45
|
+
receiver?: string | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const MorphoWithdrawParams$outboundSchema: z.ZodType<
|
|
50
|
+
MorphoWithdrawParams$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
MorphoWithdrawParams
|
|
53
|
+
> = z.object({
|
|
54
|
+
vaultAddress: z.string(),
|
|
55
|
+
amount: z.any().optional(),
|
|
56
|
+
receiver: z.nullable(z.string()).optional(),
|
|
57
|
+
}).transform((v) => {
|
|
58
|
+
return remap$(v, {
|
|
59
|
+
vaultAddress: "vault_address",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace MorphoWithdrawParams$ {
|
|
68
|
+
/** @deprecated use `MorphoWithdrawParams$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = MorphoWithdrawParams$inboundSchema;
|
|
70
|
+
/** @deprecated use `MorphoWithdrawParams$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = MorphoWithdrawParams$outboundSchema;
|
|
72
|
+
/** @deprecated use `MorphoWithdrawParams$Outbound` instead. */
|
|
73
|
+
export type Outbound = MorphoWithdrawParams$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function morphoWithdrawParamsToJSON(
|
|
77
|
+
morphoWithdrawParams: MorphoWithdrawParams,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
MorphoWithdrawParams$outboundSchema.parse(morphoWithdrawParams),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function morphoWithdrawParamsFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<MorphoWithdrawParams, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => MorphoWithdrawParams$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'MorphoWithdrawParams' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|