@compass-labs/api-sdk 0.5.38 → 0.5.39
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/README.md +0 -2
- package/bin/mcp-server.js +877 -1107
- package/bin/mcp-server.js.map +16 -26
- package/dist/commonjs/funcs/erc4626VaultsVault.d.ts +3 -1
- package/dist/commonjs/funcs/erc4626VaultsVault.d.ts.map +1 -1
- package/dist/commonjs/funcs/erc4626VaultsVault.js +3 -1
- package/dist/commonjs/funcs/erc4626VaultsVault.js.map +1 -1
- package/dist/commonjs/funcs/morphoVault.d.ts +3 -8
- package/dist/commonjs/funcs/morphoVault.d.ts.map +1 -1
- package/dist/commonjs/funcs/morphoVault.js +3 -8
- package/dist/commonjs/funcs/morphoVault.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -3
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/erc4626VaultsVault.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/erc4626VaultsVault.js +3 -1
- package/dist/commonjs/mcp-server/tools/erc4626VaultsVault.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoVault.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoVault.js +2 -7
- package/dist/commonjs/mcp-server/tools/morphoVault.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +0 -7
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -7
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/erc4626vaults.d.ts +3 -1
- package/dist/commonjs/sdk/erc4626vaults.d.ts.map +1 -1
- package/dist/commonjs/sdk/erc4626vaults.js +3 -1
- package/dist/commonjs/sdk/erc4626vaults.js.map +1 -1
- package/dist/commonjs/sdk/morpho.d.ts +3 -16
- package/dist/commonjs/sdk/morpho.d.ts.map +1 -1
- package/dist/commonjs/sdk/morpho.js +2 -18
- package/dist/commonjs/sdk/morpho.js.map +1 -1
- package/dist/esm/funcs/erc4626VaultsVault.d.ts +3 -1
- package/dist/esm/funcs/erc4626VaultsVault.d.ts.map +1 -1
- package/dist/esm/funcs/erc4626VaultsVault.js +3 -1
- package/dist/esm/funcs/erc4626VaultsVault.js.map +1 -1
- package/dist/esm/funcs/morphoVault.d.ts +3 -8
- package/dist/esm/funcs/morphoVault.d.ts.map +1 -1
- package/dist/esm/funcs/morphoVault.js +3 -8
- package/dist/esm/funcs/morphoVault.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.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +1 -3
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/erc4626VaultsVault.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/erc4626VaultsVault.js +3 -1
- package/dist/esm/mcp-server/tools/erc4626VaultsVault.js.map +1 -1
- package/dist/esm/mcp-server/tools/morphoVault.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/morphoVault.js +2 -7
- package/dist/esm/mcp-server/tools/morphoVault.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +0 -7
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -7
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/erc4626vaults.d.ts +3 -1
- package/dist/esm/sdk/erc4626vaults.d.ts.map +1 -1
- package/dist/esm/sdk/erc4626vaults.js +3 -1
- package/dist/esm/sdk/erc4626vaults.js.map +1 -1
- package/dist/esm/sdk/morpho.d.ts +3 -16
- package/dist/esm/sdk/morpho.d.ts.map +1 -1
- package/dist/esm/sdk/morpho.js +2 -18
- package/dist/esm/sdk/morpho.js.map +1 -1
- package/docs/sdks/erc4626vaults/README.md +3 -1
- package/docs/sdks/morpho/README.md +3 -79
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/erc4626VaultsVault.ts +3 -1
- package/src/funcs/morphoVault.ts +6 -11
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -3
- package/src/mcp-server/tools/erc4626VaultsVault.ts +3 -1
- package/src/mcp-server/tools/morphoVault.ts +3 -8
- package/src/models/components/index.ts +0 -7
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/erc4626vaults.ts +3 -1
- package/src/sdk/morpho.ts +3 -27
- package/dist/commonjs/funcs/morphoVaultPosition.d.ts +0 -20
- package/dist/commonjs/funcs/morphoVaultPosition.d.ts.map +0 -1
- package/dist/commonjs/funcs/morphoVaultPosition.js +0 -125
- package/dist/commonjs/funcs/morphoVaultPosition.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/morphoVaultPosition.d.ts +0 -8
- package/dist/commonjs/mcp-server/tools/morphoVaultPosition.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/morphoVaultPosition.js +0 -65
- package/dist/commonjs/mcp-server/tools/morphoVaultPosition.js.map +0 -1
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.d.ts +0 -39
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.d.ts.map +0 -1
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.js +0 -80
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.js.map +0 -1
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.d.ts +0 -55
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.d.ts.map +0 -1
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.js +0 -97
- package/dist/commonjs/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.js.map +0 -1
- package/dist/commonjs/models/components/curator.d.ts +0 -35
- package/dist/commonjs/models/components/curator.d.ts.map +0 -1
- package/dist/commonjs/models/components/curator.js +0 -75
- package/dist/commonjs/models/components/curator.js.map +0 -1
- package/dist/commonjs/models/components/liquidity.d.ts +0 -31
- package/dist/commonjs/models/components/liquidity.d.ts.map +0 -1
- package/dist/commonjs/models/components/liquidity.js +0 -71
- package/dist/commonjs/models/components/liquidity.js.map +0 -1
- package/dist/commonjs/models/components/metadata.d.ts +0 -32
- package/dist/commonjs/models/components/metadata.d.ts.map +0 -1
- package/dist/commonjs/models/components/metadata.js +0 -72
- package/dist/commonjs/models/components/metadata.js.map +0 -1
- package/dist/commonjs/models/components/morphocheckvaultpositionresponse.d.ts +0 -37
- package/dist/commonjs/models/components/morphocheckvaultpositionresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/morphocheckvaultpositionresponse.js +0 -80
- package/dist/commonjs/models/components/morphocheckvaultpositionresponse.js.map +0 -1
- package/dist/commonjs/models/components/morphogetvaultresponse.d.ts +0 -57
- package/dist/commonjs/models/components/morphogetvaultresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/morphogetvaultresponse.js +0 -85
- package/dist/commonjs/models/components/morphogetvaultresponse.js.map +0 -1
- package/dist/commonjs/models/operations/morphovaultposition.d.ts +0 -65
- package/dist/commonjs/models/operations/morphovaultposition.d.ts.map +0 -1
- package/dist/commonjs/models/operations/morphovaultposition.js +0 -103
- package/dist/commonjs/models/operations/morphovaultposition.js.map +0 -1
- package/dist/esm/funcs/morphoVaultPosition.d.ts +0 -20
- package/dist/esm/funcs/morphoVaultPosition.d.ts.map +0 -1
- package/dist/esm/funcs/morphoVaultPosition.js +0 -89
- package/dist/esm/funcs/morphoVaultPosition.js.map +0 -1
- package/dist/esm/mcp-server/tools/morphoVaultPosition.d.ts +0 -8
- package/dist/esm/mcp-server/tools/morphoVaultPosition.d.ts.map +0 -1
- package/dist/esm/mcp-server/tools/morphoVaultPosition.js +0 -29
- package/dist/esm/mcp-server/tools/morphoVaultPosition.js.map +0 -1
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.d.ts +0 -39
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.d.ts.map +0 -1
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.js +0 -42
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.js.map +0 -1
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.d.ts +0 -55
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.d.ts.map +0 -1
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.js +0 -59
- package/dist/esm/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.js.map +0 -1
- package/dist/esm/models/components/curator.d.ts +0 -35
- package/dist/esm/models/components/curator.d.ts.map +0 -1
- package/dist/esm/models/components/curator.js +0 -37
- package/dist/esm/models/components/curator.js.map +0 -1
- package/dist/esm/models/components/liquidity.d.ts +0 -31
- package/dist/esm/models/components/liquidity.d.ts.map +0 -1
- package/dist/esm/models/components/liquidity.js +0 -33
- package/dist/esm/models/components/liquidity.js.map +0 -1
- package/dist/esm/models/components/metadata.d.ts +0 -32
- package/dist/esm/models/components/metadata.d.ts.map +0 -1
- package/dist/esm/models/components/metadata.js +0 -34
- package/dist/esm/models/components/metadata.js.map +0 -1
- package/dist/esm/models/components/morphocheckvaultpositionresponse.d.ts +0 -37
- package/dist/esm/models/components/morphocheckvaultpositionresponse.d.ts.map +0 -1
- package/dist/esm/models/components/morphocheckvaultpositionresponse.js +0 -42
- package/dist/esm/models/components/morphocheckvaultpositionresponse.js.map +0 -1
- package/dist/esm/models/components/morphogetvaultresponse.d.ts +0 -57
- package/dist/esm/models/components/morphogetvaultresponse.d.ts.map +0 -1
- package/dist/esm/models/components/morphogetvaultresponse.js +0 -47
- package/dist/esm/models/components/morphogetvaultresponse.js.map +0 -1
- package/dist/esm/models/operations/morphovaultposition.d.ts +0 -65
- package/dist/esm/models/operations/morphovaultposition.d.ts.map +0 -1
- package/dist/esm/models/operations/morphovaultposition.js +0 -65
- package/dist/esm/models/operations/morphovaultposition.js.map +0 -1
- package/src/funcs/morphoVaultPosition.ts +0 -178
- package/src/mcp-server/tools/morphoVaultPosition.ts +0 -38
- package/src/models/components/compassapibackendmodelsmorphoreadresponsegetvaultasset.ts +0 -99
- package/src/models/components/compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.ts +0 -131
- package/src/models/components/curator.ts +0 -71
- package/src/models/components/liquidity.ts +0 -66
- package/src/models/components/metadata.ts +0 -72
- package/src/models/components/morphocheckvaultpositionresponse.ts +0 -87
- package/src/models/components/morphogetvaultresponse.ts +0 -128
- package/src/models/operations/morphovaultposition.ts +0 -127
|
@@ -1,71 +0,0 @@
|
|
|
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 Curator = {
|
|
11
|
-
name: string;
|
|
12
|
-
verified: boolean;
|
|
13
|
-
url: string | null;
|
|
14
|
-
image: string | null;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** @internal */
|
|
18
|
-
export const Curator$inboundSchema: z.ZodType<Curator, z.ZodTypeDef, unknown> =
|
|
19
|
-
z.object({
|
|
20
|
-
name: z.string(),
|
|
21
|
-
verified: z.boolean(),
|
|
22
|
-
url: z.nullable(z.string()),
|
|
23
|
-
image: z.nullable(z.string()),
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export type Curator$Outbound = {
|
|
28
|
-
name: string;
|
|
29
|
-
verified: boolean;
|
|
30
|
-
url: string | null;
|
|
31
|
-
image: string | null;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const Curator$outboundSchema: z.ZodType<
|
|
36
|
-
Curator$Outbound,
|
|
37
|
-
z.ZodTypeDef,
|
|
38
|
-
Curator
|
|
39
|
-
> = z.object({
|
|
40
|
-
name: z.string(),
|
|
41
|
-
verified: z.boolean(),
|
|
42
|
-
url: z.nullable(z.string()),
|
|
43
|
-
image: z.nullable(z.string()),
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @internal
|
|
48
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
-
*/
|
|
50
|
-
export namespace Curator$ {
|
|
51
|
-
/** @deprecated use `Curator$inboundSchema` instead. */
|
|
52
|
-
export const inboundSchema = Curator$inboundSchema;
|
|
53
|
-
/** @deprecated use `Curator$outboundSchema` instead. */
|
|
54
|
-
export const outboundSchema = Curator$outboundSchema;
|
|
55
|
-
/** @deprecated use `Curator$Outbound` instead. */
|
|
56
|
-
export type Outbound = Curator$Outbound;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function curatorToJSON(curator: Curator): string {
|
|
60
|
-
return JSON.stringify(Curator$outboundSchema.parse(curator));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function curatorFromJSON(
|
|
64
|
-
jsonString: string,
|
|
65
|
-
): SafeParseResult<Curator, SDKValidationError> {
|
|
66
|
-
return safeParse(
|
|
67
|
-
jsonString,
|
|
68
|
-
(x) => Curator$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
-
`Failed to parse 'Curator' from JSON`,
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
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 Liquidity = {
|
|
11
|
-
underlying: string;
|
|
12
|
-
usd: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const Liquidity$inboundSchema: z.ZodType<
|
|
17
|
-
Liquidity,
|
|
18
|
-
z.ZodTypeDef,
|
|
19
|
-
unknown
|
|
20
|
-
> = z.object({
|
|
21
|
-
underlying: z.string(),
|
|
22
|
-
usd: z.string(),
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
/** @internal */
|
|
26
|
-
export type Liquidity$Outbound = {
|
|
27
|
-
underlying: string;
|
|
28
|
-
usd: string;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const Liquidity$outboundSchema: z.ZodType<
|
|
33
|
-
Liquidity$Outbound,
|
|
34
|
-
z.ZodTypeDef,
|
|
35
|
-
Liquidity
|
|
36
|
-
> = z.object({
|
|
37
|
-
underlying: z.string(),
|
|
38
|
-
usd: z.string(),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @internal
|
|
43
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
-
*/
|
|
45
|
-
export namespace Liquidity$ {
|
|
46
|
-
/** @deprecated use `Liquidity$inboundSchema` instead. */
|
|
47
|
-
export const inboundSchema = Liquidity$inboundSchema;
|
|
48
|
-
/** @deprecated use `Liquidity$outboundSchema` instead. */
|
|
49
|
-
export const outboundSchema = Liquidity$outboundSchema;
|
|
50
|
-
/** @deprecated use `Liquidity$Outbound` instead. */
|
|
51
|
-
export type Outbound = Liquidity$Outbound;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function liquidityToJSON(liquidity: Liquidity): string {
|
|
55
|
-
return JSON.stringify(Liquidity$outboundSchema.parse(liquidity));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function liquidityFromJSON(
|
|
59
|
-
jsonString: string,
|
|
60
|
-
): SafeParseResult<Liquidity, SDKValidationError> {
|
|
61
|
-
return safeParse(
|
|
62
|
-
jsonString,
|
|
63
|
-
(x) => Liquidity$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
-
`Failed to parse 'Liquidity' from JSON`,
|
|
65
|
-
);
|
|
66
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
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
|
-
import {
|
|
10
|
-
Curator,
|
|
11
|
-
Curator$inboundSchema,
|
|
12
|
-
Curator$Outbound,
|
|
13
|
-
Curator$outboundSchema,
|
|
14
|
-
} from "./curator.js";
|
|
15
|
-
|
|
16
|
-
export type Metadata = {
|
|
17
|
-
forumLink: string | null;
|
|
18
|
-
curators: Array<Curator>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** @internal */
|
|
22
|
-
export const Metadata$inboundSchema: z.ZodType<
|
|
23
|
-
Metadata,
|
|
24
|
-
z.ZodTypeDef,
|
|
25
|
-
unknown
|
|
26
|
-
> = z.object({
|
|
27
|
-
forumLink: z.nullable(z.string()),
|
|
28
|
-
curators: z.array(Curator$inboundSchema),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type Metadata$Outbound = {
|
|
33
|
-
forumLink: string | null;
|
|
34
|
-
curators: Array<Curator$Outbound>;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const Metadata$outboundSchema: z.ZodType<
|
|
39
|
-
Metadata$Outbound,
|
|
40
|
-
z.ZodTypeDef,
|
|
41
|
-
Metadata
|
|
42
|
-
> = z.object({
|
|
43
|
-
forumLink: z.nullable(z.string()),
|
|
44
|
-
curators: z.array(Curator$outboundSchema),
|
|
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 Metadata$ {
|
|
52
|
-
/** @deprecated use `Metadata$inboundSchema` instead. */
|
|
53
|
-
export const inboundSchema = Metadata$inboundSchema;
|
|
54
|
-
/** @deprecated use `Metadata$outboundSchema` instead. */
|
|
55
|
-
export const outboundSchema = Metadata$outboundSchema;
|
|
56
|
-
/** @deprecated use `Metadata$Outbound` instead. */
|
|
57
|
-
export type Outbound = Metadata$Outbound;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function metadataToJSON(metadata: Metadata): string {
|
|
61
|
-
return JSON.stringify(Metadata$outboundSchema.parse(metadata));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function metadataFromJSON(
|
|
65
|
-
jsonString: string,
|
|
66
|
-
): SafeParseResult<Metadata, SDKValidationError> {
|
|
67
|
-
return safeParse(
|
|
68
|
-
jsonString,
|
|
69
|
-
(x) => Metadata$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
-
`Failed to parse 'Metadata' from JSON`,
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
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 MorphoCheckVaultPositionResponse = {
|
|
12
|
-
/**
|
|
13
|
-
* The number of vault shares the user holds.
|
|
14
|
-
*/
|
|
15
|
-
shares: number;
|
|
16
|
-
/**
|
|
17
|
-
* The amount of tokens the user has deposited.
|
|
18
|
-
*/
|
|
19
|
-
tokenAmount: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/** @internal */
|
|
23
|
-
export const MorphoCheckVaultPositionResponse$inboundSchema: z.ZodType<
|
|
24
|
-
MorphoCheckVaultPositionResponse,
|
|
25
|
-
z.ZodTypeDef,
|
|
26
|
-
unknown
|
|
27
|
-
> = z.object({
|
|
28
|
-
shares: z.number().int(),
|
|
29
|
-
token_amount: z.string(),
|
|
30
|
-
}).transform((v) => {
|
|
31
|
-
return remap$(v, {
|
|
32
|
-
"token_amount": "tokenAmount",
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
/** @internal */
|
|
37
|
-
export type MorphoCheckVaultPositionResponse$Outbound = {
|
|
38
|
-
shares: number;
|
|
39
|
-
token_amount: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/** @internal */
|
|
43
|
-
export const MorphoCheckVaultPositionResponse$outboundSchema: z.ZodType<
|
|
44
|
-
MorphoCheckVaultPositionResponse$Outbound,
|
|
45
|
-
z.ZodTypeDef,
|
|
46
|
-
MorphoCheckVaultPositionResponse
|
|
47
|
-
> = z.object({
|
|
48
|
-
shares: z.number().int(),
|
|
49
|
-
tokenAmount: z.string(),
|
|
50
|
-
}).transform((v) => {
|
|
51
|
-
return remap$(v, {
|
|
52
|
-
tokenAmount: "token_amount",
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @internal
|
|
58
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
-
*/
|
|
60
|
-
export namespace MorphoCheckVaultPositionResponse$ {
|
|
61
|
-
/** @deprecated use `MorphoCheckVaultPositionResponse$inboundSchema` instead. */
|
|
62
|
-
export const inboundSchema = MorphoCheckVaultPositionResponse$inboundSchema;
|
|
63
|
-
/** @deprecated use `MorphoCheckVaultPositionResponse$outboundSchema` instead. */
|
|
64
|
-
export const outboundSchema = MorphoCheckVaultPositionResponse$outboundSchema;
|
|
65
|
-
/** @deprecated use `MorphoCheckVaultPositionResponse$Outbound` instead. */
|
|
66
|
-
export type Outbound = MorphoCheckVaultPositionResponse$Outbound;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function morphoCheckVaultPositionResponseToJSON(
|
|
70
|
-
morphoCheckVaultPositionResponse: MorphoCheckVaultPositionResponse,
|
|
71
|
-
): string {
|
|
72
|
-
return JSON.stringify(
|
|
73
|
-
MorphoCheckVaultPositionResponse$outboundSchema.parse(
|
|
74
|
-
morphoCheckVaultPositionResponse,
|
|
75
|
-
),
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function morphoCheckVaultPositionResponseFromJSON(
|
|
80
|
-
jsonString: string,
|
|
81
|
-
): SafeParseResult<MorphoCheckVaultPositionResponse, SDKValidationError> {
|
|
82
|
-
return safeParse(
|
|
83
|
-
jsonString,
|
|
84
|
-
(x) => MorphoCheckVaultPositionResponse$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
-
`Failed to parse 'MorphoCheckVaultPositionResponse' from JSON`,
|
|
86
|
-
);
|
|
87
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
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
|
-
import {
|
|
10
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultAsset,
|
|
11
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultAsset$inboundSchema,
|
|
12
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultAsset$Outbound,
|
|
13
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultAsset$outboundSchema,
|
|
14
|
-
} from "./compassapibackendmodelsmorphoreadresponsegetvaultasset.js";
|
|
15
|
-
import {
|
|
16
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultVaultState,
|
|
17
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$inboundSchema,
|
|
18
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$Outbound,
|
|
19
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$outboundSchema,
|
|
20
|
-
} from "./compassapibackendmodelsmorphoreadresponsegetvaultvaultstate.js";
|
|
21
|
-
import {
|
|
22
|
-
Liquidity,
|
|
23
|
-
Liquidity$inboundSchema,
|
|
24
|
-
Liquidity$Outbound,
|
|
25
|
-
Liquidity$outboundSchema,
|
|
26
|
-
} from "./liquidity.js";
|
|
27
|
-
import {
|
|
28
|
-
Metadata,
|
|
29
|
-
Metadata$inboundSchema,
|
|
30
|
-
Metadata$Outbound,
|
|
31
|
-
Metadata$outboundSchema,
|
|
32
|
-
} from "./metadata.js";
|
|
33
|
-
|
|
34
|
-
export type MorphoGetVaultResponse = {
|
|
35
|
-
/**
|
|
36
|
-
* The name of the Morpho vault.
|
|
37
|
-
*/
|
|
38
|
-
name: string;
|
|
39
|
-
/**
|
|
40
|
-
* The symbol of the Morpho vault.
|
|
41
|
-
*/
|
|
42
|
-
symbol: string;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the vault is whitelisted or not.
|
|
45
|
-
*/
|
|
46
|
-
whitelisted: boolean;
|
|
47
|
-
state: CompassApiBackendModelsMorphoReadResponseGetVaultVaultState;
|
|
48
|
-
liquidity: Liquidity;
|
|
49
|
-
asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset;
|
|
50
|
-
/**
|
|
51
|
-
* Metadata of the vault.
|
|
52
|
-
*/
|
|
53
|
-
metadata?: Metadata | null | undefined;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
/** @internal */
|
|
57
|
-
export const MorphoGetVaultResponse$inboundSchema: z.ZodType<
|
|
58
|
-
MorphoGetVaultResponse,
|
|
59
|
-
z.ZodTypeDef,
|
|
60
|
-
unknown
|
|
61
|
-
> = z.object({
|
|
62
|
-
name: z.string(),
|
|
63
|
-
symbol: z.string(),
|
|
64
|
-
whitelisted: z.boolean(),
|
|
65
|
-
state:
|
|
66
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$inboundSchema,
|
|
67
|
-
liquidity: Liquidity$inboundSchema,
|
|
68
|
-
asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset$inboundSchema,
|
|
69
|
-
metadata: z.nullable(Metadata$inboundSchema).optional(),
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
/** @internal */
|
|
73
|
-
export type MorphoGetVaultResponse$Outbound = {
|
|
74
|
-
name: string;
|
|
75
|
-
symbol: string;
|
|
76
|
-
whitelisted: boolean;
|
|
77
|
-
state: CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$Outbound;
|
|
78
|
-
liquidity: Liquidity$Outbound;
|
|
79
|
-
asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset$Outbound;
|
|
80
|
-
metadata?: Metadata$Outbound | null | undefined;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/** @internal */
|
|
84
|
-
export const MorphoGetVaultResponse$outboundSchema: z.ZodType<
|
|
85
|
-
MorphoGetVaultResponse$Outbound,
|
|
86
|
-
z.ZodTypeDef,
|
|
87
|
-
MorphoGetVaultResponse
|
|
88
|
-
> = z.object({
|
|
89
|
-
name: z.string(),
|
|
90
|
-
symbol: z.string(),
|
|
91
|
-
whitelisted: z.boolean(),
|
|
92
|
-
state:
|
|
93
|
-
CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$outboundSchema,
|
|
94
|
-
liquidity: Liquidity$outboundSchema,
|
|
95
|
-
asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset$outboundSchema,
|
|
96
|
-
metadata: z.nullable(Metadata$outboundSchema).optional(),
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @internal
|
|
101
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
102
|
-
*/
|
|
103
|
-
export namespace MorphoGetVaultResponse$ {
|
|
104
|
-
/** @deprecated use `MorphoGetVaultResponse$inboundSchema` instead. */
|
|
105
|
-
export const inboundSchema = MorphoGetVaultResponse$inboundSchema;
|
|
106
|
-
/** @deprecated use `MorphoGetVaultResponse$outboundSchema` instead. */
|
|
107
|
-
export const outboundSchema = MorphoGetVaultResponse$outboundSchema;
|
|
108
|
-
/** @deprecated use `MorphoGetVaultResponse$Outbound` instead. */
|
|
109
|
-
export type Outbound = MorphoGetVaultResponse$Outbound;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export function morphoGetVaultResponseToJSON(
|
|
113
|
-
morphoGetVaultResponse: MorphoGetVaultResponse,
|
|
114
|
-
): string {
|
|
115
|
-
return JSON.stringify(
|
|
116
|
-
MorphoGetVaultResponse$outboundSchema.parse(morphoGetVaultResponse),
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export function morphoGetVaultResponseFromJSON(
|
|
121
|
-
jsonString: string,
|
|
122
|
-
): SafeParseResult<MorphoGetVaultResponse, SDKValidationError> {
|
|
123
|
-
return safeParse(
|
|
124
|
-
jsonString,
|
|
125
|
-
(x) => MorphoGetVaultResponse$inboundSchema.parse(JSON.parse(x)),
|
|
126
|
-
`Failed to parse 'MorphoGetVaultResponse' from JSON`,
|
|
127
|
-
);
|
|
128
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
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
|
-
export const MorphoVaultPositionChain = {
|
|
13
|
-
EthereumMainnet: "ethereum:mainnet",
|
|
14
|
-
BaseMainnet: "base:mainnet",
|
|
15
|
-
} as const;
|
|
16
|
-
export type MorphoVaultPositionChain = ClosedEnum<
|
|
17
|
-
typeof MorphoVaultPositionChain
|
|
18
|
-
>;
|
|
19
|
-
|
|
20
|
-
export type MorphoVaultPositionRequest = {
|
|
21
|
-
chain?: MorphoVaultPositionChain | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* The user address of the desired vault position.
|
|
24
|
-
*/
|
|
25
|
-
userAddress?: string | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* The vault address of the desired vault position.
|
|
28
|
-
*/
|
|
29
|
-
vaultAddress?: string | undefined;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/** @internal */
|
|
33
|
-
export const MorphoVaultPositionChain$inboundSchema: z.ZodNativeEnum<
|
|
34
|
-
typeof MorphoVaultPositionChain
|
|
35
|
-
> = z.nativeEnum(MorphoVaultPositionChain);
|
|
36
|
-
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const MorphoVaultPositionChain$outboundSchema: z.ZodNativeEnum<
|
|
39
|
-
typeof MorphoVaultPositionChain
|
|
40
|
-
> = MorphoVaultPositionChain$inboundSchema;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
45
|
-
*/
|
|
46
|
-
export namespace MorphoVaultPositionChain$ {
|
|
47
|
-
/** @deprecated use `MorphoVaultPositionChain$inboundSchema` instead. */
|
|
48
|
-
export const inboundSchema = MorphoVaultPositionChain$inboundSchema;
|
|
49
|
-
/** @deprecated use `MorphoVaultPositionChain$outboundSchema` instead. */
|
|
50
|
-
export const outboundSchema = MorphoVaultPositionChain$outboundSchema;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export const MorphoVaultPositionRequest$inboundSchema: z.ZodType<
|
|
55
|
-
MorphoVaultPositionRequest,
|
|
56
|
-
z.ZodTypeDef,
|
|
57
|
-
unknown
|
|
58
|
-
> = z.object({
|
|
59
|
-
chain: MorphoVaultPositionChain$inboundSchema.default("base:mainnet"),
|
|
60
|
-
user_address: z.string().default(
|
|
61
|
-
"0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418",
|
|
62
|
-
),
|
|
63
|
-
vault_address: z.string().default(
|
|
64
|
-
"0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
65
|
-
),
|
|
66
|
-
}).transform((v) => {
|
|
67
|
-
return remap$(v, {
|
|
68
|
-
"user_address": "userAddress",
|
|
69
|
-
"vault_address": "vaultAddress",
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
/** @internal */
|
|
74
|
-
export type MorphoVaultPositionRequest$Outbound = {
|
|
75
|
-
chain: string;
|
|
76
|
-
user_address: string;
|
|
77
|
-
vault_address: string;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/** @internal */
|
|
81
|
-
export const MorphoVaultPositionRequest$outboundSchema: z.ZodType<
|
|
82
|
-
MorphoVaultPositionRequest$Outbound,
|
|
83
|
-
z.ZodTypeDef,
|
|
84
|
-
MorphoVaultPositionRequest
|
|
85
|
-
> = z.object({
|
|
86
|
-
chain: MorphoVaultPositionChain$outboundSchema.default("base:mainnet"),
|
|
87
|
-
userAddress: z.string().default("0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418"),
|
|
88
|
-
vaultAddress: z.string().default(
|
|
89
|
-
"0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
90
|
-
),
|
|
91
|
-
}).transform((v) => {
|
|
92
|
-
return remap$(v, {
|
|
93
|
-
userAddress: "user_address",
|
|
94
|
-
vaultAddress: "vault_address",
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
-
*/
|
|
102
|
-
export namespace MorphoVaultPositionRequest$ {
|
|
103
|
-
/** @deprecated use `MorphoVaultPositionRequest$inboundSchema` instead. */
|
|
104
|
-
export const inboundSchema = MorphoVaultPositionRequest$inboundSchema;
|
|
105
|
-
/** @deprecated use `MorphoVaultPositionRequest$outboundSchema` instead. */
|
|
106
|
-
export const outboundSchema = MorphoVaultPositionRequest$outboundSchema;
|
|
107
|
-
/** @deprecated use `MorphoVaultPositionRequest$Outbound` instead. */
|
|
108
|
-
export type Outbound = MorphoVaultPositionRequest$Outbound;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export function morphoVaultPositionRequestToJSON(
|
|
112
|
-
morphoVaultPositionRequest: MorphoVaultPositionRequest,
|
|
113
|
-
): string {
|
|
114
|
-
return JSON.stringify(
|
|
115
|
-
MorphoVaultPositionRequest$outboundSchema.parse(morphoVaultPositionRequest),
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export function morphoVaultPositionRequestFromJSON(
|
|
120
|
-
jsonString: string,
|
|
121
|
-
): SafeParseResult<MorphoVaultPositionRequest, SDKValidationError> {
|
|
122
|
-
return safeParse(
|
|
123
|
-
jsonString,
|
|
124
|
-
(x) => MorphoVaultPositionRequest$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
-
`Failed to parse 'MorphoVaultPositionRequest' from JSON`,
|
|
126
|
-
);
|
|
127
|
-
}
|