@compass-labs/api-sdk 0.0.22 → 0.0.23
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 +596 -369
- package/bin/mcp-server.js.map +12 -8
- package/dist/commonjs/funcs/aaveV3ReserveOverview.d.ts +23 -0
- package/dist/commonjs/funcs/aaveV3ReserveOverview.d.ts.map +1 -0
- package/dist/commonjs/funcs/aaveV3ReserveOverview.js +126 -0
- package/dist/commonjs/funcs/aaveV3ReserveOverview.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/aaveV3ReserveOverview.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.js +69 -0
- package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.js.map +1 -0
- package/dist/commonjs/models/components/aavereserveoverviewresponse.d.ts +42 -0
- package/dist/commonjs/models/components/aavereserveoverviewresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavereserveoverviewresponse.js +84 -0
- package/dist/commonjs/models/components/aavereserveoverviewresponse.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/aavereserveoverview.d.ts +244 -0
- package/dist/commonjs/models/operations/aavereserveoverview.d.ts.map +1 -0
- package/dist/commonjs/models/operations/aavereserveoverview.js +163 -0
- package/dist/commonjs/models/operations/aavereserveoverview.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 +12 -0
- package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
- package/dist/commonjs/sdk/aavev3.js +15 -0
- package/dist/commonjs/sdk/aavev3.js.map +1 -1
- package/dist/esm/funcs/aaveV3ReserveOverview.d.ts +23 -0
- package/dist/esm/funcs/aaveV3ReserveOverview.d.ts.map +1 -0
- package/dist/esm/funcs/aaveV3ReserveOverview.js +90 -0
- package/dist/esm/funcs/aaveV3ReserveOverview.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/aaveV3ReserveOverview.d.ts +8 -0
- package/dist/esm/mcp-server/tools/aaveV3ReserveOverview.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/aaveV3ReserveOverview.js +33 -0
- package/dist/esm/mcp-server/tools/aaveV3ReserveOverview.js.map +1 -0
- package/dist/esm/models/components/aavereserveoverviewresponse.d.ts +42 -0
- package/dist/esm/models/components/aavereserveoverviewresponse.d.ts.map +1 -0
- package/dist/esm/models/components/aavereserveoverviewresponse.js +46 -0
- package/dist/esm/models/components/aavereserveoverviewresponse.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/aavereserveoverview.d.ts +244 -0
- package/dist/esm/models/operations/aavereserveoverview.d.ts.map +1 -0
- package/dist/esm/models/operations/aavereserveoverview.js +125 -0
- package/dist/esm/models/operations/aavereserveoverview.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 +12 -0
- package/dist/esm/sdk/aavev3.d.ts.map +1 -1
- package/dist/esm/sdk/aavev3.js +15 -0
- package/dist/esm/sdk/aavev3.js.map +1 -1
- package/docs/sdks/aavev3/README.md +85 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/aaveV3ReserveOverview.ts +175 -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/aaveV3ReserveOverview.ts +42 -0
- package/src/models/components/aavereserveoverviewresponse.ts +96 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/aavereserveoverview.ts +205 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/aavev3.ts +23 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
+
/**
|
|
7
|
+
* The chain to use.
|
|
8
|
+
*/
|
|
9
|
+
export const AaveReserveOverviewChain = {
|
|
10
|
+
BaseMainnet: "base:mainnet",
|
|
11
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
12
|
+
ArbitrumMainnet: "arbitrum:mainnet",
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A class representing the token.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
*
|
|
19
|
+
* This class is used to represent the token in the system. Notice individual
|
|
20
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
21
|
+
*/
|
|
22
|
+
export const AaveReserveOverviewToken = {
|
|
23
|
+
OneINCH: "1INCH",
|
|
24
|
+
Aave: "AAVE",
|
|
25
|
+
Bal: "BAL",
|
|
26
|
+
CbBTC: "cbBTC",
|
|
27
|
+
CbETH: "cbETH",
|
|
28
|
+
Crv: "CRV",
|
|
29
|
+
CrvUSD: "crvUSD",
|
|
30
|
+
Dai: "DAI",
|
|
31
|
+
Ens: "ENS",
|
|
32
|
+
ETHx: "ETHx",
|
|
33
|
+
Frax: "FRAX",
|
|
34
|
+
Fxs: "FXS",
|
|
35
|
+
Gho: "GHO",
|
|
36
|
+
Knc: "KNC",
|
|
37
|
+
Ldo: "LDO",
|
|
38
|
+
Link: "LINK",
|
|
39
|
+
Lusd: "LUSD",
|
|
40
|
+
Mkr: "MKR",
|
|
41
|
+
OsETH: "osETH",
|
|
42
|
+
Pyusd: "PYUSD",
|
|
43
|
+
RETH: "rETH",
|
|
44
|
+
Rpl: "RPL",
|
|
45
|
+
RsETH: "rsETH",
|
|
46
|
+
SDAI: "sDAI",
|
|
47
|
+
Snx: "SNX",
|
|
48
|
+
Stg: "STG",
|
|
49
|
+
SUSDe: "sUSDe",
|
|
50
|
+
TBTC: "tBTC",
|
|
51
|
+
Uni: "UNI",
|
|
52
|
+
Usdc: "USDC",
|
|
53
|
+
USDe: "USDe",
|
|
54
|
+
Usds: "USDS",
|
|
55
|
+
Usdt: "USDT",
|
|
56
|
+
Wbtc: "WBTC",
|
|
57
|
+
WeETH: "weETH",
|
|
58
|
+
Weth: "WETH",
|
|
59
|
+
WstETH: "wstETH",
|
|
60
|
+
Arb: "ARB",
|
|
61
|
+
Eurs: "EURS",
|
|
62
|
+
Mai: "MAI",
|
|
63
|
+
USDCe: "USDCe",
|
|
64
|
+
Aero: "AERO",
|
|
65
|
+
Eur: "EUR",
|
|
66
|
+
Virtual: "VIRTUAL",
|
|
67
|
+
};
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const AaveReserveOverviewChain$inboundSchema = z.nativeEnum(AaveReserveOverviewChain);
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const AaveReserveOverviewChain$outboundSchema = AaveReserveOverviewChain$inboundSchema;
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export var AaveReserveOverviewChain$;
|
|
77
|
+
(function (AaveReserveOverviewChain$) {
|
|
78
|
+
/** @deprecated use `AaveReserveOverviewChain$inboundSchema` instead. */
|
|
79
|
+
AaveReserveOverviewChain$.inboundSchema = AaveReserveOverviewChain$inboundSchema;
|
|
80
|
+
/** @deprecated use `AaveReserveOverviewChain$outboundSchema` instead. */
|
|
81
|
+
AaveReserveOverviewChain$.outboundSchema = AaveReserveOverviewChain$outboundSchema;
|
|
82
|
+
})(AaveReserveOverviewChain$ || (AaveReserveOverviewChain$ = {}));
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const AaveReserveOverviewToken$inboundSchema = z.nativeEnum(AaveReserveOverviewToken);
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const AaveReserveOverviewToken$outboundSchema = AaveReserveOverviewToken$inboundSchema;
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
90
|
+
*/
|
|
91
|
+
export var AaveReserveOverviewToken$;
|
|
92
|
+
(function (AaveReserveOverviewToken$) {
|
|
93
|
+
/** @deprecated use `AaveReserveOverviewToken$inboundSchema` instead. */
|
|
94
|
+
AaveReserveOverviewToken$.inboundSchema = AaveReserveOverviewToken$inboundSchema;
|
|
95
|
+
/** @deprecated use `AaveReserveOverviewToken$outboundSchema` instead. */
|
|
96
|
+
AaveReserveOverviewToken$.outboundSchema = AaveReserveOverviewToken$outboundSchema;
|
|
97
|
+
})(AaveReserveOverviewToken$ || (AaveReserveOverviewToken$ = {}));
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const AaveReserveOverviewRequest$inboundSchema = z.object({
|
|
100
|
+
chain: AaveReserveOverviewChain$inboundSchema.default("arbitrum:mainnet"),
|
|
101
|
+
token: AaveReserveOverviewToken$inboundSchema.default("USDC"),
|
|
102
|
+
});
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const AaveReserveOverviewRequest$outboundSchema = z.object({
|
|
105
|
+
chain: AaveReserveOverviewChain$outboundSchema.default("arbitrum:mainnet"),
|
|
106
|
+
token: AaveReserveOverviewToken$outboundSchema.default("USDC"),
|
|
107
|
+
});
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
111
|
+
*/
|
|
112
|
+
export var AaveReserveOverviewRequest$;
|
|
113
|
+
(function (AaveReserveOverviewRequest$) {
|
|
114
|
+
/** @deprecated use `AaveReserveOverviewRequest$inboundSchema` instead. */
|
|
115
|
+
AaveReserveOverviewRequest$.inboundSchema = AaveReserveOverviewRequest$inboundSchema;
|
|
116
|
+
/** @deprecated use `AaveReserveOverviewRequest$outboundSchema` instead. */
|
|
117
|
+
AaveReserveOverviewRequest$.outboundSchema = AaveReserveOverviewRequest$outboundSchema;
|
|
118
|
+
})(AaveReserveOverviewRequest$ || (AaveReserveOverviewRequest$ = {}));
|
|
119
|
+
export function aaveReserveOverviewRequestToJSON(aaveReserveOverviewRequest) {
|
|
120
|
+
return JSON.stringify(AaveReserveOverviewRequest$outboundSchema.parse(aaveReserveOverviewRequest));
|
|
121
|
+
}
|
|
122
|
+
export function aaveReserveOverviewRequestFromJSON(jsonString) {
|
|
123
|
+
return safeParse(jsonString, (x) => AaveReserveOverviewRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AaveReserveOverviewRequest' from JSON`);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=aavereserveoverview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aavereserveoverview.js","sourceRoot":"","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,EAAE,uCAAuC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IAC1E,KAAK,EAAE,uCAAuC,CAAC,OAAO,CAAC,MAAM,CAAC;CAC/D,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,2BAA2B,CAO3C;AAPD,WAAiB,2BAA2B;IAC1C,0EAA0E;IAC7D,yCAAa,GAAG,wCAAwC,CAAC;IACtE,2EAA2E;IAC9D,0CAAc,GAAG,yCAAyC,CAAC;AAG1E,CAAC,EAPgB,2BAA2B,KAA3B,2BAA2B,QAO3C;AAED,MAAM,UAAU,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wCAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./aavehistoricaltransactions.js";
|
|
2
2
|
export * from "./aaveliquiditychange.js";
|
|
3
3
|
export * from "./aaverate.js";
|
|
4
|
+
export * from "./aavereserveoverview.js";
|
|
4
5
|
export * from "./aavetokenprice.js";
|
|
5
6
|
export * from "./aaveuserpositionpertoken.js";
|
|
6
7
|
export * from "./aaveuserpositionsummary.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAIA,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qDAAqD,CAAC;AACpE,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAIA,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qDAAqD,CAAC;AACpE,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export * from "./aavehistoricaltransactions.js";
|
|
5
5
|
export * from "./aaveliquiditychange.js";
|
|
6
6
|
export * from "./aaverate.js";
|
|
7
|
+
export * from "./aavereserveoverview.js";
|
|
7
8
|
export * from "./aavetokenprice.js";
|
|
8
9
|
export * from "./aaveuserpositionpertoken.js";
|
|
9
10
|
export * from "./aaveuserpositionsummary.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qDAAqD,CAAC;AACpE,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qDAAqD,CAAC;AACpE,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
|
package/dist/esm/sdk/aavev3.d.ts
CHANGED
|
@@ -2,6 +2,18 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
import * as operations from "../models/operations/index.js";
|
|
4
4
|
export declare class AaveV3 extends ClientSDK {
|
|
5
|
+
/**
|
|
6
|
+
* Reserve overview
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Returns key metrics for Aave Reserves:
|
|
10
|
+
* - Total Supplied (TVL) in USD
|
|
11
|
+
* - Total Borrowed in USD
|
|
12
|
+
* - Utilization Ratio
|
|
13
|
+
*
|
|
14
|
+
* See below for more info:
|
|
15
|
+
*/
|
|
16
|
+
reserveOverview(request: operations.AaveReserveOverviewRequest, options?: RequestOptions): Promise<components.AaveReserveOverviewResponse>;
|
|
5
17
|
/**
|
|
6
18
|
* Interest rates
|
|
7
19
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aavev3.d.ts","sourceRoot":"","sources":["../../../src/sdk/aavev3.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aavev3.d.ts","sourceRoot":"","sources":["../../../src/sdk/aavev3.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,MAAO,SAAQ,SAAS;IACnC;;;;;;;;;;OAUG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAQlD;;;;;;;;;;;;;;;;;;OAkBG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;IAQvC;;;;;;;;;;;;OAYG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;;;;OAeG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAQlD;;;;;;;;;;;;OAYG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;;;;;;;;;OAaG;IACG,oBAAoB,CACxB,OAAO,EAAE,UAAU,CAAC,+BAA+B,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAQvD;;;;;;;;;;OAUG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC;IAQzD;;;;;;;;;;;;;OAaG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;;;;;;;;OAYG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;;;;;;;;;OAaG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;CAO3C"}
|
package/dist/esm/sdk/aavev3.js
CHANGED
|
@@ -6,6 +6,7 @@ import { aaveV3HistoricalTransactions } from "../funcs/aaveV3HistoricalTransacti
|
|
|
6
6
|
import { aaveV3LiquidityChange } from "../funcs/aaveV3LiquidityChange.js";
|
|
7
7
|
import { aaveV3Rate } from "../funcs/aaveV3Rate.js";
|
|
8
8
|
import { aaveV3Repay } from "../funcs/aaveV3Repay.js";
|
|
9
|
+
import { aaveV3ReserveOverview } from "../funcs/aaveV3ReserveOverview.js";
|
|
9
10
|
import { aaveV3Supply } from "../funcs/aaveV3Supply.js";
|
|
10
11
|
import { aaveV3TokenPrice } from "../funcs/aaveV3TokenPrice.js";
|
|
11
12
|
import { aaveV3UserPositionPerToken } from "../funcs/aaveV3UserPositionPerToken.js";
|
|
@@ -14,6 +15,20 @@ import { aaveV3Withdraw } from "../funcs/aaveV3Withdraw.js";
|
|
|
14
15
|
import { ClientSDK } from "../lib/sdks.js";
|
|
15
16
|
import { unwrapAsync } from "../types/fp.js";
|
|
16
17
|
export class AaveV3 extends ClientSDK {
|
|
18
|
+
/**
|
|
19
|
+
* Reserve overview
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Returns key metrics for Aave Reserves:
|
|
23
|
+
* - Total Supplied (TVL) in USD
|
|
24
|
+
* - Total Borrowed in USD
|
|
25
|
+
* - Utilization Ratio
|
|
26
|
+
*
|
|
27
|
+
* See below for more info:
|
|
28
|
+
*/
|
|
29
|
+
async reserveOverview(request, options) {
|
|
30
|
+
return unwrapAsync(aaveV3ReserveOverview(this, request, options));
|
|
31
|
+
}
|
|
17
32
|
/**
|
|
18
33
|
* Interest rates
|
|
19
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aavev3.js","sourceRoot":"","sources":["../../../src/sdk/aavev3.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,0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AAoB,CACxB,OAAmD,EACnD,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAqD,EACrD,OAAwB;QAExB,OAAO,WAAW,CAAC,4BAA4B,CAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,CACV,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CACV,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,KAAK,CACT,OAAoC,EACpC,OAAwB;QAExB,OAAO,WAAW,CAAC,WAAW,CAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
+
* [reserveOverview](#reserveoverview) - Reserve overview
|
|
8
9
|
* [rate](#rate) - Interest rates
|
|
9
10
|
* [tokenPrice](#tokenprice) - Token prices
|
|
10
11
|
* [liquidityChange](#liquiditychange) - Liquidity index
|
|
@@ -16,6 +17,90 @@
|
|
|
16
17
|
* [repay](#repay) - Repay loans
|
|
17
18
|
* [withdraw](#withdraw) - Unstake
|
|
18
19
|
|
|
20
|
+
## reserveOverview
|
|
21
|
+
|
|
22
|
+
Returns key metrics for Aave Reserves:
|
|
23
|
+
- Total Supplied (TVL) in USD
|
|
24
|
+
- Total Borrowed in USD
|
|
25
|
+
- Utilization Ratio
|
|
26
|
+
|
|
27
|
+
See below for more info:
|
|
28
|
+
|
|
29
|
+
### Example Usage
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
33
|
+
|
|
34
|
+
const compassApiSDK = new CompassApiSDK({
|
|
35
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
async function run() {
|
|
39
|
+
const result = await compassApiSDK.aaveV3.reserveOverview({
|
|
40
|
+
chain: "arbitrum:mainnet",
|
|
41
|
+
token: "USDC",
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Handle the result
|
|
45
|
+
console.log(result);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
run();
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Standalone function
|
|
52
|
+
|
|
53
|
+
The standalone function version of this method:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
57
|
+
import { aaveV3ReserveOverview } from "@compass-labs/api-sdk/funcs/aaveV3ReserveOverview.js";
|
|
58
|
+
|
|
59
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
60
|
+
// You can create one instance of it to use across an application.
|
|
61
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
62
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
async function run() {
|
|
66
|
+
const res = await aaveV3ReserveOverview(compassApiSDK, {
|
|
67
|
+
chain: "arbitrum:mainnet",
|
|
68
|
+
token: "USDC",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
if (!res.ok) {
|
|
72
|
+
throw res.error;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const { value: result } = res;
|
|
76
|
+
|
|
77
|
+
// Handle the result
|
|
78
|
+
console.log(result);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
run();
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Parameters
|
|
85
|
+
|
|
86
|
+
| Parameter | Type | Required | Description |
|
|
87
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
88
|
+
| `request` | [operations.AaveReserveOverviewRequest](../../models/operations/aavereserveoverviewrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
89
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
90
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
91
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
92
|
+
|
|
93
|
+
### Response
|
|
94
|
+
|
|
95
|
+
**Promise\<[components.AaveReserveOverviewResponse](../../models/components/aavereserveoverviewresponse.md)\>**
|
|
96
|
+
|
|
97
|
+
### Errors
|
|
98
|
+
|
|
99
|
+
| Error Type | Status Code | Content Type |
|
|
100
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
101
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
102
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
103
|
+
|
|
19
104
|
## rate
|
|
20
105
|
|
|
21
106
|
Returns the latest APY and APR rates for a specified token on Aave, for both
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { CompassApiSDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Reserve overview
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Returns key metrics for Aave Reserves:
|
|
33
|
+
* - Total Supplied (TVL) in USD
|
|
34
|
+
* - Total Borrowed in USD
|
|
35
|
+
* - Utilization Ratio
|
|
36
|
+
*
|
|
37
|
+
* See below for more info:
|
|
38
|
+
*/
|
|
39
|
+
export function aaveV3ReserveOverview(
|
|
40
|
+
client: CompassApiSDKCore,
|
|
41
|
+
request: operations.AaveReserveOverviewRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<
|
|
44
|
+
Result<
|
|
45
|
+
components.AaveReserveOverviewResponse,
|
|
46
|
+
| errors.HTTPValidationError
|
|
47
|
+
| APIError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| ConnectionError
|
|
54
|
+
>
|
|
55
|
+
> {
|
|
56
|
+
return new APIPromise($do(
|
|
57
|
+
client,
|
|
58
|
+
request,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client: CompassApiSDKCore,
|
|
65
|
+
request: operations.AaveReserveOverviewRequest,
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): Promise<
|
|
68
|
+
[
|
|
69
|
+
Result<
|
|
70
|
+
components.AaveReserveOverviewResponse,
|
|
71
|
+
| errors.HTTPValidationError
|
|
72
|
+
| APIError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const parsed = safeParse(
|
|
84
|
+
request,
|
|
85
|
+
(value) =>
|
|
86
|
+
operations.AaveReserveOverviewRequest$outboundSchema.parse(value),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = null;
|
|
94
|
+
|
|
95
|
+
const path = pathToFunc("/v0/aave/reserve_overview/get")();
|
|
96
|
+
|
|
97
|
+
const query = encodeFormQuery({
|
|
98
|
+
"chain": payload.chain,
|
|
99
|
+
"token": payload.token,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
112
|
+
operationID: "aave_reserve_overview",
|
|
113
|
+
oAuth2Scopes: [],
|
|
114
|
+
|
|
115
|
+
resolvedSecurity: requestSecurity,
|
|
116
|
+
|
|
117
|
+
securitySource: client._options.apiKeyAuth,
|
|
118
|
+
retryConfig: options?.retries
|
|
119
|
+
|| client._options.retryConfig
|
|
120
|
+
|| { strategy: "none" },
|
|
121
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const requestRes = client._createRequest(context, {
|
|
125
|
+
security: requestSecurity,
|
|
126
|
+
method: "GET",
|
|
127
|
+
baseURL: options?.serverURL,
|
|
128
|
+
path: path,
|
|
129
|
+
headers: headers,
|
|
130
|
+
query: query,
|
|
131
|
+
body: body,
|
|
132
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
133
|
+
}, options);
|
|
134
|
+
if (!requestRes.ok) {
|
|
135
|
+
return [requestRes, { status: "invalid" }];
|
|
136
|
+
}
|
|
137
|
+
const req = requestRes.value;
|
|
138
|
+
|
|
139
|
+
const doResult = await client._do(req, {
|
|
140
|
+
context,
|
|
141
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
142
|
+
retryConfig: context.retryConfig,
|
|
143
|
+
retryCodes: context.retryCodes,
|
|
144
|
+
});
|
|
145
|
+
if (!doResult.ok) {
|
|
146
|
+
return [doResult, { status: "request-error", request: req }];
|
|
147
|
+
}
|
|
148
|
+
const response = doResult.value;
|
|
149
|
+
|
|
150
|
+
const responseFields = {
|
|
151
|
+
HttpMeta: { Response: response, Request: req },
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const [result] = await M.match<
|
|
155
|
+
components.AaveReserveOverviewResponse,
|
|
156
|
+
| errors.HTTPValidationError
|
|
157
|
+
| APIError
|
|
158
|
+
| SDKValidationError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| InvalidRequestError
|
|
161
|
+
| RequestAbortedError
|
|
162
|
+
| RequestTimeoutError
|
|
163
|
+
| ConnectionError
|
|
164
|
+
>(
|
|
165
|
+
M.json(200, components.AaveReserveOverviewResponse$inboundSchema),
|
|
166
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
167
|
+
M.fail("4XX"),
|
|
168
|
+
M.fail("5XX"),
|
|
169
|
+
)(response, { extraFields: responseFields });
|
|
170
|
+
if (!result.ok) {
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return [result, { status: "complete", request: req, response }];
|
|
175
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.1",
|
|
60
|
-
sdkVersion: "0.0.
|
|
60
|
+
sdkVersion: "0.0.23",
|
|
61
61
|
genVersion: "2.598.22",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.0.
|
|
63
|
+
"speakeasy-sdk/typescript 0.0.23 2.598.22 0.0.1 @compass-labs/api-sdk",
|
|
64
64
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { tool$aaveV3HistoricalTransactions } from "./tools/aaveV3HistoricalTrans
|
|
|
18
18
|
import { tool$aaveV3LiquidityChange } from "./tools/aaveV3LiquidityChange.js";
|
|
19
19
|
import { tool$aaveV3Rate } from "./tools/aaveV3Rate.js";
|
|
20
20
|
import { tool$aaveV3Repay } from "./tools/aaveV3Repay.js";
|
|
21
|
+
import { tool$aaveV3ReserveOverview } from "./tools/aaveV3ReserveOverview.js";
|
|
21
22
|
import { tool$aaveV3Supply } from "./tools/aaveV3Supply.js";
|
|
22
23
|
import { tool$aaveV3TokenPrice } from "./tools/aaveV3TokenPrice.js";
|
|
23
24
|
import { tool$aaveV3UserPositionPerToken } from "./tools/aaveV3UserPositionPerToken.js";
|
|
@@ -81,7 +82,7 @@ export function createMCPServer(deps: {
|
|
|
81
82
|
}) {
|
|
82
83
|
const server = new McpServer({
|
|
83
84
|
name: "CompassApiSDK",
|
|
84
|
-
version: "0.0.
|
|
85
|
+
version: "0.0.23",
|
|
85
86
|
});
|
|
86
87
|
|
|
87
88
|
const client = new CompassApiSDKCore({
|
|
@@ -111,6 +112,7 @@ export function createMCPServer(deps: {
|
|
|
111
112
|
const register = { tool, resource, resourceTemplate, prompt };
|
|
112
113
|
void register; // suppress unused warnings
|
|
113
114
|
|
|
115
|
+
tool(tool$aaveV3ReserveOverview);
|
|
114
116
|
tool(tool$aaveV3Rate);
|
|
115
117
|
tool(tool$aaveV3TokenPrice);
|
|
116
118
|
tool(tool$aaveV3LiquidityChange);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { aaveV3ReserveOverview } from "../../funcs/aaveV3ReserveOverview.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.AaveReserveOverviewRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$aaveV3ReserveOverview: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "aave-v3-reserve-overview",
|
|
15
|
+
description: `Reserve overview
|
|
16
|
+
|
|
17
|
+
Returns key metrics for Aave Reserves:
|
|
18
|
+
- Total Supplied (TVL) in USD
|
|
19
|
+
- Total Borrowed in USD
|
|
20
|
+
- Utilization Ratio
|
|
21
|
+
|
|
22
|
+
See below for more info:`,
|
|
23
|
+
args,
|
|
24
|
+
tool: async (client, args, ctx) => {
|
|
25
|
+
const [result, apiCall] = await aaveV3ReserveOverview(
|
|
26
|
+
client,
|
|
27
|
+
args.request,
|
|
28
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
29
|
+
).$inspect();
|
|
30
|
+
|
|
31
|
+
if (!result.ok) {
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: "text", text: result.error.message }],
|
|
34
|
+
isError: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const value = result.value;
|
|
39
|
+
|
|
40
|
+
return formatResult(value, apiCall);
|
|
41
|
+
},
|
|
42
|
+
};
|