@compass-labs/api-sdk 1.5.2 → 2.0.1
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 +49 -61
- package/bin/mcp-server.js.map +11 -11
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/aavevenue.d.ts +25 -0
- package/dist/commonjs/models/components/aavevenue.d.ts.map +1 -0
- package/dist/commonjs/models/components/{aavemarket.js → aavevenue.js} +10 -10
- package/dist/commonjs/models/components/aavevenue.js.map +1 -0
- package/dist/commonjs/models/components/earnmanagerequest.d.ts +19 -19
- package/dist/commonjs/models/components/earnmanagerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnmanagerequest.js +27 -22
- package/dist/commonjs/models/components/earnmanagerequest.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +2 -2
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -2
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/vaultinfo.d.ts +0 -20
- package/dist/commonjs/models/components/vaultinfo.d.ts.map +1 -1
- package/dist/commonjs/models/components/vaultinfo.js +0 -17
- package/dist/commonjs/models/components/vaultinfo.js.map +1 -1
- package/dist/commonjs/models/components/vaultvenue.d.ts +25 -0
- package/dist/commonjs/models/components/vaultvenue.d.ts.map +1 -0
- package/dist/commonjs/models/components/{vaultmarket.js → vaultvenue.js} +10 -10
- package/dist/commonjs/models/components/vaultvenue.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/aavevenue.d.ts +25 -0
- package/dist/esm/models/components/aavevenue.d.ts.map +1 -0
- package/dist/esm/models/components/aavevenue.js +22 -0
- package/dist/esm/models/components/aavevenue.js.map +1 -0
- package/dist/esm/models/components/earnmanagerequest.d.ts +19 -19
- package/dist/esm/models/components/earnmanagerequest.d.ts.map +1 -1
- package/dist/esm/models/components/earnmanagerequest.js +24 -19
- package/dist/esm/models/components/earnmanagerequest.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +2 -2
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -2
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/vaultinfo.d.ts +0 -20
- package/dist/esm/models/components/vaultinfo.d.ts.map +1 -1
- package/dist/esm/models/components/vaultinfo.js +0 -17
- package/dist/esm/models/components/vaultinfo.js.map +1 -1
- package/dist/esm/models/components/vaultvenue.d.ts +25 -0
- package/dist/esm/models/components/vaultvenue.d.ts.map +1 -0
- package/dist/esm/models/components/{vaultmarket.js → vaultvenue.js} +7 -7
- package/dist/esm/models/components/vaultvenue.js.map +1 -0
- package/examples/node_modules/.package-lock.json +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/{aavemarket.ts → aavevenue.ts} +14 -14
- package/src/models/components/earnmanagerequest.ts +55 -54
- package/src/models/components/index.ts +2 -2
- package/src/models/components/vaultinfo.ts +0 -43
- package/src/models/components/{vaultmarket.ts → vaultvenue.ts} +14 -14
- package/dist/commonjs/models/components/aavemarket.d.ts +0 -25
- package/dist/commonjs/models/components/aavemarket.d.ts.map +0 -1
- package/dist/commonjs/models/components/aavemarket.js.map +0 -1
- package/dist/commonjs/models/components/vaultmarket.d.ts +0 -25
- package/dist/commonjs/models/components/vaultmarket.d.ts.map +0 -1
- package/dist/commonjs/models/components/vaultmarket.js.map +0 -1
- package/dist/esm/models/components/aavemarket.d.ts +0 -25
- package/dist/esm/models/components/aavemarket.d.ts.map +0 -1
- package/dist/esm/models/components/aavemarket.js +0 -22
- package/dist/esm/models/components/aavemarket.js.map +0 -1
- package/dist/esm/models/components/vaultmarket.d.ts +0 -25
- package/dist/esm/models/components/vaultmarket.d.ts.map +0 -1
- package/dist/esm/models/components/vaultmarket.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
export type VaultVenue = {
|
|
5
|
+
/**
|
|
6
|
+
* The venue type discriminator.
|
|
7
|
+
*/
|
|
8
|
+
type?: "VAULT" | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* The vault address you are interacting with for this action.
|
|
11
|
+
*/
|
|
12
|
+
vaultAddress: string;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const VaultVenue$inboundSchema: z.ZodType<VaultVenue, z.ZodTypeDef, unknown>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type VaultVenue$Outbound = {
|
|
18
|
+
type: "VAULT";
|
|
19
|
+
vault_address: string;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const VaultVenue$outboundSchema: z.ZodType<VaultVenue$Outbound, z.ZodTypeDef, VaultVenue>;
|
|
23
|
+
export declare function vaultVenueToJSON(vaultVenue: VaultVenue): string;
|
|
24
|
+
export declare function vaultVenueFromJSON(jsonString: string): SafeParseResult<VaultVenue, SDKValidationError>;
|
|
25
|
+
//# sourceMappingURL=vaultvenue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaultvenue.d.ts","sourceRoot":"","sources":["../../../../src/models/components/vaultvenue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAC9C,UAAU,EACV,CAAC,CAAC,UAAU,EACZ,OAAO,CAQP,CAAC;AACH,gBAAgB;AAChB,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAC/C,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,UAAU,CAQV,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAE/D;AACD,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAMjD"}
|
|
@@ -5,7 +5,7 @@ import * as z from "zod/v3";
|
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
/** @internal */
|
|
8
|
-
export const
|
|
8
|
+
export const VaultVenue$inboundSchema = z.object({
|
|
9
9
|
type: z.literal("VAULT").default("VAULT").optional(),
|
|
10
10
|
vault_address: z.string(),
|
|
11
11
|
}).transform((v) => {
|
|
@@ -14,7 +14,7 @@ export const VaultMarket$inboundSchema = z.object({
|
|
|
14
14
|
});
|
|
15
15
|
});
|
|
16
16
|
/** @internal */
|
|
17
|
-
export const
|
|
17
|
+
export const VaultVenue$outboundSchema = z.object({
|
|
18
18
|
type: z.literal("VAULT"),
|
|
19
19
|
vaultAddress: z.string(),
|
|
20
20
|
}).transform((v) => {
|
|
@@ -22,10 +22,10 @@ export const VaultMarket$outboundSchema = z.object({
|
|
|
22
22
|
vaultAddress: "vault_address",
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
export function
|
|
26
|
-
return JSON.stringify(
|
|
25
|
+
export function vaultVenueToJSON(vaultVenue) {
|
|
26
|
+
return JSON.stringify(VaultVenue$outboundSchema.parse(vaultVenue));
|
|
27
27
|
}
|
|
28
|
-
export function
|
|
29
|
-
return safeParse(jsonString, (x) =>
|
|
28
|
+
export function vaultVenueFromJSON(jsonString) {
|
|
29
|
+
return safeParse(jsonString, (x) => VaultVenue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultVenue' from JSON`);
|
|
30
30
|
}
|
|
31
|
-
//# sourceMappingURL=
|
|
31
|
+
//# sourceMappingURL=vaultvenue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaultvenue.js","sourceRoot":"","sources":["../../../../src/models/components/vaultvenue.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAejD,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAIjC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;IACpD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,eAAe,EAAE,cAAc;KAChC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAOH,gBAAgB;AAChB,MAAM,CAAC,MAAM,yBAAyB,GAIlC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,YAAY,EAAE,eAAe;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,gBAAgB,CAAC,UAAsB;IACrD,OAAO,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACrE,CAAC;AACD,MAAM,UAAU,kBAAkB,CAChC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpD,wCAAwC,CACzC,CAAC;AACJ,CAAC"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "
|
|
64
|
+
sdkVersion: "2.0.1",
|
|
65
65
|
genVersion: "2.755.6",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript
|
|
67
|
+
"speakeasy-sdk/typescript 2.0.1 2.755.6 0.0.1 @compass-labs/api-sdk",
|
|
68
68
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type AaveVenue = {
|
|
11
11
|
/**
|
|
12
|
-
* The
|
|
12
|
+
* The venue type discriminator.
|
|
13
13
|
*/
|
|
14
14
|
type?: "AAVE" | undefined;
|
|
15
15
|
/**
|
|
@@ -19,8 +19,8 @@ export type AaveMarket = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
|
-
export const
|
|
23
|
-
|
|
22
|
+
export const AaveVenue$inboundSchema: z.ZodType<
|
|
23
|
+
AaveVenue,
|
|
24
24
|
z.ZodTypeDef,
|
|
25
25
|
unknown
|
|
26
26
|
> = z.object({
|
|
@@ -28,30 +28,30 @@ export const AaveMarket$inboundSchema: z.ZodType<
|
|
|
28
28
|
token: z.string(),
|
|
29
29
|
});
|
|
30
30
|
/** @internal */
|
|
31
|
-
export type
|
|
31
|
+
export type AaveVenue$Outbound = {
|
|
32
32
|
type: "AAVE";
|
|
33
33
|
token: string;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
37
|
-
export const
|
|
38
|
-
|
|
37
|
+
export const AaveVenue$outboundSchema: z.ZodType<
|
|
38
|
+
AaveVenue$Outbound,
|
|
39
39
|
z.ZodTypeDef,
|
|
40
|
-
|
|
40
|
+
AaveVenue
|
|
41
41
|
> = z.object({
|
|
42
42
|
type: z.literal("AAVE"),
|
|
43
43
|
token: z.string(),
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
export function
|
|
47
|
-
return JSON.stringify(
|
|
46
|
+
export function aaveVenueToJSON(aaveVenue: AaveVenue): string {
|
|
47
|
+
return JSON.stringify(AaveVenue$outboundSchema.parse(aaveVenue));
|
|
48
48
|
}
|
|
49
|
-
export function
|
|
49
|
+
export function aaveVenueFromJSON(
|
|
50
50
|
jsonString: string,
|
|
51
|
-
): SafeParseResult<
|
|
51
|
+
): SafeParseResult<AaveVenue, SDKValidationError> {
|
|
52
52
|
return safeParse(
|
|
53
53
|
jsonString,
|
|
54
|
-
(x) =>
|
|
55
|
-
`Failed to parse '
|
|
54
|
+
(x) => AaveVenue$inboundSchema.parse(JSON.parse(x)),
|
|
55
|
+
`Failed to parse 'AaveVenue' from JSON`,
|
|
56
56
|
);
|
|
57
57
|
}
|
|
@@ -9,11 +9,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./
|
|
12
|
+
AaveVenue,
|
|
13
|
+
AaveVenue$inboundSchema,
|
|
14
|
+
AaveVenue$Outbound,
|
|
15
|
+
AaveVenue$outboundSchema,
|
|
16
|
+
} from "./aavevenue.js";
|
|
17
17
|
import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
18
18
|
import {
|
|
19
19
|
Fee,
|
|
@@ -22,28 +22,28 @@ import {
|
|
|
22
22
|
Fee$outboundSchema,
|
|
23
23
|
} from "./fee.js";
|
|
24
24
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from "./
|
|
25
|
+
VaultVenue,
|
|
26
|
+
VaultVenue$inboundSchema,
|
|
27
|
+
VaultVenue$Outbound,
|
|
28
|
+
VaultVenue$outboundSchema,
|
|
29
|
+
} from "./vaultvenue.js";
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* The earn
|
|
32
|
+
* The earn venue.
|
|
33
33
|
*/
|
|
34
|
-
export type
|
|
35
|
-
| (
|
|
36
|
-
| (
|
|
34
|
+
export type Venue =
|
|
35
|
+
| (AaveVenue & { type: "AAVE" })
|
|
36
|
+
| (VaultVenue & { type: "VAULT" });
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Whether you are depositing into or withdrawing from the given Earn `
|
|
39
|
+
* Whether you are depositing into or withdrawing from the given Earn `venue`.
|
|
40
40
|
*/
|
|
41
41
|
export const EarnManageRequestAction = {
|
|
42
42
|
Deposit: "DEPOSIT",
|
|
43
43
|
Withdraw: "WITHDRAW",
|
|
44
44
|
} as const;
|
|
45
45
|
/**
|
|
46
|
-
* Whether you are depositing into or withdrawing from the given Earn `
|
|
46
|
+
* Whether you are depositing into or withdrawing from the given Earn `venue`.
|
|
47
47
|
*/
|
|
48
48
|
export type EarnManageRequestAction = ClosedEnum<
|
|
49
49
|
typeof EarnManageRequestAction
|
|
@@ -59,11 +59,11 @@ export type EarnManageRequest = {
|
|
|
59
59
|
*/
|
|
60
60
|
chain: Chain;
|
|
61
61
|
/**
|
|
62
|
-
* The earn
|
|
62
|
+
* The earn venue.
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
venue: (AaveVenue & { type: "AAVE" }) | (VaultVenue & { type: "VAULT" });
|
|
65
65
|
/**
|
|
66
|
-
* Whether you are depositing into or withdrawing from the given Earn `
|
|
66
|
+
* Whether you are depositing into or withdrawing from the given Earn `venue`.
|
|
67
67
|
*/
|
|
68
68
|
action: EarnManageRequestAction;
|
|
69
69
|
/**
|
|
@@ -81,47 +81,48 @@ export type EarnManageRequest = {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
/** @internal */
|
|
84
|
-
export const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
export const Venue$inboundSchema: z.ZodType<Venue, z.ZodTypeDef, unknown> = z
|
|
85
|
+
.union([
|
|
86
|
+
AaveVenue$inboundSchema.and(
|
|
87
|
+
z.object({ type: z.literal("AAVE") }).transform((v) => ({
|
|
88
|
+
type: v.type,
|
|
89
|
+
})),
|
|
90
|
+
),
|
|
91
|
+
VaultVenue$inboundSchema.and(
|
|
92
|
+
z.object({ type: z.literal("VAULT") }).transform((v) => ({
|
|
93
|
+
type: v.type,
|
|
94
|
+
})),
|
|
95
|
+
),
|
|
96
|
+
]);
|
|
96
97
|
/** @internal */
|
|
97
|
-
export type
|
|
98
|
-
| (
|
|
99
|
-
| (
|
|
98
|
+
export type Venue$Outbound =
|
|
99
|
+
| (AaveVenue$Outbound & { type: "AAVE" })
|
|
100
|
+
| (VaultVenue$Outbound & { type: "VAULT" });
|
|
100
101
|
|
|
101
102
|
/** @internal */
|
|
102
|
-
export const
|
|
103
|
-
|
|
103
|
+
export const Venue$outboundSchema: z.ZodType<
|
|
104
|
+
Venue$Outbound,
|
|
104
105
|
z.ZodTypeDef,
|
|
105
|
-
|
|
106
|
+
Venue
|
|
106
107
|
> = z.union([
|
|
107
|
-
|
|
108
|
+
AaveVenue$outboundSchema.and(
|
|
108
109
|
z.object({ type: z.literal("AAVE") }).transform((v) => ({ type: v.type })),
|
|
109
110
|
),
|
|
110
|
-
|
|
111
|
+
VaultVenue$outboundSchema.and(
|
|
111
112
|
z.object({ type: z.literal("VAULT") }).transform((v) => ({ type: v.type })),
|
|
112
113
|
),
|
|
113
114
|
]);
|
|
114
115
|
|
|
115
|
-
export function
|
|
116
|
-
return JSON.stringify(
|
|
116
|
+
export function venueToJSON(venue: Venue): string {
|
|
117
|
+
return JSON.stringify(Venue$outboundSchema.parse(venue));
|
|
117
118
|
}
|
|
118
|
-
export function
|
|
119
|
+
export function venueFromJSON(
|
|
119
120
|
jsonString: string,
|
|
120
|
-
): SafeParseResult<
|
|
121
|
+
): SafeParseResult<Venue, SDKValidationError> {
|
|
121
122
|
return safeParse(
|
|
122
123
|
jsonString,
|
|
123
|
-
(x) =>
|
|
124
|
-
`Failed to parse '
|
|
124
|
+
(x) => Venue$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
+
`Failed to parse 'Venue' from JSON`,
|
|
125
126
|
);
|
|
126
127
|
}
|
|
127
128
|
|
|
@@ -142,13 +143,13 @@ export const EarnManageRequest$inboundSchema: z.ZodType<
|
|
|
142
143
|
> = z.object({
|
|
143
144
|
owner: z.string(),
|
|
144
145
|
chain: Chain$inboundSchema,
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
venue: z.union([
|
|
147
|
+
AaveVenue$inboundSchema.and(
|
|
147
148
|
z.object({ type: z.literal("AAVE") }).transform((v) => ({
|
|
148
149
|
type: v.type,
|
|
149
150
|
})),
|
|
150
151
|
),
|
|
151
|
-
|
|
152
|
+
VaultVenue$inboundSchema.and(
|
|
152
153
|
z.object({ type: z.literal("VAULT") }).transform((v) => ({
|
|
153
154
|
type: v.type,
|
|
154
155
|
})),
|
|
@@ -167,9 +168,9 @@ export const EarnManageRequest$inboundSchema: z.ZodType<
|
|
|
167
168
|
export type EarnManageRequest$Outbound = {
|
|
168
169
|
owner: string;
|
|
169
170
|
chain: string;
|
|
170
|
-
|
|
171
|
-
| (
|
|
172
|
-
| (
|
|
171
|
+
venue:
|
|
172
|
+
| (AaveVenue$Outbound & { type: "AAVE" })
|
|
173
|
+
| (VaultVenue$Outbound & { type: "VAULT" });
|
|
173
174
|
action: string;
|
|
174
175
|
amount?: any | undefined;
|
|
175
176
|
gas_sponsorship?: boolean | undefined;
|
|
@@ -184,13 +185,13 @@ export const EarnManageRequest$outboundSchema: z.ZodType<
|
|
|
184
185
|
> = z.object({
|
|
185
186
|
owner: z.string(),
|
|
186
187
|
chain: Chain$outboundSchema,
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
venue: z.union([
|
|
189
|
+
AaveVenue$outboundSchema.and(
|
|
189
190
|
z.object({ type: z.literal("AAVE") }).transform((v) => ({
|
|
190
191
|
type: v.type,
|
|
191
192
|
})),
|
|
192
193
|
),
|
|
193
|
-
|
|
194
|
+
VaultVenue$outboundSchema.and(
|
|
194
195
|
z.object({ type: z.literal("VAULT") }).transform((v) => ({
|
|
195
196
|
type: v.type,
|
|
196
197
|
})),
|
|
@@ -8,7 +8,6 @@ export * from "./aaveborrowrequest.js";
|
|
|
8
8
|
export * from "./aavehistoricaltransactionsresponse.js";
|
|
9
9
|
export * from "./aaveliquiditychangeresponse.js";
|
|
10
10
|
export * from "./aavelooprequest.js";
|
|
11
|
-
export * from "./aavemarket.js";
|
|
12
11
|
export * from "./aaveposition.js";
|
|
13
12
|
export * from "./aaverateresponse.js";
|
|
14
13
|
export * from "./aaverepayparams.js";
|
|
@@ -22,6 +21,7 @@ export * from "./aavesupportedtokensresponse.js";
|
|
|
22
21
|
export * from "./aavetokenpriceresponse.js";
|
|
23
22
|
export * from "./aaveuserpositionpertokenresponse.js";
|
|
24
23
|
export * from "./aaveuserpositionsummaryresponse.js";
|
|
24
|
+
export * from "./aavevenue.js";
|
|
25
25
|
export * from "./aavewithdrawparams.js";
|
|
26
26
|
export * from "./aavewithdrawrequest.js";
|
|
27
27
|
export * from "./aerodromelppositionsresponse.js";
|
|
@@ -218,8 +218,8 @@ export * from "./vaultdepositparams.js";
|
|
|
218
218
|
export * from "./vaultdepositrequest.js";
|
|
219
219
|
export * from "./vaultgetvaultresponse.js";
|
|
220
220
|
export * from "./vaultinfo.js";
|
|
221
|
-
export * from "./vaultmarket.js";
|
|
222
221
|
export * from "./vaultslistresponse.js";
|
|
222
|
+
export * from "./vaultvenue.js";
|
|
223
223
|
export * from "./vaultwithdrawparams.js";
|
|
224
224
|
export * from "./vaultwithdrawrequest.js";
|
|
225
225
|
export * from "./weeklyapys.js";
|
|
@@ -156,22 +156,6 @@ export type VaultInfo = {
|
|
|
156
156
|
* List of vault features and capabilities.
|
|
157
157
|
*/
|
|
158
158
|
features?: Array<string> | null | undefined;
|
|
159
|
-
/**
|
|
160
|
-
* Vault start date (first deposit).
|
|
161
|
-
*/
|
|
162
|
-
startDate?: Date | null | undefined;
|
|
163
|
-
/**
|
|
164
|
-
* Vault end date (if applicable).
|
|
165
|
-
*/
|
|
166
|
-
endDate?: Date | null | undefined;
|
|
167
|
-
/**
|
|
168
|
-
* Last update timestamp.
|
|
169
|
-
*/
|
|
170
|
-
lastUpdatedAt?: Date | null | undefined;
|
|
171
|
-
/**
|
|
172
|
-
* Block number of last update.
|
|
173
|
-
*/
|
|
174
|
-
lastUpdatedBlock?: number | null | undefined;
|
|
175
159
|
};
|
|
176
160
|
|
|
177
161
|
/** @internal */
|
|
@@ -216,16 +200,6 @@ export const VaultInfo$inboundSchema: z.ZodType<
|
|
|
216
200
|
years: z.nullable(z.string()).optional(),
|
|
217
201
|
event_count: z.nullable(z.number().int()).optional(),
|
|
218
202
|
features: z.nullable(z.array(z.string())).optional(),
|
|
219
|
-
start_date: z.nullable(
|
|
220
|
-
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
221
|
-
).optional(),
|
|
222
|
-
end_date: z.nullable(
|
|
223
|
-
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
224
|
-
).optional(),
|
|
225
|
-
last_updated_at: z.nullable(
|
|
226
|
-
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
227
|
-
).optional(),
|
|
228
|
-
last_updated_block: z.nullable(z.number().int()).optional(),
|
|
229
203
|
}).transform((v) => {
|
|
230
204
|
return remap$(v, {
|
|
231
205
|
"chain_id": "chainId",
|
|
@@ -253,10 +227,6 @@ export const VaultInfo$inboundSchema: z.ZodType<
|
|
|
253
227
|
"deposit_fee": "depositFee",
|
|
254
228
|
"withdraw_fee": "withdrawFee",
|
|
255
229
|
"event_count": "eventCount",
|
|
256
|
-
"start_date": "startDate",
|
|
257
|
-
"end_date": "endDate",
|
|
258
|
-
"last_updated_at": "lastUpdatedAt",
|
|
259
|
-
"last_updated_block": "lastUpdatedBlock",
|
|
260
230
|
});
|
|
261
231
|
});
|
|
262
232
|
/** @internal */
|
|
@@ -297,10 +267,6 @@ export type VaultInfo$Outbound = {
|
|
|
297
267
|
years?: string | null | undefined;
|
|
298
268
|
event_count?: number | null | undefined;
|
|
299
269
|
features?: Array<string> | null | undefined;
|
|
300
|
-
start_date?: string | null | undefined;
|
|
301
|
-
end_date?: string | null | undefined;
|
|
302
|
-
last_updated_at?: string | null | undefined;
|
|
303
|
-
last_updated_block?: number | null | undefined;
|
|
304
270
|
};
|
|
305
271
|
|
|
306
272
|
/** @internal */
|
|
@@ -345,11 +311,6 @@ export const VaultInfo$outboundSchema: z.ZodType<
|
|
|
345
311
|
years: z.nullable(z.string()).optional(),
|
|
346
312
|
eventCount: z.nullable(z.number().int()).optional(),
|
|
347
313
|
features: z.nullable(z.array(z.string())).optional(),
|
|
348
|
-
startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
349
|
-
endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
350
|
-
lastUpdatedAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
351
|
-
.optional(),
|
|
352
|
-
lastUpdatedBlock: z.nullable(z.number().int()).optional(),
|
|
353
314
|
}).transform((v) => {
|
|
354
315
|
return remap$(v, {
|
|
355
316
|
chainId: "chain_id",
|
|
@@ -377,10 +338,6 @@ export const VaultInfo$outboundSchema: z.ZodType<
|
|
|
377
338
|
depositFee: "deposit_fee",
|
|
378
339
|
withdrawFee: "withdraw_fee",
|
|
379
340
|
eventCount: "event_count",
|
|
380
|
-
startDate: "start_date",
|
|
381
|
-
endDate: "end_date",
|
|
382
|
-
lastUpdatedAt: "last_updated_at",
|
|
383
|
-
lastUpdatedBlock: "last_updated_block",
|
|
384
341
|
});
|
|
385
342
|
});
|
|
386
343
|
|
|
@@ -8,9 +8,9 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
-
export type
|
|
11
|
+
export type VaultVenue = {
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
13
|
+
* The venue type discriminator.
|
|
14
14
|
*/
|
|
15
15
|
type?: "VAULT" | undefined;
|
|
16
16
|
/**
|
|
@@ -20,8 +20,8 @@ export type VaultMarket = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
/** @internal */
|
|
23
|
-
export const
|
|
24
|
-
|
|
23
|
+
export const VaultVenue$inboundSchema: z.ZodType<
|
|
24
|
+
VaultVenue,
|
|
25
25
|
z.ZodTypeDef,
|
|
26
26
|
unknown
|
|
27
27
|
> = z.object({
|
|
@@ -33,16 +33,16 @@ export const VaultMarket$inboundSchema: z.ZodType<
|
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
/** @internal */
|
|
36
|
-
export type
|
|
36
|
+
export type VaultVenue$Outbound = {
|
|
37
37
|
type: "VAULT";
|
|
38
38
|
vault_address: string;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
/** @internal */
|
|
42
|
-
export const
|
|
43
|
-
|
|
42
|
+
export const VaultVenue$outboundSchema: z.ZodType<
|
|
43
|
+
VaultVenue$Outbound,
|
|
44
44
|
z.ZodTypeDef,
|
|
45
|
-
|
|
45
|
+
VaultVenue
|
|
46
46
|
> = z.object({
|
|
47
47
|
type: z.literal("VAULT"),
|
|
48
48
|
vaultAddress: z.string(),
|
|
@@ -52,15 +52,15 @@ export const VaultMarket$outboundSchema: z.ZodType<
|
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
export function
|
|
56
|
-
return JSON.stringify(
|
|
55
|
+
export function vaultVenueToJSON(vaultVenue: VaultVenue): string {
|
|
56
|
+
return JSON.stringify(VaultVenue$outboundSchema.parse(vaultVenue));
|
|
57
57
|
}
|
|
58
|
-
export function
|
|
58
|
+
export function vaultVenueFromJSON(
|
|
59
59
|
jsonString: string,
|
|
60
|
-
): SafeParseResult<
|
|
60
|
+
): SafeParseResult<VaultVenue, SDKValidationError> {
|
|
61
61
|
return safeParse(
|
|
62
62
|
jsonString,
|
|
63
|
-
(x) =>
|
|
64
|
-
`Failed to parse '
|
|
63
|
+
(x) => VaultVenue$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'VaultVenue' from JSON`,
|
|
65
65
|
);
|
|
66
66
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type AaveMarket = {
|
|
5
|
-
/**
|
|
6
|
-
* The market type discriminator.
|
|
7
|
-
*/
|
|
8
|
-
type?: "AAVE" | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* The reserve token for the Aave pool you are interacting with.
|
|
11
|
-
*/
|
|
12
|
-
token: string;
|
|
13
|
-
};
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare const AaveMarket$inboundSchema: z.ZodType<AaveMarket, z.ZodTypeDef, unknown>;
|
|
16
|
-
/** @internal */
|
|
17
|
-
export type AaveMarket$Outbound = {
|
|
18
|
-
type: "AAVE";
|
|
19
|
-
token: string;
|
|
20
|
-
};
|
|
21
|
-
/** @internal */
|
|
22
|
-
export declare const AaveMarket$outboundSchema: z.ZodType<AaveMarket$Outbound, z.ZodTypeDef, AaveMarket>;
|
|
23
|
-
export declare function aaveMarketToJSON(aaveMarket: AaveMarket): string;
|
|
24
|
-
export declare function aaveMarketFromJSON(jsonString: string): SafeParseResult<AaveMarket, SDKValidationError>;
|
|
25
|
-
//# sourceMappingURL=aavemarket.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aavemarket.d.ts","sourceRoot":"","sources":["../../../../src/models/components/aavemarket.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM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I,CAAC,SAAS,CAAC,iCAAyB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACrE,CAAC;AACD,SAAgB,kBAAkB,CAChC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpD,wCAAwC,CACzC,CAAC;AACJ,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type VaultMarket = {
|
|
5
|
-
/**
|
|
6
|
-
* The market type discriminator.
|
|
7
|
-
*/
|
|
8
|
-
type?: "VAULT" | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* The vault address you are interacting with for this action.
|
|
11
|
-
*/
|
|
12
|
-
vaultAddress: string;
|
|
13
|
-
};
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare const VaultMarket$inboundSchema: z.ZodType<VaultMarket, z.ZodTypeDef, unknown>;
|
|
16
|
-
/** @internal */
|
|
17
|
-
export type VaultMarket$Outbound = {
|
|
18
|
-
type: "VAULT";
|
|
19
|
-
vault_address: string;
|
|
20
|
-
};
|
|
21
|
-
/** @internal */
|
|
22
|
-
export declare const VaultMarket$outboundSchema: z.ZodType<VaultMarket$Outbound, z.ZodTypeDef, VaultMarket>;
|
|
23
|
-
export declare function vaultMarketToJSON(vaultMarket: VaultMarket): string;
|
|
24
|
-
export declare function vaultMarketFromJSON(jsonString: string): SafeParseResult<VaultMarket, SDKValidationError>;
|
|
25
|
-
//# sourceMappingURL=vaultmarket.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vaultmarket.d.ts","sourceRoot":"","sources":["../../../../src/models/components/vaultmarket.ts"],"names":[],"mappings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