@continuumdao/ctm-mpc-defi 0.2.13 → 0.2.17
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/dist/agent/catalog.cjs +1149 -287
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +1655 -306
- package/dist/agent/catalog.js +1144 -288
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/_shared/multisign-mcp-gas.md +7 -4
- package/dist/agent/skills/circle-cctp/SKILL.md +63 -0
- package/dist/chains/evm/index.cjs +75 -0
- package/dist/chains/evm/index.cjs.map +1 -1
- package/dist/chains/evm/index.d.ts +31 -1
- package/dist/chains/evm/index.js +73 -2
- package/dist/chains/evm/index.js.map +1 -1
- package/dist/index.cjs +140 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +138 -34
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/circle-cctp/index.cjs +1067 -0
- package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -0
- package/dist/protocols/evm/circle-cctp/index.d.ts +281 -0
- package/dist/protocols/evm/circle-cctp/index.js +1026 -0
- package/dist/protocols/evm/circle-cctp/index.js.map +1 -0
- package/dist/protocols/evm/euler-v2/index.cjs +29 -2
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.d.ts +23 -1
- package/dist/protocols/evm/euler-v2/index.js +29 -3
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/gmx/index.cjs +42 -8
- package/dist/protocols/evm/gmx/index.cjs.map +1 -1
- package/dist/protocols/evm/gmx/index.d.ts +20 -4
- package/dist/protocols/evm/gmx/index.js +42 -9
- package/dist/protocols/evm/gmx/index.js.map +1 -1
- package/dist/protocols/evm/maple/index.cjs +9 -1
- package/dist/protocols/evm/maple/index.cjs.map +1 -1
- package/dist/protocols/evm/maple/index.d.ts +2 -1
- package/dist/protocols/evm/maple/index.js +9 -1
- package/dist/protocols/evm/maple/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +56 -0
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +28 -1
- package/dist/protocols/evm/morpho/index.js +56 -1
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +98 -26
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.js +99 -27
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +6 -1
package/dist/agent/catalog.js
CHANGED
|
@@ -408,7 +408,7 @@ var EVM_COMMON_PARAM_DOCS = {
|
|
|
408
408
|
}
|
|
409
409
|
};
|
|
410
410
|
var MULTISIGN_SUBMIT_OUTPUT_DOC = {
|
|
411
|
-
description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with
|
|
411
|
+
description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not poll wait_for_sign_request_ready after submit (Join may take days). Do not call the same build tool again if requestId was returned.",
|
|
412
412
|
fields: {
|
|
413
413
|
requestId: {
|
|
414
414
|
type: "string",
|
|
@@ -420,7 +420,7 @@ var MULTISIGN_SUBMIT_OUTPUT_DOC = {
|
|
|
420
420
|
},
|
|
421
421
|
followUp: {
|
|
422
422
|
type: "string",
|
|
423
|
-
description: "Lifecycle next steps (
|
|
423
|
+
description: "Lifecycle next steps (sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result). No polling after submit."
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
};
|
|
@@ -478,7 +478,6 @@ var MANAGEMENT_SIG_DOC = {
|
|
|
478
478
|
// src/agent/mcpMultisignSubmitMeta.ts
|
|
479
479
|
var MCP_MULTISIGN_SUBMIT_DESCRIPTION_SUFFIX = "Builds the unsigned batch, signs the management envelope, and POSTs /multiSignRequest. Returns { requestId } on success \u2014 do not call again; use list_sign_requests to verify duplicates.";
|
|
480
480
|
var MCP_MULTISIGN_SUBMIT_FOLLOW_UP = [
|
|
481
|
-
"wait_for_sign_request_ready",
|
|
482
481
|
"sign_request_agree",
|
|
483
482
|
"trigger_sign_result",
|
|
484
483
|
"broadcast_sign_result"
|
|
@@ -616,13 +615,287 @@ var jsonObjectSchema = z.record(z.unknown());
|
|
|
616
615
|
function parseMultisignBuilderOutput(data) {
|
|
617
616
|
return multisignOutputSchema.parse(data);
|
|
618
617
|
}
|
|
618
|
+
|
|
619
|
+
// src/agent/schemas/chainPreprocess.ts
|
|
620
|
+
function preprocessObject(raw) {
|
|
621
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
622
|
+
return { ...raw };
|
|
623
|
+
}
|
|
624
|
+
function firstDefined(...values) {
|
|
625
|
+
for (const v of values) {
|
|
626
|
+
if (v === void 0 || v === null) continue;
|
|
627
|
+
if (typeof v === "string" && !v.trim()) continue;
|
|
628
|
+
return v;
|
|
629
|
+
}
|
|
630
|
+
return void 0;
|
|
631
|
+
}
|
|
632
|
+
function aliasField(o, target, ...sources) {
|
|
633
|
+
if (firstDefined(o[target]) != null) return;
|
|
634
|
+
const val = firstDefined(...sources.map((k) => o[k]));
|
|
635
|
+
if (val != null) o[target] = val;
|
|
636
|
+
}
|
|
637
|
+
function derivePurposeIfMissing(o, build) {
|
|
638
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
639
|
+
if (purposeText) {
|
|
640
|
+
o.purposeText = purposeText;
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
const derived = build(o);
|
|
644
|
+
if (derived) o.purposeText = derived;
|
|
645
|
+
}
|
|
646
|
+
function isLongToDirection(o) {
|
|
647
|
+
if (firstDefined(o.direction) != null) return;
|
|
648
|
+
const raw = o.isLong;
|
|
649
|
+
if (typeof raw === "boolean") {
|
|
650
|
+
o.direction = raw ? "long" : "short";
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
if (typeof raw === "string") {
|
|
654
|
+
const t = raw.trim().toLowerCase();
|
|
655
|
+
if (t === "true" || t === "long") o.direction = "long";
|
|
656
|
+
else if (t === "false" || t === "short") o.direction = "short";
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
function preprocessGmxGmBuildInput(raw) {
|
|
660
|
+
const o = preprocessObject(raw);
|
|
661
|
+
if (!o) return raw;
|
|
662
|
+
aliasField(o, "marketSymbol", "symbol", "market", "gmSymbol");
|
|
663
|
+
derivePurposeIfMissing(o, (x) => {
|
|
664
|
+
const sym = String(x.marketSymbol ?? x.symbol ?? "").trim();
|
|
665
|
+
const amt = String(x.collateralAmountHuman ?? x.gmAmountHuman ?? "").trim();
|
|
666
|
+
if (sym && amt) return `GMX GM ${sym} ${amt}`;
|
|
667
|
+
return void 0;
|
|
668
|
+
});
|
|
669
|
+
return o;
|
|
670
|
+
}
|
|
671
|
+
function preprocessGmxDecreaseInput(raw) {
|
|
672
|
+
const o = preprocessObject(raw);
|
|
673
|
+
if (!o) return raw;
|
|
674
|
+
aliasField(o, "symbol", "symbol", "indexName", "marketSymbol");
|
|
675
|
+
aliasField(o, "sizeUsdHuman", "sizeUsdHuman", "sizeUsd", "sizeInUsd");
|
|
676
|
+
aliasField(o, "collateralToken", "collateralToken", "collateralSymbol");
|
|
677
|
+
isLongToDirection(o);
|
|
678
|
+
derivePurposeIfMissing(o, (x) => {
|
|
679
|
+
const sym = String(x.symbol ?? "").trim();
|
|
680
|
+
const dir = String(x.direction ?? "").trim();
|
|
681
|
+
const size = String(x.sizeUsdHuman ?? "").trim();
|
|
682
|
+
if (sym && dir && size) return `GMX decrease ${dir} ${sym} ${size} USD`;
|
|
683
|
+
return void 0;
|
|
684
|
+
});
|
|
685
|
+
return o;
|
|
686
|
+
}
|
|
687
|
+
function preprocessGmxIncreaseInput(raw) {
|
|
688
|
+
const o = preprocessObject(raw);
|
|
689
|
+
if (!o) return raw;
|
|
690
|
+
aliasField(o, "symbol", "symbol", "indexName", "marketSymbol");
|
|
691
|
+
derivePurposeIfMissing(o, (x) => {
|
|
692
|
+
const sym = String(x.symbol ?? "").trim();
|
|
693
|
+
const dir = String(x.direction ?? "").trim();
|
|
694
|
+
const size = String(x.sizeUsdHuman ?? "").trim();
|
|
695
|
+
if (sym && dir && size) return `GMX ${dir} ${sym} ${size} USD`;
|
|
696
|
+
return void 0;
|
|
697
|
+
});
|
|
698
|
+
return o;
|
|
699
|
+
}
|
|
700
|
+
function preprocessHyperliquidCoinInput(raw) {
|
|
701
|
+
const o = preprocessObject(raw);
|
|
702
|
+
if (!o) return raw;
|
|
703
|
+
aliasField(o, "coin", "coin", "name", "resolvedCoin", "symbol");
|
|
704
|
+
return o;
|
|
705
|
+
}
|
|
706
|
+
function preprocessHyperliquidLimitOrderInput(raw) {
|
|
707
|
+
const o = preprocessHyperliquidCoinInput(raw);
|
|
708
|
+
if (!preprocessObject(o)) return raw;
|
|
709
|
+
aliasField(o, "limitPxHuman", "limitPxHuman", "limitPx", "markPx");
|
|
710
|
+
aliasField(o, "szHuman", "szHuman", "sz", "size");
|
|
711
|
+
derivePurposeIfMissing(o, (x) => {
|
|
712
|
+
const coin = String(x.coin ?? "").trim();
|
|
713
|
+
const side = x.isBuy === true || x.isBuy === "true" ? "buy" : "sell";
|
|
714
|
+
const sz = String(x.szHuman ?? "").trim();
|
|
715
|
+
if (coin && sz) return `HL limit ${side} ${coin} ${sz}`;
|
|
716
|
+
return void 0;
|
|
717
|
+
});
|
|
718
|
+
return o;
|
|
719
|
+
}
|
|
720
|
+
function preprocessHyperliquidCloseInput(raw) {
|
|
721
|
+
const o = preprocessHyperliquidCoinInput(raw);
|
|
722
|
+
if (!preprocessObject(o)) return raw;
|
|
723
|
+
aliasField(o, "szHuman", "szHuman", "sz", "size");
|
|
724
|
+
aliasField(o, "limitPxHuman", "limitPxHuman", "limitPx", "markPx");
|
|
725
|
+
derivePurposeIfMissing(o, (x) => {
|
|
726
|
+
const coin = String(x.coin ?? "").trim();
|
|
727
|
+
const sz = String(x.szHuman ?? "").trim();
|
|
728
|
+
if (coin && sz) return `HL close ${coin} ${sz}`;
|
|
729
|
+
return void 0;
|
|
730
|
+
});
|
|
731
|
+
return o;
|
|
732
|
+
}
|
|
733
|
+
function preprocessHyperliquidVaultDepositInput(raw) {
|
|
734
|
+
const o = preprocessObject(raw);
|
|
735
|
+
if (!o) return raw;
|
|
736
|
+
derivePurposeIfMissing(o, (x) => {
|
|
737
|
+
const name = String(x.vaultName ?? "").trim();
|
|
738
|
+
const usd = String(x.usdHuman ?? "").trim();
|
|
739
|
+
if (name && usd) return `HL vault deposit ${usd} into ${name}`;
|
|
740
|
+
if (usd) return `HL vault deposit ${usd}`;
|
|
741
|
+
return void 0;
|
|
742
|
+
});
|
|
743
|
+
return o;
|
|
744
|
+
}
|
|
745
|
+
function preprocessHyperliquidVaultWithdrawInput(raw) {
|
|
746
|
+
const o = preprocessObject(raw);
|
|
747
|
+
if (!o) return raw;
|
|
748
|
+
aliasField(o, "usdHuman", "usdHuman", "equity");
|
|
749
|
+
derivePurposeIfMissing(o, (x) => {
|
|
750
|
+
const usd = String(x.usdHuman ?? "").trim();
|
|
751
|
+
if (usd) return `HL vault withdraw ${usd}`;
|
|
752
|
+
return void 0;
|
|
753
|
+
});
|
|
754
|
+
return o;
|
|
755
|
+
}
|
|
756
|
+
function preprocessHyperliquidUndelegateInput(raw) {
|
|
757
|
+
const o = preprocessObject(raw);
|
|
758
|
+
if (!o) return raw;
|
|
759
|
+
aliasField(o, "hypeHuman", "hypeHuman", "amount");
|
|
760
|
+
return o;
|
|
761
|
+
}
|
|
762
|
+
function preprocessUniswapLpCreateInput(raw) {
|
|
763
|
+
const o = preprocessObject(raw);
|
|
764
|
+
if (!o) return raw;
|
|
765
|
+
aliasField(o, "poolPreset", "poolPreset", "presetId");
|
|
766
|
+
const pool = o.existingPool;
|
|
767
|
+
if (pool && typeof pool === "object" && !Array.isArray(pool)) {
|
|
768
|
+
const p = pool;
|
|
769
|
+
aliasField(p, "token0Address", "token0Address", "token0");
|
|
770
|
+
aliasField(p, "token1Address", "token1Address", "token1");
|
|
771
|
+
aliasField(p, "poolReference", "poolReference", "poolId");
|
|
772
|
+
}
|
|
773
|
+
return o;
|
|
774
|
+
}
|
|
775
|
+
function preprocessUniswapLpNftInput(raw) {
|
|
776
|
+
const o = preprocessObject(raw);
|
|
777
|
+
if (!o) return raw;
|
|
778
|
+
aliasField(o, "nftTokenId", "nftTokenId", "tokenId");
|
|
779
|
+
return o;
|
|
780
|
+
}
|
|
781
|
+
function preprocessUniswapLpCollectInput(raw) {
|
|
782
|
+
const o = preprocessObject(raw);
|
|
783
|
+
if (!o) return raw;
|
|
784
|
+
aliasField(o, "tokenId", "tokenId", "nftTokenId");
|
|
785
|
+
return o;
|
|
786
|
+
}
|
|
787
|
+
function tokenAddressFromQuoteSnapshot(quote, side) {
|
|
788
|
+
const inner = quote.quote;
|
|
789
|
+
if (!inner || typeof inner !== "object" || Array.isArray(inner)) return void 0;
|
|
790
|
+
const row = inner[side];
|
|
791
|
+
const token = row?.token;
|
|
792
|
+
return typeof token === "string" && token.trim() ? token.trim() : void 0;
|
|
793
|
+
}
|
|
794
|
+
function preprocessUniswapBuildSwapInput(raw) {
|
|
795
|
+
const o = preprocessObject(raw);
|
|
796
|
+
if (!o) return raw;
|
|
797
|
+
aliasField(o, "fullQuoteSnapshot", "fullQuoteSnapshot", "fullQuoteFromPermit", "quote");
|
|
798
|
+
const createResp = firstDefined(o.createSwapResponse, o.create_swap_response, o.createSwap);
|
|
799
|
+
if (createResp != null) o.createSwapResponse = createResp;
|
|
800
|
+
if (!firstDefined(o.swap) && createResp && typeof createResp === "object" && !Array.isArray(createResp)) {
|
|
801
|
+
const nested = createResp.swap;
|
|
802
|
+
if (nested != null) o.swap = nested;
|
|
803
|
+
}
|
|
804
|
+
const quote = o.fullQuoteSnapshot && typeof o.fullQuoteSnapshot === "object" && !Array.isArray(o.fullQuoteSnapshot) ? o.fullQuoteSnapshot : null;
|
|
805
|
+
if (quote && !firstDefined(o.tokenIn)) {
|
|
806
|
+
const tokenIn = tokenAddressFromQuoteSnapshot(quote, "input");
|
|
807
|
+
if (tokenIn) o.tokenIn = tokenIn;
|
|
808
|
+
}
|
|
809
|
+
derivePurposeIfMissing(o, () => "Uniswap V4 swap");
|
|
810
|
+
return o;
|
|
811
|
+
}
|
|
812
|
+
function preprocessUniswapBuildLpInput(raw) {
|
|
813
|
+
const o = preprocessUniswapLpNftInput(raw);
|
|
814
|
+
if (!preprocessObject(o)) return raw;
|
|
815
|
+
derivePurposeIfMissing(o, () => "Uniswap V4 liquidity");
|
|
816
|
+
return o;
|
|
817
|
+
}
|
|
818
|
+
function preprocessCurveBuildSwapInput(raw) {
|
|
819
|
+
const o = preprocessObject(raw);
|
|
820
|
+
if (!o) return raw;
|
|
821
|
+
const quote = o.quoteSnapshot && typeof o.quoteSnapshot === "object" && !Array.isArray(o.quoteSnapshot) ? o.quoteSnapshot : o;
|
|
822
|
+
aliasField(o, "tokenIn", "tokenIn", "tokenInRouterId", "tokenInAddress");
|
|
823
|
+
aliasField(o, "tokenOut", "tokenOut", "tokenOutRouterId", "tokenOutAddress");
|
|
824
|
+
aliasField(o, "amountHuman", "amountHuman", "inputAmount");
|
|
825
|
+
if (!firstDefined(o.tokenIn) && firstDefined(quote.tokenInRouterId)) {
|
|
826
|
+
o.tokenIn = quote.tokenInRouterId;
|
|
827
|
+
}
|
|
828
|
+
if (!firstDefined(o.tokenOut) && firstDefined(quote.tokenOutRouterId)) {
|
|
829
|
+
o.tokenOut = quote.tokenOutRouterId;
|
|
830
|
+
}
|
|
831
|
+
if (!firstDefined(o.amountHuman) && firstDefined(quote.inputAmount)) {
|
|
832
|
+
o.amountHuman = quote.inputAmount;
|
|
833
|
+
}
|
|
834
|
+
derivePurposeIfMissing(o, (x) => {
|
|
835
|
+
const amt = String(x.amountHuman ?? "").trim();
|
|
836
|
+
if (amt) return `Curve swap ${amt}`;
|
|
837
|
+
return void 0;
|
|
838
|
+
});
|
|
839
|
+
return o;
|
|
840
|
+
}
|
|
841
|
+
function preprocessMorphoBlueCollateralDepositInput(raw) {
|
|
842
|
+
const o = preprocessObject(raw);
|
|
843
|
+
if (!o) return raw;
|
|
844
|
+
aliasField(o, "collateralToken", "collateralToken", "collateralTokenAddress");
|
|
845
|
+
aliasField(o, "marketId", "marketId", "marketID");
|
|
846
|
+
derivePurposeIfMissing(o, (x) => {
|
|
847
|
+
const amt = String(x.amountHuman ?? "").trim();
|
|
848
|
+
const label = String(x.marketLabel ?? "").trim();
|
|
849
|
+
if (amt && label) return `Morpho Blue collateral ${amt} for ${label}`;
|
|
850
|
+
if (amt) return `Morpho Blue collateral deposit ${amt}`;
|
|
851
|
+
return void 0;
|
|
852
|
+
});
|
|
853
|
+
return o;
|
|
854
|
+
}
|
|
855
|
+
function preprocessMorphoBlueBorrowRepayInput(raw) {
|
|
856
|
+
const o = preprocessObject(raw);
|
|
857
|
+
if (!o) return raw;
|
|
858
|
+
aliasField(o, "loanToken", "loanToken", "loanTokenAddress");
|
|
859
|
+
return o;
|
|
860
|
+
}
|
|
861
|
+
function preprocessEulerV2IsolatedLendInput(raw) {
|
|
862
|
+
const o = preprocessObject(raw);
|
|
863
|
+
if (!o) return raw;
|
|
864
|
+
aliasField(o, "vault", "vault", "evaultAddress");
|
|
865
|
+
aliasField(o, "underlyingAddress", "underlyingAddress", "underlying");
|
|
866
|
+
aliasField(o, "marketName", "marketName", "vaultName");
|
|
867
|
+
derivePurposeIfMissing(o, (x) => {
|
|
868
|
+
const amt = String(x.assetAmountHuman ?? x.amountHuman ?? "").trim();
|
|
869
|
+
const label = String(x.marketName ?? x.vaultName ?? "").trim();
|
|
870
|
+
if (amt && label) return `Euler lend ${amt} into ${label}`;
|
|
871
|
+
if (amt) return `Euler vault deposit ${amt}`;
|
|
872
|
+
return void 0;
|
|
873
|
+
});
|
|
874
|
+
return o;
|
|
875
|
+
}
|
|
876
|
+
function preprocessAaveMultisignInput(action) {
|
|
877
|
+
return (raw) => {
|
|
878
|
+
const o = preprocessObject(raw);
|
|
879
|
+
if (!o) return raw;
|
|
880
|
+
derivePurposeIfMissing(o, (x) => {
|
|
881
|
+
const amt = String(x.amountHuman ?? "").trim();
|
|
882
|
+
const asset = String(x.underlying ?? "").trim();
|
|
883
|
+
if (amt && asset) return `Aave ${action} ${amt} ${asset}`;
|
|
884
|
+
if (amt) return `Aave ${action} ${amt}`;
|
|
885
|
+
return void 0;
|
|
886
|
+
});
|
|
887
|
+
return o;
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// src/agent/schemas/uniswapV4.ts
|
|
619
892
|
var uniswapQuoteTradeTypeSchema = z.enum(["EXACT_INPUT", "EXACT_OUTPUT"]);
|
|
620
893
|
var mcpUniswapV4QuoteInputSchema = z.object({
|
|
621
894
|
type: uniswapQuoteTradeTypeSchema.describe("EXACT_INPUT or EXACT_OUTPUT"),
|
|
622
895
|
amount: z.string().min(1).describe("Amount in token-in base units (wei string for ERC-20)"),
|
|
623
896
|
tokenIn: z.string().min(1).describe("Input token; 0x0 for native ETH"),
|
|
624
897
|
tokenOut: z.string().min(1).describe("Output token address"),
|
|
625
|
-
chainId:
|
|
898
|
+
chainId: agentEvmChainIdSchema.describe("tokenInChainId / same-chain default"),
|
|
626
899
|
uniswapApiKey: z.string().min(1).describe("Uniswap Trade API x-api-key"),
|
|
627
900
|
swapper: evmAddressSchema.optional().describe("MPC executor; omit if keyGen + managementNodeUrl provided"),
|
|
628
901
|
slippage: z.union([z.number(), z.string()]).optional().describe("Slippage percent; omit for API auto slippage"),
|
|
@@ -630,7 +903,7 @@ var mcpUniswapV4QuoteInputSchema = z.object({
|
|
|
630
903
|
managementNodeUrl: z.string().min(1).optional().describe("MPC node base URL; required with keyGen when swapper is omitted"),
|
|
631
904
|
tokenInChainId: z.union([z.number(), z.string()]).optional(),
|
|
632
905
|
tokenOutChainId: z.union([z.number(), z.string()]).optional(),
|
|
633
|
-
permit2Disabled:
|
|
906
|
+
permit2Disabled: agentOptionalBooleanSchema(),
|
|
634
907
|
baseUrl: z.string().optional(),
|
|
635
908
|
universalRouterVersion: z.string().optional()
|
|
636
909
|
});
|
|
@@ -652,18 +925,21 @@ var mcpUniswapV4CreateSwapOutputSchema = z.object({
|
|
|
652
925
|
}).passthrough().describe("{ swap: TransactionRequest, requestId?, gasFee? }");
|
|
653
926
|
var swapTxRequestSchema = jsonObjectSchema.describe("swap field from create_swap response (to, data, value)");
|
|
654
927
|
var mcpUniswapV4BuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
928
|
+
z.preprocess(
|
|
929
|
+
preprocessUniswapBuildSwapInput,
|
|
930
|
+
evmMultisignCommonInputSchema.extend({
|
|
931
|
+
tokenIn: evmAddressSchema.describe("Token in; 0x0 for native ETH"),
|
|
659
932
|
swap: swapTxRequestSchema,
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
933
|
+
createSwapResponse: z.object({
|
|
934
|
+
swap: swapTxRequestSchema,
|
|
935
|
+
requestId: z.string().optional(),
|
|
936
|
+
gasFee: z.string().optional()
|
|
937
|
+
}).passthrough().describe("Full create_swap response"),
|
|
938
|
+
fullQuoteSnapshot: jsonObjectSchema.describe("Quote JSON used for the swap"),
|
|
939
|
+
swapDeadlineUnix: z.number().describe("Same deadline passed to create_swap"),
|
|
940
|
+
slippagePercent: z.number().optional().describe("Extra approve headroom for EXACT_OUTPUT")
|
|
941
|
+
})
|
|
942
|
+
)
|
|
667
943
|
);
|
|
668
944
|
var lpExistingPoolSchema = z.object({
|
|
669
945
|
token0Address: evmAddressSchema,
|
|
@@ -693,22 +969,26 @@ var lpTickBoundsSchema = z.object({
|
|
|
693
969
|
var lpCommonApiInputSchema = z.object({
|
|
694
970
|
uniswapApiKey: z.string().min(1),
|
|
695
971
|
walletAddress: evmAddressSchema.optional(),
|
|
696
|
-
chainId:
|
|
972
|
+
chainId: agentEvmChainIdSchema,
|
|
697
973
|
slippageTolerance: z.number().optional(),
|
|
698
|
-
simulateTransaction:
|
|
974
|
+
simulateTransaction: agentOptionalBooleanSchema(),
|
|
699
975
|
baseUrl: z.string().optional(),
|
|
700
976
|
keyGen: z.string().optional(),
|
|
701
977
|
managementNodeUrl: z.string().optional()
|
|
702
978
|
});
|
|
703
|
-
var mcpUniswapV4LpCreatePositionInputSchema =
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
979
|
+
var mcpUniswapV4LpCreatePositionInputSchema = z.preprocess(
|
|
980
|
+
preprocessUniswapLpCreateInput,
|
|
981
|
+
lpCommonApiInputSchema.extend({
|
|
982
|
+
poolPreset: z.string().optional().describe("presetId from ctm_uniswap_v4_list_lp_pools \u2014 server resolves existingPool"),
|
|
983
|
+
existingPool: lpExistingPoolSchema.optional(),
|
|
984
|
+
newPool: lpNewPoolSchema.optional(),
|
|
985
|
+
independentToken: lpIndependentTokenSchema,
|
|
986
|
+
priceBounds: lpPriceBoundsSchema.optional(),
|
|
987
|
+
tickBounds: lpTickBoundsSchema.optional()
|
|
988
|
+
})
|
|
989
|
+
);
|
|
710
990
|
var mcpUniswapV4LpListPoolsInputSchema = z.object({
|
|
711
|
-
chainId:
|
|
991
|
+
chainId: agentEvmChainIdSchema,
|
|
712
992
|
pair: z.string().optional().describe("Optional filter, e.g. eth-usdc or ETH/USDC")
|
|
713
993
|
});
|
|
714
994
|
var mcpUniswapV4LpListPoolsOutputSchema = z.object({
|
|
@@ -735,26 +1015,35 @@ var mcpUniswapV4LpListPoolsOutputSchema = z.object({
|
|
|
735
1015
|
notes: z.string()
|
|
736
1016
|
});
|
|
737
1017
|
var mcpUniswapV4LpCreatePositionOutputSchema = jsonObjectSchema;
|
|
738
|
-
var mcpUniswapV4LpIncreaseInputSchema =
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
1018
|
+
var mcpUniswapV4LpIncreaseInputSchema = z.preprocess(
|
|
1019
|
+
preprocessUniswapLpNftInput,
|
|
1020
|
+
lpCommonApiInputSchema.extend({
|
|
1021
|
+
token0Address: evmAddressSchema,
|
|
1022
|
+
token1Address: evmAddressSchema,
|
|
1023
|
+
nftTokenId: z.union([z.string(), z.number()]).describe("tokenId from lp_list_positions"),
|
|
1024
|
+
independentToken: lpIndependentTokenSchema
|
|
1025
|
+
})
|
|
1026
|
+
);
|
|
744
1027
|
var mcpUniswapV4LpIncreaseOutputSchema = jsonObjectSchema;
|
|
745
|
-
var mcpUniswapV4LpDecreaseInputSchema =
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
1028
|
+
var mcpUniswapV4LpDecreaseInputSchema = z.preprocess(
|
|
1029
|
+
preprocessUniswapLpNftInput,
|
|
1030
|
+
lpCommonApiInputSchema.extend({
|
|
1031
|
+
token0Address: evmAddressSchema,
|
|
1032
|
+
token1Address: evmAddressSchema,
|
|
1033
|
+
nftTokenId: z.union([z.string(), z.number()]).describe("tokenId from lp_list_positions"),
|
|
1034
|
+
liquidityPercentageToDecrease: z.number().int().min(1).max(100)
|
|
1035
|
+
})
|
|
1036
|
+
);
|
|
751
1037
|
var mcpUniswapV4LpDecreaseOutputSchema = jsonObjectSchema;
|
|
752
|
-
var mcpUniswapV4LpClaimInputSchema =
|
|
753
|
-
|
|
754
|
-
|
|
1038
|
+
var mcpUniswapV4LpClaimInputSchema = z.preprocess(
|
|
1039
|
+
preprocessUniswapLpCollectInput,
|
|
1040
|
+
lpCommonApiInputSchema.extend({
|
|
1041
|
+
tokenId: z.union([z.string(), z.number()]).describe("tokenId from lp_list_positions")
|
|
1042
|
+
})
|
|
1043
|
+
);
|
|
755
1044
|
var mcpUniswapV4LpClaimOutputSchema = jsonObjectSchema;
|
|
756
1045
|
var mcpUniswapV4LpListPositionsInputSchema = z.object({
|
|
757
|
-
chainId:
|
|
1046
|
+
chainId: agentEvmChainIdSchema,
|
|
758
1047
|
keyGenId: z.string().min(1).optional(),
|
|
759
1048
|
walletAddress: evmAddressSchema.optional(),
|
|
760
1049
|
positionManagerAddress: evmAddressSchema.optional()
|
|
@@ -772,7 +1061,7 @@ var mcpUniswapV4LpListPositionsOutputSchema = z.object({
|
|
|
772
1061
|
)
|
|
773
1062
|
});
|
|
774
1063
|
var mcpUniswapV4RegisterPositionNftInputSchema = z.object({
|
|
775
|
-
chainId:
|
|
1064
|
+
chainId: agentEvmChainIdSchema,
|
|
776
1065
|
tokenId: z.union([z.string(), z.number()]),
|
|
777
1066
|
keyGenId: z.string().min(1).optional(),
|
|
778
1067
|
positionManagerAddress: evmAddressSchema.optional(),
|
|
@@ -786,7 +1075,7 @@ var mcpUniswapV4RegisterPositionNftOutputSchema = z.object({
|
|
|
786
1075
|
positionManager: evmAddressSchema
|
|
787
1076
|
});
|
|
788
1077
|
var mcpUniswapV4RegisterPositionFromMintTxInputSchema = z.object({
|
|
789
|
-
chainId:
|
|
1078
|
+
chainId: agentEvmChainIdSchema,
|
|
790
1079
|
txHash: z.string().min(1),
|
|
791
1080
|
keyGenId: z.string().min(1).optional(),
|
|
792
1081
|
walletAddress: evmAddressSchema.optional(),
|
|
@@ -805,28 +1094,37 @@ var lpBuildCommonSchema = {
|
|
|
805
1094
|
poolReference: z.string().optional()
|
|
806
1095
|
};
|
|
807
1096
|
var mcpUniswapV4BuildMintLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
808
|
-
evmMultisignCommonInputSchema.extend(lpBuildCommonSchema)
|
|
1097
|
+
z.preprocess(preprocessUniswapBuildLpInput, evmMultisignCommonInputSchema.extend(lpBuildCommonSchema))
|
|
809
1098
|
);
|
|
810
1099
|
var mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
1100
|
+
z.preprocess(
|
|
1101
|
+
preprocessUniswapBuildLpInput,
|
|
1102
|
+
evmMultisignCommonInputSchema.extend({
|
|
1103
|
+
...lpBuildCommonSchema,
|
|
1104
|
+
nftTokenId: z.union([z.string(), z.number()]).describe("tokenId from lp_list_positions")
|
|
1105
|
+
})
|
|
1106
|
+
)
|
|
815
1107
|
);
|
|
816
1108
|
var mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
1109
|
+
z.preprocess(
|
|
1110
|
+
preprocessUniswapBuildLpInput,
|
|
1111
|
+
evmMultisignCommonInputSchema.extend({
|
|
1112
|
+
...lpBuildCommonSchema,
|
|
1113
|
+
nftTokenId: z.union([z.string(), z.number()])
|
|
1114
|
+
})
|
|
1115
|
+
)
|
|
821
1116
|
);
|
|
822
1117
|
var mcpUniswapV4BuildCollectFeesMultisignInputSchema = withMultisignKeySourceRefine(
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1118
|
+
z.preprocess(
|
|
1119
|
+
preprocessUniswapBuildLpInput,
|
|
1120
|
+
evmMultisignCommonInputSchema.extend({
|
|
1121
|
+
...lpBuildCommonSchema,
|
|
1122
|
+
nftTokenId: z.union([z.string(), z.number()])
|
|
1123
|
+
})
|
|
1124
|
+
)
|
|
827
1125
|
);
|
|
828
1126
|
var mcpCurveDaoQuoteInputSchema = z.object({
|
|
829
|
-
chainId:
|
|
1127
|
+
chainId: agentEvmChainIdSchema.describe("EVM chain id (rpcUrl resolved from get_chain_registry rpcGateway)"),
|
|
830
1128
|
rpcUrl: z.string().min(1).optional().describe("JSON-RPC URL; continuum-mcp-server injects from chain registry \u2014 do not pass a public RPC URL"),
|
|
831
1129
|
tokenIn: z.string().min(1).describe("Input token address, or 0xeeee\u2026 / 0x0 / eth for native"),
|
|
832
1130
|
tokenOut: z.string().min(1).describe("Output token address or 0xeeee\u2026 native placeholder"),
|
|
@@ -837,13 +1135,112 @@ var mcpCurveDaoQuoteOutputSchema = jsonObjectSchema.describe(
|
|
|
837
1135
|
"Curve router quote: { inputAmount, output, route, priceImpactPercent?, tokenInRouterId, tokenOutRouterId }"
|
|
838
1136
|
);
|
|
839
1137
|
var mcpCurveDaoBuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
1138
|
+
z.preprocess(
|
|
1139
|
+
preprocessCurveBuildSwapInput,
|
|
1140
|
+
evmMultisignCommonInputSchema.extend({
|
|
1141
|
+
tokenIn: evmAddressSchema.describe("ERC-20 sold (native in uses WETH path in UI)"),
|
|
1142
|
+
tokenOut: z.string().min(1).describe("Output token or 0xeeee\u2026 native placeholder"),
|
|
1143
|
+
amountHuman: z.string().min(1).describe("Human-readable amount of tokenIn"),
|
|
1144
|
+
slippagePercent: z.number().gt(0).lt(100).describe("Slippage 0\u2013100 exclusive"),
|
|
1145
|
+
quoteSnapshot: jsonObjectSchema.optional().describe("Optional quote row from ctm_curve_dao_quote \u2014 aliases tokenIn/tokenOut/amountHuman")
|
|
1146
|
+
})
|
|
1147
|
+
)
|
|
846
1148
|
);
|
|
1149
|
+
var morphoExposureRowSchema = z.object({
|
|
1150
|
+
label: z.string(),
|
|
1151
|
+
allocatedUsdLabel: z.string(),
|
|
1152
|
+
allocationPercentLabel: z.string()
|
|
1153
|
+
});
|
|
1154
|
+
function preprocessMorphoVaultDepositInput(raw) {
|
|
1155
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1156
|
+
const o = { ...raw };
|
|
1157
|
+
const vaultAddr = o.vaultAddress ?? o.vault;
|
|
1158
|
+
if (vaultAddr != null) {
|
|
1159
|
+
o.vaultAddress = vaultAddr;
|
|
1160
|
+
o.vault = vaultAddr;
|
|
1161
|
+
}
|
|
1162
|
+
const underlyingAddr = o.underlyingAddress ?? o.underlying;
|
|
1163
|
+
if (underlyingAddr != null) {
|
|
1164
|
+
o.underlyingAddress = underlyingAddr;
|
|
1165
|
+
o.underlying = underlyingAddr;
|
|
1166
|
+
}
|
|
1167
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
1168
|
+
if (!purposeText) {
|
|
1169
|
+
const amt = String(o.amountHuman ?? "").trim();
|
|
1170
|
+
const label = String(o.vaultName ?? o.vaultSymbol ?? "").trim();
|
|
1171
|
+
if (amt && label) o.purposeText = `Deposit ${amt} into ${label}`;
|
|
1172
|
+
else if (amt) o.purposeText = `Morpho vault deposit ${amt}`;
|
|
1173
|
+
}
|
|
1174
|
+
return o;
|
|
1175
|
+
}
|
|
1176
|
+
function preprocessMorphoVaultWithdrawInput(raw) {
|
|
1177
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1178
|
+
const o = { ...raw };
|
|
1179
|
+
const vaultAddr = o.vaultAddress ?? o.vault;
|
|
1180
|
+
if (vaultAddr != null) {
|
|
1181
|
+
o.vaultAddress = vaultAddr;
|
|
1182
|
+
o.vault = vaultAddr;
|
|
1183
|
+
}
|
|
1184
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
1185
|
+
if (!purposeText) {
|
|
1186
|
+
const amt = String(o.amountHuman ?? "").trim();
|
|
1187
|
+
const label = String(o.vaultName ?? o.vaultSymbol ?? "").trim();
|
|
1188
|
+
if (amt && label) o.purposeText = `Withdraw ${amt} from ${label}`;
|
|
1189
|
+
else if (amt) o.purposeText = `Morpho vault withdraw ${amt}`;
|
|
1190
|
+
}
|
|
1191
|
+
return o;
|
|
1192
|
+
}
|
|
1193
|
+
var mcpMorphoFetchEarnVaultsInputSchema = z.object({
|
|
1194
|
+
chainId: agentEvmChainIdSchema,
|
|
1195
|
+
underlying: z.string().trim().min(1).optional().describe("Deposit asset symbol (e.g. USDC) or ERC-20 address. Omit to search all listed vaults on the chain."),
|
|
1196
|
+
query: z.string().trim().min(1).optional().describe("Case-insensitive filter on vault name, symbol, address, or underlying symbol (e.g. Steakhouse, bbqUSDC)."),
|
|
1197
|
+
limit: z.number().int().min(1).max(200).optional().describe("Max rows (default 50).")
|
|
1198
|
+
});
|
|
1199
|
+
var mcpMorphoFetchEarnVaultsOutputSchema = z.object({
|
|
1200
|
+
vaults: z.array(
|
|
1201
|
+
z.object({
|
|
1202
|
+
vaultAddress: z.string(),
|
|
1203
|
+
vaultName: z.string(),
|
|
1204
|
+
vaultSymbol: z.string(),
|
|
1205
|
+
underlyingAddress: z.string(),
|
|
1206
|
+
underlyingSymbol: z.string(),
|
|
1207
|
+
apy: z.string(),
|
|
1208
|
+
netApy: z.string(),
|
|
1209
|
+
netApy7d: z.string(),
|
|
1210
|
+
netApy30d: z.string(),
|
|
1211
|
+
netApy90d: z.string(),
|
|
1212
|
+
performanceFee: z.string(),
|
|
1213
|
+
managementFee: z.string().nullable(),
|
|
1214
|
+
totalDepositsUsd: z.string(),
|
|
1215
|
+
liquidityUsd: z.string(),
|
|
1216
|
+
exposure: z.array(morphoExposureRowSchema)
|
|
1217
|
+
})
|
|
1218
|
+
)
|
|
1219
|
+
});
|
|
1220
|
+
var mcpMorphoFetchBlueMarketsInputSchema = z.object({
|
|
1221
|
+
chainId: agentEvmChainIdSchema,
|
|
1222
|
+
collateral: z.string().trim().min(1).optional().describe("Collateral asset symbol or address (e.g. WETH, cbETH)."),
|
|
1223
|
+
loan: z.string().trim().min(1).optional().describe("Loan asset symbol or address (e.g. USDC)."),
|
|
1224
|
+
query: z.string().trim().min(1).optional().describe("Filter on market label, symbols, or marketId."),
|
|
1225
|
+
limit: z.number().int().min(1).max(200).optional()
|
|
1226
|
+
});
|
|
1227
|
+
var mcpMorphoFetchBlueMarketsOutputSchema = z.object({
|
|
1228
|
+
markets: z.array(
|
|
1229
|
+
z.object({
|
|
1230
|
+
marketId: z.string().describe("Pass to build_blue_* multisign tools"),
|
|
1231
|
+
marketLabel: z.string(),
|
|
1232
|
+
morphoBlueAddress: z.string(),
|
|
1233
|
+
collateralTokenAddress: z.string().describe("Copy as collateralToken for supply collateral"),
|
|
1234
|
+
collateralTokenSymbol: z.string(),
|
|
1235
|
+
collateralTokenDecimals: z.number().int(),
|
|
1236
|
+
loanTokenAddress: z.string().describe("Copy as loanToken for borrow/repay"),
|
|
1237
|
+
loanTokenSymbol: z.string(),
|
|
1238
|
+
loanTokenDecimals: z.number().int(),
|
|
1239
|
+
borrowApyLabel: z.string(),
|
|
1240
|
+
supplyApyLabel: z.string()
|
|
1241
|
+
})
|
|
1242
|
+
)
|
|
1243
|
+
});
|
|
847
1244
|
var mcpServerCommonInputSchema = z.object({
|
|
848
1245
|
keyGenId: z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
849
1246
|
chainId: z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
@@ -858,9 +1255,10 @@ var mcpServerSubmitOutputSchema = z.object({
|
|
|
858
1255
|
status: z.literal("submitted").optional().describe("Present when POST /multiSignRequest succeeded. Confirms the request exists on the node."),
|
|
859
1256
|
followUp: z.string().optional().describe(
|
|
860
1257
|
"Next MCP lifecycle steps. Do not call the same build_*_multisign tool again unless the user explicitly wants a duplicate order."
|
|
861
|
-
)
|
|
1258
|
+
),
|
|
1259
|
+
fees: z.record(z.unknown()).optional().describe("Protocol fee summary when available (e.g. Circle CCTP Forwarding Service quote used at propose).")
|
|
862
1260
|
}).describe(
|
|
863
|
-
"Submitted mpc-auth multiSignRequest. Continue with
|
|
1261
|
+
"Submitted mpc-auth multiSignRequest. Continue with sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not poll wait_for_sign_request_ready \u2014 Join agreement may take days."
|
|
864
1262
|
);
|
|
865
1263
|
var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
866
1264
|
"ctm_uniswap_v4_quote",
|
|
@@ -940,48 +1338,79 @@ var mcpSkySusdsRedeemInputSchema = mcpMultisignInput({
|
|
|
940
1338
|
sharesHuman: z.string().min(1)
|
|
941
1339
|
});
|
|
942
1340
|
var mcpAaveV4MarketIdSchema = z.string().min(1).optional().describe("UI market segment: main (Plus), core, or bluechip (Prime). Default main.");
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1341
|
+
function mcpAaveV4MultisignInput(fields, action) {
|
|
1342
|
+
return withMultisignKeySourceRefine(
|
|
1343
|
+
z.preprocess(preprocessAaveMultisignInput(action), evmMultisignCommonInputSchema.extend(fields))
|
|
1344
|
+
);
|
|
1345
|
+
}
|
|
1346
|
+
var mcpAaveV4HealthPreviewFields = {
|
|
1347
|
+
skipHealthPreview: agentOptionalBooleanSchema().describe(
|
|
1348
|
+
"Skip Aave v4 health-factor preview before withdraw/borrow/repay (not recommended)."
|
|
1349
|
+
),
|
|
1350
|
+
acknowledgeHealthRisk: agentOptionalBooleanSchema().describe(
|
|
946
1351
|
"Required true when preview returns a confirm-level health risk (withdraw/borrow/repay)."
|
|
947
1352
|
)
|
|
948
1353
|
};
|
|
949
|
-
var mcpAaveV4DepositInputSchema =
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
var
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
}
|
|
1354
|
+
var mcpAaveV4DepositInputSchema = mcpAaveV4MultisignInput(
|
|
1355
|
+
{
|
|
1356
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 continuum-mcp-server resolves spoke from Aave v4 API."),
|
|
1357
|
+
underlying: evmAddressSchema.describe(
|
|
1358
|
+
"Asset to supply. Native ETH: 0x0 or wrapped native with isNativeIn true."
|
|
1359
|
+
),
|
|
1360
|
+
amountHuman: z.string().min(1),
|
|
1361
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1362
|
+
isNativeIn: agentOptionalBooleanSchema().describe(
|
|
1363
|
+
"Wrap native to wrapped native before supply (e.g. ETH \u2192 WETH)."
|
|
1364
|
+
),
|
|
1365
|
+
enableAsCollateralAfterSupply: agentOptionalBooleanSchema().describe(
|
|
1366
|
+
"Append setUsingAsCollateral after supply in the same batch."
|
|
1367
|
+
)
|
|
1368
|
+
},
|
|
1369
|
+
"deposit"
|
|
1370
|
+
);
|
|
1371
|
+
var mcpAaveV4WithdrawInputSchema = mcpAaveV4MultisignInput(
|
|
1372
|
+
{
|
|
1373
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
1374
|
+
underlying: evmAddressSchema.describe("Supplied asset to withdraw."),
|
|
1375
|
+
amountHuman: z.string().min(1),
|
|
1376
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1377
|
+
...mcpAaveV4HealthPreviewFields
|
|
1378
|
+
},
|
|
1379
|
+
"withdraw"
|
|
1380
|
+
);
|
|
1381
|
+
var mcpAaveV4BorrowInputSchema = mcpAaveV4MultisignInput(
|
|
1382
|
+
{
|
|
1383
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
1384
|
+
underlying: evmAddressSchema.describe("Debt asset to borrow (e.g. USDC), not collateral."),
|
|
1385
|
+
amountHuman: z.string().min(1),
|
|
1386
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1387
|
+
collateralUnderlying: evmAddressSchema.optional().describe("Collateral token already supplied; helps pick hub when debt exists on multiple hubs."),
|
|
1388
|
+
...mcpAaveV4HealthPreviewFields
|
|
1389
|
+
},
|
|
1390
|
+
"borrow"
|
|
1391
|
+
);
|
|
1392
|
+
var mcpAaveV4RepayInputSchema = mcpAaveV4MultisignInput(
|
|
1393
|
+
{
|
|
1394
|
+
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
1395
|
+
underlying: evmAddressSchema.describe("Debt token to repay."),
|
|
1396
|
+
amountHuman: z.string().min(1),
|
|
1397
|
+
marketId: mcpAaveV4MarketIdSchema,
|
|
1398
|
+
...mcpAaveV4HealthPreviewFields
|
|
1399
|
+
},
|
|
1400
|
+
"repay"
|
|
1401
|
+
);
|
|
1402
|
+
var mcpEulerV2IsolatedLendInputSchema = withMultisignKeySourceRefine(
|
|
1403
|
+
z.preprocess(
|
|
1404
|
+
preprocessEulerV2IsolatedLendInput,
|
|
1405
|
+
evmMultisignCommonInputSchema.extend({
|
|
1406
|
+
vault: evmAddressSchema.describe("evaultAddress from ctm_euler_v2_fetch_lend_vaults"),
|
|
1407
|
+
assetAmountHuman: z.string().min(1),
|
|
1408
|
+
underlyingAddress: evmAddressSchema.optional().describe("underlyingAddress from fetch row \u2014 server resolves if omitted"),
|
|
1409
|
+
marketName: z.string().optional().describe("marketName from fetch row (purposeText)"),
|
|
1410
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
1411
|
+
})
|
|
1412
|
+
)
|
|
1413
|
+
);
|
|
985
1414
|
var mcpEulerV2IsolatedBorrowInputSchema = mcpMultisignInput({
|
|
986
1415
|
vault: evmAddressSchema,
|
|
987
1416
|
collateralAsset: evmAddressSchema,
|
|
@@ -1007,32 +1436,68 @@ var mcpEulerV2CollateralWithdrawInputSchema = mcpMultisignInput({
|
|
|
1007
1436
|
collateralAsset: evmAddressSchema,
|
|
1008
1437
|
amountHuman: z.string().min(1)
|
|
1009
1438
|
});
|
|
1010
|
-
var mcpMorphoVaultDepositInputSchema =
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1439
|
+
var mcpMorphoVaultDepositInputSchema = withMultisignKeySourceRefine(
|
|
1440
|
+
z.preprocess(
|
|
1441
|
+
preprocessMorphoVaultDepositInput,
|
|
1442
|
+
evmMultisignCommonInputSchema.extend({
|
|
1443
|
+
vaultAddress: evmAddressSchema.describe(
|
|
1444
|
+
"Vault contract address \u2014 copy vaultAddress from ctm_morpho_fetch_earn_vaults row."
|
|
1445
|
+
),
|
|
1446
|
+
underlyingAddress: evmAddressSchema.describe(
|
|
1447
|
+
"Deposit asset address \u2014 copy underlyingAddress from the same fetch row."
|
|
1448
|
+
),
|
|
1449
|
+
amountHuman: z.string().min(1).describe('Human-readable deposit amount (e.g. "1000" USDC).'),
|
|
1450
|
+
vaultName: z.string().optional().describe("Optional vaultName from fetch row (fills purposeText when omitted)."),
|
|
1451
|
+
vaultSymbol: z.string().optional().describe("Optional vaultSymbol from fetch row."),
|
|
1452
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
1453
|
+
})
|
|
1454
|
+
)
|
|
1455
|
+
);
|
|
1456
|
+
var mcpMorphoVaultWithdrawInputSchema = withMultisignKeySourceRefine(
|
|
1457
|
+
z.preprocess(
|
|
1458
|
+
preprocessMorphoVaultWithdrawInput,
|
|
1459
|
+
evmMultisignCommonInputSchema.extend({
|
|
1460
|
+
vaultAddress: evmAddressSchema.describe(
|
|
1461
|
+
"Vault contract address \u2014 copy vaultAddress from ctm_morpho_fetch_earn_vaults or positions."
|
|
1462
|
+
),
|
|
1463
|
+
amountHuman: z.string().min(1),
|
|
1464
|
+
vaultName: z.string().optional(),
|
|
1465
|
+
vaultSymbol: z.string().optional()
|
|
1466
|
+
})
|
|
1467
|
+
)
|
|
1468
|
+
);
|
|
1469
|
+
var mcpMorphoBlueCollateralDepositInputSchema = withMultisignKeySourceRefine(
|
|
1470
|
+
z.preprocess(
|
|
1471
|
+
preprocessMorphoBlueCollateralDepositInput,
|
|
1472
|
+
evmMultisignCommonInputSchema.extend({
|
|
1473
|
+
marketId: z.string().min(1).describe("marketId from ctm_morpho_fetch_blue_markets"),
|
|
1474
|
+
collateralToken: evmAddressSchema.describe("collateralTokenAddress from fetch row"),
|
|
1475
|
+
amountHuman: z.string().min(1),
|
|
1476
|
+
marketLabel: z.string().optional(),
|
|
1477
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
1478
|
+
})
|
|
1479
|
+
)
|
|
1480
|
+
);
|
|
1481
|
+
var mcpMorphoBlueBorrowInputSchema = withMultisignKeySourceRefine(
|
|
1482
|
+
z.preprocess(
|
|
1483
|
+
preprocessMorphoBlueBorrowRepayInput,
|
|
1484
|
+
evmMultisignCommonInputSchema.extend({
|
|
1485
|
+
marketId: z.string().min(1),
|
|
1486
|
+
loanToken: evmAddressSchema.describe("loanTokenAddress from ctm_morpho_fetch_blue_markets"),
|
|
1487
|
+
amountHuman: z.string().min(1)
|
|
1488
|
+
})
|
|
1489
|
+
)
|
|
1490
|
+
);
|
|
1491
|
+
var mcpMorphoBlueRepayInputSchema = withMultisignKeySourceRefine(
|
|
1492
|
+
z.preprocess(
|
|
1493
|
+
preprocessMorphoBlueBorrowRepayInput,
|
|
1494
|
+
evmMultisignCommonInputSchema.extend({
|
|
1495
|
+
marketId: z.string().min(1),
|
|
1496
|
+
loanToken: evmAddressSchema.describe("loanTokenAddress from fetch row"),
|
|
1497
|
+
amountHuman: z.string().min(1)
|
|
1498
|
+
})
|
|
1499
|
+
)
|
|
1500
|
+
);
|
|
1036
1501
|
var mcpMorphoBlueCollateralWithdrawInputSchema = mcpMultisignInput({
|
|
1037
1502
|
marketId: z.string().min(1),
|
|
1038
1503
|
amountHuman: z.string().min(1),
|
|
@@ -1043,46 +1508,39 @@ var mcpMorphoMerklClaimInputSchema = mcpMultisignInput({
|
|
|
1043
1508
|
distributor: evmAddressSchema.optional(),
|
|
1044
1509
|
valueWei: z.string().optional()
|
|
1045
1510
|
});
|
|
1046
|
-
var
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
chainId: z.number().int().positive(),
|
|
1053
|
-
underlying: z.string().trim().min(1).optional().describe("Deposit asset symbol (e.g. USDC) or ERC-20 address. Omit to search all listed vaults on the chain."),
|
|
1054
|
-
query: z.string().trim().min(1).optional().describe("Case-insensitive filter on vault name, symbol, address, or underlying symbol (e.g. Steakhouse, bbqUSDC)."),
|
|
1055
|
-
limit: z.number().int().min(1).max(200).optional().describe("Max rows (default 50).")
|
|
1511
|
+
var mcpEulerV2FetchLendVaultsInputSchema = z.object({
|
|
1512
|
+
chainId: agentEvmChainIdSchema,
|
|
1513
|
+
underlyingAddress: evmAddressSchema.describe(
|
|
1514
|
+
"Underlying asset address from get_defi_protocol_supported_tokens."
|
|
1515
|
+
),
|
|
1516
|
+
limit: z.number().int().min(1).max(100).optional().describe("Max vault rows (default 30).")
|
|
1056
1517
|
});
|
|
1057
|
-
var
|
|
1518
|
+
var mcpEulerV2FetchLendVaultsOutputSchema = z.object({
|
|
1058
1519
|
vaults: z.array(
|
|
1059
1520
|
z.object({
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
vaultSymbol: z.string(),
|
|
1521
|
+
evaultAddress: z.string().describe("Copy as vault / evaultAddress for isolated lend multisign"),
|
|
1522
|
+
marketName: z.string(),
|
|
1063
1523
|
underlyingAddress: z.string(),
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
performanceFee: z.string(),
|
|
1071
|
-
managementFee: z.string().nullable(),
|
|
1072
|
-
totalDepositsUsd: z.string(),
|
|
1073
|
-
liquidityUsd: z.string(),
|
|
1074
|
-
exposure: z.array(morphoExposureRowSchema)
|
|
1524
|
+
underlyingDecimals: z.number().int(),
|
|
1525
|
+
supplyApyPercentLabel: z.string(),
|
|
1526
|
+
borrowApyPercentLabel: z.string(),
|
|
1527
|
+
availableLiquidityFormatted: z.string(),
|
|
1528
|
+
totalSupplyFormatted: z.string(),
|
|
1529
|
+
evcAddress: z.string().nullable()
|
|
1075
1530
|
})
|
|
1076
1531
|
)
|
|
1077
1532
|
});
|
|
1078
|
-
function mcpGmxMultisignInput(fields) {
|
|
1079
|
-
|
|
1533
|
+
function mcpGmxMultisignInput(fields, preprocess) {
|
|
1534
|
+
const inner = evmMultisignCommonInputSchema.extend(fields);
|
|
1535
|
+
const shaped = preprocess ? z.preprocess(preprocess, inner) : inner;
|
|
1536
|
+
return withMultisignKeySourceRefine(shaped);
|
|
1080
1537
|
}
|
|
1081
1538
|
var gmxDirectionSchema = z.enum(["long", "short"]);
|
|
1082
1539
|
var gmxOrderTypeSchema = z.enum(["market", "limit"]);
|
|
1083
|
-
var
|
|
1084
|
-
chainId:
|
|
1540
|
+
var gmxFetchChainInputSchema = z.object({
|
|
1541
|
+
chainId: agentEvmChainIdSchema
|
|
1085
1542
|
});
|
|
1543
|
+
var mcpGmxFetchMarketsInputSchema = gmxFetchChainInputSchema;
|
|
1086
1544
|
var mcpGmxFetchMarketsOutputSchema = z.object({
|
|
1087
1545
|
markets: z.array(
|
|
1088
1546
|
z.object({
|
|
@@ -1093,53 +1551,95 @@ var mcpGmxFetchMarketsOutputSchema = z.object({
|
|
|
1093
1551
|
)
|
|
1094
1552
|
});
|
|
1095
1553
|
var mcpGmxFetchPositionsInputSchema = z.object({
|
|
1096
|
-
chainId:
|
|
1554
|
+
chainId: agentEvmChainIdSchema,
|
|
1097
1555
|
executorAddress: evmAddressSchema
|
|
1098
1556
|
});
|
|
1099
1557
|
var mcpGmxFetchPositionsOutputSchema = z.object({
|
|
1100
|
-
positions: z.array(
|
|
1558
|
+
positions: z.array(
|
|
1559
|
+
z.object({
|
|
1560
|
+
key: z.string(),
|
|
1561
|
+
symbol: z.string().nullable().describe("GMX market symbol \u2014 pass to build_decrease as symbol"),
|
|
1562
|
+
indexName: z.string(),
|
|
1563
|
+
isLong: z.boolean(),
|
|
1564
|
+
direction: z.enum(["long", "short"]).describe("Derived from isLong \u2014 pass to build_decrease"),
|
|
1565
|
+
sizeUsd: z.string().nullable().describe("Copy as sizeUsdHuman for partial close"),
|
|
1566
|
+
collateralUsd: z.string().nullable(),
|
|
1567
|
+
collateralSymbol: z.string().nullable().describe("Copy as collateralToken"),
|
|
1568
|
+
entryPriceUsd: z.string().nullable(),
|
|
1569
|
+
markPriceUsd: z.string().nullable(),
|
|
1570
|
+
liquidationPriceUsd: z.string().nullable(),
|
|
1571
|
+
leverageLabel: z.string().nullable(),
|
|
1572
|
+
pnlUsd: z.string().nullable()
|
|
1573
|
+
})
|
|
1574
|
+
)
|
|
1101
1575
|
});
|
|
1102
|
-
var
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
orderType: gmxOrderTypeSchema,
|
|
1106
|
-
sizeUsdHuman: z.string().min(1),
|
|
1107
|
-
collateralToken: z.string().min(1),
|
|
1108
|
-
collateralAmountHuman: z.string().min(1),
|
|
1109
|
-
triggerPriceUsdHuman: z.string().optional(),
|
|
1110
|
-
slippageBps: z.number().int().nonnegative().optional(),
|
|
1111
|
-
executionFeeBufferBps: z.number().int().nonnegative().optional()
|
|
1576
|
+
var mcpGmxFetchOrdersInputSchema = z.object({
|
|
1577
|
+
chainId: agentEvmChainIdSchema,
|
|
1578
|
+
executorAddress: evmAddressSchema
|
|
1112
1579
|
});
|
|
1113
|
-
var
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
slippageBps: z.number().int().nonnegative().optional(),
|
|
1123
|
-
executionFeeBufferBps: z.number().int().nonnegative().optional()
|
|
1580
|
+
var mcpGmxFetchOrdersOutputSchema = z.object({
|
|
1581
|
+
orders: z.array(
|
|
1582
|
+
z.object({
|
|
1583
|
+
orderId: z.string().describe("Order key \u2014 pass to build_cancel_multisign as orderId"),
|
|
1584
|
+
isLong: z.boolean().optional(),
|
|
1585
|
+
sizeDeltaUsd: z.string().nullable().optional(),
|
|
1586
|
+
triggerPrice: z.string().nullable().optional()
|
|
1587
|
+
})
|
|
1588
|
+
)
|
|
1124
1589
|
});
|
|
1590
|
+
var mcpGmxIncreaseInputSchema = mcpGmxMultisignInput(
|
|
1591
|
+
{
|
|
1592
|
+
symbol: z.string().min(1).describe("Market symbol from ctm_gmx_fetch_markets"),
|
|
1593
|
+
direction: gmxDirectionSchema,
|
|
1594
|
+
orderType: gmxOrderTypeSchema,
|
|
1595
|
+
sizeUsdHuman: z.string().min(1),
|
|
1596
|
+
collateralToken: z.string().min(1),
|
|
1597
|
+
collateralAmountHuman: z.string().min(1),
|
|
1598
|
+
triggerPriceUsdHuman: z.string().optional(),
|
|
1599
|
+
slippageBps: z.number().int().nonnegative().optional(),
|
|
1600
|
+
executionFeeBufferBps: z.number().int().nonnegative().optional()
|
|
1601
|
+
},
|
|
1602
|
+
preprocessGmxIncreaseInput
|
|
1603
|
+
);
|
|
1604
|
+
var mcpGmxDecreaseInputSchema = mcpGmxMultisignInput(
|
|
1605
|
+
{
|
|
1606
|
+
symbol: z.string().min(1).describe("symbol from ctm_gmx_fetch_positions or fetch_markets"),
|
|
1607
|
+
direction: gmxDirectionSchema.describe("direction from position row or isLong"),
|
|
1608
|
+
orderType: gmxOrderTypeSchema,
|
|
1609
|
+
sizeUsdHuman: z.string().min(1).describe("sizeUsd from position row"),
|
|
1610
|
+
collateralToken: z.string().min(1).describe("collateralSymbol from position row"),
|
|
1611
|
+
receiveToken: z.string().optional(),
|
|
1612
|
+
triggerPriceUsdHuman: z.string().optional(),
|
|
1613
|
+
keepLeverage: agentOptionalBooleanSchema(),
|
|
1614
|
+
slippageBps: z.number().int().nonnegative().optional(),
|
|
1615
|
+
executionFeeBufferBps: z.number().int().nonnegative().optional()
|
|
1616
|
+
},
|
|
1617
|
+
preprocessGmxDecreaseInput
|
|
1618
|
+
);
|
|
1125
1619
|
var mcpGmxCancelInputSchema = mcpGmxMultisignInput({
|
|
1126
|
-
orderId: z.string().min(1)
|
|
1127
|
-
});
|
|
1128
|
-
var mcpGmxGmDepositInputSchema = mcpGmxMultisignInput({
|
|
1129
|
-
marketSymbol: z.string().min(1),
|
|
1130
|
-
collateralToken: z.string().min(1),
|
|
1131
|
-
collateralAmountHuman: z.string().min(1),
|
|
1132
|
-
executionFeeBufferBps: z.number().int().nonnegative().optional(),
|
|
1133
|
-
isNativeIn: z.boolean().optional(),
|
|
1134
|
-
nativeWrapped: evmAddressSchema.optional()
|
|
1135
|
-
});
|
|
1136
|
-
var mcpGmxGmWithdrawInputSchema = mcpGmxMultisignInput({
|
|
1137
|
-
marketSymbol: z.string().min(1),
|
|
1138
|
-
gmAmountHuman: z.string().min(1),
|
|
1139
|
-
gmDecimals: z.number().int().nonnegative().optional(),
|
|
1140
|
-
executionFeeBufferBps: z.number().int().nonnegative().optional(),
|
|
1141
|
-
isNativeOut: z.boolean().optional()
|
|
1620
|
+
orderId: z.string().min(1).describe("orderId from ctm_gmx_fetch_orders")
|
|
1142
1621
|
});
|
|
1622
|
+
var mcpGmxGmDepositInputSchema = mcpGmxMultisignInput(
|
|
1623
|
+
{
|
|
1624
|
+
marketSymbol: z.string().min(1).describe("symbol from ctm_gmx_fetch_gm_markets"),
|
|
1625
|
+
collateralToken: z.string().min(1).describe("longTokenSymbol or shortTokenSymbol from GM market row"),
|
|
1626
|
+
collateralAmountHuman: z.string().min(1),
|
|
1627
|
+
executionFeeBufferBps: z.number().int().nonnegative().optional(),
|
|
1628
|
+
isNativeIn: agentOptionalBooleanSchema(),
|
|
1629
|
+
nativeWrapped: evmAddressSchema.optional()
|
|
1630
|
+
},
|
|
1631
|
+
preprocessGmxGmBuildInput
|
|
1632
|
+
);
|
|
1633
|
+
var mcpGmxGmWithdrawInputSchema = mcpGmxMultisignInput(
|
|
1634
|
+
{
|
|
1635
|
+
marketSymbol: z.string().min(1).describe("symbol from ctm_gmx_fetch_gm_markets"),
|
|
1636
|
+
gmAmountHuman: z.string().min(1),
|
|
1637
|
+
gmDecimals: z.number().int().nonnegative().optional(),
|
|
1638
|
+
executionFeeBufferBps: z.number().int().nonnegative().optional(),
|
|
1639
|
+
isNativeOut: agentOptionalBooleanSchema()
|
|
1640
|
+
},
|
|
1641
|
+
preprocessGmxGmBuildInput
|
|
1642
|
+
);
|
|
1143
1643
|
var mcpGmxStakeGmxInputSchema = mcpGmxMultisignInput({
|
|
1144
1644
|
amountHuman: z.string().min(1),
|
|
1145
1645
|
gmxDecimals: z.number().int().nonnegative().optional()
|
|
@@ -1148,9 +1648,7 @@ var mcpGmxUnstakeGmxInputSchema = mcpGmxMultisignInput({
|
|
|
1148
1648
|
amountHuman: z.string().min(1),
|
|
1149
1649
|
gmxDecimals: z.number().int().nonnegative().optional()
|
|
1150
1650
|
});
|
|
1151
|
-
var mcpGmxFetchGmMarketsInputSchema =
|
|
1152
|
-
chainId: z.number().int().positive()
|
|
1153
|
-
});
|
|
1651
|
+
var mcpGmxFetchGmMarketsInputSchema = gmxFetchChainInputSchema;
|
|
1154
1652
|
var mcpGmxGmMarketApyRowSchema = z.object({
|
|
1155
1653
|
symbol: z.string(),
|
|
1156
1654
|
marketTokenAddress: z.string(),
|
|
@@ -1164,9 +1662,7 @@ var mcpGmxGmMarketApyRowSchema = z.object({
|
|
|
1164
1662
|
var mcpGmxFetchGmMarketsOutputSchema = z.object({
|
|
1165
1663
|
markets: z.array(mcpGmxGmMarketApyRowSchema)
|
|
1166
1664
|
});
|
|
1167
|
-
var mcpGmxFetchGmApyInputSchema =
|
|
1168
|
-
chainId: z.number().int().positive()
|
|
1169
|
-
});
|
|
1665
|
+
var mcpGmxFetchGmApyInputSchema = gmxFetchChainInputSchema;
|
|
1170
1666
|
var mcpGmxFetchGmApyOutputSchema = z.object({
|
|
1171
1667
|
markets: z.array(
|
|
1172
1668
|
z.object({
|
|
@@ -1182,7 +1678,7 @@ var mcpGmxFetchGmApyOutputSchema = z.object({
|
|
|
1182
1678
|
)
|
|
1183
1679
|
});
|
|
1184
1680
|
var mcpGmxFetchStakingPowerInputSchema = z.object({
|
|
1185
|
-
chainId:
|
|
1681
|
+
chainId: agentEvmChainIdSchema,
|
|
1186
1682
|
executorAddress: evmAddressSchema
|
|
1187
1683
|
});
|
|
1188
1684
|
var mcpGmxFetchStakingPowerOutputSchema = z.object({
|
|
@@ -1198,7 +1694,7 @@ var gmxOhlcvCandleSchema = z.object({
|
|
|
1198
1694
|
close: z.string()
|
|
1199
1695
|
});
|
|
1200
1696
|
var mcpGmxFetchMarketPricesInputSchema = z.object({
|
|
1201
|
-
chainId:
|
|
1697
|
+
chainId: agentEvmChainIdSchema,
|
|
1202
1698
|
symbol: z.string().min(1),
|
|
1203
1699
|
collateralSymbol: z.string().min(1)
|
|
1204
1700
|
});
|
|
@@ -1212,7 +1708,7 @@ var mcpGmxFetchMarketPricesOutputSchema = z.object({
|
|
|
1212
1708
|
fetchedAtMs: z.number()
|
|
1213
1709
|
});
|
|
1214
1710
|
var mcpGmxFetchOhlcvInputSchema = z.object({
|
|
1215
|
-
chainId:
|
|
1711
|
+
chainId: agentEvmChainIdSchema,
|
|
1216
1712
|
symbol: z.string().min(1),
|
|
1217
1713
|
timeframe: gmxOhlcvTimeframeSchema.optional(),
|
|
1218
1714
|
limit: z.number().int().positive().max(500).optional(),
|
|
@@ -1223,8 +1719,10 @@ var mcpGmxFetchOhlcvOutputSchema = z.object({
|
|
|
1223
1719
|
timeframe: gmxOhlcvTimeframeSchema,
|
|
1224
1720
|
candles: z.array(gmxOhlcvCandleSchema)
|
|
1225
1721
|
});
|
|
1226
|
-
function mcpHyperliquidMultisignInput(fields) {
|
|
1227
|
-
|
|
1722
|
+
function mcpHyperliquidMultisignInput(fields, preprocess) {
|
|
1723
|
+
const inner = evmMultisignCommonInputSchema.extend(fields);
|
|
1724
|
+
const shaped = preprocess ? z.preprocess(preprocess, inner) : inner;
|
|
1725
|
+
return withMultisignKeySourceRefine(shaped);
|
|
1228
1726
|
}
|
|
1229
1727
|
var hyperliquidTifSchema = z.enum(["alo", "gtc", "ioc"]);
|
|
1230
1728
|
var hyperliquidOhlcvIntervalSchema = z.enum([
|
|
@@ -1243,11 +1741,14 @@ var hyperliquidOhlcvIntervalSchema = z.enum([
|
|
|
1243
1741
|
"1w",
|
|
1244
1742
|
"1M"
|
|
1245
1743
|
]);
|
|
1744
|
+
var hyperliquidFetchChainInputSchema = z.object({
|
|
1745
|
+
chainId: agentEvmChainIdSchema
|
|
1746
|
+
});
|
|
1246
1747
|
var hyperliquidPositionRowSchema = z.object({
|
|
1247
1748
|
key: z.string(),
|
|
1248
1749
|
coin: z.string(),
|
|
1249
1750
|
isLong: z.boolean(),
|
|
1250
|
-
size: z.string().nullable(),
|
|
1751
|
+
size: z.string().nullable().describe("Copy as szHuman for build_close_multisign"),
|
|
1251
1752
|
entryPx: z.string().nullable(),
|
|
1252
1753
|
positionValueUsd: z.string().nullable(),
|
|
1253
1754
|
unrealizedPnlUsd: z.string().nullable(),
|
|
@@ -1268,14 +1769,13 @@ var hyperliquidAccountSummarySchema = z.object({
|
|
|
1268
1769
|
totalMarginUsedUsd: z.string().nullable(),
|
|
1269
1770
|
withdrawableUsd: z.string().nullable()
|
|
1270
1771
|
});
|
|
1271
|
-
var mcpHyperliquidFetchMarketsInputSchema =
|
|
1272
|
-
chainId: z.number().int().positive(),
|
|
1772
|
+
var mcpHyperliquidFetchMarketsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1273
1773
|
dex: z.string().optional()
|
|
1274
1774
|
});
|
|
1275
1775
|
var mcpHyperliquidFetchMarketsOutputSchema = z.object({
|
|
1276
1776
|
markets: z.array(
|
|
1277
1777
|
z.object({
|
|
1278
|
-
name: z.string(),
|
|
1778
|
+
name: z.string().describe("Perp coin name \u2014 alias for build limit order coin"),
|
|
1279
1779
|
asset: z.number(),
|
|
1280
1780
|
szDecimals: z.number(),
|
|
1281
1781
|
maxLeverage: z.number(),
|
|
@@ -1290,8 +1790,7 @@ var mcpHyperliquidFetchMarketsOutputSchema = z.object({
|
|
|
1290
1790
|
})
|
|
1291
1791
|
)
|
|
1292
1792
|
});
|
|
1293
|
-
var mcpHyperliquidSearchMarketsInputSchema =
|
|
1294
|
-
chainId: z.number().int().positive(),
|
|
1793
|
+
var mcpHyperliquidSearchMarketsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1295
1794
|
query: z.string().min(1),
|
|
1296
1795
|
dex: z.string().optional(),
|
|
1297
1796
|
limit: z.number().int().positive().max(50).optional()
|
|
@@ -1314,8 +1813,7 @@ var mcpHyperliquidSearchMarketsOutputSchema = z.object({
|
|
|
1314
1813
|
})
|
|
1315
1814
|
)
|
|
1316
1815
|
});
|
|
1317
|
-
var mcpHyperliquidFetchOpenContextInputSchema =
|
|
1318
|
-
chainId: z.number().int().positive(),
|
|
1816
|
+
var mcpHyperliquidFetchOpenContextInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1319
1817
|
executorAddress: evmAddressSchema,
|
|
1320
1818
|
coin: z.string().min(1),
|
|
1321
1819
|
dex: z.string().optional()
|
|
@@ -1326,16 +1824,14 @@ var mcpHyperliquidFetchOpenContextOutputSchema = z.object({
|
|
|
1326
1824
|
activeAsset: hyperliquidActiveAssetSchema
|
|
1327
1825
|
})
|
|
1328
1826
|
});
|
|
1329
|
-
var mcpHyperliquidFetchPositionsInputSchema =
|
|
1330
|
-
chainId: z.number().int().positive(),
|
|
1827
|
+
var mcpHyperliquidFetchPositionsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1331
1828
|
executorAddress: evmAddressSchema,
|
|
1332
1829
|
dex: z.string().optional()
|
|
1333
1830
|
});
|
|
1334
1831
|
var mcpHyperliquidFetchPositionsOutputSchema = z.object({
|
|
1335
1832
|
positions: z.array(hyperliquidPositionRowSchema)
|
|
1336
1833
|
});
|
|
1337
|
-
var mcpHyperliquidFetchOpenOrdersInputSchema =
|
|
1338
|
-
chainId: z.number().int().positive(),
|
|
1834
|
+
var mcpHyperliquidFetchOpenOrdersInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1339
1835
|
executorAddress: evmAddressSchema,
|
|
1340
1836
|
dex: z.string().optional()
|
|
1341
1837
|
});
|
|
@@ -1346,18 +1842,16 @@ var mcpHyperliquidFetchOpenOrdersOutputSchema = z.object({
|
|
|
1346
1842
|
side: z.string(),
|
|
1347
1843
|
limitPx: z.string(),
|
|
1348
1844
|
sz: z.string(),
|
|
1349
|
-
oid: z.number(),
|
|
1845
|
+
oid: z.number().describe("Pass to build_cancel_multisign as oid"),
|
|
1350
1846
|
timestamp: z.number(),
|
|
1351
1847
|
reduceOnly: z.boolean().optional()
|
|
1352
1848
|
})
|
|
1353
1849
|
)
|
|
1354
1850
|
});
|
|
1355
|
-
var mcpHyperliquidFetchMarketSnapshotInputSchema =
|
|
1356
|
-
chainId: z.number().int().positive(),
|
|
1851
|
+
var mcpHyperliquidFetchMarketSnapshotInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1357
1852
|
coin: z.string().min(1),
|
|
1358
1853
|
interval: hyperliquidOhlcvIntervalSchema.optional(),
|
|
1359
1854
|
dex: z.string().optional(),
|
|
1360
|
-
/** Recent OHLCV bars to return (default 48, max 200). Live price is always current. */
|
|
1361
1855
|
candleLimit: z.number().int().positive().max(200).optional()
|
|
1362
1856
|
});
|
|
1363
1857
|
var hyperliquidOhlcvCandleSchema = z.object({
|
|
@@ -1388,21 +1882,16 @@ var mcpHyperliquidFetchMarketSnapshotOutputSchema = z.object({
|
|
|
1388
1882
|
candles: z.array(hyperliquidOhlcvCandleSchema),
|
|
1389
1883
|
candleCount: z.number()
|
|
1390
1884
|
}),
|
|
1391
|
-
resolvedCoin: z.string(),
|
|
1885
|
+
resolvedCoin: z.string().describe("Canonical coin \u2014 alias for build coin"),
|
|
1392
1886
|
dex: z.string().nullable()
|
|
1393
1887
|
});
|
|
1394
|
-
var mcpHyperliquidFetchOhlcvInputSchema =
|
|
1395
|
-
chainId: z.number().int().positive(),
|
|
1888
|
+
var mcpHyperliquidFetchOhlcvInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1396
1889
|
coin: z.string().min(1),
|
|
1397
1890
|
interval: hyperliquidOhlcvIntervalSchema.optional(),
|
|
1398
1891
|
dex: z.string().optional(),
|
|
1399
|
-
/** Calendar-day lookback ending now (e.g. 7 = last week). Preferred for agent requests. */
|
|
1400
1892
|
lookbackDays: z.number().positive().max(90).optional(),
|
|
1401
|
-
/** Hour lookback ending now. Alternative to lookbackDays. */
|
|
1402
1893
|
lookbackHours: z.number().positive().max(90 * 24).optional(),
|
|
1403
|
-
/** Explicit range start (ms since epoch). Use with endTimeMs. */
|
|
1404
1894
|
startTimeMs: z.number().int().positive().optional(),
|
|
1405
|
-
/** Explicit range end (ms since epoch). Defaults to now. */
|
|
1406
1895
|
endTimeMs: z.number().int().positive().optional()
|
|
1407
1896
|
});
|
|
1408
1897
|
var mcpHyperliquidFetchOhlcvOutputSchema = z.object({
|
|
@@ -1421,8 +1910,7 @@ var mcpHyperliquidFetchOhlcvOutputSchema = z.object({
|
|
|
1421
1910
|
resolvedCoin: z.string(),
|
|
1422
1911
|
dex: z.string().nullable()
|
|
1423
1912
|
});
|
|
1424
|
-
var mcpHyperliquidFetchUsdClassBalancesInputSchema =
|
|
1425
|
-
chainId: z.number().int().positive(),
|
|
1913
|
+
var mcpHyperliquidFetchUsdClassBalancesInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1426
1914
|
executorAddress: evmAddressSchema
|
|
1427
1915
|
});
|
|
1428
1916
|
var mcpHyperliquidFetchUsdClassBalancesOutputSchema = z.object({
|
|
@@ -1431,34 +1919,31 @@ var mcpHyperliquidFetchUsdClassBalancesOutputSchema = z.object({
|
|
|
1431
1919
|
perpWithdrawable: z.string()
|
|
1432
1920
|
})
|
|
1433
1921
|
});
|
|
1434
|
-
var mcpHyperliquidFetchVaultsInputSchema =
|
|
1435
|
-
chainId: z.number().int().positive(),
|
|
1922
|
+
var mcpHyperliquidFetchVaultsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1436
1923
|
executorAddress: evmAddressSchema.optional()
|
|
1437
1924
|
});
|
|
1438
1925
|
var mcpHyperliquidFetchVaultsOutputSchema = z.object({
|
|
1439
1926
|
vaults: z.array(
|
|
1440
1927
|
z.object({
|
|
1441
1928
|
vaultAddress: z.string(),
|
|
1442
|
-
name: z.string(),
|
|
1929
|
+
name: z.string().describe("Optional vaultName for purposeText on deposit"),
|
|
1443
1930
|
apr: z.number().nullable(),
|
|
1444
1931
|
tvlUsd: z.string().nullable()
|
|
1445
1932
|
})
|
|
1446
1933
|
)
|
|
1447
1934
|
});
|
|
1448
|
-
var mcpHyperliquidFetchUserVaultEquitiesInputSchema =
|
|
1449
|
-
chainId: z.number().int().positive(),
|
|
1935
|
+
var mcpHyperliquidFetchUserVaultEquitiesInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1450
1936
|
executorAddress: evmAddressSchema
|
|
1451
1937
|
});
|
|
1452
1938
|
var mcpHyperliquidFetchUserVaultEquitiesOutputSchema = z.object({
|
|
1453
1939
|
rows: z.array(
|
|
1454
1940
|
z.object({
|
|
1455
1941
|
vaultAddress: z.string(),
|
|
1456
|
-
equity: z.string()
|
|
1942
|
+
equity: z.string().describe("Copy as usdHuman for build_vault_withdraw_multisign")
|
|
1457
1943
|
})
|
|
1458
1944
|
)
|
|
1459
1945
|
});
|
|
1460
|
-
var mcpHyperliquidFetchStakingSummaryInputSchema =
|
|
1461
|
-
chainId: z.number().int().positive(),
|
|
1946
|
+
var mcpHyperliquidFetchStakingSummaryInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1462
1947
|
executorAddress: evmAddressSchema
|
|
1463
1948
|
});
|
|
1464
1949
|
var mcpHyperliquidFetchStakingSummaryOutputSchema = z.object({
|
|
@@ -1467,53 +1952,68 @@ var mcpHyperliquidFetchStakingSummaryOutputSchema = z.object({
|
|
|
1467
1952
|
undelegated: z.string()
|
|
1468
1953
|
})
|
|
1469
1954
|
});
|
|
1470
|
-
var mcpHyperliquidFetchDelegationsInputSchema =
|
|
1471
|
-
chainId: z.number().int().positive(),
|
|
1955
|
+
var mcpHyperliquidFetchDelegationsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
1472
1956
|
executorAddress: evmAddressSchema
|
|
1473
1957
|
});
|
|
1474
1958
|
var mcpHyperliquidFetchDelegationsOutputSchema = z.object({
|
|
1475
1959
|
delegations: z.array(
|
|
1476
1960
|
z.object({
|
|
1477
1961
|
validator: z.string(),
|
|
1478
|
-
amount: z.string()
|
|
1962
|
+
amount: z.string().describe("Copy as hypeHuman for build_undelegate_multisign")
|
|
1479
1963
|
})
|
|
1480
1964
|
)
|
|
1481
1965
|
});
|
|
1482
|
-
var mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidMultisignInput(
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1966
|
+
var mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidMultisignInput(
|
|
1967
|
+
{
|
|
1968
|
+
coin: z.string().min(1).describe("coin from fetch_markets (name) or search_markets"),
|
|
1969
|
+
isBuy: agentBooleanSchema(),
|
|
1970
|
+
limitPxHuman: z.string().min(1).describe("limitPx or markPx from open_context"),
|
|
1971
|
+
szHuman: z.string().min(1),
|
|
1972
|
+
marketKind: z.enum(["perp", "spot"]).optional(),
|
|
1973
|
+
tif: hyperliquidTifSchema.optional(),
|
|
1974
|
+
dex: z.string().optional()
|
|
1975
|
+
},
|
|
1976
|
+
preprocessHyperliquidLimitOrderInput
|
|
1977
|
+
);
|
|
1978
|
+
var mcpHyperliquidCloseInputSchema = mcpHyperliquidMultisignInput(
|
|
1979
|
+
{
|
|
1980
|
+
coin: z.string().min(1),
|
|
1981
|
+
isLong: agentBooleanSchema(),
|
|
1982
|
+
limitPxHuman: z.string().min(1),
|
|
1983
|
+
szHuman: z.string().min(1).describe("size from fetch_positions"),
|
|
1984
|
+
dex: z.string().optional(),
|
|
1985
|
+
tif: hyperliquidTifSchema.optional()
|
|
1986
|
+
},
|
|
1987
|
+
preprocessHyperliquidCloseInput
|
|
1988
|
+
);
|
|
1989
|
+
var mcpHyperliquidCancelInputSchema = mcpHyperliquidMultisignInput(
|
|
1990
|
+
{
|
|
1991
|
+
coin: z.string().min(1),
|
|
1992
|
+
oid: z.number().int().positive().describe("oid from fetch_open_orders"),
|
|
1993
|
+
marketKind: z.enum(["perp", "spot"]).optional(),
|
|
1994
|
+
dex: z.string().optional()
|
|
1995
|
+
},
|
|
1996
|
+
preprocessHyperliquidCoinInput
|
|
1997
|
+
);
|
|
1505
1998
|
var mcpHyperliquidUsdTransferInputSchema = mcpHyperliquidMultisignInput({
|
|
1506
1999
|
usdHuman: z.string().min(1),
|
|
1507
|
-
toPerp:
|
|
1508
|
-
});
|
|
1509
|
-
var mcpHyperliquidVaultDepositInputSchema = mcpHyperliquidMultisignInput({
|
|
1510
|
-
vaultAddress: evmAddressSchema,
|
|
1511
|
-
usdHuman: z.string().min(1)
|
|
1512
|
-
});
|
|
1513
|
-
var mcpHyperliquidVaultWithdrawInputSchema = mcpHyperliquidMultisignInput({
|
|
1514
|
-
vaultAddress: evmAddressSchema,
|
|
1515
|
-
usdHuman: z.string().min(1)
|
|
2000
|
+
toPerp: agentBooleanSchema()
|
|
1516
2001
|
});
|
|
2002
|
+
var mcpHyperliquidVaultDepositInputSchema = mcpHyperliquidMultisignInput(
|
|
2003
|
+
{
|
|
2004
|
+
vaultAddress: evmAddressSchema.describe("vaultAddress from fetch_vaults"),
|
|
2005
|
+
usdHuman: z.string().min(1),
|
|
2006
|
+
vaultName: z.string().optional().describe("name from fetch_vaults row")
|
|
2007
|
+
},
|
|
2008
|
+
preprocessHyperliquidVaultDepositInput
|
|
2009
|
+
);
|
|
2010
|
+
var mcpHyperliquidVaultWithdrawInputSchema = mcpHyperliquidMultisignInput(
|
|
2011
|
+
{
|
|
2012
|
+
vaultAddress: evmAddressSchema,
|
|
2013
|
+
usdHuman: z.string().min(1).describe("equity from fetch_user_vault_equities")
|
|
2014
|
+
},
|
|
2015
|
+
preprocessHyperliquidVaultWithdrawInput
|
|
2016
|
+
);
|
|
1517
2017
|
var mcpHyperliquidStakeInputSchema = mcpHyperliquidMultisignInput({
|
|
1518
2018
|
hypeHuman: z.string().min(1)
|
|
1519
2019
|
});
|
|
@@ -1524,9 +2024,76 @@ var mcpHyperliquidDelegateInputSchema = mcpHyperliquidMultisignInput({
|
|
|
1524
2024
|
hypeHuman: z.string().min(1),
|
|
1525
2025
|
validator: evmAddressSchema
|
|
1526
2026
|
});
|
|
1527
|
-
var mcpHyperliquidUndelegateInputSchema = mcpHyperliquidMultisignInput(
|
|
1528
|
-
|
|
1529
|
-
|
|
2027
|
+
var mcpHyperliquidUndelegateInputSchema = mcpHyperliquidMultisignInput(
|
|
2028
|
+
{
|
|
2029
|
+
hypeHuman: z.string().min(1).describe("amount from fetch_delegations"),
|
|
2030
|
+
validator: evmAddressSchema
|
|
2031
|
+
},
|
|
2032
|
+
preprocessHyperliquidUndelegateInput
|
|
2033
|
+
);
|
|
2034
|
+
var mcpCctpFeeFieldsSchema = z.object({
|
|
2035
|
+
feeTierUsed: z.enum(["low", "med", "high"]),
|
|
2036
|
+
maxFee: z.string().describe("Selected tier max fee in USDC base units (6 decimals)"),
|
|
2037
|
+
maxFeeHuman: z.string().describe("Human-readable USDC max forwarding fee for feeTierUsed"),
|
|
2038
|
+
forwardFeeLow: z.string(),
|
|
2039
|
+
forwardFeeLowHuman: z.string(),
|
|
2040
|
+
forwardFeeMed: z.string(),
|
|
2041
|
+
forwardFeeMedHuman: z.string(),
|
|
2042
|
+
forwardFeeHigh: z.string(),
|
|
2043
|
+
forwardFeeHighHuman: z.string(),
|
|
2044
|
+
transferAmount: z.string().optional(),
|
|
2045
|
+
transferAmountHuman: z.string().optional(),
|
|
2046
|
+
totalBurn: z.string().optional().describe("transferAmount + maxFee when transferAmountHuman was provided"),
|
|
2047
|
+
totalBurnHuman: z.string().optional(),
|
|
2048
|
+
feeSummary: z.string().describe("Plain-language fee summary for agents")
|
|
2049
|
+
});
|
|
2050
|
+
var mcpCctpFetchSupportedRoutesInputSchema = z.object({
|
|
2051
|
+
network: z.enum(["mainnet", "testnet"]).optional().describe("Filter routes by network; omit for all")
|
|
2052
|
+
});
|
|
2053
|
+
var mcpCctpFetchSupportedRoutesOutputSchema = jsonObjectSchema.describe(
|
|
2054
|
+
"{ routes: [{ sourceChainId, destChainId, sourceDomain, destDomain, sourceLabel, destLabel, network }] }"
|
|
2055
|
+
);
|
|
2056
|
+
var mcpCctpFetchBurnFeesInputSchema = z.object({
|
|
2057
|
+
sourceChainId: agentEvmChainIdSchema.describe("Source chain EIP-155 id (burn chain)"),
|
|
2058
|
+
destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
|
|
2059
|
+
transferAmountHuman: z.string().min(1).optional().describe("Human USDC amount recipient receives (6 decimals). Omit for tier fees only; include for totalBurn."),
|
|
2060
|
+
feeTier: z.enum(["low", "med", "high"]).optional().describe("Iris forwardFee tier; default med")
|
|
2061
|
+
});
|
|
2062
|
+
var mcpCctpFetchBurnFeesOutputSchema = z.object({
|
|
2063
|
+
sourceChainId: z.number(),
|
|
2064
|
+
destChainId: z.number(),
|
|
2065
|
+
sourceDomain: z.number(),
|
|
2066
|
+
destDomain: z.number(),
|
|
2067
|
+
sourceLabel: z.string(),
|
|
2068
|
+
destLabel: z.string(),
|
|
2069
|
+
network: z.enum(["mainnet", "testnet"]),
|
|
2070
|
+
fees: mcpCctpFeeFieldsSchema
|
|
2071
|
+
}).passthrough().describe("Iris Forwarding Service fee quote with human-readable USDC amounts in fees and top-level fee fields");
|
|
2072
|
+
var mcpCctpFetchUsdcBalanceInputSchema = z.object({
|
|
2073
|
+
chainId: agentEvmChainIdSchema.describe("Source chain to read USDC balance on"),
|
|
2074
|
+
executorAddress: evmAddressSchema.optional().describe("Server-filled from keyGenId when omitted"),
|
|
2075
|
+
rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry"),
|
|
2076
|
+
transferAmountHuman: z.string().min(1).optional().describe("When set with feeSnapshot, returns requiredTotalBurn* and sufficientForTransfer"),
|
|
2077
|
+
feeSnapshot: jsonObjectSchema.optional().describe("Output from ctm_cctp_fetch_burn_fees (uses maxFee) for balance sufficiency check")
|
|
2078
|
+
});
|
|
2079
|
+
var mcpCctpFetchUsdcBalanceOutputSchema = jsonObjectSchema.describe(
|
|
2080
|
+
"{ balanceUsdcHuman, balanceRaw, usdcAddress, requiredTotalBurnHuman?, sufficientForTransfer?, feeSummary? }"
|
|
2081
|
+
);
|
|
2082
|
+
var mcpCctpFetchTransferStatusInputSchema = z.object({
|
|
2083
|
+
sourceChainId: agentEvmChainIdSchema.describe("Source chain where burn was executed"),
|
|
2084
|
+
sourceDomain: z.number().int().min(0).describe("CCTP domain id of source chain"),
|
|
2085
|
+
burnTxHash: z.string().min(1).describe("Burn transaction hash (0x-prefixed or raw)")
|
|
2086
|
+
});
|
|
2087
|
+
var mcpCctpFetchTransferStatusOutputSchema = jsonObjectSchema.describe(
|
|
2088
|
+
"{ status, attestation?, message?, eventNonce? } from Iris /v2/messages"
|
|
2089
|
+
);
|
|
2090
|
+
var mcpCctpBuildBurnMultisignInputSchema = mcpMultisignInput({
|
|
2091
|
+
destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
|
|
2092
|
+
transferAmountHuman: z.string().min(1).describe("Human USDC amount recipient receives"),
|
|
2093
|
+
mintRecipient: evmAddressSchema.optional().describe("Recipient on destination chain; defaults to MPC executor address"),
|
|
2094
|
+
feeTier: z.enum(["low", "med", "high"]).optional(),
|
|
2095
|
+
minFinalityThreshold: z.number().int().positive().optional(),
|
|
2096
|
+
feeSnapshot: jsonObjectSchema.optional().describe("Optional output from ctm_cctp_fetch_burn_fees")
|
|
1530
2097
|
});
|
|
1531
2098
|
|
|
1532
2099
|
// src/agent/mcpProtocolTools.ts
|
|
@@ -1839,8 +2406,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1839
2406
|
prerequisites: [
|
|
1840
2407
|
"keyGenId",
|
|
1841
2408
|
"chainId",
|
|
1842
|
-
"vaultAddress from ctm_morpho_fetch_earn_vaults",
|
|
1843
|
-
"underlying",
|
|
2409
|
+
"vaultAddress + underlyingAddress from ctm_morpho_fetch_earn_vaults",
|
|
1844
2410
|
"amountHuman"
|
|
1845
2411
|
],
|
|
1846
2412
|
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoVaultDepositBatch" },
|
|
@@ -2083,6 +2649,26 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2083
2649
|
prerequisites: ["keyGen", "executorAddress", "delegation from fetch_delegations"],
|
|
2084
2650
|
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidUndelegateBatch" },
|
|
2085
2651
|
inputZod: mcpHyperliquidUndelegateInputSchema
|
|
2652
|
+
}),
|
|
2653
|
+
defineProtocolMcpTool({
|
|
2654
|
+
name: "ctm_cctp_build_burn_multisign",
|
|
2655
|
+
actionId: "circle-cctp.burn-forward",
|
|
2656
|
+
protocolId: "circle-cctp",
|
|
2657
|
+
chainCategory: "evm",
|
|
2658
|
+
description: "Create and submit mpc-auth multiSignRequest for CCTP Forwarding Service USDC transfer (approve + depositForBurnWithHook on source chain).",
|
|
2659
|
+
prerequisites: [
|
|
2660
|
+
"ctm_cctp_fetch_burn_fees (required)",
|
|
2661
|
+
"keyGenId",
|
|
2662
|
+
"chainId = source chain",
|
|
2663
|
+
"destChainId",
|
|
2664
|
+
"transferAmountHuman",
|
|
2665
|
+
"sufficient USDC on source"
|
|
2666
|
+
],
|
|
2667
|
+
handler: {
|
|
2668
|
+
importPath: "protocols/evm/circle-cctp",
|
|
2669
|
+
exportName: "buildEvmMultisignBodyCctpBurnBatchFromMcp"
|
|
2670
|
+
},
|
|
2671
|
+
inputZod: mcpCctpBuildBurnMultisignInputSchema
|
|
2086
2672
|
})
|
|
2087
2673
|
];
|
|
2088
2674
|
|
|
@@ -2366,13 +2952,25 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
2366
2952
|
actionId: "gmx.fetch-positions",
|
|
2367
2953
|
protocolId: "gmx",
|
|
2368
2954
|
chainCategory: "evm",
|
|
2369
|
-
description: "Fetch open GMX perp positions
|
|
2955
|
+
description: "Fetch open GMX perp positions (symbol, direction, sizeUsd, collateralSymbol) for build_decrease. Read-only.",
|
|
2370
2956
|
prerequisites: ["chainId", "executorAddress (MPC ethereumaddress)"],
|
|
2371
2957
|
followUp: ["ctm_gmx_build_decrease_multisign"],
|
|
2372
2958
|
handler: { importPath: "protocols/evm/gmx", exportName: "gmxFetchPositionsForExecutor" },
|
|
2373
2959
|
inputZod: mcpGmxFetchPositionsInputSchema,
|
|
2374
2960
|
outputZod: mcpGmxFetchPositionsOutputSchema
|
|
2375
2961
|
}),
|
|
2962
|
+
defineMcpTool({
|
|
2963
|
+
name: "ctm_gmx_fetch_orders",
|
|
2964
|
+
actionId: "gmx.fetch-orders",
|
|
2965
|
+
protocolId: "gmx",
|
|
2966
|
+
chainCategory: "evm",
|
|
2967
|
+
description: "Fetch pending GMX orders (orderId) for build_cancel_multisign. Read-only.",
|
|
2968
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2969
|
+
followUp: ["ctm_gmx_build_cancel_multisign"],
|
|
2970
|
+
handler: { importPath: "protocols/evm/gmx", exportName: "gmxFetchOrdersSummary" },
|
|
2971
|
+
inputZod: mcpGmxFetchOrdersInputSchema,
|
|
2972
|
+
outputZod: mcpGmxFetchOrdersOutputSchema
|
|
2973
|
+
}),
|
|
2376
2974
|
defineMcpTool({
|
|
2377
2975
|
name: "ctm_gmx_fetch_market_prices",
|
|
2378
2976
|
actionId: "gmx.fetch-market-prices",
|
|
@@ -2577,6 +3175,82 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
2577
3175
|
inputZod: mcpHyperliquidFetchDelegationsInputSchema,
|
|
2578
3176
|
outputZod: mcpHyperliquidFetchDelegationsOutputSchema
|
|
2579
3177
|
}),
|
|
3178
|
+
defineMcpTool({
|
|
3179
|
+
name: "ctm_morpho_fetch_blue_markets",
|
|
3180
|
+
actionId: "morpho.fetch-blue-markets",
|
|
3181
|
+
protocolId: "morpho",
|
|
3182
|
+
chainCategory: "evm",
|
|
3183
|
+
description: "Morpho Blue borrow markets. Filter by collateral/loan asset; returns marketId and token addresses for blue multisign tools.",
|
|
3184
|
+
prerequisites: ["chainId"],
|
|
3185
|
+
followUp: [
|
|
3186
|
+
"ctm_morpho_build_blue_collateral_deposit_multisign",
|
|
3187
|
+
"ctm_morpho_build_blue_borrow_multisign",
|
|
3188
|
+
"ctm_morpho_build_blue_repay_multisign"
|
|
3189
|
+
],
|
|
3190
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchBlueMarketsSummary" },
|
|
3191
|
+
inputZod: mcpMorphoFetchBlueMarketsInputSchema,
|
|
3192
|
+
outputZod: mcpMorphoFetchBlueMarketsOutputSchema
|
|
3193
|
+
}),
|
|
3194
|
+
defineMcpTool({
|
|
3195
|
+
name: "ctm_euler_v2_fetch_lend_vaults",
|
|
3196
|
+
actionId: "euler-v2.fetch-lend-vaults",
|
|
3197
|
+
protocolId: "euler-v2",
|
|
3198
|
+
chainCategory: "evm",
|
|
3199
|
+
description: "Euler v2 isolated lend vaults for an underlying asset. Returns evaultAddress for build_isolated_lend_multisign.",
|
|
3200
|
+
prerequisites: ["chainId", "underlyingAddress from get_defi_protocol_supported_tokens"],
|
|
3201
|
+
followUp: ["ctm_euler_v2_build_isolated_lend_multisign"],
|
|
3202
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "eulerV2FetchLendVaultsSummary" },
|
|
3203
|
+
inputZod: mcpEulerV2FetchLendVaultsInputSchema,
|
|
3204
|
+
outputZod: mcpEulerV2FetchLendVaultsOutputSchema
|
|
3205
|
+
}),
|
|
3206
|
+
defineMcpTool({
|
|
3207
|
+
name: "ctm_cctp_fetch_supported_routes",
|
|
3208
|
+
actionId: "circle-cctp.fetch-routes",
|
|
3209
|
+
protocolId: "circle-cctp",
|
|
3210
|
+
chainCategory: "evm",
|
|
3211
|
+
description: "List supported Circle CCTP V2 Forwarding Service routes (EVM source \u2192 destination pairs on mainnet or testnet). Read-only.",
|
|
3212
|
+
prerequisites: ["load_defi_protocol", "get_chain_registry"],
|
|
3213
|
+
followUp: ["ctm_cctp_fetch_burn_fees"],
|
|
3214
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchSupportedRoutes" },
|
|
3215
|
+
inputZod: mcpCctpFetchSupportedRoutesInputSchema,
|
|
3216
|
+
outputZod: mcpCctpFetchSupportedRoutesOutputSchema
|
|
3217
|
+
}),
|
|
3218
|
+
defineMcpTool({
|
|
3219
|
+
name: "ctm_cctp_fetch_burn_fees",
|
|
3220
|
+
actionId: "circle-cctp.fetch-fees",
|
|
3221
|
+
protocolId: "circle-cctp",
|
|
3222
|
+
chainCategory: "evm",
|
|
3223
|
+
description: "Quote Circle Iris Forwarding Service burn fees (?forward=true) for a CCTP route. Returns human-readable USDC fee tiers and totalBurn when transferAmountHuman is set. Does NOT create a sign request.",
|
|
3224
|
+
prerequisites: ["supported route (ctm_cctp_fetch_supported_routes)"],
|
|
3225
|
+
followUp: ["ctm_cctp_fetch_usdc_balance", "ctm_cctp_build_burn_multisign"],
|
|
3226
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchBurnFeesForRoute" },
|
|
3227
|
+
inputZod: mcpCctpFetchBurnFeesInputSchema,
|
|
3228
|
+
outputZod: mcpCctpFetchBurnFeesOutputSchema
|
|
3229
|
+
}),
|
|
3230
|
+
defineMcpTool({
|
|
3231
|
+
name: "ctm_cctp_fetch_usdc_balance",
|
|
3232
|
+
actionId: "circle-cctp.fetch-usdc-balance",
|
|
3233
|
+
protocolId: "circle-cctp",
|
|
3234
|
+
chainCategory: "evm",
|
|
3235
|
+
description: "Read MPC wallet USDC balance on a CCTP source chain. Read-only.",
|
|
3236
|
+
prerequisites: ["chainId (source)", "executorAddress or keyGenId"],
|
|
3237
|
+
followUp: ["ctm_cctp_build_burn_multisign"],
|
|
3238
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchUsdcBalance" },
|
|
3239
|
+
inputZod: mcpCctpFetchUsdcBalanceInputSchema,
|
|
3240
|
+
outputZod: mcpCctpFetchUsdcBalanceOutputSchema
|
|
3241
|
+
}),
|
|
3242
|
+
defineMcpTool({
|
|
3243
|
+
name: "ctm_cctp_fetch_transfer_status",
|
|
3244
|
+
actionId: "circle-cctp.fetch-status",
|
|
3245
|
+
protocolId: "circle-cctp",
|
|
3246
|
+
chainCategory: "evm",
|
|
3247
|
+
description: "Poll Circle Iris for CCTP message/attestation status after source-chain burn Execute. Read-only.",
|
|
3248
|
+
prerequisites: ["sourceChainId", "sourceDomain", "burnTxHash from broadcast"],
|
|
3249
|
+
followUp: [],
|
|
3250
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchTransferStatus" },
|
|
3251
|
+
inputZod: mcpCctpFetchTransferStatusInputSchema,
|
|
3252
|
+
outputZod: mcpCctpFetchTransferStatusOutputSchema
|
|
3253
|
+
}),
|
|
2580
3254
|
defineMcpTool({
|
|
2581
3255
|
name: "ctm_morpho_fetch_earn_vaults",
|
|
2582
3256
|
actionId: "morpho.fetch-earn-vaults",
|
|
@@ -2644,7 +3318,7 @@ function getAgentCatalogForMcp() {
|
|
|
2644
3318
|
"1. Quote (protocol-specific API if needed)",
|
|
2645
3319
|
"2. Build protocol calldata (e.g. create_swap)",
|
|
2646
3320
|
"3. build_*_multisign \u2192 { requestId } (MCP auto-submits)",
|
|
2647
|
-
"4.
|
|
3321
|
+
"4. sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result (do not poll wait_for_sign_request_ready \u2014 Join may take days)"
|
|
2648
3322
|
],
|
|
2649
3323
|
evmSwapManualTypical: [
|
|
2650
3324
|
"1. Quote (protocol-specific API if needed)",
|
|
@@ -2663,7 +3337,7 @@ function getAgentCatalogForMcp() {
|
|
|
2663
3337
|
"1. load_defi_protocol for the target protocol",
|
|
2664
3338
|
"2. get_defi_protocol_supported_chains / get_token_registry to pick chainId and tokens",
|
|
2665
3339
|
"3. MCP build_* tool with keyGenId + chainId \u2192 { requestId }",
|
|
2666
|
-
"4. Base MCP:
|
|
3340
|
+
"4. Base MCP: sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result (no wait_for_sign_request_ready polling after submit)"
|
|
2667
3341
|
]
|
|
2668
3342
|
}
|
|
2669
3343
|
};
|
|
@@ -3548,6 +4222,185 @@ var morphoProtocolModule = {
|
|
|
3548
4222
|
]
|
|
3549
4223
|
};
|
|
3550
4224
|
registerProtocolModule(morphoProtocolModule);
|
|
4225
|
+
|
|
4226
|
+
// src/protocols/evm/circle-cctp/constants.ts
|
|
4227
|
+
var CIRCLE_CCTP_PROTOCOL_ID = "circle-cctp";
|
|
4228
|
+
var TOKEN_MESSENGER_V2_MAINNET = "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
4229
|
+
var TOKEN_MESSENGER_V2_TESTNET = "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
4230
|
+
var CCTP_EVM_CHAINS = [
|
|
4231
|
+
{
|
|
4232
|
+
chainId: 1,
|
|
4233
|
+
domain: 0,
|
|
4234
|
+
network: "mainnet",
|
|
4235
|
+
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
4236
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4237
|
+
label: "Ethereum"
|
|
4238
|
+
},
|
|
4239
|
+
{
|
|
4240
|
+
chainId: 43114,
|
|
4241
|
+
domain: 1,
|
|
4242
|
+
network: "mainnet",
|
|
4243
|
+
usdc: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
|
|
4244
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4245
|
+
label: "Avalanche"
|
|
4246
|
+
},
|
|
4247
|
+
{
|
|
4248
|
+
chainId: 10,
|
|
4249
|
+
domain: 2,
|
|
4250
|
+
network: "mainnet",
|
|
4251
|
+
usdc: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
4252
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4253
|
+
label: "OP Mainnet"
|
|
4254
|
+
},
|
|
4255
|
+
{
|
|
4256
|
+
chainId: 42161,
|
|
4257
|
+
domain: 3,
|
|
4258
|
+
network: "mainnet",
|
|
4259
|
+
usdc: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
4260
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4261
|
+
label: "Arbitrum"
|
|
4262
|
+
},
|
|
4263
|
+
{
|
|
4264
|
+
chainId: 8453,
|
|
4265
|
+
domain: 6,
|
|
4266
|
+
network: "mainnet",
|
|
4267
|
+
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
4268
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4269
|
+
label: "Base"
|
|
4270
|
+
},
|
|
4271
|
+
{
|
|
4272
|
+
chainId: 137,
|
|
4273
|
+
domain: 7,
|
|
4274
|
+
network: "mainnet",
|
|
4275
|
+
usdc: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
4276
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4277
|
+
label: "Polygon PoS"
|
|
4278
|
+
},
|
|
4279
|
+
{
|
|
4280
|
+
chainId: 11155111,
|
|
4281
|
+
domain: 0,
|
|
4282
|
+
network: "testnet",
|
|
4283
|
+
usdc: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
4284
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4285
|
+
label: "Ethereum Sepolia"
|
|
4286
|
+
},
|
|
4287
|
+
{
|
|
4288
|
+
chainId: 43113,
|
|
4289
|
+
domain: 1,
|
|
4290
|
+
network: "testnet",
|
|
4291
|
+
usdc: "0x5425890298aed601595a70AB815c96711a31Bc65",
|
|
4292
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4293
|
+
label: "Avalanche Fuji"
|
|
4294
|
+
},
|
|
4295
|
+
{
|
|
4296
|
+
chainId: 11155420,
|
|
4297
|
+
domain: 2,
|
|
4298
|
+
network: "testnet",
|
|
4299
|
+
usdc: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
|
|
4300
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4301
|
+
label: "OP Sepolia"
|
|
4302
|
+
},
|
|
4303
|
+
{
|
|
4304
|
+
chainId: 421614,
|
|
4305
|
+
domain: 3,
|
|
4306
|
+
network: "testnet",
|
|
4307
|
+
usdc: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
|
|
4308
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4309
|
+
label: "Arbitrum Sepolia"
|
|
4310
|
+
},
|
|
4311
|
+
{
|
|
4312
|
+
chainId: 84532,
|
|
4313
|
+
domain: 6,
|
|
4314
|
+
network: "testnet",
|
|
4315
|
+
usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
4316
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4317
|
+
label: "Base Sepolia"
|
|
4318
|
+
},
|
|
4319
|
+
{
|
|
4320
|
+
chainId: 80002,
|
|
4321
|
+
domain: 7,
|
|
4322
|
+
network: "testnet",
|
|
4323
|
+
usdc: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
|
|
4324
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4325
|
+
label: "Polygon Amoy"
|
|
4326
|
+
}
|
|
4327
|
+
];
|
|
4328
|
+
function cctpChainConfig(chainId) {
|
|
4329
|
+
return CCTP_EVM_CHAINS.find((c) => c.chainId === chainId) ?? null;
|
|
4330
|
+
}
|
|
4331
|
+
function parseCctpEvmChainId(chainId) {
|
|
4332
|
+
if (typeof chainId === "number") {
|
|
4333
|
+
return Number.isFinite(chainId) ? chainId : Number.NaN;
|
|
4334
|
+
}
|
|
4335
|
+
const t = String(chainId).trim();
|
|
4336
|
+
if (!t) return Number.NaN;
|
|
4337
|
+
const low = t.toLowerCase();
|
|
4338
|
+
if (low.startsWith("eip155:")) {
|
|
4339
|
+
const n2 = Number.parseInt(t.slice("eip155:".length).trim(), 10);
|
|
4340
|
+
return Number.isFinite(n2) ? n2 : Number.NaN;
|
|
4341
|
+
}
|
|
4342
|
+
if (low.startsWith("0x")) {
|
|
4343
|
+
const n2 = Number.parseInt(t, 16);
|
|
4344
|
+
return Number.isFinite(n2) ? n2 : Number.NaN;
|
|
4345
|
+
}
|
|
4346
|
+
const n = Number.parseInt(t, 10);
|
|
4347
|
+
return Number.isFinite(n) ? n : Number.NaN;
|
|
4348
|
+
}
|
|
4349
|
+
function isCctpSourceChainSupported(chainId) {
|
|
4350
|
+
const n = parseCctpEvmChainId(chainId);
|
|
4351
|
+
return Number.isFinite(n) && cctpChainConfig(n) != null;
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
// src/protocols/evm/circle-cctp/index.ts
|
|
4355
|
+
var circleCctpProtocolModule = {
|
|
4356
|
+
id: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4357
|
+
chainCategory: "evm",
|
|
4358
|
+
isChainSupported(ctx) {
|
|
4359
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
4360
|
+
return isCctpSourceChainSupported(ctx.chainId);
|
|
4361
|
+
},
|
|
4362
|
+
isTokenSupported(token) {
|
|
4363
|
+
return token.category === "evm" && token.kind === "erc20";
|
|
4364
|
+
},
|
|
4365
|
+
actions: [
|
|
4366
|
+
{
|
|
4367
|
+
id: "circle-cctp.fetch-routes",
|
|
4368
|
+
protocolId: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4369
|
+
chainCategory: "evm",
|
|
4370
|
+
description: "List supported CCTP Forwarding Service routes (EVM)",
|
|
4371
|
+
commonParams: [],
|
|
4372
|
+
params: {
|
|
4373
|
+
network: { type: "string", required: false, description: "mainnet | testnet" }
|
|
4374
|
+
}
|
|
4375
|
+
},
|
|
4376
|
+
{
|
|
4377
|
+
id: "circle-cctp.fetch-fees",
|
|
4378
|
+
protocolId: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4379
|
+
chainCategory: "evm",
|
|
4380
|
+
description: "Quote Iris Forwarding Service burn fees for a route",
|
|
4381
|
+
commonParams: [],
|
|
4382
|
+
params: {
|
|
4383
|
+
sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
|
|
4384
|
+
destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
|
|
4385
|
+
transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" }
|
|
4386
|
+
}
|
|
4387
|
+
},
|
|
4388
|
+
{
|
|
4389
|
+
id: "circle-cctp.burn-forward",
|
|
4390
|
+
protocolId: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4391
|
+
chainCategory: "evm",
|
|
4392
|
+
description: "Burn USDC on source chain via CCTP Forwarding Service (approve + depositForBurnWithHook batch)",
|
|
4393
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
4394
|
+
params: {
|
|
4395
|
+
sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
|
|
4396
|
+
destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
|
|
4397
|
+
transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" },
|
|
4398
|
+
mintRecipient: { type: "address", required: false, description: "Destination mint recipient (default executor)" }
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
]
|
|
4402
|
+
};
|
|
4403
|
+
registerProtocolModule(circleCctpProtocolModule);
|
|
3551
4404
|
var skillsDir = join(dirname(fileURLToPath(import.meta.url)), "skills");
|
|
3552
4405
|
var SKILL_PROTOCOL_IDS = [
|
|
3553
4406
|
"aave-v4",
|
|
@@ -3560,7 +4413,8 @@ var SKILL_PROTOCOL_IDS = [
|
|
|
3560
4413
|
"sky",
|
|
3561
4414
|
"gmx",
|
|
3562
4415
|
"hyperliquid",
|
|
3563
|
-
"morpho"
|
|
4416
|
+
"morpho",
|
|
4417
|
+
"circle-cctp"
|
|
3564
4418
|
];
|
|
3565
4419
|
function getToolsForProtocol(protocolId) {
|
|
3566
4420
|
return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
|
|
@@ -3887,6 +4741,7 @@ registerProtocolModule(eulerV2ProtocolModule);
|
|
|
3887
4741
|
registerProtocolModule(gmxProtocolModule);
|
|
3888
4742
|
registerProtocolModule(hyperliquidProtocolModule);
|
|
3889
4743
|
registerProtocolModule(morphoProtocolModule);
|
|
4744
|
+
registerProtocolModule(circleCctpProtocolModule);
|
|
3890
4745
|
function getAgentCatalog() {
|
|
3891
4746
|
return {
|
|
3892
4747
|
protocols: getProtocolModules(),
|
|
@@ -3906,11 +4761,12 @@ function getAgentCatalog() {
|
|
|
3906
4761
|
gmx: gmxProtocolModule,
|
|
3907
4762
|
hyperliquid: hyperliquidProtocolModule,
|
|
3908
4763
|
morpho: morphoProtocolModule,
|
|
4764
|
+
circleCctp: circleCctpProtocolModule,
|
|
3909
4765
|
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
3910
4766
|
mcp: getAgentCatalogForMcp()
|
|
3911
4767
|
};
|
|
3912
4768
|
}
|
|
3913
4769
|
|
|
3914
|
-
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
|
|
4770
|
+
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchOrdersInputSchema, mcpGmxFetchOrdersOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
|
|
3915
4771
|
//# sourceMappingURL=catalog.js.map
|
|
3916
4772
|
//# sourceMappingURL=catalog.js.map
|