@compass-labs/api-sdk 0.0.28 → 0.0.30
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/FUNCTIONS.md +4 -3
- package/README.md +23 -13
- package/bin/mcp-server.js +1048 -570
- package/bin/mcp-server.js.map +19 -11
- package/dist/commonjs/funcs/aaveV3AvgRate.d.ts +18 -0
- package/dist/commonjs/funcs/aaveV3AvgRate.d.ts.map +1 -0
- package/dist/commonjs/funcs/aaveV3AvgRate.js +122 -0
- package/dist/commonjs/funcs/aaveV3AvgRate.js.map +1 -0
- package/dist/commonjs/funcs/aaveV3StdRate.d.ts +18 -0
- package/dist/commonjs/funcs/aaveV3StdRate.d.ts.map +1 -0
- package/dist/commonjs/funcs/aaveV3StdRate.js +122 -0
- package/dist/commonjs/funcs/aaveV3StdRate.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js +64 -0
- package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/aaveV3StdRate.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/aaveV3StdRate.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/aaveV3StdRate.js +64 -0
- package/dist/commonjs/mcp-server/tools/aaveV3StdRate.js.map +1 -0
- package/dist/commonjs/models/components/aaveavgrateresponse.d.ts +57 -0
- package/dist/commonjs/models/components/aaveavgrateresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/aaveavgrateresponse.js +98 -0
- package/dist/commonjs/models/components/aaveavgrateresponse.js.map +1 -0
- package/dist/commonjs/models/components/aavestdrateresponse.d.ts +57 -0
- package/dist/commonjs/models/components/aavestdrateresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavestdrateresponse.js +98 -0
- package/dist/commonjs/models/components/aavestdrateresponse.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/aaveavgrate.d.ts +244 -0
- package/dist/commonjs/models/operations/aaveavgrate.d.ts.map +1 -0
- package/dist/commonjs/models/operations/aaveavgrate.js +165 -0
- package/dist/commonjs/models/operations/aaveavgrate.js.map +1 -0
- package/dist/commonjs/models/operations/aavestdrate.d.ts +244 -0
- package/dist/commonjs/models/operations/aavestdrate.d.ts.map +1 -0
- package/dist/commonjs/models/operations/aavestdrate.js +165 -0
- package/dist/commonjs/models/operations/aavestdrate.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/aavev3.d.ts +14 -0
- package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
- package/dist/commonjs/sdk/aavev3.js +20 -0
- package/dist/commonjs/sdk/aavev3.js.map +1 -1
- package/dist/esm/funcs/aaveV3AvgRate.d.ts +18 -0
- package/dist/esm/funcs/aaveV3AvgRate.d.ts.map +1 -0
- package/dist/esm/funcs/aaveV3AvgRate.js +86 -0
- package/dist/esm/funcs/aaveV3AvgRate.js.map +1 -0
- package/dist/esm/funcs/aaveV3StdRate.d.ts +18 -0
- package/dist/esm/funcs/aaveV3StdRate.d.ts.map +1 -0
- package/dist/esm/funcs/aaveV3StdRate.js +86 -0
- package/dist/esm/funcs/aaveV3StdRate.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.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3AvgRate.d.ts +8 -0
- package/dist/esm/mcp-server/tools/aaveV3AvgRate.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/aaveV3AvgRate.js +28 -0
- package/dist/esm/mcp-server/tools/aaveV3AvgRate.js.map +1 -0
- package/dist/esm/mcp-server/tools/aaveV3StdRate.d.ts +8 -0
- package/dist/esm/mcp-server/tools/aaveV3StdRate.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/aaveV3StdRate.js +28 -0
- package/dist/esm/mcp-server/tools/aaveV3StdRate.js.map +1 -0
- package/dist/esm/models/components/aaveavgrateresponse.d.ts +57 -0
- package/dist/esm/models/components/aaveavgrateresponse.d.ts.map +1 -0
- package/dist/esm/models/components/aaveavgrateresponse.js +60 -0
- package/dist/esm/models/components/aaveavgrateresponse.js.map +1 -0
- package/dist/esm/models/components/aavestdrateresponse.d.ts +57 -0
- package/dist/esm/models/components/aavestdrateresponse.d.ts.map +1 -0
- package/dist/esm/models/components/aavestdrateresponse.js +60 -0
- package/dist/esm/models/components/aavestdrateresponse.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/aaveavgrate.d.ts +244 -0
- package/dist/esm/models/operations/aaveavgrate.d.ts.map +1 -0
- package/dist/esm/models/operations/aaveavgrate.js +127 -0
- package/dist/esm/models/operations/aaveavgrate.js.map +1 -0
- package/dist/esm/models/operations/aavestdrate.d.ts +244 -0
- package/dist/esm/models/operations/aavestdrate.d.ts.map +1 -0
- package/dist/esm/models/operations/aavestdrate.js +127 -0
- package/dist/esm/models/operations/aavestdrate.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/aavev3.d.ts +14 -0
- package/dist/esm/sdk/aavev3.d.ts.map +1 -1
- package/dist/esm/sdk/aavev3.js +20 -0
- package/dist/esm/sdk/aavev3.js.map +1 -1
- package/docs/sdks/aavev3/README.md +164 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/aaveV3AvgRate.ts +170 -0
- package/src/funcs/aaveV3StdRate.ts +170 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/aaveV3AvgRate.ts +37 -0
- package/src/mcp-server/tools/aaveV3StdRate.ts +37 -0
- package/src/models/components/aaveavgrateresponse.ts +123 -0
- package/src/models/components/aavestdrateresponse.ts +123 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/operations/aaveavgrate.ts +203 -0
- package/src/models/operations/aavestdrate.ts +203 -0
- package/src/models/operations/index.ts +2 -0
- package/src/sdk/aavev3.ts +36 -0
|
@@ -0,0 +1,123 @@
|
|
|
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 AaveAvgRateResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* Mean of the variable rate APY for deposits.
|
|
14
|
+
*/
|
|
15
|
+
supplyApyVariableRate: number;
|
|
16
|
+
/**
|
|
17
|
+
* Mean of the variable rate APR for deposits.
|
|
18
|
+
*/
|
|
19
|
+
supplyAprVariableRate: number;
|
|
20
|
+
/**
|
|
21
|
+
* Mean of the variable rate APY for loans.
|
|
22
|
+
*/
|
|
23
|
+
borrowApyVariableRate: number;
|
|
24
|
+
/**
|
|
25
|
+
* Mean of the variable rate APR for loans.
|
|
26
|
+
*/
|
|
27
|
+
borrowAprVariableRate: number;
|
|
28
|
+
/**
|
|
29
|
+
* Mean of the fixed rate APY for loans.
|
|
30
|
+
*/
|
|
31
|
+
borrowApyFixedRate: number;
|
|
32
|
+
/**
|
|
33
|
+
* Mean of the fixed rate APR for loans.
|
|
34
|
+
*/
|
|
35
|
+
borrowAprFixedRate: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const AaveAvgRateResponse$inboundSchema: z.ZodType<
|
|
40
|
+
AaveAvgRateResponse,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
supply_apy_variable_rate: z.number(),
|
|
45
|
+
supply_apr_variable_rate: z.number(),
|
|
46
|
+
borrow_apy_variable_rate: z.number(),
|
|
47
|
+
borrow_apr_variable_rate: z.number(),
|
|
48
|
+
borrow_apy_fixed_rate: z.number(),
|
|
49
|
+
borrow_apr_fixed_rate: z.number(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"supply_apy_variable_rate": "supplyApyVariableRate",
|
|
53
|
+
"supply_apr_variable_rate": "supplyAprVariableRate",
|
|
54
|
+
"borrow_apy_variable_rate": "borrowApyVariableRate",
|
|
55
|
+
"borrow_apr_variable_rate": "borrowAprVariableRate",
|
|
56
|
+
"borrow_apy_fixed_rate": "borrowApyFixedRate",
|
|
57
|
+
"borrow_apr_fixed_rate": "borrowAprFixedRate",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type AaveAvgRateResponse$Outbound = {
|
|
63
|
+
supply_apy_variable_rate: number;
|
|
64
|
+
supply_apr_variable_rate: number;
|
|
65
|
+
borrow_apy_variable_rate: number;
|
|
66
|
+
borrow_apr_variable_rate: number;
|
|
67
|
+
borrow_apy_fixed_rate: number;
|
|
68
|
+
borrow_apr_fixed_rate: number;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const AaveAvgRateResponse$outboundSchema: z.ZodType<
|
|
73
|
+
AaveAvgRateResponse$Outbound,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
AaveAvgRateResponse
|
|
76
|
+
> = z.object({
|
|
77
|
+
supplyApyVariableRate: z.number(),
|
|
78
|
+
supplyAprVariableRate: z.number(),
|
|
79
|
+
borrowApyVariableRate: z.number(),
|
|
80
|
+
borrowAprVariableRate: z.number(),
|
|
81
|
+
borrowApyFixedRate: z.number(),
|
|
82
|
+
borrowAprFixedRate: z.number(),
|
|
83
|
+
}).transform((v) => {
|
|
84
|
+
return remap$(v, {
|
|
85
|
+
supplyApyVariableRate: "supply_apy_variable_rate",
|
|
86
|
+
supplyAprVariableRate: "supply_apr_variable_rate",
|
|
87
|
+
borrowApyVariableRate: "borrow_apy_variable_rate",
|
|
88
|
+
borrowAprVariableRate: "borrow_apr_variable_rate",
|
|
89
|
+
borrowApyFixedRate: "borrow_apy_fixed_rate",
|
|
90
|
+
borrowAprFixedRate: "borrow_apr_fixed_rate",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
97
|
+
*/
|
|
98
|
+
export namespace AaveAvgRateResponse$ {
|
|
99
|
+
/** @deprecated use `AaveAvgRateResponse$inboundSchema` instead. */
|
|
100
|
+
export const inboundSchema = AaveAvgRateResponse$inboundSchema;
|
|
101
|
+
/** @deprecated use `AaveAvgRateResponse$outboundSchema` instead. */
|
|
102
|
+
export const outboundSchema = AaveAvgRateResponse$outboundSchema;
|
|
103
|
+
/** @deprecated use `AaveAvgRateResponse$Outbound` instead. */
|
|
104
|
+
export type Outbound = AaveAvgRateResponse$Outbound;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function aaveAvgRateResponseToJSON(
|
|
108
|
+
aaveAvgRateResponse: AaveAvgRateResponse,
|
|
109
|
+
): string {
|
|
110
|
+
return JSON.stringify(
|
|
111
|
+
AaveAvgRateResponse$outboundSchema.parse(aaveAvgRateResponse),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function aaveAvgRateResponseFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<AaveAvgRateResponse, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => AaveAvgRateResponse$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'AaveAvgRateResponse' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
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 AaveSTDRateResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* Standard deviation of the variable rate APY for deposits.
|
|
14
|
+
*/
|
|
15
|
+
supplyApyVariableRate: number;
|
|
16
|
+
/**
|
|
17
|
+
* Standard deviation of the variable rate APR for deposits.
|
|
18
|
+
*/
|
|
19
|
+
supplyAprVariableRate: number;
|
|
20
|
+
/**
|
|
21
|
+
* Standard deviation of the variable rate APY for loans.
|
|
22
|
+
*/
|
|
23
|
+
borrowApyVariableRate: number;
|
|
24
|
+
/**
|
|
25
|
+
* Standard deviation of the variable rate APR for loans.
|
|
26
|
+
*/
|
|
27
|
+
borrowAprVariableRate: number;
|
|
28
|
+
/**
|
|
29
|
+
* Standard deviation of the fixed rate APY for loans.
|
|
30
|
+
*/
|
|
31
|
+
borrowApyFixedRate: number;
|
|
32
|
+
/**
|
|
33
|
+
* Standard deviation of the fixed rate APR for loans.
|
|
34
|
+
*/
|
|
35
|
+
borrowAprFixedRate: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const AaveSTDRateResponse$inboundSchema: z.ZodType<
|
|
40
|
+
AaveSTDRateResponse,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
supply_apy_variable_rate: z.number(),
|
|
45
|
+
supply_apr_variable_rate: z.number(),
|
|
46
|
+
borrow_apy_variable_rate: z.number(),
|
|
47
|
+
borrow_apr_variable_rate: z.number(),
|
|
48
|
+
borrow_apy_fixed_rate: z.number(),
|
|
49
|
+
borrow_apr_fixed_rate: z.number(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"supply_apy_variable_rate": "supplyApyVariableRate",
|
|
53
|
+
"supply_apr_variable_rate": "supplyAprVariableRate",
|
|
54
|
+
"borrow_apy_variable_rate": "borrowApyVariableRate",
|
|
55
|
+
"borrow_apr_variable_rate": "borrowAprVariableRate",
|
|
56
|
+
"borrow_apy_fixed_rate": "borrowApyFixedRate",
|
|
57
|
+
"borrow_apr_fixed_rate": "borrowAprFixedRate",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type AaveSTDRateResponse$Outbound = {
|
|
63
|
+
supply_apy_variable_rate: number;
|
|
64
|
+
supply_apr_variable_rate: number;
|
|
65
|
+
borrow_apy_variable_rate: number;
|
|
66
|
+
borrow_apr_variable_rate: number;
|
|
67
|
+
borrow_apy_fixed_rate: number;
|
|
68
|
+
borrow_apr_fixed_rate: number;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const AaveSTDRateResponse$outboundSchema: z.ZodType<
|
|
73
|
+
AaveSTDRateResponse$Outbound,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
AaveSTDRateResponse
|
|
76
|
+
> = z.object({
|
|
77
|
+
supplyApyVariableRate: z.number(),
|
|
78
|
+
supplyAprVariableRate: z.number(),
|
|
79
|
+
borrowApyVariableRate: z.number(),
|
|
80
|
+
borrowAprVariableRate: z.number(),
|
|
81
|
+
borrowApyFixedRate: z.number(),
|
|
82
|
+
borrowAprFixedRate: z.number(),
|
|
83
|
+
}).transform((v) => {
|
|
84
|
+
return remap$(v, {
|
|
85
|
+
supplyApyVariableRate: "supply_apy_variable_rate",
|
|
86
|
+
supplyAprVariableRate: "supply_apr_variable_rate",
|
|
87
|
+
borrowApyVariableRate: "borrow_apy_variable_rate",
|
|
88
|
+
borrowAprVariableRate: "borrow_apr_variable_rate",
|
|
89
|
+
borrowApyFixedRate: "borrow_apy_fixed_rate",
|
|
90
|
+
borrowAprFixedRate: "borrow_apr_fixed_rate",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
97
|
+
*/
|
|
98
|
+
export namespace AaveSTDRateResponse$ {
|
|
99
|
+
/** @deprecated use `AaveSTDRateResponse$inboundSchema` instead. */
|
|
100
|
+
export const inboundSchema = AaveSTDRateResponse$inboundSchema;
|
|
101
|
+
/** @deprecated use `AaveSTDRateResponse$outboundSchema` instead. */
|
|
102
|
+
export const outboundSchema = AaveSTDRateResponse$outboundSchema;
|
|
103
|
+
/** @deprecated use `AaveSTDRateResponse$Outbound` instead. */
|
|
104
|
+
export type Outbound = AaveSTDRateResponse$Outbound;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function aaveSTDRateResponseToJSON(
|
|
108
|
+
aaveSTDRateResponse: AaveSTDRateResponse,
|
|
109
|
+
): string {
|
|
110
|
+
return JSON.stringify(
|
|
111
|
+
AaveSTDRateResponse$outboundSchema.parse(aaveSTDRateResponse),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function aaveSTDRateResponseFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<AaveSTDRateResponse, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => AaveSTDRateResponse$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'AaveSTDRateResponse' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./aaveavgrateresponse.js";
|
|
5
6
|
export * from "./aaveborrowparams.js";
|
|
6
7
|
export * from "./aaveborrowrequest.js";
|
|
7
8
|
export * from "./aavehistoricaltransactionsresponse.js";
|
|
@@ -11,6 +12,7 @@ export * from "./aaverateresponse.js";
|
|
|
11
12
|
export * from "./aaverepayparams.js";
|
|
12
13
|
export * from "./aaverepayrequest.js";
|
|
13
14
|
export * from "./aavereserveoverviewresponse.js";
|
|
15
|
+
export * from "./aavestdrateresponse.js";
|
|
14
16
|
export * from "./aavesupplyparams.js";
|
|
15
17
|
export * from "./aavesupplyrequest.js";
|
|
16
18
|
export * from "./aavetokenpriceresponse.js";
|
|
@@ -0,0 +1,203 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The chain to use.
|
|
13
|
+
*/
|
|
14
|
+
export const AaveAvgRateChain = {
|
|
15
|
+
BaseMainnet: "base:mainnet",
|
|
16
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
17
|
+
ArbitrumMainnet: "arbitrum:mainnet",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The chain to use.
|
|
21
|
+
*/
|
|
22
|
+
export type AaveAvgRateChain = ClosedEnum<typeof AaveAvgRateChain>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A class representing the token.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
*
|
|
29
|
+
* This class is used to represent the token in the system. Notice individual
|
|
30
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
31
|
+
*/
|
|
32
|
+
export const AaveAvgRateToken = {
|
|
33
|
+
OneINCH: "1INCH",
|
|
34
|
+
Aave: "AAVE",
|
|
35
|
+
Bal: "BAL",
|
|
36
|
+
CbBTC: "cbBTC",
|
|
37
|
+
CbETH: "cbETH",
|
|
38
|
+
Crv: "CRV",
|
|
39
|
+
CrvUSD: "crvUSD",
|
|
40
|
+
Dai: "DAI",
|
|
41
|
+
Ens: "ENS",
|
|
42
|
+
ETHx: "ETHx",
|
|
43
|
+
Frax: "FRAX",
|
|
44
|
+
Fxs: "FXS",
|
|
45
|
+
Gho: "GHO",
|
|
46
|
+
Knc: "KNC",
|
|
47
|
+
Ldo: "LDO",
|
|
48
|
+
Link: "LINK",
|
|
49
|
+
Lusd: "LUSD",
|
|
50
|
+
Mkr: "MKR",
|
|
51
|
+
OsETH: "osETH",
|
|
52
|
+
Pyusd: "PYUSD",
|
|
53
|
+
RETH: "rETH",
|
|
54
|
+
Rpl: "RPL",
|
|
55
|
+
RsETH: "rsETH",
|
|
56
|
+
SDAI: "sDAI",
|
|
57
|
+
Snx: "SNX",
|
|
58
|
+
Stg: "STG",
|
|
59
|
+
SUSDe: "sUSDe",
|
|
60
|
+
TBTC: "tBTC",
|
|
61
|
+
Uni: "UNI",
|
|
62
|
+
Usdc: "USDC",
|
|
63
|
+
USDe: "USDe",
|
|
64
|
+
Usds: "USDS",
|
|
65
|
+
Usdt: "USDT",
|
|
66
|
+
Wbtc: "WBTC",
|
|
67
|
+
WeETH: "weETH",
|
|
68
|
+
Weth: "WETH",
|
|
69
|
+
WstETH: "wstETH",
|
|
70
|
+
Arb: "ARB",
|
|
71
|
+
Eurs: "EURS",
|
|
72
|
+
Mai: "MAI",
|
|
73
|
+
USDCe: "USDCe",
|
|
74
|
+
Aero: "AERO",
|
|
75
|
+
Eur: "EUR",
|
|
76
|
+
Virtual: "VIRTUAL",
|
|
77
|
+
} as const;
|
|
78
|
+
/**
|
|
79
|
+
* A class representing the token.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
*
|
|
83
|
+
* This class is used to represent the token in the system. Notice individual
|
|
84
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
85
|
+
*/
|
|
86
|
+
export type AaveAvgRateToken = ClosedEnum<typeof AaveAvgRateToken>;
|
|
87
|
+
|
|
88
|
+
export type AaveAvgRateRequest = {
|
|
89
|
+
/**
|
|
90
|
+
* The chain to use.
|
|
91
|
+
*/
|
|
92
|
+
chain?: AaveAvgRateChain | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The symbol of the asset to fetch the user's position on..
|
|
95
|
+
*/
|
|
96
|
+
token?: AaveAvgRateToken | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* The number of days to fetch the user's position on.
|
|
99
|
+
*/
|
|
100
|
+
days?: number | undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const AaveAvgRateChain$inboundSchema: z.ZodNativeEnum<
|
|
105
|
+
typeof AaveAvgRateChain
|
|
106
|
+
> = z.nativeEnum(AaveAvgRateChain);
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const AaveAvgRateChain$outboundSchema: z.ZodNativeEnum<
|
|
110
|
+
typeof AaveAvgRateChain
|
|
111
|
+
> = AaveAvgRateChain$inboundSchema;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
116
|
+
*/
|
|
117
|
+
export namespace AaveAvgRateChain$ {
|
|
118
|
+
/** @deprecated use `AaveAvgRateChain$inboundSchema` instead. */
|
|
119
|
+
export const inboundSchema = AaveAvgRateChain$inboundSchema;
|
|
120
|
+
/** @deprecated use `AaveAvgRateChain$outboundSchema` instead. */
|
|
121
|
+
export const outboundSchema = AaveAvgRateChain$outboundSchema;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export const AaveAvgRateToken$inboundSchema: z.ZodNativeEnum<
|
|
126
|
+
typeof AaveAvgRateToken
|
|
127
|
+
> = z.nativeEnum(AaveAvgRateToken);
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const AaveAvgRateToken$outboundSchema: z.ZodNativeEnum<
|
|
131
|
+
typeof AaveAvgRateToken
|
|
132
|
+
> = AaveAvgRateToken$inboundSchema;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
137
|
+
*/
|
|
138
|
+
export namespace AaveAvgRateToken$ {
|
|
139
|
+
/** @deprecated use `AaveAvgRateToken$inboundSchema` instead. */
|
|
140
|
+
export const inboundSchema = AaveAvgRateToken$inboundSchema;
|
|
141
|
+
/** @deprecated use `AaveAvgRateToken$outboundSchema` instead. */
|
|
142
|
+
export const outboundSchema = AaveAvgRateToken$outboundSchema;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const AaveAvgRateRequest$inboundSchema: z.ZodType<
|
|
147
|
+
AaveAvgRateRequest,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
unknown
|
|
150
|
+
> = z.object({
|
|
151
|
+
chain: AaveAvgRateChain$inboundSchema.default("ethereum:mainnet"),
|
|
152
|
+
token: AaveAvgRateToken$inboundSchema.default("USDC"),
|
|
153
|
+
days: z.number().int().default(7),
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export type AaveAvgRateRequest$Outbound = {
|
|
158
|
+
chain: string;
|
|
159
|
+
token: string;
|
|
160
|
+
days: number;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export const AaveAvgRateRequest$outboundSchema: z.ZodType<
|
|
165
|
+
AaveAvgRateRequest$Outbound,
|
|
166
|
+
z.ZodTypeDef,
|
|
167
|
+
AaveAvgRateRequest
|
|
168
|
+
> = z.object({
|
|
169
|
+
chain: AaveAvgRateChain$outboundSchema.default("ethereum:mainnet"),
|
|
170
|
+
token: AaveAvgRateToken$outboundSchema.default("USDC"),
|
|
171
|
+
days: z.number().int().default(7),
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @internal
|
|
176
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
177
|
+
*/
|
|
178
|
+
export namespace AaveAvgRateRequest$ {
|
|
179
|
+
/** @deprecated use `AaveAvgRateRequest$inboundSchema` instead. */
|
|
180
|
+
export const inboundSchema = AaveAvgRateRequest$inboundSchema;
|
|
181
|
+
/** @deprecated use `AaveAvgRateRequest$outboundSchema` instead. */
|
|
182
|
+
export const outboundSchema = AaveAvgRateRequest$outboundSchema;
|
|
183
|
+
/** @deprecated use `AaveAvgRateRequest$Outbound` instead. */
|
|
184
|
+
export type Outbound = AaveAvgRateRequest$Outbound;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function aaveAvgRateRequestToJSON(
|
|
188
|
+
aaveAvgRateRequest: AaveAvgRateRequest,
|
|
189
|
+
): string {
|
|
190
|
+
return JSON.stringify(
|
|
191
|
+
AaveAvgRateRequest$outboundSchema.parse(aaveAvgRateRequest),
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function aaveAvgRateRequestFromJSON(
|
|
196
|
+
jsonString: string,
|
|
197
|
+
): SafeParseResult<AaveAvgRateRequest, SDKValidationError> {
|
|
198
|
+
return safeParse(
|
|
199
|
+
jsonString,
|
|
200
|
+
(x) => AaveAvgRateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
201
|
+
`Failed to parse 'AaveAvgRateRequest' from JSON`,
|
|
202
|
+
);
|
|
203
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The chain to use.
|
|
13
|
+
*/
|
|
14
|
+
export const AaveStdRateChain = {
|
|
15
|
+
BaseMainnet: "base:mainnet",
|
|
16
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
17
|
+
ArbitrumMainnet: "arbitrum:mainnet",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The chain to use.
|
|
21
|
+
*/
|
|
22
|
+
export type AaveStdRateChain = ClosedEnum<typeof AaveStdRateChain>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A class representing the token.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
*
|
|
29
|
+
* This class is used to represent the token in the system. Notice individual
|
|
30
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
31
|
+
*/
|
|
32
|
+
export const AaveStdRateToken = {
|
|
33
|
+
OneINCH: "1INCH",
|
|
34
|
+
Aave: "AAVE",
|
|
35
|
+
Bal: "BAL",
|
|
36
|
+
CbBTC: "cbBTC",
|
|
37
|
+
CbETH: "cbETH",
|
|
38
|
+
Crv: "CRV",
|
|
39
|
+
CrvUSD: "crvUSD",
|
|
40
|
+
Dai: "DAI",
|
|
41
|
+
Ens: "ENS",
|
|
42
|
+
ETHx: "ETHx",
|
|
43
|
+
Frax: "FRAX",
|
|
44
|
+
Fxs: "FXS",
|
|
45
|
+
Gho: "GHO",
|
|
46
|
+
Knc: "KNC",
|
|
47
|
+
Ldo: "LDO",
|
|
48
|
+
Link: "LINK",
|
|
49
|
+
Lusd: "LUSD",
|
|
50
|
+
Mkr: "MKR",
|
|
51
|
+
OsETH: "osETH",
|
|
52
|
+
Pyusd: "PYUSD",
|
|
53
|
+
RETH: "rETH",
|
|
54
|
+
Rpl: "RPL",
|
|
55
|
+
RsETH: "rsETH",
|
|
56
|
+
SDAI: "sDAI",
|
|
57
|
+
Snx: "SNX",
|
|
58
|
+
Stg: "STG",
|
|
59
|
+
SUSDe: "sUSDe",
|
|
60
|
+
TBTC: "tBTC",
|
|
61
|
+
Uni: "UNI",
|
|
62
|
+
Usdc: "USDC",
|
|
63
|
+
USDe: "USDe",
|
|
64
|
+
Usds: "USDS",
|
|
65
|
+
Usdt: "USDT",
|
|
66
|
+
Wbtc: "WBTC",
|
|
67
|
+
WeETH: "weETH",
|
|
68
|
+
Weth: "WETH",
|
|
69
|
+
WstETH: "wstETH",
|
|
70
|
+
Arb: "ARB",
|
|
71
|
+
Eurs: "EURS",
|
|
72
|
+
Mai: "MAI",
|
|
73
|
+
USDCe: "USDCe",
|
|
74
|
+
Aero: "AERO",
|
|
75
|
+
Eur: "EUR",
|
|
76
|
+
Virtual: "VIRTUAL",
|
|
77
|
+
} as const;
|
|
78
|
+
/**
|
|
79
|
+
* A class representing the token.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
*
|
|
83
|
+
* This class is used to represent the token in the system. Notice individual
|
|
84
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
85
|
+
*/
|
|
86
|
+
export type AaveStdRateToken = ClosedEnum<typeof AaveStdRateToken>;
|
|
87
|
+
|
|
88
|
+
export type AaveStdRateRequest = {
|
|
89
|
+
/**
|
|
90
|
+
* The chain to use.
|
|
91
|
+
*/
|
|
92
|
+
chain?: AaveStdRateChain | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The symbol of the asset to fetch the user's position on..
|
|
95
|
+
*/
|
|
96
|
+
token?: AaveStdRateToken | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* The number of days to fetch the user's position on.
|
|
99
|
+
*/
|
|
100
|
+
days?: number | undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const AaveStdRateChain$inboundSchema: z.ZodNativeEnum<
|
|
105
|
+
typeof AaveStdRateChain
|
|
106
|
+
> = z.nativeEnum(AaveStdRateChain);
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const AaveStdRateChain$outboundSchema: z.ZodNativeEnum<
|
|
110
|
+
typeof AaveStdRateChain
|
|
111
|
+
> = AaveStdRateChain$inboundSchema;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
116
|
+
*/
|
|
117
|
+
export namespace AaveStdRateChain$ {
|
|
118
|
+
/** @deprecated use `AaveStdRateChain$inboundSchema` instead. */
|
|
119
|
+
export const inboundSchema = AaveStdRateChain$inboundSchema;
|
|
120
|
+
/** @deprecated use `AaveStdRateChain$outboundSchema` instead. */
|
|
121
|
+
export const outboundSchema = AaveStdRateChain$outboundSchema;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export const AaveStdRateToken$inboundSchema: z.ZodNativeEnum<
|
|
126
|
+
typeof AaveStdRateToken
|
|
127
|
+
> = z.nativeEnum(AaveStdRateToken);
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const AaveStdRateToken$outboundSchema: z.ZodNativeEnum<
|
|
131
|
+
typeof AaveStdRateToken
|
|
132
|
+
> = AaveStdRateToken$inboundSchema;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
137
|
+
*/
|
|
138
|
+
export namespace AaveStdRateToken$ {
|
|
139
|
+
/** @deprecated use `AaveStdRateToken$inboundSchema` instead. */
|
|
140
|
+
export const inboundSchema = AaveStdRateToken$inboundSchema;
|
|
141
|
+
/** @deprecated use `AaveStdRateToken$outboundSchema` instead. */
|
|
142
|
+
export const outboundSchema = AaveStdRateToken$outboundSchema;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const AaveStdRateRequest$inboundSchema: z.ZodType<
|
|
147
|
+
AaveStdRateRequest,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
unknown
|
|
150
|
+
> = z.object({
|
|
151
|
+
chain: AaveStdRateChain$inboundSchema.default("ethereum:mainnet"),
|
|
152
|
+
token: AaveStdRateToken$inboundSchema.default("USDC"),
|
|
153
|
+
days: z.number().int().default(7),
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export type AaveStdRateRequest$Outbound = {
|
|
158
|
+
chain: string;
|
|
159
|
+
token: string;
|
|
160
|
+
days: number;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export const AaveStdRateRequest$outboundSchema: z.ZodType<
|
|
165
|
+
AaveStdRateRequest$Outbound,
|
|
166
|
+
z.ZodTypeDef,
|
|
167
|
+
AaveStdRateRequest
|
|
168
|
+
> = z.object({
|
|
169
|
+
chain: AaveStdRateChain$outboundSchema.default("ethereum:mainnet"),
|
|
170
|
+
token: AaveStdRateToken$outboundSchema.default("USDC"),
|
|
171
|
+
days: z.number().int().default(7),
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @internal
|
|
176
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
177
|
+
*/
|
|
178
|
+
export namespace AaveStdRateRequest$ {
|
|
179
|
+
/** @deprecated use `AaveStdRateRequest$inboundSchema` instead. */
|
|
180
|
+
export const inboundSchema = AaveStdRateRequest$inboundSchema;
|
|
181
|
+
/** @deprecated use `AaveStdRateRequest$outboundSchema` instead. */
|
|
182
|
+
export const outboundSchema = AaveStdRateRequest$outboundSchema;
|
|
183
|
+
/** @deprecated use `AaveStdRateRequest$Outbound` instead. */
|
|
184
|
+
export type Outbound = AaveStdRateRequest$Outbound;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function aaveStdRateRequestToJSON(
|
|
188
|
+
aaveStdRateRequest: AaveStdRateRequest,
|
|
189
|
+
): string {
|
|
190
|
+
return JSON.stringify(
|
|
191
|
+
AaveStdRateRequest$outboundSchema.parse(aaveStdRateRequest),
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function aaveStdRateRequestFromJSON(
|
|
196
|
+
jsonString: string,
|
|
197
|
+
): SafeParseResult<AaveStdRateRequest, SDKValidationError> {
|
|
198
|
+
return safeParse(
|
|
199
|
+
jsonString,
|
|
200
|
+
(x) => AaveStdRateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
201
|
+
`Failed to parse 'AaveStdRateRequest' from JSON`,
|
|
202
|
+
);
|
|
203
|
+
}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./aaveavgrate.js";
|
|
5
6
|
export * from "./aavehistoricaltransactions.js";
|
|
6
7
|
export * from "./aaveliquiditychange.js";
|
|
7
8
|
export * from "./aaverate.js";
|
|
8
9
|
export * from "./aavereserveoverview.js";
|
|
10
|
+
export * from "./aavestdrate.js";
|
|
9
11
|
export * from "./aavetokenprice.js";
|
|
10
12
|
export * from "./aaveuserpositionpertoken.js";
|
|
11
13
|
export * from "./aaveuserpositionsummary.js";
|