@compass-labs/api-sdk 0.0.29 → 0.0.31
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 +2 -2
- package/README.md +9 -7
- package/bin/mcp-server.js +615 -376
- package/bin/mcp-server.js.map +13 -9
- 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 +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- 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 +6 -6
- 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 +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- 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 +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/aavev3.d.ts +7 -0
- package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
- package/dist/commonjs/sdk/aavev3.js +10 -0
- package/dist/commonjs/sdk/aavev3.js.map +1 -1
- 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 +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- 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 +6 -6
- 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 +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- 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 +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/aavev3.d.ts +7 -0
- package/dist/esm/sdk/aavev3.d.ts.map +1 -1
- package/dist/esm/sdk/aavev3.js +10 -0
- package/dist/esm/sdk/aavev3.js.map +1 -1
- package/docs/sdks/aavev3/README.md +82 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- 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 +3 -1
- package/src/mcp-server/tools/aaveV3StdRate.ts +37 -0
- package/src/models/components/aaveavgrateresponse.ts +6 -6
- package/src/models/components/aavestdrateresponse.ts +123 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/aavestdrate.ts +203 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/aavev3.ts +18 -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 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
|
+
}
|
|
@@ -12,6 +12,7 @@ export * from "./aaverateresponse.js";
|
|
|
12
12
|
export * from "./aaverepayparams.js";
|
|
13
13
|
export * from "./aaverepayrequest.js";
|
|
14
14
|
export * from "./aavereserveoverviewresponse.js";
|
|
15
|
+
export * from "./aavestdrateresponse.js";
|
|
15
16
|
export * from "./aavesupplyparams.js";
|
|
16
17
|
export * from "./aavesupplyrequest.js";
|
|
17
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 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
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from "./aavehistoricaltransactions.js";
|
|
|
7
7
|
export * from "./aaveliquiditychange.js";
|
|
8
8
|
export * from "./aaverate.js";
|
|
9
9
|
export * from "./aavereserveoverview.js";
|
|
10
|
+
export * from "./aavestdrate.js";
|
|
10
11
|
export * from "./aavetokenprice.js";
|
|
11
12
|
export * from "./aaveuserpositionpertoken.js";
|
|
12
13
|
export * from "./aaveuserpositionsummary.js";
|
package/src/sdk/aavev3.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { aaveV3LiquidityChange } from "../funcs/aaveV3LiquidityChange.js";
|
|
|
9
9
|
import { aaveV3Rate } from "../funcs/aaveV3Rate.js";
|
|
10
10
|
import { aaveV3Repay } from "../funcs/aaveV3Repay.js";
|
|
11
11
|
import { aaveV3ReserveOverview } from "../funcs/aaveV3ReserveOverview.js";
|
|
12
|
+
import { aaveV3StdRate } from "../funcs/aaveV3StdRate.js";
|
|
12
13
|
import { aaveV3Supply } from "../funcs/aaveV3Supply.js";
|
|
13
14
|
import { aaveV3TokenPrice } from "../funcs/aaveV3TokenPrice.js";
|
|
14
15
|
import { aaveV3UserPositionPerToken } from "../funcs/aaveV3UserPositionPerToken.js";
|
|
@@ -20,6 +21,23 @@ import * as operations from "../models/operations/index.js";
|
|
|
20
21
|
import { unwrapAsync } from "../types/fp.js";
|
|
21
22
|
|
|
22
23
|
export class AaveV3 extends ClientSDK {
|
|
24
|
+
/**
|
|
25
|
+
* Standard deviation of interest rates
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Returns the standard deviation of Interest Rates for Aave Reserves over time:
|
|
29
|
+
*/
|
|
30
|
+
async stdRate(
|
|
31
|
+
request: operations.AaveStdRateRequest,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): Promise<components.AaveSTDRateResponse> {
|
|
34
|
+
return unwrapAsync(aaveV3StdRate(
|
|
35
|
+
this,
|
|
36
|
+
request,
|
|
37
|
+
options,
|
|
38
|
+
));
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
/**
|
|
24
42
|
* Average interest rates
|
|
25
43
|
*
|