@compass-labs/api-sdk 0.5.49 → 0.5.51
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 +229 -43
- package/bin/mcp-server.js.map +16 -11
- 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/components/userstate.d.ts +2 -2
- package/dist/commonjs/models/components/userstate.d.ts.map +1 -1
- package/dist/commonjs/models/components/userstate.js +2 -2
- package/dist/commonjs/models/components/userstate.js.map +1 -1
- 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/models/operations/morphomarkets.d.ts +53 -4
- package/dist/commonjs/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphomarkets.js +52 -5
- package/dist/commonjs/models/operations/morphomarkets.js.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.d.ts +27 -2
- package/dist/commonjs/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.js +27 -3
- package/dist/commonjs/models/operations/morphovaults.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/components/userstate.d.ts +2 -2
- package/dist/esm/models/components/userstate.d.ts.map +1 -1
- package/dist/esm/models/components/userstate.js +2 -2
- package/dist/esm/models/components/userstate.js.map +1 -1
- 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/models/operations/morphomarkets.d.ts +53 -4
- package/dist/esm/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/esm/models/operations/morphomarkets.js +47 -4
- package/dist/esm/models/operations/morphomarkets.js.map +1 -1
- package/dist/esm/models/operations/morphovaults.d.ts +27 -2
- package/dist/esm/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/esm/models/operations/morphovaults.js +24 -2
- package/dist/esm/models/operations/morphovaults.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/components/userstate.ts +4 -4
- package/src/models/operations/genericsupportedchains.ts +72 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/morphomarkets.ts +117 -8
- package/src/models/operations/morphovaults.ts +58 -4
- package/src/sdk/universal.ts +18 -0
package/README.md
CHANGED
|
@@ -324,6 +324,7 @@ run();
|
|
|
324
324
|
* [portfolio](docs/sdks/universal/README.md#portfolio) - List User Portfolio
|
|
325
325
|
* [visualizePortfolio](docs/sdks/universal/README.md#visualizeportfolio) - Visualize User Portfolio
|
|
326
326
|
* [supportedTokens](docs/sdks/universal/README.md#supportedtokens) - List Supported Tokens
|
|
327
|
+
* [supportedChains](docs/sdks/universal/README.md#supportedchains) - List Supported Chains
|
|
327
328
|
* [allowance](docs/sdks/universal/README.md#allowance) - Get Allowance
|
|
328
329
|
* [ens](docs/sdks/universal/README.md#ens) - Resolve ENS
|
|
329
330
|
* [wrapEth](docs/sdks/universal/README.md#wrapeth) - Wrap ETH
|
|
@@ -423,6 +424,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
423
424
|
- [`universalAllowanceSet`](docs/sdks/universal/README.md#allowanceset) - Set Allowance
|
|
424
425
|
- [`universalEns`](docs/sdks/universal/README.md#ens) - Resolve ENS
|
|
425
426
|
- [`universalPortfolio`](docs/sdks/universal/README.md#portfolio) - List User Portfolio
|
|
427
|
+
- [`universalSupportedChains`](docs/sdks/universal/README.md#supportedchains) - List Supported Chains
|
|
426
428
|
- [`universalSupportedTokens`](docs/sdks/universal/README.md#supportedtokens) - List Supported Tokens
|
|
427
429
|
- [`universalUnwrapWeth`](docs/sdks/universal/README.md#unwrapweth) - Unwrap WETH
|
|
428
430
|
- [`universalVisualizePortfolio`](docs/sdks/universal/README.md#visualizeportfolio) - Visualize User Portfolio
|
package/bin/mcp-server.js
CHANGED
|
@@ -34264,9 +34264,9 @@ var init_config = __esm(() => {
|
|
|
34264
34264
|
SDK_METADATA = {
|
|
34265
34265
|
language: "typescript",
|
|
34266
34266
|
openapiDocVersion: "0.0.1",
|
|
34267
|
-
sdkVersion: "0.5.
|
|
34267
|
+
sdkVersion: "0.5.51",
|
|
34268
34268
|
genVersion: "2.657.1",
|
|
34269
|
-
userAgent: "speakeasy-sdk/typescript 0.5.
|
|
34269
|
+
userAgent: "speakeasy-sdk/typescript 0.5.51 2.657.1 0.0.1 @compass-labs/api-sdk"
|
|
34270
34270
|
};
|
|
34271
34271
|
});
|
|
34272
34272
|
|
|
@@ -40359,7 +40359,7 @@ var UserState$inboundSchema, UserState$outboundSchema, UserState$;
|
|
|
40359
40359
|
var init_userstate = __esm(() => {
|
|
40360
40360
|
init_zod();
|
|
40361
40361
|
UserState$inboundSchema = objectType({
|
|
40362
|
-
vaultsPnlUsd: stringType(),
|
|
40362
|
+
vaultsPnlUsd: nullableType(stringType()),
|
|
40363
40363
|
vaultsAssetsUsd: stringType(),
|
|
40364
40364
|
marketsPnlUsd: nullableType(stringType()),
|
|
40365
40365
|
marketsBorrowAssetsUsd: stringType(),
|
|
@@ -40367,7 +40367,7 @@ var init_userstate = __esm(() => {
|
|
|
40367
40367
|
marketsSupplyAssetsUsd: stringType()
|
|
40368
40368
|
});
|
|
40369
40369
|
UserState$outboundSchema = objectType({
|
|
40370
|
-
vaultsPnlUsd: stringType(),
|
|
40370
|
+
vaultsPnlUsd: nullableType(stringType()),
|
|
40371
40371
|
vaultsAssetsUsd: stringType(),
|
|
40372
40372
|
marketsPnlUsd: nullableType(stringType()),
|
|
40373
40373
|
marketsBorrowAssetsUsd: stringType(),
|
|
@@ -41569,6 +41569,26 @@ var init_portfolio = __esm(() => {
|
|
|
41569
41569
|
})(Portfolio$ ||= {});
|
|
41570
41570
|
});
|
|
41571
41571
|
|
|
41572
|
+
// src/models/components/protocol.ts
|
|
41573
|
+
var Protocol2, Protocol$inboundSchema, Protocol$outboundSchema, Protocol$;
|
|
41574
|
+
var init_protocol2 = __esm(() => {
|
|
41575
|
+
init_zod();
|
|
41576
|
+
Protocol2 = {
|
|
41577
|
+
Aave: "aave",
|
|
41578
|
+
Aerodrome: "aerodrome",
|
|
41579
|
+
Morpho: "morpho",
|
|
41580
|
+
Sky: "sky",
|
|
41581
|
+
Uniswap: "uniswap",
|
|
41582
|
+
Pendle: "pendle"
|
|
41583
|
+
};
|
|
41584
|
+
Protocol$inboundSchema = nativeEnumType(Protocol2);
|
|
41585
|
+
Protocol$outboundSchema = Protocol$inboundSchema;
|
|
41586
|
+
((Protocol$) => {
|
|
41587
|
+
Protocol$.inboundSchema = Protocol$inboundSchema;
|
|
41588
|
+
Protocol$.outboundSchema = Protocol$outboundSchema;
|
|
41589
|
+
})(Protocol$ ||= {});
|
|
41590
|
+
});
|
|
41591
|
+
|
|
41572
41592
|
// src/models/components/security.ts
|
|
41573
41593
|
var Security$inboundSchema, Security$outboundSchema, Security$;
|
|
41574
41594
|
var init_security2 = __esm(() => {
|
|
@@ -41876,6 +41896,23 @@ var init_skywithdrawrequest = __esm(() => {
|
|
|
41876
41896
|
})(SkyWithdrawRequest$ ||= {});
|
|
41877
41897
|
});
|
|
41878
41898
|
|
|
41899
|
+
// src/models/components/supportedchaininfo.ts
|
|
41900
|
+
var SupportedChainInfo$inboundSchema, SupportedChainInfo$outboundSchema, SupportedChainInfo$;
|
|
41901
|
+
var init_supportedchaininfo = __esm(() => {
|
|
41902
|
+
init_zod();
|
|
41903
|
+
init_chain();
|
|
41904
|
+
SupportedChainInfo$inboundSchema = objectType({
|
|
41905
|
+
chains: arrayType(Chain$inboundSchema)
|
|
41906
|
+
});
|
|
41907
|
+
SupportedChainInfo$outboundSchema = objectType({
|
|
41908
|
+
chains: arrayType(Chain$outboundSchema)
|
|
41909
|
+
});
|
|
41910
|
+
((SupportedChainInfo$) => {
|
|
41911
|
+
SupportedChainInfo$.inboundSchema = SupportedChainInfo$inboundSchema;
|
|
41912
|
+
SupportedChainInfo$.outboundSchema = SupportedChainInfo$outboundSchema;
|
|
41913
|
+
})(SupportedChainInfo$ ||= {});
|
|
41914
|
+
});
|
|
41915
|
+
|
|
41879
41916
|
// src/models/components/tokenaddressresponse.ts
|
|
41880
41917
|
var TokenAddressResponse$inboundSchema, TokenAddressResponse$outboundSchema, TokenAddressResponse$;
|
|
41881
41918
|
var init_tokenaddressresponse = __esm(() => {
|
|
@@ -42934,6 +42971,7 @@ var init_components = __esm(() => {
|
|
|
42934
42971
|
init_pendlesellytrequest();
|
|
42935
42972
|
init_portfolio();
|
|
42936
42973
|
init_position();
|
|
42974
|
+
init_protocol2();
|
|
42937
42975
|
init_redeemunderlying();
|
|
42938
42976
|
init_repay();
|
|
42939
42977
|
init_reserve();
|
|
@@ -42951,6 +42989,7 @@ var init_components = __esm(() => {
|
|
|
42951
42989
|
init_skywithdrawparams();
|
|
42952
42990
|
init_skywithdrawrequest();
|
|
42953
42991
|
init_supply();
|
|
42992
|
+
init_supportedchaininfo();
|
|
42954
42993
|
init_swapborrowrate();
|
|
42955
42994
|
init_syposition();
|
|
42956
42995
|
init_tokenaddressresponse();
|
|
@@ -44068,6 +44107,23 @@ var init_genericportfolio = __esm(() => {
|
|
|
44068
44107
|
})(GenericPortfolioRequest$ ||= {});
|
|
44069
44108
|
});
|
|
44070
44109
|
|
|
44110
|
+
// src/models/operations/genericsupportedchains.ts
|
|
44111
|
+
var GenericSupportedChainsRequest$inboundSchema, GenericSupportedChainsRequest$outboundSchema, GenericSupportedChainsRequest$;
|
|
44112
|
+
var init_genericsupportedchains = __esm(() => {
|
|
44113
|
+
init_zod();
|
|
44114
|
+
init_components();
|
|
44115
|
+
GenericSupportedChainsRequest$inboundSchema = objectType({
|
|
44116
|
+
protocol: nullableType(Protocol$inboundSchema).optional()
|
|
44117
|
+
});
|
|
44118
|
+
GenericSupportedChainsRequest$outboundSchema = objectType({
|
|
44119
|
+
protocol: nullableType(Protocol$outboundSchema).optional()
|
|
44120
|
+
});
|
|
44121
|
+
((GenericSupportedChainsRequest$) => {
|
|
44122
|
+
GenericSupportedChainsRequest$.inboundSchema = GenericSupportedChainsRequest$inboundSchema;
|
|
44123
|
+
GenericSupportedChainsRequest$.outboundSchema = GenericSupportedChainsRequest$outboundSchema;
|
|
44124
|
+
})(GenericSupportedChainsRequest$ ||= {});
|
|
44125
|
+
});
|
|
44126
|
+
|
|
44071
44127
|
// src/models/operations/genericsupportedtokens.ts
|
|
44072
44128
|
var GenericSupportedTokensChain, GenericSupportedTokensChain$inboundSchema, GenericSupportedTokensChain$outboundSchema, GenericSupportedTokensChain$, GenericSupportedTokensRequest$inboundSchema, GenericSupportedTokensRequest$outboundSchema, GenericSupportedTokensRequest$;
|
|
44073
44129
|
var init_genericsupportedtokens = __esm(() => {
|
|
@@ -44203,10 +44259,11 @@ var init_morphomarketposition = __esm(() => {
|
|
|
44203
44259
|
});
|
|
44204
44260
|
|
|
44205
44261
|
// src/models/operations/morphomarkets.ts
|
|
44206
|
-
var MorphoMarketsChain, MorphoMarketsChain$inboundSchema, MorphoMarketsChain$outboundSchema, MorphoMarketsChain$, MorphoMarketsRequest$inboundSchema, MorphoMarketsRequest$outboundSchema, MorphoMarketsRequest$;
|
|
44262
|
+
var MorphoMarketsChain, MorphoMarketsChain$inboundSchema, MorphoMarketsChain$outboundSchema, MorphoMarketsChain$, CollateralToken$inboundSchema, CollateralToken$outboundSchema, CollateralToken$, LoanToken$inboundSchema, LoanToken$outboundSchema, LoanToken$, MorphoMarketsRequest$inboundSchema, MorphoMarketsRequest$outboundSchema, MorphoMarketsRequest$;
|
|
44207
44263
|
var init_morphomarkets = __esm(() => {
|
|
44208
44264
|
init_zod();
|
|
44209
44265
|
init_primitives();
|
|
44266
|
+
init_components();
|
|
44210
44267
|
MorphoMarketsChain = {
|
|
44211
44268
|
EthereumMainnet: "ethereum:mainnet",
|
|
44212
44269
|
BaseMainnet: "base:mainnet"
|
|
@@ -44217,10 +44274,22 @@ var init_morphomarkets = __esm(() => {
|
|
|
44217
44274
|
MorphoMarketsChain$.inboundSchema = MorphoMarketsChain$inboundSchema;
|
|
44218
44275
|
MorphoMarketsChain$.outboundSchema = MorphoMarketsChain$outboundSchema;
|
|
44219
44276
|
})(MorphoMarketsChain$ ||= {});
|
|
44277
|
+
CollateralToken$inboundSchema = unionType([TokenEnum$inboundSchema, stringType()]);
|
|
44278
|
+
CollateralToken$outboundSchema = unionType([TokenEnum$outboundSchema, stringType()]);
|
|
44279
|
+
((CollateralToken$) => {
|
|
44280
|
+
CollateralToken$.inboundSchema = CollateralToken$inboundSchema;
|
|
44281
|
+
CollateralToken$.outboundSchema = CollateralToken$outboundSchema;
|
|
44282
|
+
})(CollateralToken$ ||= {});
|
|
44283
|
+
LoanToken$inboundSchema = unionType([TokenEnum$inboundSchema, stringType()]);
|
|
44284
|
+
LoanToken$outboundSchema = unionType([TokenEnum$outboundSchema, stringType()]);
|
|
44285
|
+
((LoanToken$) => {
|
|
44286
|
+
LoanToken$.inboundSchema = LoanToken$inboundSchema;
|
|
44287
|
+
LoanToken$.outboundSchema = LoanToken$outboundSchema;
|
|
44288
|
+
})(LoanToken$ ||= {});
|
|
44220
44289
|
MorphoMarketsRequest$inboundSchema = objectType({
|
|
44221
44290
|
chain: MorphoMarketsChain$inboundSchema.default("base:mainnet"),
|
|
44222
|
-
collateral_token: nullableType(stringType()).optional(),
|
|
44223
|
-
loan_token: nullableType(stringType()).optional()
|
|
44291
|
+
collateral_token: nullableType(unionType([TokenEnum$inboundSchema, stringType()])).optional(),
|
|
44292
|
+
loan_token: nullableType(unionType([TokenEnum$inboundSchema, stringType()])).optional()
|
|
44224
44293
|
}).transform((v2) => {
|
|
44225
44294
|
return remap(v2, {
|
|
44226
44295
|
collateral_token: "collateralToken",
|
|
@@ -44229,8 +44298,8 @@ var init_morphomarkets = __esm(() => {
|
|
|
44229
44298
|
});
|
|
44230
44299
|
MorphoMarketsRequest$outboundSchema = objectType({
|
|
44231
44300
|
chain: MorphoMarketsChain$outboundSchema.default("base:mainnet"),
|
|
44232
|
-
collateralToken: nullableType(stringType()).optional(),
|
|
44233
|
-
loanToken: nullableType(stringType()).optional()
|
|
44301
|
+
collateralToken: nullableType(unionType([TokenEnum$outboundSchema, stringType()])).optional(),
|
|
44302
|
+
loanToken: nullableType(unionType([TokenEnum$outboundSchema, stringType()])).optional()
|
|
44234
44303
|
}).transform((v2) => {
|
|
44235
44304
|
return remap(v2, {
|
|
44236
44305
|
collateralToken: "collateral_token",
|
|
@@ -44325,10 +44394,11 @@ var init_morphovault2 = __esm(() => {
|
|
|
44325
44394
|
});
|
|
44326
44395
|
|
|
44327
44396
|
// src/models/operations/morphovaults.ts
|
|
44328
|
-
var MorphoVaultsChain, MorphoVaultsChain$inboundSchema, MorphoVaultsChain$outboundSchema, MorphoVaultsChain$, MorphoVaultsRequest$inboundSchema, MorphoVaultsRequest$outboundSchema, MorphoVaultsRequest$;
|
|
44397
|
+
var MorphoVaultsChain, MorphoVaultsChain$inboundSchema, MorphoVaultsChain$outboundSchema, MorphoVaultsChain$, DepositToken$inboundSchema, DepositToken$outboundSchema, DepositToken$, MorphoVaultsRequest$inboundSchema, MorphoVaultsRequest$outboundSchema, MorphoVaultsRequest$;
|
|
44329
44398
|
var init_morphovaults = __esm(() => {
|
|
44330
44399
|
init_zod();
|
|
44331
44400
|
init_primitives();
|
|
44401
|
+
init_components();
|
|
44332
44402
|
MorphoVaultsChain = {
|
|
44333
44403
|
EthereumMainnet: "ethereum:mainnet",
|
|
44334
44404
|
BaseMainnet: "base:mainnet"
|
|
@@ -44339,9 +44409,15 @@ var init_morphovaults = __esm(() => {
|
|
|
44339
44409
|
MorphoVaultsChain$.inboundSchema = MorphoVaultsChain$inboundSchema;
|
|
44340
44410
|
MorphoVaultsChain$.outboundSchema = MorphoVaultsChain$outboundSchema;
|
|
44341
44411
|
})(MorphoVaultsChain$ ||= {});
|
|
44412
|
+
DepositToken$inboundSchema = unionType([TokenEnum$inboundSchema, stringType()]);
|
|
44413
|
+
DepositToken$outboundSchema = unionType([TokenEnum$outboundSchema, stringType()]);
|
|
44414
|
+
((DepositToken$) => {
|
|
44415
|
+
DepositToken$.inboundSchema = DepositToken$inboundSchema;
|
|
44416
|
+
DepositToken$.outboundSchema = DepositToken$outboundSchema;
|
|
44417
|
+
})(DepositToken$ ||= {});
|
|
44342
44418
|
MorphoVaultsRequest$inboundSchema = objectType({
|
|
44343
44419
|
chain: MorphoVaultsChain$inboundSchema.default("base:mainnet"),
|
|
44344
|
-
deposit_token: nullableType(stringType()).optional()
|
|
44420
|
+
deposit_token: nullableType(unionType([TokenEnum$inboundSchema, stringType()])).optional()
|
|
44345
44421
|
}).transform((v2) => {
|
|
44346
44422
|
return remap(v2, {
|
|
44347
44423
|
deposit_token: "depositToken"
|
|
@@ -44349,7 +44425,7 @@ var init_morphovaults = __esm(() => {
|
|
|
44349
44425
|
});
|
|
44350
44426
|
MorphoVaultsRequest$outboundSchema = objectType({
|
|
44351
44427
|
chain: MorphoVaultsChain$outboundSchema.default("base:mainnet"),
|
|
44352
|
-
depositToken: nullableType(stringType()).optional()
|
|
44428
|
+
depositToken: nullableType(unionType([TokenEnum$outboundSchema, stringType()])).optional()
|
|
44353
44429
|
}).transform((v2) => {
|
|
44354
44430
|
return remap(v2, {
|
|
44355
44431
|
depositToken: "deposit_token"
|
|
@@ -45366,6 +45442,7 @@ var init_operations = __esm(() => {
|
|
|
45366
45442
|
init_genericallowance();
|
|
45367
45443
|
init_genericens();
|
|
45368
45444
|
init_genericportfolio();
|
|
45445
|
+
init_genericsupportedchains();
|
|
45369
45446
|
init_genericsupportedtokens();
|
|
45370
45447
|
init_genericvisualizeportfolio();
|
|
45371
45448
|
init_morphomarket2();
|
|
@@ -53985,11 +54062,118 @@ balances, including their respective values and quantities.`,
|
|
|
53985
54062
|
};
|
|
53986
54063
|
});
|
|
53987
54064
|
|
|
53988
|
-
// src/funcs/
|
|
53989
|
-
function
|
|
54065
|
+
// src/funcs/universalSupportedChains.ts
|
|
54066
|
+
function universalSupportedChains(client, request, options) {
|
|
53990
54067
|
return new APIPromise($do76(client, request, options));
|
|
53991
54068
|
}
|
|
53992
54069
|
async function $do76(client, request, options) {
|
|
54070
|
+
const parsed = safeParse(request, (value) => GenericSupportedChainsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
54071
|
+
if (!parsed.ok) {
|
|
54072
|
+
return [parsed, { status: "invalid" }];
|
|
54073
|
+
}
|
|
54074
|
+
const payload = parsed.value;
|
|
54075
|
+
const body = null;
|
|
54076
|
+
const path = pathToFunc("/v0/generic/supported_chains/get")();
|
|
54077
|
+
const query = encodeFormQuery({
|
|
54078
|
+
protocol: payload.protocol
|
|
54079
|
+
});
|
|
54080
|
+
const headers = new Headers(compactMap({
|
|
54081
|
+
Accept: "application/json"
|
|
54082
|
+
}));
|
|
54083
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
54084
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
54085
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54086
|
+
const context = {
|
|
54087
|
+
options: client._options,
|
|
54088
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
54089
|
+
operationID: "generic_supported_chains",
|
|
54090
|
+
oAuth2Scopes: [],
|
|
54091
|
+
resolvedSecurity: requestSecurity,
|
|
54092
|
+
securitySource: client._options.apiKeyAuth,
|
|
54093
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
54094
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
54095
|
+
};
|
|
54096
|
+
const requestRes = client._createRequest(context, {
|
|
54097
|
+
security: requestSecurity,
|
|
54098
|
+
method: "GET",
|
|
54099
|
+
baseURL: options?.serverURL,
|
|
54100
|
+
path,
|
|
54101
|
+
headers,
|
|
54102
|
+
query,
|
|
54103
|
+
body,
|
|
54104
|
+
userAgent: client._options.userAgent,
|
|
54105
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
54106
|
+
}, options);
|
|
54107
|
+
if (!requestRes.ok) {
|
|
54108
|
+
return [requestRes, { status: "invalid" }];
|
|
54109
|
+
}
|
|
54110
|
+
const req = requestRes.value;
|
|
54111
|
+
const doResult = await client._do(req, {
|
|
54112
|
+
context,
|
|
54113
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
54114
|
+
retryConfig: context.retryConfig,
|
|
54115
|
+
retryCodes: context.retryCodes
|
|
54116
|
+
});
|
|
54117
|
+
if (!doResult.ok) {
|
|
54118
|
+
return [doResult, { status: "request-error", request: req }];
|
|
54119
|
+
}
|
|
54120
|
+
const response = doResult.value;
|
|
54121
|
+
const responseFields = {
|
|
54122
|
+
HttpMeta: { Response: response, Request: req }
|
|
54123
|
+
};
|
|
54124
|
+
const [result] = await match(json(200, SupportedChainInfo$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
|
|
54125
|
+
if (!result.ok) {
|
|
54126
|
+
return [result, { status: "complete", request: req, response }];
|
|
54127
|
+
}
|
|
54128
|
+
return [result, { status: "complete", request: req, response }];
|
|
54129
|
+
}
|
|
54130
|
+
var init_universalSupportedChains = __esm(() => {
|
|
54131
|
+
init_encodings();
|
|
54132
|
+
init_matchers();
|
|
54133
|
+
init_primitives();
|
|
54134
|
+
init_schemas();
|
|
54135
|
+
init_security();
|
|
54136
|
+
init_url();
|
|
54137
|
+
init_components();
|
|
54138
|
+
init_errors2();
|
|
54139
|
+
init_operations();
|
|
54140
|
+
init_async();
|
|
54141
|
+
});
|
|
54142
|
+
|
|
54143
|
+
// src/mcp-server/tools/universalSupportedChains.ts
|
|
54144
|
+
var args76, tool$universalSupportedChains;
|
|
54145
|
+
var init_universalSupportedChains2 = __esm(() => {
|
|
54146
|
+
init_universalSupportedChains();
|
|
54147
|
+
init_operations();
|
|
54148
|
+
init_tools();
|
|
54149
|
+
args76 = {
|
|
54150
|
+
request: GenericSupportedChainsRequest$inboundSchema
|
|
54151
|
+
};
|
|
54152
|
+
tool$universalSupportedChains = {
|
|
54153
|
+
name: "universal-supported-chains",
|
|
54154
|
+
description: `List Supported Chains
|
|
54155
|
+
|
|
54156
|
+
Get the list of supported chains by the Compass API.`,
|
|
54157
|
+
args: args76,
|
|
54158
|
+
tool: async (client, args77, ctx) => {
|
|
54159
|
+
const [result, apiCall] = await universalSupportedChains(client, args77.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54160
|
+
if (!result.ok) {
|
|
54161
|
+
return {
|
|
54162
|
+
content: [{ type: "text", text: result.error.message }],
|
|
54163
|
+
isError: true
|
|
54164
|
+
};
|
|
54165
|
+
}
|
|
54166
|
+
const value = result.value;
|
|
54167
|
+
return formatResult(value, apiCall);
|
|
54168
|
+
}
|
|
54169
|
+
};
|
|
54170
|
+
});
|
|
54171
|
+
|
|
54172
|
+
// src/funcs/universalSupportedTokens.ts
|
|
54173
|
+
function universalSupportedTokens(client, request, options) {
|
|
54174
|
+
return new APIPromise($do77(client, request, options));
|
|
54175
|
+
}
|
|
54176
|
+
async function $do77(client, request, options) {
|
|
53993
54177
|
const parsed = safeParse(request, (value) => GenericSupportedTokensRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53994
54178
|
if (!parsed.ok) {
|
|
53995
54179
|
return [parsed, { status: "invalid" }];
|
|
@@ -54064,12 +54248,12 @@ var init_universalSupportedTokens = __esm(() => {
|
|
|
54064
54248
|
});
|
|
54065
54249
|
|
|
54066
54250
|
// src/mcp-server/tools/universalSupportedTokens.ts
|
|
54067
|
-
var
|
|
54251
|
+
var args77, tool$universalSupportedTokens;
|
|
54068
54252
|
var init_universalSupportedTokens2 = __esm(() => {
|
|
54069
54253
|
init_universalSupportedTokens();
|
|
54070
54254
|
init_operations();
|
|
54071
54255
|
init_tools();
|
|
54072
|
-
|
|
54256
|
+
args77 = {
|
|
54073
54257
|
request: GenericSupportedTokensRequest$inboundSchema
|
|
54074
54258
|
};
|
|
54075
54259
|
tool$universalSupportedTokens = {
|
|
@@ -54077,9 +54261,9 @@ var init_universalSupportedTokens2 = __esm(() => {
|
|
|
54077
54261
|
description: `List Supported Tokens
|
|
54078
54262
|
|
|
54079
54263
|
Get the list of supported tokens on a chain by the Compass API.`,
|
|
54080
|
-
args:
|
|
54081
|
-
tool: async (client,
|
|
54082
|
-
const [result, apiCall] = await universalSupportedTokens(client,
|
|
54264
|
+
args: args77,
|
|
54265
|
+
tool: async (client, args78, ctx) => {
|
|
54266
|
+
const [result, apiCall] = await universalSupportedTokens(client, args78.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54083
54267
|
if (!result.ok) {
|
|
54084
54268
|
return {
|
|
54085
54269
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54094,9 +54278,9 @@ Get the list of supported tokens on a chain by the Compass API.`,
|
|
|
54094
54278
|
|
|
54095
54279
|
// src/funcs/universalUnwrapWeth.ts
|
|
54096
54280
|
function universalUnwrapWeth(client, request, options) {
|
|
54097
|
-
return new APIPromise($
|
|
54281
|
+
return new APIPromise($do78(client, request, options));
|
|
54098
54282
|
}
|
|
54099
|
-
async function $
|
|
54283
|
+
async function $do78(client, request, options) {
|
|
54100
54284
|
const parsed = safeParse(request, (value) => UnwrapWethRequest$outboundSchema.parse(value), "Input validation failed");
|
|
54101
54285
|
if (!parsed.ok) {
|
|
54102
54286
|
return [parsed, { status: "invalid" }];
|
|
@@ -54167,12 +54351,12 @@ var init_universalUnwrapWeth = __esm(() => {
|
|
|
54167
54351
|
});
|
|
54168
54352
|
|
|
54169
54353
|
// src/mcp-server/tools/universalUnwrapWeth.ts
|
|
54170
|
-
var
|
|
54354
|
+
var args78, tool$universalUnwrapWeth;
|
|
54171
54355
|
var init_universalUnwrapWeth2 = __esm(() => {
|
|
54172
54356
|
init_universalUnwrapWeth();
|
|
54173
54357
|
init_components();
|
|
54174
54358
|
init_tools();
|
|
54175
|
-
|
|
54359
|
+
args78 = {
|
|
54176
54360
|
request: UnwrapWethRequest$inboundSchema
|
|
54177
54361
|
};
|
|
54178
54362
|
tool$universalUnwrapWeth = {
|
|
@@ -54181,9 +54365,9 @@ var init_universalUnwrapWeth2 = __esm(() => {
|
|
|
54181
54365
|
|
|
54182
54366
|
Unwrapping WETH converts the ERC-20 compliant form of ETH back to native ETH that
|
|
54183
54367
|
can be used for gas and other native purposes.`,
|
|
54184
|
-
args:
|
|
54185
|
-
tool: async (client,
|
|
54186
|
-
const [result, apiCall] = await universalUnwrapWeth(client,
|
|
54368
|
+
args: args78,
|
|
54369
|
+
tool: async (client, args79, ctx) => {
|
|
54370
|
+
const [result, apiCall] = await universalUnwrapWeth(client, args79.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54187
54371
|
if (!result.ok) {
|
|
54188
54372
|
return {
|
|
54189
54373
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54198,9 +54382,9 @@ can be used for gas and other native purposes.`,
|
|
|
54198
54382
|
|
|
54199
54383
|
// src/funcs/universalVisualizePortfolio.ts
|
|
54200
54384
|
function universalVisualizePortfolio(client, request, options) {
|
|
54201
|
-
return new APIPromise($
|
|
54385
|
+
return new APIPromise($do79(client, request, options));
|
|
54202
54386
|
}
|
|
54203
|
-
async function $
|
|
54387
|
+
async function $do79(client, request, options) {
|
|
54204
54388
|
const parsed = safeParse(request, (value) => GenericVisualizePortfolioRequest$outboundSchema.parse(value), "Input validation failed");
|
|
54205
54389
|
if (!parsed.ok) {
|
|
54206
54390
|
return [parsed, { status: "invalid" }];
|
|
@@ -54276,12 +54460,12 @@ var init_universalVisualizePortfolio = __esm(() => {
|
|
|
54276
54460
|
});
|
|
54277
54461
|
|
|
54278
54462
|
// src/mcp-server/tools/universalVisualizePortfolio.ts
|
|
54279
|
-
var
|
|
54463
|
+
var args79, tool$universalVisualizePortfolio;
|
|
54280
54464
|
var init_universalVisualizePortfolio2 = __esm(() => {
|
|
54281
54465
|
init_universalVisualizePortfolio();
|
|
54282
54466
|
init_operations();
|
|
54283
54467
|
init_tools();
|
|
54284
|
-
|
|
54468
|
+
args79 = {
|
|
54285
54469
|
request: GenericVisualizePortfolioRequest$inboundSchema
|
|
54286
54470
|
};
|
|
54287
54471
|
tool$universalVisualizePortfolio = {
|
|
@@ -54293,9 +54477,9 @@ Generate a visual representation of the token portfolio for a wallet address.
|
|
|
54293
54477
|
The response is an SVG image of a pie chart depicting the relative distribution of
|
|
54294
54478
|
tokens held, colored and labeled with token symbols, percentages and token values in
|
|
54295
54479
|
USD.`,
|
|
54296
|
-
args:
|
|
54297
|
-
tool: async (client,
|
|
54298
|
-
const [result, apiCall] = await universalVisualizePortfolio(client,
|
|
54480
|
+
args: args79,
|
|
54481
|
+
tool: async (client, args80, ctx) => {
|
|
54482
|
+
const [result, apiCall] = await universalVisualizePortfolio(client, args80.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54299
54483
|
if (!result.ok) {
|
|
54300
54484
|
return {
|
|
54301
54485
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54310,9 +54494,9 @@ USD.`,
|
|
|
54310
54494
|
|
|
54311
54495
|
// src/funcs/universalWrapEth.ts
|
|
54312
54496
|
function universalWrapEth(client, request, options) {
|
|
54313
|
-
return new APIPromise($
|
|
54497
|
+
return new APIPromise($do80(client, request, options));
|
|
54314
54498
|
}
|
|
54315
|
-
async function $
|
|
54499
|
+
async function $do80(client, request, options) {
|
|
54316
54500
|
const parsed = safeParse(request, (value) => WrapEthRequest$outboundSchema.parse(value), "Input validation failed");
|
|
54317
54501
|
if (!parsed.ok) {
|
|
54318
54502
|
return [parsed, { status: "invalid" }];
|
|
@@ -54383,12 +54567,12 @@ var init_universalWrapEth = __esm(() => {
|
|
|
54383
54567
|
});
|
|
54384
54568
|
|
|
54385
54569
|
// src/mcp-server/tools/universalWrapEth.ts
|
|
54386
|
-
var
|
|
54570
|
+
var args80, tool$universalWrapEth;
|
|
54387
54571
|
var init_universalWrapEth2 = __esm(() => {
|
|
54388
54572
|
init_universalWrapEth();
|
|
54389
54573
|
init_components();
|
|
54390
54574
|
init_tools();
|
|
54391
|
-
|
|
54575
|
+
args80 = {
|
|
54392
54576
|
request: WrapEthRequest$inboundSchema
|
|
54393
54577
|
};
|
|
54394
54578
|
tool$universalWrapEth = {
|
|
@@ -54397,9 +54581,9 @@ var init_universalWrapEth2 = __esm(() => {
|
|
|
54397
54581
|
|
|
54398
54582
|
Wrapping ETH creates an ERC20 compliant form of ETH that is typically needed for
|
|
54399
54583
|
it to be traded on DeFi protocols.`,
|
|
54400
|
-
args:
|
|
54401
|
-
tool: async (client,
|
|
54402
|
-
const [result, apiCall] = await universalWrapEth(client,
|
|
54584
|
+
args: args80,
|
|
54585
|
+
tool: async (client, args81, ctx) => {
|
|
54586
|
+
const [result, apiCall] = await universalWrapEth(client, args81.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54403
54587
|
if (!result.ok) {
|
|
54404
54588
|
return {
|
|
54405
54589
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54416,7 +54600,7 @@ it to be traded on DeFi protocols.`,
|
|
|
54416
54600
|
function createMCPServer(deps) {
|
|
54417
54601
|
const server = new McpServer({
|
|
54418
54602
|
name: "CompassApiSDK",
|
|
54419
|
-
version: "0.5.
|
|
54603
|
+
version: "0.5.51"
|
|
54420
54604
|
});
|
|
54421
54605
|
const client = new CompassApiSDKCore({
|
|
54422
54606
|
apiKeyAuth: deps.apiKeyAuth,
|
|
@@ -54485,6 +54669,7 @@ function createMCPServer(deps) {
|
|
|
54485
54669
|
tool(tool$universalPortfolio);
|
|
54486
54670
|
tool(tool$universalVisualizePortfolio);
|
|
54487
54671
|
tool(tool$universalSupportedTokens);
|
|
54672
|
+
tool(tool$universalSupportedChains);
|
|
54488
54673
|
tool(tool$universalAllowance);
|
|
54489
54674
|
tool(tool$universalEns);
|
|
54490
54675
|
tool(tool$universalWrapEth);
|
|
@@ -54591,6 +54776,7 @@ var init_server2 = __esm(() => {
|
|
|
54591
54776
|
init_universalAllowanceSet2();
|
|
54592
54777
|
init_universalEns2();
|
|
54593
54778
|
init_universalPortfolio2();
|
|
54779
|
+
init_universalSupportedChains2();
|
|
54594
54780
|
init_universalSupportedTokens2();
|
|
54595
54781
|
init_universalUnwrapWeth2();
|
|
54596
54782
|
init_universalVisualizePortfolio2();
|
|
@@ -55790,7 +55976,7 @@ var routes = ln({
|
|
|
55790
55976
|
var app = _e(routes, {
|
|
55791
55977
|
name: "mcp",
|
|
55792
55978
|
versionInfo: {
|
|
55793
|
-
currentVersion: "0.5.
|
|
55979
|
+
currentVersion: "0.5.51"
|
|
55794
55980
|
}
|
|
55795
55981
|
});
|
|
55796
55982
|
Yt(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -55798,5 +55984,5 @@ export {
|
|
|
55798
55984
|
app
|
|
55799
55985
|
};
|
|
55800
55986
|
|
|
55801
|
-
//# debugId=
|
|
55987
|
+
//# debugId=C756BB1FE87AB9A364756E2164756E21
|
|
55802
55988
|
//# sourceMappingURL=mcp-server.js.map
|