@compass-labs/api-sdk 0.5.48 → 0.5.50

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.
Files changed (150) hide show
  1. package/FUNCTIONS.md +3 -3
  2. package/README.md +10 -6
  3. package/bin/mcp-server.js +916 -552
  4. package/bin/mcp-server.js.map +18 -8
  5. package/dist/commonjs/funcs/aaveV3AaveSupportedTokens.d.ts +25 -0
  6. package/dist/commonjs/funcs/aaveV3AaveSupportedTokens.d.ts.map +1 -0
  7. package/dist/commonjs/funcs/aaveV3AaveSupportedTokens.js +129 -0
  8. package/dist/commonjs/funcs/aaveV3AaveSupportedTokens.js.map +1 -0
  9. package/dist/commonjs/funcs/universalSupportedChains.d.ts +19 -0
  10. package/dist/commonjs/funcs/universalSupportedChains.d.ts.map +1 -0
  11. package/dist/commonjs/funcs/universalSupportedChains.js +122 -0
  12. package/dist/commonjs/funcs/universalSupportedChains.js.map +1 -0
  13. package/dist/commonjs/lib/config.d.ts +2 -2
  14. package/dist/commonjs/lib/config.js +2 -2
  15. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  16. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  17. package/dist/commonjs/mcp-server/server.js +5 -1
  18. package/dist/commonjs/mcp-server/server.js.map +1 -1
  19. package/dist/commonjs/mcp-server/tools/aaveV3AaveSupportedTokens.d.ts +8 -0
  20. package/dist/commonjs/mcp-server/tools/aaveV3AaveSupportedTokens.d.ts.map +1 -0
  21. package/dist/commonjs/mcp-server/tools/aaveV3AaveSupportedTokens.js +70 -0
  22. package/dist/commonjs/mcp-server/tools/aaveV3AaveSupportedTokens.js.map +1 -0
  23. package/dist/commonjs/mcp-server/tools/universalSupportedChains.d.ts +8 -0
  24. package/dist/commonjs/mcp-server/tools/universalSupportedChains.d.ts.map +1 -0
  25. package/dist/commonjs/mcp-server/tools/universalSupportedChains.js +64 -0
  26. package/dist/commonjs/mcp-server/tools/universalSupportedChains.js.map +1 -0
  27. package/dist/commonjs/models/components/aavesupportedtokenmetadata.d.ts +47 -0
  28. package/dist/commonjs/models/components/aavesupportedtokenmetadata.d.ts.map +1 -0
  29. package/dist/commonjs/models/components/aavesupportedtokenmetadata.js +86 -0
  30. package/dist/commonjs/models/components/aavesupportedtokenmetadata.js.map +1 -0
  31. package/dist/commonjs/models/components/aavesupportedtokensresponse.d.ts +33 -0
  32. package/dist/commonjs/models/components/aavesupportedtokensresponse.d.ts.map +1 -0
  33. package/dist/commonjs/models/components/aavesupportedtokensresponse.js +70 -0
  34. package/dist/commonjs/models/components/aavesupportedtokensresponse.js.map +1 -0
  35. package/dist/commonjs/models/components/index.d.ts +4 -0
  36. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/index.js +4 -0
  38. package/dist/commonjs/models/components/index.js.map +1 -1
  39. package/dist/commonjs/models/components/protocol.d.ts +40 -0
  40. package/dist/commonjs/models/components/protocol.d.ts.map +1 -0
  41. package/dist/commonjs/models/components/protocol.js +65 -0
  42. package/dist/commonjs/models/components/protocol.js.map +1 -0
  43. package/dist/commonjs/models/components/supportedchaininfo.d.ts +33 -0
  44. package/dist/commonjs/models/components/supportedchaininfo.d.ts.map +1 -0
  45. package/dist/commonjs/models/components/supportedchaininfo.js +70 -0
  46. package/dist/commonjs/models/components/supportedchaininfo.js.map +1 -0
  47. package/dist/commonjs/models/operations/aaveaavesupportedtokens.d.ts +72 -0
  48. package/dist/commonjs/models/operations/aaveaavesupportedtokens.d.ts.map +1 -0
  49. package/dist/commonjs/models/operations/aaveaavesupportedtokens.js +94 -0
  50. package/dist/commonjs/models/operations/aaveaavesupportedtokens.js.map +1 -0
  51. package/dist/commonjs/models/operations/genericsupportedchains.d.ts +33 -0
  52. package/dist/commonjs/models/operations/genericsupportedchains.d.ts.map +1 -0
  53. package/dist/commonjs/models/operations/genericsupportedchains.js +70 -0
  54. package/dist/commonjs/models/operations/genericsupportedchains.js.map +1 -0
  55. package/dist/commonjs/models/operations/index.d.ts +2 -0
  56. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  57. package/dist/commonjs/models/operations/index.js +2 -0
  58. package/dist/commonjs/models/operations/index.js.map +1 -1
  59. package/dist/commonjs/sdk/aavev3.d.ts +13 -0
  60. package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
  61. package/dist/commonjs/sdk/aavev3.js +16 -0
  62. package/dist/commonjs/sdk/aavev3.js.map +1 -1
  63. package/dist/commonjs/sdk/universal.d.ts +7 -0
  64. package/dist/commonjs/sdk/universal.d.ts.map +1 -1
  65. package/dist/commonjs/sdk/universal.js +10 -0
  66. package/dist/commonjs/sdk/universal.js.map +1 -1
  67. package/dist/esm/funcs/aaveV3AaveSupportedTokens.d.ts +25 -0
  68. package/dist/esm/funcs/aaveV3AaveSupportedTokens.d.ts.map +1 -0
  69. package/dist/esm/funcs/aaveV3AaveSupportedTokens.js +93 -0
  70. package/dist/esm/funcs/aaveV3AaveSupportedTokens.js.map +1 -0
  71. package/dist/esm/funcs/universalSupportedChains.d.ts +19 -0
  72. package/dist/esm/funcs/universalSupportedChains.d.ts.map +1 -0
  73. package/dist/esm/funcs/universalSupportedChains.js +86 -0
  74. package/dist/esm/funcs/universalSupportedChains.js.map +1 -0
  75. package/dist/esm/lib/config.d.ts +2 -2
  76. package/dist/esm/lib/config.js +2 -2
  77. package/dist/esm/mcp-server/mcp-server.js +1 -1
  78. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  79. package/dist/esm/mcp-server/server.js +5 -1
  80. package/dist/esm/mcp-server/server.js.map +1 -1
  81. package/dist/esm/mcp-server/tools/aaveV3AaveSupportedTokens.d.ts +8 -0
  82. package/dist/esm/mcp-server/tools/aaveV3AaveSupportedTokens.d.ts.map +1 -0
  83. package/dist/esm/mcp-server/tools/aaveV3AaveSupportedTokens.js +34 -0
  84. package/dist/esm/mcp-server/tools/aaveV3AaveSupportedTokens.js.map +1 -0
  85. package/dist/esm/mcp-server/tools/universalSupportedChains.d.ts +8 -0
  86. package/dist/esm/mcp-server/tools/universalSupportedChains.d.ts.map +1 -0
  87. package/dist/esm/mcp-server/tools/universalSupportedChains.js +28 -0
  88. package/dist/esm/mcp-server/tools/universalSupportedChains.js.map +1 -0
  89. package/dist/esm/models/components/aavesupportedtokenmetadata.d.ts +47 -0
  90. package/dist/esm/models/components/aavesupportedtokenmetadata.d.ts.map +1 -0
  91. package/dist/esm/models/components/aavesupportedtokenmetadata.js +48 -0
  92. package/dist/esm/models/components/aavesupportedtokenmetadata.js.map +1 -0
  93. package/dist/esm/models/components/aavesupportedtokensresponse.d.ts +33 -0
  94. package/dist/esm/models/components/aavesupportedtokensresponse.d.ts.map +1 -0
  95. package/dist/esm/models/components/aavesupportedtokensresponse.js +32 -0
  96. package/dist/esm/models/components/aavesupportedtokensresponse.js.map +1 -0
  97. package/dist/esm/models/components/index.d.ts +4 -0
  98. package/dist/esm/models/components/index.d.ts.map +1 -1
  99. package/dist/esm/models/components/index.js +4 -0
  100. package/dist/esm/models/components/index.js.map +1 -1
  101. package/dist/esm/models/components/protocol.d.ts +40 -0
  102. package/dist/esm/models/components/protocol.d.ts.map +1 -0
  103. package/dist/esm/models/components/protocol.js +29 -0
  104. package/dist/esm/models/components/protocol.js.map +1 -0
  105. package/dist/esm/models/components/supportedchaininfo.d.ts +33 -0
  106. package/dist/esm/models/components/supportedchaininfo.d.ts.map +1 -0
  107. package/dist/esm/models/components/supportedchaininfo.js +32 -0
  108. package/dist/esm/models/components/supportedchaininfo.js.map +1 -0
  109. package/dist/esm/models/operations/aaveaavesupportedtokens.d.ts +72 -0
  110. package/dist/esm/models/operations/aaveaavesupportedtokens.d.ts.map +1 -0
  111. package/dist/esm/models/operations/aaveaavesupportedtokens.js +56 -0
  112. package/dist/esm/models/operations/aaveaavesupportedtokens.js.map +1 -0
  113. package/dist/esm/models/operations/genericsupportedchains.d.ts +33 -0
  114. package/dist/esm/models/operations/genericsupportedchains.d.ts.map +1 -0
  115. package/dist/esm/models/operations/genericsupportedchains.js +32 -0
  116. package/dist/esm/models/operations/genericsupportedchains.js.map +1 -0
  117. package/dist/esm/models/operations/index.d.ts +2 -0
  118. package/dist/esm/models/operations/index.d.ts.map +1 -1
  119. package/dist/esm/models/operations/index.js +2 -0
  120. package/dist/esm/models/operations/index.js.map +1 -1
  121. package/dist/esm/sdk/aavev3.d.ts +13 -0
  122. package/dist/esm/sdk/aavev3.d.ts.map +1 -1
  123. package/dist/esm/sdk/aavev3.js +16 -0
  124. package/dist/esm/sdk/aavev3.js.map +1 -1
  125. package/dist/esm/sdk/universal.d.ts +7 -0
  126. package/dist/esm/sdk/universal.d.ts.map +1 -1
  127. package/dist/esm/sdk/universal.js +10 -0
  128. package/dist/esm/sdk/universal.js.map +1 -1
  129. package/docs/sdks/aavev3/README.md +76 -0
  130. package/docs/sdks/universal/README.md +70 -0
  131. package/examples/{aaveV3Rate.example.ts → aaveV3AaveSupportedTokens.example.ts} +2 -2
  132. package/jsr.json +1 -1
  133. package/package.json +1 -1
  134. package/src/funcs/aaveV3AaveSupportedTokens.ts +182 -0
  135. package/src/funcs/universalSupportedChains.ts +175 -0
  136. package/src/lib/config.ts +2 -2
  137. package/src/mcp-server/mcp-server.ts +1 -1
  138. package/src/mcp-server/server.ts +5 -1
  139. package/src/mcp-server/tools/aaveV3AaveSupportedTokens.ts +43 -0
  140. package/src/mcp-server/tools/universalSupportedChains.ts +37 -0
  141. package/src/models/components/aavesupportedtokenmetadata.ts +101 -0
  142. package/src/models/components/aavesupportedtokensresponse.ts +77 -0
  143. package/src/models/components/index.ts +4 -0
  144. package/src/models/components/protocol.ts +35 -0
  145. package/src/models/components/supportedchaininfo.ts +70 -0
  146. package/src/models/operations/aaveaavesupportedtokens.ts +117 -0
  147. package/src/models/operations/genericsupportedchains.ts +72 -0
  148. package/src/models/operations/index.ts +2 -0
  149. package/src/sdk/aavev3.ts +24 -0
  150. package/src/sdk/universal.ts +18 -0
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { universalSupportedChains } from "../../funcs/universalSupportedChains.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GenericSupportedChainsRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$universalSupportedChains: ToolDefinition<typeof args> = {
14
+ name: "universal-supported-chains",
15
+ description: `List Supported Chains
16
+
17
+ Get the list of supported chains by the Compass API.`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await universalSupportedChains(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -0,0 +1,101 @@
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 AaveSupportedTokenMetadata = {
12
+ /**
13
+ * Token symbol (e.g., 'WETH', 'DAI').
14
+ */
15
+ symbol: string;
16
+ /**
17
+ * Token contract address.
18
+ */
19
+ address: string;
20
+ /**
21
+ * Whether the token can be used as collateral.
22
+ */
23
+ supplyingEnabled: boolean;
24
+ /**
25
+ * Whether the token can be borrowed.
26
+ */
27
+ borrowingEnabled: boolean;
28
+ };
29
+
30
+ /** @internal */
31
+ export const AaveSupportedTokenMetadata$inboundSchema: z.ZodType<
32
+ AaveSupportedTokenMetadata,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ symbol: z.string(),
37
+ address: z.string(),
38
+ supplying_enabled: z.boolean(),
39
+ borrowing_enabled: z.boolean(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ "supplying_enabled": "supplyingEnabled",
43
+ "borrowing_enabled": "borrowingEnabled",
44
+ });
45
+ });
46
+
47
+ /** @internal */
48
+ export type AaveSupportedTokenMetadata$Outbound = {
49
+ symbol: string;
50
+ address: string;
51
+ supplying_enabled: boolean;
52
+ borrowing_enabled: boolean;
53
+ };
54
+
55
+ /** @internal */
56
+ export const AaveSupportedTokenMetadata$outboundSchema: z.ZodType<
57
+ AaveSupportedTokenMetadata$Outbound,
58
+ z.ZodTypeDef,
59
+ AaveSupportedTokenMetadata
60
+ > = z.object({
61
+ symbol: z.string(),
62
+ address: z.string(),
63
+ supplyingEnabled: z.boolean(),
64
+ borrowingEnabled: z.boolean(),
65
+ }).transform((v) => {
66
+ return remap$(v, {
67
+ supplyingEnabled: "supplying_enabled",
68
+ borrowingEnabled: "borrowing_enabled",
69
+ });
70
+ });
71
+
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 namespace AaveSupportedTokenMetadata$ {
77
+ /** @deprecated use `AaveSupportedTokenMetadata$inboundSchema` instead. */
78
+ export const inboundSchema = AaveSupportedTokenMetadata$inboundSchema;
79
+ /** @deprecated use `AaveSupportedTokenMetadata$outboundSchema` instead. */
80
+ export const outboundSchema = AaveSupportedTokenMetadata$outboundSchema;
81
+ /** @deprecated use `AaveSupportedTokenMetadata$Outbound` instead. */
82
+ export type Outbound = AaveSupportedTokenMetadata$Outbound;
83
+ }
84
+
85
+ export function aaveSupportedTokenMetadataToJSON(
86
+ aaveSupportedTokenMetadata: AaveSupportedTokenMetadata,
87
+ ): string {
88
+ return JSON.stringify(
89
+ AaveSupportedTokenMetadata$outboundSchema.parse(aaveSupportedTokenMetadata),
90
+ );
91
+ }
92
+
93
+ export function aaveSupportedTokenMetadataFromJSON(
94
+ jsonString: string,
95
+ ): SafeParseResult<AaveSupportedTokenMetadata, SDKValidationError> {
96
+ return safeParse(
97
+ jsonString,
98
+ (x) => AaveSupportedTokenMetadata$inboundSchema.parse(JSON.parse(x)),
99
+ `Failed to parse 'AaveSupportedTokenMetadata' from JSON`,
100
+ );
101
+ }
@@ -0,0 +1,77 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ AaveSupportedTokenMetadata,
11
+ AaveSupportedTokenMetadata$inboundSchema,
12
+ AaveSupportedTokenMetadata$Outbound,
13
+ AaveSupportedTokenMetadata$outboundSchema,
14
+ } from "./aavesupportedtokenmetadata.js";
15
+
16
+ export type AaveSupportedTokensResponse = {
17
+ /**
18
+ * List of supported tokens with configuration metadata for a given chain.
19
+ */
20
+ tokens: Array<AaveSupportedTokenMetadata>;
21
+ };
22
+
23
+ /** @internal */
24
+ export const AaveSupportedTokensResponse$inboundSchema: z.ZodType<
25
+ AaveSupportedTokensResponse,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ tokens: z.array(AaveSupportedTokenMetadata$inboundSchema),
30
+ });
31
+
32
+ /** @internal */
33
+ export type AaveSupportedTokensResponse$Outbound = {
34
+ tokens: Array<AaveSupportedTokenMetadata$Outbound>;
35
+ };
36
+
37
+ /** @internal */
38
+ export const AaveSupportedTokensResponse$outboundSchema: z.ZodType<
39
+ AaveSupportedTokensResponse$Outbound,
40
+ z.ZodTypeDef,
41
+ AaveSupportedTokensResponse
42
+ > = z.object({
43
+ tokens: z.array(AaveSupportedTokenMetadata$outboundSchema),
44
+ });
45
+
46
+ /**
47
+ * @internal
48
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
+ */
50
+ export namespace AaveSupportedTokensResponse$ {
51
+ /** @deprecated use `AaveSupportedTokensResponse$inboundSchema` instead. */
52
+ export const inboundSchema = AaveSupportedTokensResponse$inboundSchema;
53
+ /** @deprecated use `AaveSupportedTokensResponse$outboundSchema` instead. */
54
+ export const outboundSchema = AaveSupportedTokensResponse$outboundSchema;
55
+ /** @deprecated use `AaveSupportedTokensResponse$Outbound` instead. */
56
+ export type Outbound = AaveSupportedTokensResponse$Outbound;
57
+ }
58
+
59
+ export function aaveSupportedTokensResponseToJSON(
60
+ aaveSupportedTokensResponse: AaveSupportedTokensResponse,
61
+ ): string {
62
+ return JSON.stringify(
63
+ AaveSupportedTokensResponse$outboundSchema.parse(
64
+ aaveSupportedTokensResponse,
65
+ ),
66
+ );
67
+ }
68
+
69
+ export function aaveSupportedTokensResponseFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<AaveSupportedTokensResponse, SDKValidationError> {
72
+ return safeParse(
73
+ jsonString,
74
+ (x) => AaveSupportedTokensResponse$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'AaveSupportedTokensResponse' from JSON`,
76
+ );
77
+ }
@@ -15,6 +15,8 @@ export * from "./aavereserveoverviewresponse.js";
15
15
  export * from "./aavestdrateresponse.js";
16
16
  export * from "./aavesupplyparams.js";
17
17
  export * from "./aavesupplyrequest.js";
18
+ export * from "./aavesupportedtokenmetadata.js";
19
+ export * from "./aavesupportedtokensresponse.js";
18
20
  export * from "./aavetokenpriceresponse.js";
19
21
  export * from "./aaveuserpositionpertokenresponse.js";
20
22
  export * from "./aaveuserpositionsummaryresponse.js";
@@ -114,6 +116,7 @@ export * from "./pendlesellytparams.js";
114
116
  export * from "./pendlesellytrequest.js";
115
117
  export * from "./portfolio.js";
116
118
  export * from "./position.js";
119
+ export * from "./protocol.js";
117
120
  export * from "./redeemunderlying.js";
118
121
  export * from "./repay.js";
119
122
  export * from "./reserve.js";
@@ -131,6 +134,7 @@ export * from "./skysellrequest.js";
131
134
  export * from "./skywithdrawparams.js";
132
135
  export * from "./skywithdrawrequest.js";
133
136
  export * from "./supply.js";
137
+ export * from "./supportedchaininfo.js";
134
138
  export * from "./swapborrowrate.js";
135
139
  export * from "./syposition.js";
136
140
  export * from "./tokenaddressresponse.js";
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const Protocol = {
9
+ Aave: "aave",
10
+ Aerodrome: "aerodrome",
11
+ Morpho: "morpho",
12
+ Sky: "sky",
13
+ Uniswap: "uniswap",
14
+ Pendle: "pendle",
15
+ } as const;
16
+ export type Protocol = ClosedEnum<typeof Protocol>;
17
+
18
+ /** @internal */
19
+ export const Protocol$inboundSchema: z.ZodNativeEnum<typeof Protocol> = z
20
+ .nativeEnum(Protocol);
21
+
22
+ /** @internal */
23
+ export const Protocol$outboundSchema: z.ZodNativeEnum<typeof Protocol> =
24
+ Protocol$inboundSchema;
25
+
26
+ /**
27
+ * @internal
28
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
29
+ */
30
+ export namespace Protocol$ {
31
+ /** @deprecated use `Protocol$inboundSchema` instead. */
32
+ export const inboundSchema = Protocol$inboundSchema;
33
+ /** @deprecated use `Protocol$outboundSchema` instead. */
34
+ export const outboundSchema = Protocol$outboundSchema;
35
+ }
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
10
+
11
+ /**
12
+ * Response model for a chain.
13
+ */
14
+ export type SupportedChainInfo = {
15
+ chains: Array<Chain>;
16
+ };
17
+
18
+ /** @internal */
19
+ export const SupportedChainInfo$inboundSchema: z.ZodType<
20
+ SupportedChainInfo,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ chains: z.array(Chain$inboundSchema),
25
+ });
26
+
27
+ /** @internal */
28
+ export type SupportedChainInfo$Outbound = {
29
+ chains: Array<string>;
30
+ };
31
+
32
+ /** @internal */
33
+ export const SupportedChainInfo$outboundSchema: z.ZodType<
34
+ SupportedChainInfo$Outbound,
35
+ z.ZodTypeDef,
36
+ SupportedChainInfo
37
+ > = z.object({
38
+ chains: z.array(Chain$outboundSchema),
39
+ });
40
+
41
+ /**
42
+ * @internal
43
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
44
+ */
45
+ export namespace SupportedChainInfo$ {
46
+ /** @deprecated use `SupportedChainInfo$inboundSchema` instead. */
47
+ export const inboundSchema = SupportedChainInfo$inboundSchema;
48
+ /** @deprecated use `SupportedChainInfo$outboundSchema` instead. */
49
+ export const outboundSchema = SupportedChainInfo$outboundSchema;
50
+ /** @deprecated use `SupportedChainInfo$Outbound` instead. */
51
+ export type Outbound = SupportedChainInfo$Outbound;
52
+ }
53
+
54
+ export function supportedChainInfoToJSON(
55
+ supportedChainInfo: SupportedChainInfo,
56
+ ): string {
57
+ return JSON.stringify(
58
+ SupportedChainInfo$outboundSchema.parse(supportedChainInfo),
59
+ );
60
+ }
61
+
62
+ export function supportedChainInfoFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<SupportedChainInfo, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => SupportedChainInfo$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'SupportedChainInfo' from JSON`,
69
+ );
70
+ }
@@ -0,0 +1,117 @@
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 AaveAaveSupportedTokensChain = {
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 AaveAaveSupportedTokensChain = ClosedEnum<
23
+ typeof AaveAaveSupportedTokensChain
24
+ >;
25
+
26
+ export type AaveAaveSupportedTokensRequest = {
27
+ /**
28
+ * The chain to use.
29
+ */
30
+ chain?: AaveAaveSupportedTokensChain | undefined;
31
+ /**
32
+ * Optional block number (defaults to latest).
33
+ */
34
+ block?: number | null | undefined;
35
+ };
36
+
37
+ /** @internal */
38
+ export const AaveAaveSupportedTokensChain$inboundSchema: z.ZodNativeEnum<
39
+ typeof AaveAaveSupportedTokensChain
40
+ > = z.nativeEnum(AaveAaveSupportedTokensChain);
41
+
42
+ /** @internal */
43
+ export const AaveAaveSupportedTokensChain$outboundSchema: z.ZodNativeEnum<
44
+ typeof AaveAaveSupportedTokensChain
45
+ > = AaveAaveSupportedTokensChain$inboundSchema;
46
+
47
+ /**
48
+ * @internal
49
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
+ */
51
+ export namespace AaveAaveSupportedTokensChain$ {
52
+ /** @deprecated use `AaveAaveSupportedTokensChain$inboundSchema` instead. */
53
+ export const inboundSchema = AaveAaveSupportedTokensChain$inboundSchema;
54
+ /** @deprecated use `AaveAaveSupportedTokensChain$outboundSchema` instead. */
55
+ export const outboundSchema = AaveAaveSupportedTokensChain$outboundSchema;
56
+ }
57
+
58
+ /** @internal */
59
+ export const AaveAaveSupportedTokensRequest$inboundSchema: z.ZodType<
60
+ AaveAaveSupportedTokensRequest,
61
+ z.ZodTypeDef,
62
+ unknown
63
+ > = z.object({
64
+ chain: AaveAaveSupportedTokensChain$inboundSchema.default("arbitrum:mainnet"),
65
+ block: z.nullable(z.number().int()).optional(),
66
+ });
67
+
68
+ /** @internal */
69
+ export type AaveAaveSupportedTokensRequest$Outbound = {
70
+ chain: string;
71
+ block?: number | null | undefined;
72
+ };
73
+
74
+ /** @internal */
75
+ export const AaveAaveSupportedTokensRequest$outboundSchema: z.ZodType<
76
+ AaveAaveSupportedTokensRequest$Outbound,
77
+ z.ZodTypeDef,
78
+ AaveAaveSupportedTokensRequest
79
+ > = z.object({
80
+ chain: AaveAaveSupportedTokensChain$outboundSchema.default(
81
+ "arbitrum:mainnet",
82
+ ),
83
+ block: z.nullable(z.number().int()).optional(),
84
+ });
85
+
86
+ /**
87
+ * @internal
88
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
89
+ */
90
+ export namespace AaveAaveSupportedTokensRequest$ {
91
+ /** @deprecated use `AaveAaveSupportedTokensRequest$inboundSchema` instead. */
92
+ export const inboundSchema = AaveAaveSupportedTokensRequest$inboundSchema;
93
+ /** @deprecated use `AaveAaveSupportedTokensRequest$outboundSchema` instead. */
94
+ export const outboundSchema = AaveAaveSupportedTokensRequest$outboundSchema;
95
+ /** @deprecated use `AaveAaveSupportedTokensRequest$Outbound` instead. */
96
+ export type Outbound = AaveAaveSupportedTokensRequest$Outbound;
97
+ }
98
+
99
+ export function aaveAaveSupportedTokensRequestToJSON(
100
+ aaveAaveSupportedTokensRequest: AaveAaveSupportedTokensRequest,
101
+ ): string {
102
+ return JSON.stringify(
103
+ AaveAaveSupportedTokensRequest$outboundSchema.parse(
104
+ aaveAaveSupportedTokensRequest,
105
+ ),
106
+ );
107
+ }
108
+
109
+ export function aaveAaveSupportedTokensRequestFromJSON(
110
+ jsonString: string,
111
+ ): SafeParseResult<AaveAaveSupportedTokensRequest, SDKValidationError> {
112
+ return safeParse(
113
+ jsonString,
114
+ (x) => AaveAaveSupportedTokensRequest$inboundSchema.parse(JSON.parse(x)),
115
+ `Failed to parse 'AaveAaveSupportedTokensRequest' from JSON`,
116
+ );
117
+ }
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as components from "../components/index.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type GenericSupportedChainsRequest = {
12
+ /**
13
+ * The protocol to get the supported chains for.
14
+ */
15
+ protocol?: components.Protocol | null | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export const GenericSupportedChainsRequest$inboundSchema: z.ZodType<
20
+ GenericSupportedChainsRequest,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ protocol: z.nullable(components.Protocol$inboundSchema).optional(),
25
+ });
26
+
27
+ /** @internal */
28
+ export type GenericSupportedChainsRequest$Outbound = {
29
+ protocol?: string | null | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export const GenericSupportedChainsRequest$outboundSchema: z.ZodType<
34
+ GenericSupportedChainsRequest$Outbound,
35
+ z.ZodTypeDef,
36
+ GenericSupportedChainsRequest
37
+ > = z.object({
38
+ protocol: z.nullable(components.Protocol$outboundSchema).optional(),
39
+ });
40
+
41
+ /**
42
+ * @internal
43
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
44
+ */
45
+ export namespace GenericSupportedChainsRequest$ {
46
+ /** @deprecated use `GenericSupportedChainsRequest$inboundSchema` instead. */
47
+ export const inboundSchema = GenericSupportedChainsRequest$inboundSchema;
48
+ /** @deprecated use `GenericSupportedChainsRequest$outboundSchema` instead. */
49
+ export const outboundSchema = GenericSupportedChainsRequest$outboundSchema;
50
+ /** @deprecated use `GenericSupportedChainsRequest$Outbound` instead. */
51
+ export type Outbound = GenericSupportedChainsRequest$Outbound;
52
+ }
53
+
54
+ export function genericSupportedChainsRequestToJSON(
55
+ genericSupportedChainsRequest: GenericSupportedChainsRequest,
56
+ ): string {
57
+ return JSON.stringify(
58
+ GenericSupportedChainsRequest$outboundSchema.parse(
59
+ genericSupportedChainsRequest,
60
+ ),
61
+ );
62
+ }
63
+
64
+ export function genericSupportedChainsRequestFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<GenericSupportedChainsRequest, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => GenericSupportedChainsRequest$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'GenericSupportedChainsRequest' from JSON`,
71
+ );
72
+ }
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./aaveaavesupportedtokens.js";
5
6
  export * from "./aaveavgrate.js";
6
7
  export * from "./aavehistoricaltransactions.js";
7
8
  export * from "./aaveliquiditychange.js";
@@ -16,6 +17,7 @@ export * from "./aerodromeslipstreampoolprice.js";
16
17
  export * from "./genericallowance.js";
17
18
  export * from "./genericens.js";
18
19
  export * from "./genericportfolio.js";
20
+ export * from "./genericsupportedchains.js";
19
21
  export * from "./genericsupportedtokens.js";
20
22
  export * from "./genericvisualizeportfolio.js";
21
23
  export * from "./morphomarket.js";
package/src/sdk/aavev3.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { aaveV3AaveSupportedTokens } from "../funcs/aaveV3AaveSupportedTokens.js";
5
6
  import { aaveV3AvgRate } from "../funcs/aaveV3AvgRate.js";
6
7
  import { aaveV3Borrow } from "../funcs/aaveV3Borrow.js";
7
8
  import { aaveV3HistoricalTransactions } from "../funcs/aaveV3HistoricalTransactions.js";
@@ -21,6 +22,29 @@ import * as operations from "../models/operations/index.js";
21
22
  import { unwrapAsync } from "../types/fp.js";
22
23
 
23
24
  export class AaveV3 extends ClientSDK {
25
+ /**
26
+ * Aave Supported Tokens
27
+ *
28
+ * @remarks
29
+ * Returns the list of supported tokens on Aave for the specified network, along
30
+ * with key metadata.
31
+ *
32
+ * For each token, the response includes:
33
+ * - The symbol and contract address.
34
+ * - Whether the token is currently enabled for supplying (depositing).
35
+ * - Whether it is enabled for borrowing.
36
+ */
37
+ async aaveSupportedTokens(
38
+ request: operations.AaveAaveSupportedTokensRequest,
39
+ options?: RequestOptions,
40
+ ): Promise<components.AaveSupportedTokensResponse> {
41
+ return unwrapAsync(aaveV3AaveSupportedTokens(
42
+ this,
43
+ request,
44
+ options,
45
+ ));
46
+ }
47
+
24
48
  /**
25
49
  * Interest Rates
26
50
  *
@@ -6,6 +6,7 @@ import { universalAllowance } from "../funcs/universalAllowance.js";
6
6
  import { universalAllowanceSet } from "../funcs/universalAllowanceSet.js";
7
7
  import { universalEns } from "../funcs/universalEns.js";
8
8
  import { universalPortfolio } from "../funcs/universalPortfolio.js";
9
+ import { universalSupportedChains } from "../funcs/universalSupportedChains.js";
9
10
  import { universalSupportedTokens } from "../funcs/universalSupportedTokens.js";
10
11
  import { universalUnwrapWeth } from "../funcs/universalUnwrapWeth.js";
11
12
  import { universalVisualizePortfolio } from "../funcs/universalVisualizePortfolio.js";
@@ -74,6 +75,23 @@ export class Universal extends ClientSDK {
74
75
  ));
75
76
  }
76
77
 
78
+ /**
79
+ * List Supported Chains
80
+ *
81
+ * @remarks
82
+ * Get the list of supported chains by the Compass API.
83
+ */
84
+ async supportedChains(
85
+ request: operations.GenericSupportedChainsRequest,
86
+ options?: RequestOptions,
87
+ ): Promise<components.SupportedChainInfo> {
88
+ return unwrapAsync(universalSupportedChains(
89
+ this,
90
+ request,
91
+ options,
92
+ ));
93
+ }
94
+
77
95
  /**
78
96
  * Get Allowance
79
97
  *