@compass-labs/api-sdk 0.5.49 → 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.
- package/README.md +2 -0
- package/bin/mcp-server.js +199 -33
- package/bin/mcp-server.js.map +13 -8
- package/dist/commonjs/funcs/universalSupportedChains.d.ts +19 -0
- package/dist/commonjs/funcs/universalSupportedChains.d.ts.map +1 -0
- package/dist/commonjs/funcs/universalSupportedChains.js +122 -0
- package/dist/commonjs/funcs/universalSupportedChains.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/universalSupportedChains.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/universalSupportedChains.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/universalSupportedChains.js +64 -0
- package/dist/commonjs/mcp-server/tools/universalSupportedChains.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/components/protocol.d.ts +40 -0
- package/dist/commonjs/models/components/protocol.d.ts.map +1 -0
- package/dist/commonjs/models/components/protocol.js +65 -0
- package/dist/commonjs/models/components/protocol.js.map +1 -0
- package/dist/commonjs/models/components/supportedchaininfo.d.ts +33 -0
- package/dist/commonjs/models/components/supportedchaininfo.d.ts.map +1 -0
- package/dist/commonjs/models/components/supportedchaininfo.js +70 -0
- package/dist/commonjs/models/components/supportedchaininfo.js.map +1 -0
- package/dist/commonjs/models/operations/genericsupportedchains.d.ts +33 -0
- package/dist/commonjs/models/operations/genericsupportedchains.d.ts.map +1 -0
- package/dist/commonjs/models/operations/genericsupportedchains.js +70 -0
- package/dist/commonjs/models/operations/genericsupportedchains.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/universal.d.ts +7 -0
- package/dist/commonjs/sdk/universal.d.ts.map +1 -1
- package/dist/commonjs/sdk/universal.js +10 -0
- package/dist/commonjs/sdk/universal.js.map +1 -1
- package/dist/esm/funcs/universalSupportedChains.d.ts +19 -0
- package/dist/esm/funcs/universalSupportedChains.d.ts.map +1 -0
- package/dist/esm/funcs/universalSupportedChains.js +86 -0
- package/dist/esm/funcs/universalSupportedChains.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/universalSupportedChains.d.ts +8 -0
- package/dist/esm/mcp-server/tools/universalSupportedChains.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/universalSupportedChains.js +28 -0
- package/dist/esm/mcp-server/tools/universalSupportedChains.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/components/protocol.d.ts +40 -0
- package/dist/esm/models/components/protocol.d.ts.map +1 -0
- package/dist/esm/models/components/protocol.js +29 -0
- package/dist/esm/models/components/protocol.js.map +1 -0
- package/dist/esm/models/components/supportedchaininfo.d.ts +33 -0
- package/dist/esm/models/components/supportedchaininfo.d.ts.map +1 -0
- package/dist/esm/models/components/supportedchaininfo.js +32 -0
- package/dist/esm/models/components/supportedchaininfo.js.map +1 -0
- package/dist/esm/models/operations/genericsupportedchains.d.ts +33 -0
- package/dist/esm/models/operations/genericsupportedchains.d.ts.map +1 -0
- package/dist/esm/models/operations/genericsupportedchains.js +32 -0
- package/dist/esm/models/operations/genericsupportedchains.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/universal.d.ts +7 -0
- package/dist/esm/sdk/universal.d.ts.map +1 -1
- package/dist/esm/sdk/universal.js +10 -0
- package/dist/esm/sdk/universal.js.map +1 -1
- package/docs/sdks/universal/README.md +70 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/universalSupportedChains.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/universalSupportedChains.ts +37 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/protocol.ts +35 -0
- package/src/models/components/supportedchaininfo.ts +70 -0
- package/src/models/operations/genericsupportedchains.ts +72 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/universal.ts +18 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
export const Protocol = {
|
|
6
|
+
Aave: "aave",
|
|
7
|
+
Aerodrome: "aerodrome",
|
|
8
|
+
Morpho: "morpho",
|
|
9
|
+
Sky: "sky",
|
|
10
|
+
Uniswap: "uniswap",
|
|
11
|
+
Pendle: "pendle",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const Protocol$inboundSchema = z
|
|
15
|
+
.nativeEnum(Protocol);
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const Protocol$outboundSchema = Protocol$inboundSchema;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
+
*/
|
|
22
|
+
export var Protocol$;
|
|
23
|
+
(function (Protocol$) {
|
|
24
|
+
/** @deprecated use `Protocol$inboundSchema` instead. */
|
|
25
|
+
Protocol$.inboundSchema = Protocol$inboundSchema;
|
|
26
|
+
/** @deprecated use `Protocol$outboundSchema` instead. */
|
|
27
|
+
Protocol$.outboundSchema = Protocol$outboundSchema;
|
|
28
|
+
})(Protocol$ || (Protocol$ = {}));
|
|
29
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../../src/models/components/protocol.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAGX,gBAAgB;AAChB,MAAM,CAAC,MAAM,sBAAsB,GAAqC,CAAC;KACtE,UAAU,CAAC,QAAQ,CAAC,CAAC;AAExB,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAClC,sBAAsB,CAAC;AAEzB;;;GAGG;AACH,MAAM,KAAW,SAAS,CAKzB;AALD,WAAiB,SAAS;IACxB,wDAAwD;IAC3C,uBAAa,GAAG,sBAAsB,CAAC;IACpD,yDAAyD;IAC5C,wBAAc,GAAG,uBAAuB,CAAC;AACxD,CAAC,EALgB,SAAS,KAAT,SAAS,QAKzB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import { Chain } from "./chain.js";
|
|
5
|
+
/**
|
|
6
|
+
* Response model for a chain.
|
|
7
|
+
*/
|
|
8
|
+
export type SupportedChainInfo = {
|
|
9
|
+
chains: Array<Chain>;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const SupportedChainInfo$inboundSchema: z.ZodType<SupportedChainInfo, z.ZodTypeDef, unknown>;
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type SupportedChainInfo$Outbound = {
|
|
15
|
+
chains: Array<string>;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const SupportedChainInfo$outboundSchema: z.ZodType<SupportedChainInfo$Outbound, z.ZodTypeDef, SupportedChainInfo>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace SupportedChainInfo$ {
|
|
24
|
+
/** @deprecated use `SupportedChainInfo$inboundSchema` instead. */
|
|
25
|
+
const inboundSchema: z.ZodType<SupportedChainInfo, z.ZodTypeDef, unknown>;
|
|
26
|
+
/** @deprecated use `SupportedChainInfo$outboundSchema` instead. */
|
|
27
|
+
const outboundSchema: z.ZodType<SupportedChainInfo$Outbound, z.ZodTypeDef, SupportedChainInfo>;
|
|
28
|
+
/** @deprecated use `SupportedChainInfo$Outbound` instead. */
|
|
29
|
+
type Outbound = SupportedChainInfo$Outbound;
|
|
30
|
+
}
|
|
31
|
+
export declare function supportedChainInfoToJSON(supportedChainInfo: SupportedChainInfo): string;
|
|
32
|
+
export declare function supportedChainInfoFromJSON(jsonString: string): SafeParseResult<SupportedChainInfo, SDKValidationError>;
|
|
33
|
+
//# sourceMappingURL=supportedchaininfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportedchaininfo.d.ts","sourceRoot":"","sources":["../../../../src/models/components/supportedchaininfo.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,KAAK,EAA6C,MAAM,YAAY,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAGP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACvB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAGlB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,mBAAmB,CAAC;IACnC,kEAAkE;IAC3D,MAAM,aAAa,sDAAmC,CAAC;IAC9D,mEAAmE;IAC5D,MAAM,cAAc,0EAAoC,CAAC;IAChE,6DAA6D;IAC7D,KAAY,QAAQ,GAAG,2BAA2B,CAAC;CACpD;AAED,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const SupportedChainInfo$inboundSchema = z.object({
|
|
9
|
+
chains: z.array(Chain$inboundSchema),
|
|
10
|
+
});
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const SupportedChainInfo$outboundSchema = z.object({
|
|
13
|
+
chains: z.array(Chain$outboundSchema),
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
|
+
*/
|
|
19
|
+
export var SupportedChainInfo$;
|
|
20
|
+
(function (SupportedChainInfo$) {
|
|
21
|
+
/** @deprecated use `SupportedChainInfo$inboundSchema` instead. */
|
|
22
|
+
SupportedChainInfo$.inboundSchema = SupportedChainInfo$inboundSchema;
|
|
23
|
+
/** @deprecated use `SupportedChainInfo$outboundSchema` instead. */
|
|
24
|
+
SupportedChainInfo$.outboundSchema = SupportedChainInfo$outboundSchema;
|
|
25
|
+
})(SupportedChainInfo$ || (SupportedChainInfo$ = {}));
|
|
26
|
+
export function supportedChainInfoToJSON(supportedChainInfo) {
|
|
27
|
+
return JSON.stringify(SupportedChainInfo$outboundSchema.parse(supportedChainInfo));
|
|
28
|
+
}
|
|
29
|
+
export function supportedChainInfoFromJSON(jsonString) {
|
|
30
|
+
return safeParse(jsonString, (x) => SupportedChainInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportedChainInfo' from JSON`);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=supportedchaininfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportedchaininfo.js","sourceRoot":"","sources":["../../../../src/models/components/supportedchaininfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAS,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAS9E,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;CACrC,CAAC,CAAC;AAOH,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;CACtC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,mBAAmB,CAOnC;AAPD,WAAiB,mBAAmB;IAClC,kEAAkE;IACrD,iCAAa,GAAG,gCAAgC,CAAC;IAC9D,mEAAmE;IACtD,kCAAc,GAAG,iCAAiC,CAAC;AAGlE,CAAC,EAPgB,mBAAmB,KAAnB,mBAAmB,QAOnC;AAED,MAAM,UAAU,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import * as components from "../components/index.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
export type GenericSupportedChainsRequest = {
|
|
6
|
+
/**
|
|
7
|
+
* The protocol to get the supported chains for.
|
|
8
|
+
*/
|
|
9
|
+
protocol?: components.Protocol | null | undefined;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const GenericSupportedChainsRequest$inboundSchema: z.ZodType<GenericSupportedChainsRequest, z.ZodTypeDef, unknown>;
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type GenericSupportedChainsRequest$Outbound = {
|
|
15
|
+
protocol?: string | null | undefined;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const GenericSupportedChainsRequest$outboundSchema: z.ZodType<GenericSupportedChainsRequest$Outbound, z.ZodTypeDef, GenericSupportedChainsRequest>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace GenericSupportedChainsRequest$ {
|
|
24
|
+
/** @deprecated use `GenericSupportedChainsRequest$inboundSchema` instead. */
|
|
25
|
+
const inboundSchema: z.ZodType<GenericSupportedChainsRequest, z.ZodTypeDef, unknown>;
|
|
26
|
+
/** @deprecated use `GenericSupportedChainsRequest$outboundSchema` instead. */
|
|
27
|
+
const outboundSchema: z.ZodType<GenericSupportedChainsRequest$Outbound, z.ZodTypeDef, GenericSupportedChainsRequest>;
|
|
28
|
+
/** @deprecated use `GenericSupportedChainsRequest$Outbound` instead. */
|
|
29
|
+
type Outbound = GenericSupportedChainsRequest$Outbound;
|
|
30
|
+
}
|
|
31
|
+
export declare function genericSupportedChainsRequestToJSON(genericSupportedChainsRequest: GenericSupportedChainsRequest): string;
|
|
32
|
+
export declare function genericSupportedChainsRequestFromJSON(jsonString: string): SafeParseResult<GenericSupportedChainsRequest, SDKValidationError>;
|
|
33
|
+
//# sourceMappingURL=genericsupportedchains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericsupportedchains.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/genericsupportedchains.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,OAAO,CACjE,6BAA6B,EAC7B,CAAC,CAAC,UAAU,EACZ,OAAO,CAGP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,sCAAsC,GAAG;IACnD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,sCAAsC,EACtC,CAAC,CAAC,UAAU,EACZ,6BAA6B,CAG7B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,8BAA8B,CAAC;IAC9C,6EAA6E;IACtE,MAAM,aAAa,iEAA8C,CAAC;IACzE,8EAA8E;IACvE,MAAM,cAAc,gGAA+C,CAAC;IAC3E,wEAAwE;IACxE,KAAY,QAAQ,GAAG,sCAAsC,CAAC;CAC/D;AAED,wBAAgB,mCAAmC,CACjD,6BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR;AAED,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAMpE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import * as components from "../components/index.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const GenericSupportedChainsRequest$inboundSchema = z.object({
|
|
9
|
+
protocol: z.nullable(components.Protocol$inboundSchema).optional(),
|
|
10
|
+
});
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const GenericSupportedChainsRequest$outboundSchema = z.object({
|
|
13
|
+
protocol: z.nullable(components.Protocol$outboundSchema).optional(),
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
|
+
*/
|
|
19
|
+
export var GenericSupportedChainsRequest$;
|
|
20
|
+
(function (GenericSupportedChainsRequest$) {
|
|
21
|
+
/** @deprecated use `GenericSupportedChainsRequest$inboundSchema` instead. */
|
|
22
|
+
GenericSupportedChainsRequest$.inboundSchema = GenericSupportedChainsRequest$inboundSchema;
|
|
23
|
+
/** @deprecated use `GenericSupportedChainsRequest$outboundSchema` instead. */
|
|
24
|
+
GenericSupportedChainsRequest$.outboundSchema = GenericSupportedChainsRequest$outboundSchema;
|
|
25
|
+
})(GenericSupportedChainsRequest$ || (GenericSupportedChainsRequest$ = {}));
|
|
26
|
+
export function genericSupportedChainsRequestToJSON(genericSupportedChainsRequest) {
|
|
27
|
+
return JSON.stringify(GenericSupportedChainsRequest$outboundSchema.parse(genericSupportedChainsRequest));
|
|
28
|
+
}
|
|
29
|
+
export function genericSupportedChainsRequestFromJSON(jsonString) {
|
|
30
|
+
return safeParse(jsonString, (x) => GenericSupportedChainsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GenericSupportedChainsRequest' from JSON`);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=genericsupportedchains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericsupportedchains.js","sourceRoot":"","sources":["../../../../src/models/operations/genericsupportedchains.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAUrD,gBAAgB;AAChB,MAAM,CAAC,MAAM,2CAA2C,GAIpD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC,QAAQ,EAAE;CACnE,CAAC,CAAC;AAOH,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;CACpE,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,8BAA8B,CAO9C;AAPD,WAAiB,8BAA8B;IAC7C,6EAA6E;IAChE,4CAAa,GAAG,2CAA2C,CAAC;IACzE,8EAA8E;IACjE,6CAAc,GAAG,4CAA4C,CAAC;AAG7E,CAAC,EAPgB,8BAA8B,KAA9B,8BAA8B,QAO9C;AAED,MAAM,UAAU,mCAAmC,CACjD,6BAA4D;IAE5D,OAAO,IAAI,CAAC,SAAS,CACnB,4CAA4C,CAAC,KAAK,CAChD,6BAA6B,CAC9B,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qCAAqC,CACnD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2CAA2C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvE,2DAA2D,CAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -13,6 +13,7 @@ export * from "./aerodromeslipstreampoolprice.js";
|
|
|
13
13
|
export * from "./genericallowance.js";
|
|
14
14
|
export * from "./genericens.js";
|
|
15
15
|
export * from "./genericportfolio.js";
|
|
16
|
+
export * from "./genericsupportedchains.js";
|
|
16
17
|
export * from "./genericsupportedtokens.js";
|
|
17
18
|
export * from "./genericvisualizeportfolio.js";
|
|
18
19
|
export * from "./morphomarket.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAIA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,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,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,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;AAC7C,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAIA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,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,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,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;AAC7C,cAAc,kBAAkB,CAAC"}
|
|
@@ -16,6 +16,7 @@ export * from "./aerodromeslipstreampoolprice.js";
|
|
|
16
16
|
export * from "./genericallowance.js";
|
|
17
17
|
export * from "./genericens.js";
|
|
18
18
|
export * from "./genericportfolio.js";
|
|
19
|
+
export * from "./genericsupportedchains.js";
|
|
19
20
|
export * from "./genericsupportedtokens.js";
|
|
20
21
|
export * from "./genericvisualizeportfolio.js";
|
|
21
22
|
export * from "./morphomarket.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,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,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,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;AAC7C,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/operations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,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,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,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;AAC7C,cAAc,kBAAkB,CAAC"}
|
|
@@ -30,6 +30,13 @@ export declare class Universal extends ClientSDK {
|
|
|
30
30
|
* Get the list of supported tokens on a chain by the Compass API.
|
|
31
31
|
*/
|
|
32
32
|
supportedTokens(request: operations.GenericSupportedTokensRequest, options?: RequestOptions): Promise<components.TokenInfo>;
|
|
33
|
+
/**
|
|
34
|
+
* List Supported Chains
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Get the list of supported chains by the Compass API.
|
|
38
|
+
*/
|
|
39
|
+
supportedChains(request: operations.GenericSupportedChainsRequest, options?: RequestOptions): Promise<components.SupportedChainInfo>;
|
|
33
40
|
/**
|
|
34
41
|
* Get Allowance
|
|
35
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universal.d.ts","sourceRoot":"","sources":["../../../src/sdk/universal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"universal.d.ts","sourceRoot":"","sources":["../../../src/sdk/universal.ts"],"names":[],"mappings":"AAaA,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,SAAU,SAAQ,SAAS;IACtC;;;;;;;;OAQG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;IAQhC;;;;;;;;;OASG;IACG,kBAAkB,CACtB,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;IAQ5B;;;;;OAKG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;IAQhC;;;;;OAKG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;;;;;;;;;;OAWG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;OAQG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;;OAMG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,cAAc,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;;OAMG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;;;;;;;;OAYG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;CAOlC"}
|
|
@@ -5,6 +5,7 @@ import { universalAllowance } from "../funcs/universalAllowance.js";
|
|
|
5
5
|
import { universalAllowanceSet } from "../funcs/universalAllowanceSet.js";
|
|
6
6
|
import { universalEns } from "../funcs/universalEns.js";
|
|
7
7
|
import { universalPortfolio } from "../funcs/universalPortfolio.js";
|
|
8
|
+
import { universalSupportedChains } from "../funcs/universalSupportedChains.js";
|
|
8
9
|
import { universalSupportedTokens } from "../funcs/universalSupportedTokens.js";
|
|
9
10
|
import { universalUnwrapWeth } from "../funcs/universalUnwrapWeth.js";
|
|
10
11
|
import { universalVisualizePortfolio } from "../funcs/universalVisualizePortfolio.js";
|
|
@@ -46,6 +47,15 @@ export class Universal extends ClientSDK {
|
|
|
46
47
|
async supportedTokens(request, options) {
|
|
47
48
|
return unwrapAsync(universalSupportedTokens(this, request, options));
|
|
48
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* List Supported Chains
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Get the list of supported chains by the Compass API.
|
|
55
|
+
*/
|
|
56
|
+
async supportedChains(request, options) {
|
|
57
|
+
return unwrapAsync(universalSupportedChains(this, request, options));
|
|
58
|
+
}
|
|
49
59
|
/**
|
|
50
60
|
* Get Allowance
|
|
51
61
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universal.js","sourceRoot":"","sources":["../../../src/sdk/universal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,SAAU,SAAQ,SAAS;IACtC;;;;;;;;OAQG;IACH,KAAK,CAAC,SAAS,CACb,OAA2C,EAC3C,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAAoD,EACpD,OAAwB;QAExB,OAAO,WAAW,CAAC,2BAA2B,CAC5C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,OAAiD,EACjD,OAAwB;QAExB,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,SAAS,CACb,OAA2C,EAC3C,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,CACX,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,gBAAgB,CACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,mBAAmB,CACpC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,qBAAqB,CACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"universal.js","sourceRoot":"","sources":["../../../src/sdk/universal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,SAAU,SAAQ,SAAS;IACtC;;;;;;;;OAQG;IACH,KAAK,CAAC,SAAS,CACb,OAA2C,EAC3C,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAAoD,EACpD,OAAwB;QAExB,OAAO,WAAW,CAAC,2BAA2B,CAC5C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,OAAiD,EACjD,OAAwB;QAExB,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,OAAiD,EACjD,OAAwB;QAExB,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,SAAS,CACb,OAA2C,EAC3C,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,CACX,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,gBAAgB,CACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,mBAAmB,CACpC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,qBAAqB,CACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* [portfolio](#portfolio) - List User Portfolio
|
|
9
9
|
* [visualizePortfolio](#visualizeportfolio) - Visualize User Portfolio
|
|
10
10
|
* [supportedTokens](#supportedtokens) - List Supported Tokens
|
|
11
|
+
* [supportedChains](#supportedchains) - List Supported Chains
|
|
11
12
|
* [allowance](#allowance) - Get Allowance
|
|
12
13
|
* [ens](#ens) - Resolve ENS
|
|
13
14
|
* [wrapEth](#wrapeth) - Wrap ETH
|
|
@@ -228,6 +229,75 @@ run();
|
|
|
228
229
|
| errors.HTTPValidationError | 422 | application/json |
|
|
229
230
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
230
231
|
|
|
232
|
+
## supportedChains
|
|
233
|
+
|
|
234
|
+
Get the list of supported chains by the Compass API.
|
|
235
|
+
|
|
236
|
+
### Example Usage
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
240
|
+
|
|
241
|
+
const compassApiSDK = new CompassApiSDK({
|
|
242
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
async function run() {
|
|
246
|
+
const result = await compassApiSDK.universal.supportedChains({});
|
|
247
|
+
|
|
248
|
+
console.log(result);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
run();
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Standalone function
|
|
255
|
+
|
|
256
|
+
The standalone function version of this method:
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
260
|
+
import { universalSupportedChains } from "@compass-labs/api-sdk/funcs/universalSupportedChains.js";
|
|
261
|
+
|
|
262
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
263
|
+
// You can create one instance of it to use across an application.
|
|
264
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
265
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
async function run() {
|
|
269
|
+
const res = await universalSupportedChains(compassApiSDK, {});
|
|
270
|
+
if (res.ok) {
|
|
271
|
+
const { value: result } = res;
|
|
272
|
+
console.log(result);
|
|
273
|
+
} else {
|
|
274
|
+
console.log("universalSupportedChains failed:", res.error);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
run();
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Parameters
|
|
282
|
+
|
|
283
|
+
| Parameter | Type | Required | Description |
|
|
284
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
285
|
+
| `request` | [operations.GenericSupportedChainsRequest](../../models/operations/genericsupportedchainsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
286
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
287
|
+
| `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. |
|
|
288
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
289
|
+
|
|
290
|
+
### Response
|
|
291
|
+
|
|
292
|
+
**Promise\<[components.SupportedChainInfo](../../models/components/supportedchaininfo.md)\>**
|
|
293
|
+
|
|
294
|
+
### Errors
|
|
295
|
+
|
|
296
|
+
| Error Type | Status Code | Content Type |
|
|
297
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
298
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
299
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
300
|
+
|
|
231
301
|
## allowance
|
|
232
302
|
|
|
233
303
|
In decentralized finance (DeFi) protocols such as Uniswap or AAVE, users must set
|
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 { CompassAPISDKError } from "../models/errors/compassapisdkerror.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 { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List Supported Chains
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Get the list of supported chains by the Compass API.
|
|
34
|
+
*/
|
|
35
|
+
export function universalSupportedChains(
|
|
36
|
+
client: CompassApiSDKCore,
|
|
37
|
+
request: operations.GenericSupportedChainsRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
components.SupportedChainInfo,
|
|
42
|
+
| errors.HTTPValidationError
|
|
43
|
+
| CompassAPISDKError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: CompassApiSDKCore,
|
|
62
|
+
request: operations.GenericSupportedChainsRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
components.SupportedChainInfo,
|
|
68
|
+
| errors.HTTPValidationError
|
|
69
|
+
| CompassAPISDKError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) =>
|
|
84
|
+
operations.GenericSupportedChainsRequest$outboundSchema.parse(value),
|
|
85
|
+
"Input validation failed",
|
|
86
|
+
);
|
|
87
|
+
if (!parsed.ok) {
|
|
88
|
+
return [parsed, { status: "invalid" }];
|
|
89
|
+
}
|
|
90
|
+
const payload = parsed.value;
|
|
91
|
+
const body = null;
|
|
92
|
+
|
|
93
|
+
const path = pathToFunc("/v0/generic/supported_chains/get")();
|
|
94
|
+
|
|
95
|
+
const query = encodeFormQuery({
|
|
96
|
+
"protocol": payload.protocol,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const headers = new Headers(compactMap({
|
|
100
|
+
Accept: "application/json",
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
104
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
105
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
|
|
107
|
+
const context = {
|
|
108
|
+
options: client._options,
|
|
109
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
110
|
+
operationID: "generic_supported_chains",
|
|
111
|
+
oAuth2Scopes: [],
|
|
112
|
+
|
|
113
|
+
resolvedSecurity: requestSecurity,
|
|
114
|
+
|
|
115
|
+
securitySource: client._options.apiKeyAuth,
|
|
116
|
+
retryConfig: options?.retries
|
|
117
|
+
|| client._options.retryConfig
|
|
118
|
+
|| { strategy: "none" },
|
|
119
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const requestRes = client._createRequest(context, {
|
|
123
|
+
security: requestSecurity,
|
|
124
|
+
method: "GET",
|
|
125
|
+
baseURL: options?.serverURL,
|
|
126
|
+
path: path,
|
|
127
|
+
headers: headers,
|
|
128
|
+
query: query,
|
|
129
|
+
body: body,
|
|
130
|
+
userAgent: client._options.userAgent,
|
|
131
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req = requestRes.value;
|
|
137
|
+
|
|
138
|
+
const doResult = await client._do(req, {
|
|
139
|
+
context,
|
|
140
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
141
|
+
retryConfig: context.retryConfig,
|
|
142
|
+
retryCodes: context.retryCodes,
|
|
143
|
+
});
|
|
144
|
+
if (!doResult.ok) {
|
|
145
|
+
return [doResult, { status: "request-error", request: req }];
|
|
146
|
+
}
|
|
147
|
+
const response = doResult.value;
|
|
148
|
+
|
|
149
|
+
const responseFields = {
|
|
150
|
+
HttpMeta: { Response: response, Request: req },
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const [result] = await M.match<
|
|
154
|
+
components.SupportedChainInfo,
|
|
155
|
+
| errors.HTTPValidationError
|
|
156
|
+
| CompassAPISDKError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
164
|
+
>(
|
|
165
|
+
M.json(200, components.SupportedChainInfo$inboundSchema),
|
|
166
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
167
|
+
M.fail("4XX"),
|
|
168
|
+
M.fail("5XX"),
|
|
169
|
+
)(response, req, { 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
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "0.5.
|
|
64
|
+
sdkVersion: "0.5.50",
|
|
65
65
|
genVersion: "2.657.1",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.5.
|
|
67
|
+
"speakeasy-sdk/typescript 0.5.50 2.657.1 0.0.1 @compass-labs/api-sdk",
|
|
68
68
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -88,6 +88,7 @@ import { tool$universalAllowance } from "./tools/universalAllowance.js";
|
|
|
88
88
|
import { tool$universalAllowanceSet } from "./tools/universalAllowanceSet.js";
|
|
89
89
|
import { tool$universalEns } from "./tools/universalEns.js";
|
|
90
90
|
import { tool$universalPortfolio } from "./tools/universalPortfolio.js";
|
|
91
|
+
import { tool$universalSupportedChains } from "./tools/universalSupportedChains.js";
|
|
91
92
|
import { tool$universalSupportedTokens } from "./tools/universalSupportedTokens.js";
|
|
92
93
|
import { tool$universalUnwrapWeth } from "./tools/universalUnwrapWeth.js";
|
|
93
94
|
import { tool$universalVisualizePortfolio } from "./tools/universalVisualizePortfolio.js";
|
|
@@ -103,7 +104,7 @@ export function createMCPServer(deps: {
|
|
|
103
104
|
}) {
|
|
104
105
|
const server = new McpServer({
|
|
105
106
|
name: "CompassApiSDK",
|
|
106
|
-
version: "0.5.
|
|
107
|
+
version: "0.5.50",
|
|
107
108
|
});
|
|
108
109
|
|
|
109
110
|
const client = new CompassApiSDKCore({
|
|
@@ -188,6 +189,7 @@ export function createMCPServer(deps: {
|
|
|
188
189
|
tool(tool$universalPortfolio);
|
|
189
190
|
tool(tool$universalVisualizePortfolio);
|
|
190
191
|
tool(tool$universalSupportedTokens);
|
|
192
|
+
tool(tool$universalSupportedChains);
|
|
191
193
|
tool(tool$universalAllowance);
|
|
192
194
|
tool(tool$universalEns);
|
|
193
195
|
tool(tool$universalWrapEth);
|