@continuumdao/ctm-mpc-defi 0.2.55 → 0.2.56

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.
@@ -103,6 +103,110 @@ var init_defiProxy = __esm({
103
103
  "src/core/defiProxy.ts"() {
104
104
  }
105
105
  });
106
+ function isConfiguredAddress(addr) {
107
+ if (!addr?.trim()) return false;
108
+ try {
109
+ return viem.getAddress(addr) !== viem.zeroAddress;
110
+ } catch {
111
+ return false;
112
+ }
113
+ }
114
+ function continuumDaoDeployment(chainId) {
115
+ return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
116
+ }
117
+ function isContinuumDaoLockChain(chainId) {
118
+ return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
119
+ }
120
+ function isContinuumDaoSupportedChainId(chainId) {
121
+ return continuumDaoDeployment(chainId) != null;
122
+ }
123
+ function ctmTokenAddressOnEvmChain(chainId) {
124
+ const ctm = continuumDaoDeployment(chainId)?.ctm;
125
+ return ctm && isConfiguredAddress(ctm) ? viem.getAddress(ctm) : null;
126
+ }
127
+ function votingEscrowAddressOnEvmChain(chainId) {
128
+ const ve = continuumDaoDeployment(chainId)?.votingEscrow;
129
+ return ve && isConfiguredAddress(ve) ? viem.getAddress(ve) : null;
130
+ }
131
+ function votingEscrowMarketplaceAddressOnEvmChain(chainId) {
132
+ if (chainId !== CONTINUUM_DAO_LINEA_CHAIN_ID) return null;
133
+ return VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS;
134
+ }
135
+ function listContinuumDaoDefaultAssets() {
136
+ const out = [];
137
+ for (const chainId of [
138
+ CONTINUUM_DAO_LINEA_CHAIN_ID,
139
+ CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
140
+ CONTINUUM_DAO_ETHEREUM_CHAIN_ID
141
+ ]) {
142
+ const dep = continuumDaoDeployment(chainId);
143
+ if (!dep) continue;
144
+ if (isConfiguredAddress(dep.ctm)) {
145
+ out.push({
146
+ chainId,
147
+ tokenType: "CTMERC20",
148
+ contractAddress: viem.getAddress(dep.ctm),
149
+ name: CTM_TOKEN_NAME,
150
+ symbol: CTM_TOKEN_SYMBOL,
151
+ decimals: CTM_TOKEN_DECIMALS
152
+ });
153
+ }
154
+ if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
155
+ out.push({
156
+ chainId,
157
+ tokenType: "ERC721",
158
+ contractAddress: viem.getAddress(dep.votingEscrow),
159
+ name: VECTM_TOKEN_NAME,
160
+ symbol: VECTM_TOKEN_SYMBOL
161
+ });
162
+ }
163
+ }
164
+ return out;
165
+ }
166
+ var CONTINUUM_DAO_PROTOCOL_ID, CONTINUUM_DAO_ETHEREUM_CHAIN_ID, CONTINUUM_DAO_LINEA_CHAIN_ID, CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID, CTM_TOKEN_NAME, CTM_TOKEN_SYMBOL, VECTM_TOKEN_NAME, VECTM_TOKEN_SYMBOL, CTM_TOKEN_DECIMALS, WEEK_SECONDS, UNSET, CTM_TOKEN_ADDRESS, VOTING_ESCROW_LINEA_ADDRESS, VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS, MARKETPLACE_WETH_LINEA_ADDRESS, MARKETPLACE_USDC_LINEA_ADDRESS, CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS, CONTINUUM_DAO_DEPLOYMENTS;
167
+ var init_constants = __esm({
168
+ "src/protocols/evm/continuum-dao/constants.ts"() {
169
+ CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
170
+ CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
171
+ CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
172
+ CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
173
+ CTM_TOKEN_NAME = "Continuum";
174
+ CTM_TOKEN_SYMBOL = "CTM";
175
+ VECTM_TOKEN_NAME = "Voting Escrow Continuum";
176
+ VECTM_TOKEN_SYMBOL = "veCTM";
177
+ CTM_TOKEN_DECIMALS = 18;
178
+ WEEK_SECONDS = 7 * 86400;
179
+ UNSET = {
180
+ ctm: viem.zeroAddress,
181
+ votingEscrow: viem.zeroAddress,
182
+ nodeProperties: viem.zeroAddress,
183
+ rewards: viem.zeroAddress,
184
+ governor: viem.zeroAddress
185
+ };
186
+ CTM_TOKEN_ADDRESS = viem.getAddress("0x2026027054F5beBCEB650aBD62dC623e327658e7");
187
+ VOTING_ESCROW_LINEA_ADDRESS = viem.getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
188
+ viem.getAddress("0x4ebd7cCBe32a51d1638cFE90E8eD1c4BdF42f729");
189
+ VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS = viem.getAddress("0x92557d38beAe4658d3c03A02F349FFB60c3bfFA5");
190
+ MARKETPLACE_WETH_LINEA_ADDRESS = viem.getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f");
191
+ MARKETPLACE_USDC_LINEA_ADDRESS = viem.getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff");
192
+ CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID = "continuum-dao-marketplace";
193
+ CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS = viem.getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
194
+ viem.getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
195
+ CONTINUUM_DAO_DEPLOYMENTS = {
196
+ [CONTINUUM_DAO_LINEA_CHAIN_ID]: {
197
+ ...UNSET,
198
+ ctm: CTM_TOKEN_ADDRESS,
199
+ votingEscrow: VOTING_ESCROW_LINEA_ADDRESS,
200
+ governor: CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS
201
+ },
202
+ [CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
203
+ [CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
204
+ ...UNSET,
205
+ ctm: CTM_TOKEN_ADDRESS
206
+ }
207
+ };
208
+ }
209
+ });
106
210
 
107
211
  // src/protocols/evm/arcus/support.ts
108
212
  function isArcusChainSupported(chainId) {
@@ -117,7 +221,7 @@ var init_support = __esm({
117
221
 
118
222
  // src/protocols/evm/arcus/constants.ts
119
223
  var ARCUS_PROTOCOL_ID;
120
- var init_constants = __esm({
224
+ var init_constants2 = __esm({
121
225
  "src/protocols/evm/arcus/constants.ts"() {
122
226
  ARCUS_PROTOCOL_ID = "arcus";
123
227
  }
@@ -513,109 +617,6 @@ var init_yields = __esm({
513
617
  );
514
618
  }
515
619
  });
516
- function isConfiguredAddress(addr) {
517
- if (!addr?.trim()) return false;
518
- try {
519
- return viem.getAddress(addr) !== viem.zeroAddress;
520
- } catch {
521
- return false;
522
- }
523
- }
524
- function continuumDaoDeployment(chainId) {
525
- return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
526
- }
527
- function isContinuumDaoLockChain(chainId) {
528
- return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
529
- }
530
- function isContinuumDaoSupportedChainId(chainId) {
531
- return continuumDaoDeployment(chainId) != null;
532
- }
533
- function ctmTokenAddressOnEvmChain(chainId) {
534
- const ctm = continuumDaoDeployment(chainId)?.ctm;
535
- return ctm && isConfiguredAddress(ctm) ? viem.getAddress(ctm) : null;
536
- }
537
- function votingEscrowAddressOnEvmChain(chainId) {
538
- const ve = continuumDaoDeployment(chainId)?.votingEscrow;
539
- return ve && isConfiguredAddress(ve) ? viem.getAddress(ve) : null;
540
- }
541
- function votingEscrowMarketplaceAddressOnEvmChain(chainId) {
542
- if (chainId !== CONTINUUM_DAO_LINEA_CHAIN_ID) return null;
543
- return VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS;
544
- }
545
- function listContinuumDaoDefaultAssets() {
546
- const out = [];
547
- for (const chainId of [
548
- CONTINUUM_DAO_LINEA_CHAIN_ID,
549
- CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
550
- CONTINUUM_DAO_ETHEREUM_CHAIN_ID
551
- ]) {
552
- const dep = continuumDaoDeployment(chainId);
553
- if (!dep) continue;
554
- if (isConfiguredAddress(dep.ctm)) {
555
- out.push({
556
- chainId,
557
- tokenType: "CTMERC20",
558
- contractAddress: viem.getAddress(dep.ctm),
559
- name: CTM_TOKEN_NAME,
560
- symbol: CTM_TOKEN_SYMBOL,
561
- decimals: CTM_TOKEN_DECIMALS
562
- });
563
- }
564
- if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
565
- out.push({
566
- chainId,
567
- tokenType: "ERC721",
568
- contractAddress: viem.getAddress(dep.votingEscrow),
569
- name: VECTM_TOKEN_NAME,
570
- symbol: VECTM_TOKEN_SYMBOL
571
- });
572
- }
573
- }
574
- return out;
575
- }
576
- var CONTINUUM_DAO_PROTOCOL_ID, CONTINUUM_DAO_ETHEREUM_CHAIN_ID, CONTINUUM_DAO_LINEA_CHAIN_ID, CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID, CTM_TOKEN_NAME, CTM_TOKEN_SYMBOL, VECTM_TOKEN_NAME, VECTM_TOKEN_SYMBOL, CTM_TOKEN_DECIMALS, UNSET, CTM_TOKEN_ADDRESS, VOTING_ESCROW_LINEA_ADDRESS, VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS, CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS, CONTINUUM_DAO_DEPLOYMENTS;
577
- var init_constants2 = __esm({
578
- "src/protocols/evm/continuum-dao/constants.ts"() {
579
- CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
580
- CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
581
- CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
582
- CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
583
- CTM_TOKEN_NAME = "Continuum";
584
- CTM_TOKEN_SYMBOL = "CTM";
585
- VECTM_TOKEN_NAME = "Voting Escrow Continuum";
586
- VECTM_TOKEN_SYMBOL = "veCTM";
587
- CTM_TOKEN_DECIMALS = 18;
588
- UNSET = {
589
- ctm: viem.zeroAddress,
590
- votingEscrow: viem.zeroAddress,
591
- nodeProperties: viem.zeroAddress,
592
- rewards: viem.zeroAddress,
593
- governor: viem.zeroAddress
594
- };
595
- CTM_TOKEN_ADDRESS = viem.getAddress("0x2026027054F5beBCEB650aBD62dC623e327658e7");
596
- VOTING_ESCROW_LINEA_ADDRESS = viem.getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
597
- viem.getAddress("0x4ebd7cCBe32a51d1638cFE90E8eD1c4BdF42f729");
598
- VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS = viem.getAddress("0x92557d38beAe4658d3c03A02F349FFB60c3bfFA5");
599
- viem.getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f");
600
- viem.getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff");
601
- CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID = "continuum-dao-marketplace";
602
- CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS = viem.getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
603
- viem.getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
604
- CONTINUUM_DAO_DEPLOYMENTS = {
605
- [CONTINUUM_DAO_LINEA_CHAIN_ID]: {
606
- ...UNSET,
607
- ctm: CTM_TOKEN_ADDRESS,
608
- votingEscrow: VOTING_ESCROW_LINEA_ADDRESS,
609
- governor: CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS
610
- },
611
- [CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
612
- [CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
613
- ...UNSET,
614
- ctm: CTM_TOKEN_ADDRESS
615
- }
616
- };
617
- }
618
- });
619
620
  var init_committeeList = __esm({
620
621
  "src/protocols/evm/continuum-dao/committeeList.ts"() {
621
622
  }
@@ -2745,6 +2746,172 @@ function preprocessMerklClaimInput(kind) {
2745
2746
  return o;
2746
2747
  };
2747
2748
  }
2749
+
2750
+ // src/protocols/evm/continuum-dao/purpose.ts
2751
+ init_constants();
2752
+ function chainParts(chainId) {
2753
+ const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId ?? "").trim(), 10);
2754
+ const id = Number.isFinite(n) ? n : 0;
2755
+ if (id === CONTINUUM_DAO_LINEA_CHAIN_ID) return { name: "Linea Mainnet", id };
2756
+ if (id === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID) return { name: "Linea Sepolia", id };
2757
+ if (id === CONTINUUM_DAO_ETHEREUM_CHAIN_ID) return { name: "Ethereum Mainnet", id };
2758
+ return { name: "chain", id };
2759
+ }
2760
+ function suffix(chainId) {
2761
+ const { name, id } = chainParts(chainId);
2762
+ return `on ${name} (chainId ${id})`;
2763
+ }
2764
+ function text(value) {
2765
+ return String(value ?? "").trim();
2766
+ }
2767
+ function tokenLabel(value) {
2768
+ const id = text(value);
2769
+ return id ? `#${id}` : "#\u2026";
2770
+ }
2771
+ function shortAddr(value) {
2772
+ const trimmed = text(value);
2773
+ if (!trimmed) return "\u2026";
2774
+ try {
2775
+ if (!viem.isAddress(trimmed)) return trimmed;
2776
+ const addr = viem.getAddress(trimmed);
2777
+ return `${addr.slice(0, 6)}\u2026${addr.slice(-4)}`;
2778
+ } catch {
2779
+ return trimmed;
2780
+ }
2781
+ }
2782
+ function weeksLabel(seconds) {
2783
+ const n = Number(text(seconds));
2784
+ if (!Number.isFinite(n) || n <= 0) return "\u2026 weeks";
2785
+ const weeks = Math.max(1, Math.round(n / WEEK_SECONDS));
2786
+ return `${weeks} week${weeks === 1 ? "" : "s"}`;
2787
+ }
2788
+ function paymentMeta(address) {
2789
+ const lower = text(address).toLowerCase();
2790
+ if (lower === MARKETPLACE_USDC_LINEA_ADDRESS.toLowerCase()) return { symbol: "USDC", decimals: 6 };
2791
+ if (lower === MARKETPLACE_WETH_LINEA_ADDRESS.toLowerCase()) return { symbol: "WETH", decimals: 18 };
2792
+ if (lower === CTM_TOKEN_ADDRESS.toLowerCase()) return { symbol: "CTM", decimals: 18 };
2793
+ return { symbol: "token", decimals: 18 };
2794
+ }
2795
+ function moneyFromWei(wei2, paymentToken) {
2796
+ const raw = text(wei2);
2797
+ if (!raw) return "\u2026 token";
2798
+ try {
2799
+ const meta = paymentMeta(paymentToken);
2800
+ const human = viem.formatUnits(BigInt(raw), meta.decimals).replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "");
2801
+ return `${human} ${meta.symbol}`;
2802
+ } catch {
2803
+ return raw;
2804
+ }
2805
+ }
2806
+ function deadlineLabel(value) {
2807
+ const n = Number(text(value));
2808
+ if (!Number.isFinite(n) || n <= 0) return "\u2026";
2809
+ const date = new Date(n * 1e3);
2810
+ if (Number.isNaN(date.getTime())) return "\u2026";
2811
+ return `${date.toISOString().slice(0, 16).replace("T", " ")} UTC`;
2812
+ }
2813
+ function bravoLabel(support) {
2814
+ const raw = text(support).toLowerCase();
2815
+ if (raw === "0" || raw === "against") return "Against";
2816
+ if (raw === "1" || raw === "for") return "For";
2817
+ if (raw === "2" || raw === "abstain") return "Abstain";
2818
+ return null;
2819
+ }
2820
+ function proposalLabel(input) {
2821
+ const title = text(input.title || input.proposalTitle);
2822
+ if (title) return title;
2823
+ const id = text(input.proposalId);
2824
+ return id ? `proposal ${id}` : "proposal";
2825
+ }
2826
+ function buildContinuumDaoMcpPurpose(action, input) {
2827
+ const end = suffix(input.chainId);
2828
+ const id = tokenLabel(input.tokenId);
2829
+ switch (action) {
2830
+ case "createLock":
2831
+ return `ContinuumDAO: create lock ${text(input.amountHuman) || "\u2026"} CTM for ${weeksLabel(input.lockDurationSeconds)} ${end}`;
2832
+ case "increaseAmount":
2833
+ return `ContinuumDAO: increase lock ${id} by ${text(input.amountHuman) || "\u2026"} CTM ${end}`;
2834
+ case "increaseUnlockTime":
2835
+ return `ContinuumDAO: extend lock ${id} by ${weeksLabel(input.lockDurationSeconds)} ${end}`;
2836
+ case "split":
2837
+ return `ContinuumDAO: split lock ${id}, extract ${text(input.extractedHuman) || "\u2026"} CTM ${end}`;
2838
+ case "merge": {
2839
+ const from = tokenLabel(input.fromTokenId);
2840
+ const into = text(input.toTokenId);
2841
+ return into ? `ContinuumDAO: merge lock ${from} into #${into} ${end}` : `ContinuumDAO: merge lock ${from} into \u2026 ${end}`;
2842
+ }
2843
+ case "withdraw":
2844
+ return `ContinuumDAO: withdraw expired lock ${id} ${end}`;
2845
+ case "liquidate":
2846
+ return `ContinuumDAO: liquidate lock ${id} ${end}`;
2847
+ case "delegate":
2848
+ return text(input.delegatee) ? `ContinuumDAO: delegate voting power to ${shortAddr(input.delegatee)} ${end}` : `ContinuumDAO: delegate voting power ${end}`;
2849
+ case "undelegate":
2850
+ return `ContinuumDAO: undelegate (return voting power to this KeyGen) ${end}`;
2851
+ case "transfer":
2852
+ return text(input.to) ? `ContinuumDAO: transfer veCTM ${id} to ${shortAddr(input.to)} ${end}` : `ContinuumDAO: transfer veCTM ${id} ${end}`;
2853
+ case "attach":
2854
+ return text(input.tokenId) ? `ContinuumDAO: attach veCTM ${id} to this node ${end}` : `ContinuumDAO: attach veCTM to this node ${end}`;
2855
+ case "requestDetach":
2856
+ return `ContinuumDAO: request detach veCTM ${id} ${end}`;
2857
+ case "proposeBravo": {
2858
+ const title = text(input.title);
2859
+ return title ? `ContinuumDAO: propose "${title}" (Bravo) ${end}` : `ContinuumDAO: propose governance proposal (Bravo) ${end}`;
2860
+ }
2861
+ case "proposeDelta": {
2862
+ const title = text(input.title);
2863
+ return title ? `ContinuumDAO: propose "${title}" (Delta) ${end}` : `ContinuumDAO: propose governance proposal (Delta) ${end}`;
2864
+ }
2865
+ case "castVoteBravo": {
2866
+ const label = proposalLabel(input);
2867
+ const support = bravoLabel(input.support);
2868
+ return support ? `ContinuumDAO: vote ${support} on "${label}" ${end}` : `ContinuumDAO: vote on "${label}" ${end}`;
2869
+ }
2870
+ case "castVoteDelta":
2871
+ return `ContinuumDAO: vote on "${proposalLabel(input)}" (Delta) ${end}`;
2872
+ case "execute":
2873
+ return `ContinuumDAO: execute "${proposalLabel(input)}" ${end}`;
2874
+ case "cancel":
2875
+ return `ContinuumDAO: cancel "${proposalLabel(input)}" ${end}`;
2876
+ case "forumSignIn": {
2877
+ const who = text(input.username);
2878
+ return who ? `ContinuumDAO: sign in to the forum as ${who} ${end}` : `ContinuumDAO: sign in to the forum ${end}`;
2879
+ }
2880
+ case "marketplaceCreateListing":
2881
+ return `ContinuumDAO: list veCTM ${id} for ${moneyFromWei(input.askWei, input.paymentToken)} until ${deadlineLabel(input.deadline)} ${end}`;
2882
+ case "marketplaceDelist":
2883
+ return `ContinuumDAO: delist veCTM ${id} ${end}`;
2884
+ case "marketplaceFulfillListing":
2885
+ return `ContinuumDAO: buy veCTM ${id} for ${moneyFromWei(input.priceWei, input.paymentToken)} ${end}`;
2886
+ case "marketplaceCreateOffering":
2887
+ return `ContinuumDAO: offer ${moneyFromWei(input.bidWei, input.paymentToken)} for veCTM ${id} until ${deadlineLabel(input.deadline)} ${end}`;
2888
+ case "marketplaceRescind":
2889
+ return `ContinuumDAO: rescind offer on veCTM ${id} ${end}`;
2890
+ case "marketplaceFulfillOffering":
2891
+ return `ContinuumDAO: accept offer of ${moneyFromWei(input.priceWei, input.paymentToken)} on veCTM ${id} ${end}`;
2892
+ case "marketplaceCreateAuction":
2893
+ return `ContinuumDAO: auction veCTM ${id} reserve ${moneyFromWei(input.reserveWei, input.paymentToken)}, minimum increment ${moneyFromWei(input.minIncrementWei, input.paymentToken)}, until ${deadlineLabel(input.deadline)} ${end}`;
2894
+ case "marketplaceCancelAuction":
2895
+ return `ContinuumDAO: cancel auction for veCTM ${id} ${end}`;
2896
+ case "marketplaceAuctionBid":
2897
+ return `ContinuumDAO: bid ${moneyFromWei(input.priceWei, input.paymentToken)} on veCTM ${id} ${end}`;
2898
+ case "marketplaceSettleAuction":
2899
+ return `ContinuumDAO: settle auction for veCTM ${id} ${end}`;
2900
+ default:
2901
+ return `ContinuumDAO: ${end}`;
2902
+ }
2903
+ }
2904
+ function preprocessContinuumDaoPurpose(action, raw) {
2905
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
2906
+ const o = { ...raw };
2907
+ const supplied = text(o.purposeText ?? o.purpose);
2908
+ if (supplied) {
2909
+ o.purposeText = supplied;
2910
+ return o;
2911
+ }
2912
+ o.purposeText = buildContinuumDaoMcpPurpose(action, o);
2913
+ return o;
2914
+ }
2748
2915
  var mcpServerCommonInputSchema = zod.z.object({
2749
2916
  keyGenId: zod.z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
2750
2917
  chainId: zod.z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
@@ -2790,6 +2957,14 @@ var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
2790
2957
  function mcpMultisignInput(fields) {
2791
2958
  return withMultisignKeySourceRefine(evmMultisignCommonInputSchema.extend(fields));
2792
2959
  }
2960
+ function mcpContinuumDaoWriteInput(action, fields) {
2961
+ return withMultisignKeySourceRefine(
2962
+ zod.z.preprocess(
2963
+ (raw) => preprocessContinuumDaoPurpose(action, raw),
2964
+ evmMultisignCommonInputSchema.extend(fields)
2965
+ )
2966
+ );
2967
+ }
2793
2968
  var mcpLidoSubmitInputSchema = mcpMultisignInput({
2794
2969
  valueWei: zod.z.string().min(1).describe("ETH to stake (wei decimal string)"),
2795
2970
  referral: evmAddressSchema.optional()
@@ -3231,42 +3406,45 @@ var mcpMorphoMidnightRepayInputSchema = withMultisignKeySourceRefine(
3231
3406
  })
3232
3407
  )
3233
3408
  );
3234
- var mcpContinuumDaoCreateLockInputSchema = mcpMultisignInput({
3409
+ var mcpContinuumDaoCreateLockInputSchema = mcpContinuumDaoWriteInput("createLock", {
3235
3410
  amountHuman: zod.z.string().min(1).describe("CTM amount to lock. Must be >= VotingEscrow.minimumLock (default 1 CTM)."),
3236
3411
  lockDurationSeconds: zod.z.union([zod.z.string(), zod.z.number()]).describe("Lock duration in seconds. Must be 1\u2013208 weeks (week-aligned on-chain)."),
3237
3412
  ctm: evmAddressSchema.optional(),
3238
3413
  votingEscrow: evmAddressSchema.optional()
3239
3414
  });
3240
- var mcpContinuumDaoIncreaseAmountInputSchema = mcpMultisignInput({
3415
+ var mcpContinuumDaoIncreaseAmountInputSchema = mcpContinuumDaoWriteInput("increaseAmount", {
3241
3416
  tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3242
3417
  amountHuman: zod.z.string().min(1),
3243
3418
  ctm: evmAddressSchema.optional(),
3244
3419
  votingEscrow: evmAddressSchema.optional()
3245
3420
  });
3246
- var mcpContinuumDaoIncreaseUnlockTimeInputSchema = mcpMultisignInput({
3421
+ var mcpContinuumDaoIncreaseUnlockTimeInputSchema = mcpContinuumDaoWriteInput("increaseUnlockTime", {
3247
3422
  tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3248
3423
  lockDurationSeconds: zod.z.union([zod.z.string(), zod.z.number()]),
3249
3424
  votingEscrow: evmAddressSchema.optional()
3250
3425
  });
3251
- var mcpContinuumDaoSplitInputSchema = mcpMultisignInput({
3426
+ var mcpContinuumDaoSplitInputSchema = mcpContinuumDaoWriteInput("split", {
3252
3427
  tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3253
3428
  extractedHuman: zod.z.string().min(1).describe("CTM extracted into the new lock. Minimum 1 CTM; original lock must also keep 1 CTM."),
3254
3429
  votingEscrow: evmAddressSchema.optional()
3255
3430
  });
3256
- var mcpContinuumDaoMergeInputSchema = mcpMultisignInput({
3431
+ var mcpContinuumDaoMergeInputSchema = mcpContinuumDaoWriteInput("merge", {
3257
3432
  fromTokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3258
3433
  toTokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3259
3434
  votingEscrow: evmAddressSchema.optional()
3260
3435
  });
3261
- var mcpContinuumDaoTokenIdInputSchema = mcpMultisignInput({
3436
+ var continuumDaoTokenIdFields = {
3262
3437
  tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3263
3438
  votingEscrow: evmAddressSchema.optional()
3264
- });
3265
- var mcpContinuumDaoDelegateInputSchema = mcpMultisignInput({
3439
+ };
3440
+ var mcpContinuumDaoWithdrawInputSchema = mcpContinuumDaoWriteInput("withdraw", continuumDaoTokenIdFields);
3441
+ var mcpContinuumDaoLiquidateInputSchema = mcpContinuumDaoWriteInput("liquidate", continuumDaoTokenIdFields);
3442
+ var mcpContinuumDaoTokenIdInputSchema = mcpContinuumDaoWithdrawInputSchema;
3443
+ var mcpContinuumDaoDelegateInputSchema = mcpContinuumDaoWriteInput("delegate", {
3266
3444
  delegatee: evmAddressSchema,
3267
3445
  votingEscrow: evmAddressSchema.optional()
3268
3446
  });
3269
- var mcpContinuumDaoUndelegateInputSchema = mcpMultisignInput({
3447
+ var mcpContinuumDaoUndelegateInputSchema = mcpContinuumDaoWriteInput("undelegate", {
3270
3448
  votingEscrow: evmAddressSchema.optional()
3271
3449
  });
3272
3450
  var mcpContinuumDaoFetchDelegatesInputSchema = zod.z.object({
@@ -3280,12 +3458,12 @@ var mcpContinuumDaoFetchDelegatesOutputSchema = zod.z.object({
3280
3458
  delegatee: evmAddressSchema,
3281
3459
  self: zod.z.boolean()
3282
3460
  });
3283
- var mcpContinuumDaoTransferInputSchema = mcpMultisignInput({
3461
+ var mcpContinuumDaoTransferInputSchema = mcpContinuumDaoWriteInput("transfer", {
3284
3462
  tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3285
3463
  to: evmAddressSchema,
3286
3464
  votingEscrow: evmAddressSchema.optional()
3287
3465
  });
3288
- var mcpContinuumDaoAttachInputSchema = mcpMultisignInput({
3466
+ var mcpContinuumDaoAttachInputSchema = mcpContinuumDaoWriteInput("attach", {
3289
3467
  nodeKey: zod.z.string().min(1),
3290
3468
  tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3291
3469
  mpaWallet: evmAddressSchema,
@@ -3297,7 +3475,7 @@ var mcpContinuumDaoAttachInputSchema = mcpMultisignInput({
3297
3475
  dIDType: zod.z.string().optional(),
3298
3476
  dID: zod.z.string().optional()
3299
3477
  });
3300
- var mcpContinuumDaoRequestDetachInputSchema = mcpMultisignInput({
3478
+ var mcpContinuumDaoRequestDetachInputSchema = mcpContinuumDaoWriteInput("requestDetach", {
3301
3479
  tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
3302
3480
  nodeProperties: evmAddressSchema
3303
3481
  });
@@ -3321,7 +3499,7 @@ var forumTopicKeyField = zod.z.string().min(1).describe(
3321
3499
  "URL of the Governance forum thread created first with ctm_continuum_dao_forum_create_topic (decision / election / treasury / constitution / admin). Must be /topic/:tid or /t/:tid. Ideas threads and the homepage are refused."
3322
3500
  );
3323
3501
  var proposalTypeField = zod.z.number().int().min(0).max(4).describe("0 Admin, 1 Constitution, 2 Decision, 3 Election, 4 Treasury. Must match the forum thread section.");
3324
- var mcpContinuumDaoProposeBravoInputSchema = mcpMultisignInput({
3502
+ var mcpContinuumDaoProposeBravoInputSchema = mcpContinuumDaoWriteInput("proposeBravo", {
3325
3503
  title: zod.z.string().min(1).max(128),
3326
3504
  description: zod.z.string().describe("Catalog description stored by POST /proposals/create."),
3327
3505
  type: proposalTypeField,
@@ -3331,7 +3509,7 @@ var mcpContinuumDaoProposeBravoInputSchema = mcpMultisignInput({
3331
3509
  forumKey: forumTopicKeyField,
3332
3510
  forumUrl: zod.z.string().optional()
3333
3511
  });
3334
- var mcpContinuumDaoProposeDeltaInputSchema = mcpMultisignInput({
3512
+ var mcpContinuumDaoProposeDeltaInputSchema = mcpContinuumDaoWriteInput("proposeDelta", {
3335
3513
  title: zod.z.string().min(1).max(128),
3336
3514
  description: zod.z.string().describe("Catalog description stored by POST /proposals/create."),
3337
3515
  type: proposalTypeField,
@@ -3541,20 +3719,23 @@ var mcpContinuumDaoSimulateProposalOutputSchema = zod.z.object({
3541
3719
  }),
3542
3720
  note: zod.z.string()
3543
3721
  });
3544
- var mcpContinuumDaoCastVoteBravoInputSchema = mcpMultisignInput({
3722
+ var mcpContinuumDaoCastVoteBravoInputSchema = mcpContinuumDaoWriteInput("castVoteBravo", {
3545
3723
  proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
3546
3724
  support: zod.z.union([zod.z.literal(0), zod.z.literal(1), zod.z.literal(2), zod.z.string()]),
3547
3725
  governor: evmAddressSchema.optional()
3548
3726
  });
3549
- var mcpContinuumDaoCastVoteDeltaInputSchema = mcpMultisignInput({
3727
+ var mcpContinuumDaoCastVoteDeltaInputSchema = mcpContinuumDaoWriteInput("castVoteDelta", {
3550
3728
  proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
3551
3729
  weights: zod.z.array(zod.z.union([zod.z.string(), zod.z.number()])),
3552
3730
  governor: evmAddressSchema.optional()
3553
3731
  });
3554
- var mcpContinuumDaoProposalIdInputSchema = mcpMultisignInput({
3732
+ var continuumDaoProposalIdFields = {
3555
3733
  proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
3556
3734
  governor: evmAddressSchema.optional()
3557
- });
3735
+ };
3736
+ var mcpContinuumDaoExecuteInputSchema = mcpContinuumDaoWriteInput("execute", continuumDaoProposalIdFields);
3737
+ var mcpContinuumDaoCancelInputSchema = mcpContinuumDaoWriteInput("cancel", continuumDaoProposalIdFields);
3738
+ var mcpContinuumDaoProposalIdInputSchema = mcpContinuumDaoExecuteInputSchema;
3558
3739
  var mcpContinuumDaoFetchVotingPowerInputSchema = zod.z.object({
3559
3740
  chainId: zod.z.union([zod.z.string(), zod.z.number()]),
3560
3741
  rpcUrl: zod.z.string().min(1),
@@ -4046,7 +4227,7 @@ var mcpContinuumDaoForumSignInEligibleOutputSchema = zod.z.object({
4046
4227
  threshold: zod.z.string().optional().describe("MultiSignAgentWallet.veCtmThresholdPower wei"),
4047
4228
  tokenId: zod.z.string().optional()
4048
4229
  });
4049
- var mcpContinuumDaoForumSignInInputSchema = mcpMultisignInput({
4230
+ var mcpContinuumDaoForumSignInInputSchema = mcpContinuumDaoWriteInput("forumSignIn", {
4050
4231
  nodeKey: zod.z.string().optional().describe(
4051
4232
  "Node key bound to this KeyGen. Always required on KeyGen forum sign-in, including when username is a custom name. The server fills it from this node when omitted. useNodeKeyUsername does not replace it."
4052
4233
  ),
@@ -5878,14 +6059,26 @@ var mcpDeriveTransferSpotInputSchema = mcpDeriveMultisignInput({
5878
6059
  });
5879
6060
  var mcpCctpFeeFieldsSchema = zod.z.object({
5880
6061
  feeTierUsed: zod.z.enum(["low", "med", "high"]),
5881
- maxFee: zod.z.string().describe("Selected tier max fee in USDC base units (6 decimals)"),
5882
- maxFeeHuman: zod.z.string().describe("Human-readable USDC max forwarding fee for feeTierUsed"),
5883
- forwardFeeLow: zod.z.string(),
6062
+ maxFee: zod.z.string().describe(
6063
+ "depositForBurnWithHook maxFee in USDC base units: selected forwardFee tier plus the fast-transfer protocol fee when transferAmountHuman is set"
6064
+ ),
6065
+ maxFeeHuman: zod.z.string().describe("Human-readable maxFee (forwarding fee + protocol fee)"),
6066
+ forwardFeeLow: zod.z.string().describe("Iris forwarding fee only, low tier, USDC base units"),
5884
6067
  forwardFeeLowHuman: zod.z.string(),
5885
- forwardFeeMed: zod.z.string(),
6068
+ forwardFeeMed: zod.z.string().describe("Iris forwarding fee only, med tier, USDC base units"),
5886
6069
  forwardFeeMedHuman: zod.z.string(),
5887
- forwardFeeHigh: zod.z.string(),
6070
+ forwardFeeHigh: zod.z.string().describe("Iris forwarding fee only, high tier, USDC base units"),
5888
6071
  forwardFeeHighHuman: zod.z.string(),
6072
+ maxFeeLow: zod.z.string().optional().describe("forwardFee low + protocol fee"),
6073
+ maxFeeLowHuman: zod.z.string().optional(),
6074
+ maxFeeMed: zod.z.string().optional().describe("forwardFee med + protocol fee"),
6075
+ maxFeeMedHuman: zod.z.string().optional(),
6076
+ maxFeeHigh: zod.z.string().optional().describe("forwardFee high + protocol fee"),
6077
+ maxFeeHighHuman: zod.z.string().optional(),
6078
+ minimumFeeBps: zod.z.number().optional().describe("Iris protocol fee rate in basis points for the selected finality row"),
6079
+ protocolFee: zod.z.string().optional().describe("Protocol fee in USDC base units for transferAmountHuman"),
6080
+ protocolFeeHuman: zod.z.string().optional(),
6081
+ finalityThreshold: zod.z.number().int().optional().describe("Iris fee row used. 1000 = fast transfer"),
5889
6082
  transferAmount: zod.z.string().optional(),
5890
6083
  transferAmountHuman: zod.z.string().optional(),
5891
6084
  totalBurn: zod.z.string().optional().describe("transferAmount + maxFee when transferAmountHuman was provided"),
@@ -5901,8 +6094,13 @@ var mcpCctpFetchSupportedRoutesOutputSchema = jsonObjectSchema.describe(
5901
6094
  var mcpCctpFetchBurnFeesInputSchema = zod.z.object({
5902
6095
  sourceChainId: agentEvmChainIdSchema.describe("Source chain EIP-155 id (burn chain)"),
5903
6096
  destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
5904
- transferAmountHuman: zod.z.string().min(1).optional().describe("Human USDC amount recipient receives (6 decimals). Omit for tier fees only; include for totalBurn."),
5905
- feeTier: zod.z.enum(["low", "med", "high"]).optional().describe("Iris forwardFee tier; default med")
6097
+ transferAmountHuman: zod.z.string().min(1).optional().describe(
6098
+ "Human USDC amount the recipient receives (6 decimals). Required for a maxFee that includes the fast-transfer protocol fee and for totalBurn. Omit only to inspect raw forwarding tiers."
6099
+ ),
6100
+ feeTier: zod.z.enum(["low", "med", "high"]).optional().describe("Iris forwardFee tier; default med"),
6101
+ minFinalityThreshold: agentCoercedOptionalIntSchema(zod.z.number().int().positive()).describe(
6102
+ "Iris fee row. 1000 (default) is fast transfer and includes minimumFee bps. 2000 is standard transfer."
6103
+ )
5906
6104
  });
5907
6105
  var mcpCctpFetchBurnFeesOutputSchema = zod.z.object({
5908
6106
  sourceChainId: zod.z.number(),
@@ -5938,7 +6136,9 @@ var mcpCctpBuildBurnMultisignInputSchema = mcpMultisignInput({
5938
6136
  mintRecipient: evmAddressSchema.optional().describe("Recipient on destination chain; defaults to MPC executor address"),
5939
6137
  feeTier: zod.z.enum(["low", "med", "high"]).optional(),
5940
6138
  minFinalityThreshold: agentCoercedOptionalIntSchema(zod.z.number().int().positive()),
5941
- feeSnapshot: jsonObjectSchema.optional().describe("Optional output from ctm_cctp_fetch_burn_fees")
6139
+ feeSnapshot: jsonObjectSchema.optional().describe(
6140
+ "Optional output from ctm_cctp_fetch_burn_fees. Build re-quotes Iris. A snapshot maxFee below the live forward+protocol total is ignored; a higher snapshot is kept as a cap."
6141
+ )
5942
6142
  });
5943
6143
  var outcomeIdSchema = zod.z.number().int().nonnegative();
5944
6144
  var sideSchema = zod.z.enum(["yes", "no"]);
@@ -6984,7 +7184,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
6984
7184
  actionId: "circle-cctp.burn-forward",
6985
7185
  protocolId: "circle-cctp",
6986
7186
  chainCategory: "evm",
6987
- description: "Create and submit mpc-auth multiSignRequest for CCTP Forwarding Service USDC transfer (approve + depositForBurnWithHook on source chain).",
7187
+ description: "Create and submit mpc-auth multiSignRequest for CCTP Forwarding Service USDC transfer (approve + depositForBurnWithHook on source chain). Re-quotes Iris and sets maxFee to the forwarding tier plus the fast-transfer protocol fee. A feeSnapshot cannot set a lower maxFee.",
6988
7188
  prerequisites: [
6989
7189
  "ctm_cctp_fetch_burn_fees (required)",
6990
7190
  "keyGenId",
@@ -7063,7 +7263,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
7063
7263
  description: "Build VotingEscrow.withdraw for an expired, unattached lock. Refuses if still locked or node-attached.",
7064
7264
  prerequisites: ["keyGen", "tokenId", "lock expired", "unattached"],
7065
7265
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoWithdraw" },
7066
- inputZod: mcpContinuumDaoTokenIdInputSchema
7266
+ inputZod: mcpContinuumDaoWithdrawInputSchema
7067
7267
  }),
7068
7268
  defineProtocolMcpTool({
7069
7269
  name: "ctm_continuum_dao_build_liquidate_multisign",
@@ -7073,7 +7273,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
7073
7273
  description: "Build VotingEscrow.liquidate. Refuses if attached, liquidations disabled, locked amount <= 100 gwei, or penalty would be zero. Expired locks withdraw instead on-chain.",
7074
7274
  prerequisites: ["keyGen", "tokenId", "liquidationsEnabled", "unattached"],
7075
7275
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoLiquidate" },
7076
- inputZod: mcpContinuumDaoTokenIdInputSchema
7276
+ inputZod: mcpContinuumDaoLiquidateInputSchema
7077
7277
  }),
7078
7278
  defineProtocolMcpTool({
7079
7279
  name: "ctm_continuum_dao_build_delegate_multisign",
@@ -7191,7 +7391,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
7191
7391
  description: "Build ContinuumDAO.execute(proposalId). proposalId may be a catalog id (including 0) or the governor hash. Call after Succeeded. Queue is not implemented.",
7192
7392
  prerequisites: ["keyGen", "proposalId", "Succeeded state"],
7193
7393
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoExecute" },
7194
- inputZod: mcpContinuumDaoProposalIdInputSchema
7394
+ inputZod: mcpContinuumDaoExecuteInputSchema
7195
7395
  }),
7196
7396
  defineProtocolMcpTool({
7197
7397
  name: "ctm_continuum_dao_build_cancel_multisign",
@@ -7201,7 +7401,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
7201
7401
  description: "Build ContinuumDAO.cancel(proposalId). Proposer while Pending, or the proposal guardian.",
7202
7402
  prerequisites: ["keyGen", "proposalId"],
7203
7403
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCancel" },
7204
- inputZod: mcpContinuumDaoProposalIdInputSchema
7404
+ inputZod: mcpContinuumDaoCancelInputSchema
7205
7405
  }),
7206
7406
  defineProtocolMcpTool({
7207
7407
  name: "ctm_continuum_dao_build_forum_sign_in_multisign",
@@ -7541,7 +7741,7 @@ var mcpContinuumDaoMarketplaceSearchInputSchema = zod.z.object({
7541
7741
  sort: zod.z.enum(["pricePerLockedCtm", "price", "locked", "unlock", "deadline"]).optional().describe("Default pricePerLockedCtm, cheapest first. locked defaults to most CTM. unlock and deadline default to soonest."),
7542
7742
  sortDirection: zod.z.enum(["asc", "desc"]).optional(),
7543
7743
  limit: zod.z.number().int().min(1).max(25).optional().describe("Ranked rows to return, default 10"),
7544
- executor: evmAddressSchema.optional().describe("KeyGen address. veCTMs this address sells are omitted."),
7744
+ executor: evmAddressSchema.optional().describe("KeyGen address. Listings this address sells are returned with action delist and fillable false."),
7545
7745
  excludeOwned: zod.z.boolean().optional()
7546
7746
  });
7547
7747
  var mcpContinuumDaoMarketplaceFeeAlternativeInputSchema = zod.z.object({
@@ -7618,46 +7818,46 @@ var mcpContinuumDaoMarketplaceActivityOutputSchema = zod.z.object({
7618
7818
  var mcpContinuumDaoMarketplaceFeeOutputSchema = zod.z.object({ source }).passthrough();
7619
7819
  var wei = zod.z.union([zod.z.string(), zod.z.number()]);
7620
7820
  var deadline = zod.z.union([zod.z.string(), zod.z.number()]).describe("Unix seconds");
7621
- var mcpContinuumDaoMarketplaceCreateListingInputSchema = mcpMultisignInput({
7821
+ var mcpContinuumDaoMarketplaceCreateListingInputSchema = mcpContinuumDaoWriteInput("marketplaceCreateListing", {
7622
7822
  tokenId: wei,
7623
7823
  paymentToken: evmAddressSchema,
7624
7824
  askWei: wei,
7625
7825
  deadline
7626
7826
  });
7627
- var mcpContinuumDaoMarketplaceDelistInputSchema = mcpMultisignInput({ tokenId: wei });
7628
- var mcpContinuumDaoMarketplaceFulfillListingInputSchema = mcpMultisignInput({
7827
+ var mcpContinuumDaoMarketplaceDelistInputSchema = mcpContinuumDaoWriteInput("marketplaceDelist", { tokenId: wei });
7828
+ var mcpContinuumDaoMarketplaceFulfillListingInputSchema = mcpContinuumDaoWriteInput("marketplaceFulfillListing", {
7629
7829
  tokenId: wei,
7630
7830
  seller: evmAddressSchema,
7631
7831
  paymentToken: evmAddressSchema,
7632
7832
  priceWei: wei
7633
7833
  });
7634
- var mcpContinuumDaoMarketplaceCreateOfferingInputSchema = mcpMultisignInput({
7834
+ var mcpContinuumDaoMarketplaceCreateOfferingInputSchema = mcpContinuumDaoWriteInput("marketplaceCreateOffering", {
7635
7835
  tokenId: wei,
7636
7836
  paymentToken: evmAddressSchema,
7637
7837
  bidWei: wei,
7638
7838
  deadline
7639
7839
  });
7640
- var mcpContinuumDaoMarketplaceRescindInputSchema = mcpMultisignInput({ tokenId: wei });
7641
- var mcpContinuumDaoMarketplaceFulfillOfferingInputSchema = mcpMultisignInput({
7840
+ var mcpContinuumDaoMarketplaceRescindInputSchema = mcpContinuumDaoWriteInput("marketplaceRescind", { tokenId: wei });
7841
+ var mcpContinuumDaoMarketplaceFulfillOfferingInputSchema = mcpContinuumDaoWriteInput("marketplaceFulfillOffering", {
7642
7842
  tokenId: wei,
7643
7843
  buyer: evmAddressSchema,
7644
7844
  paymentToken: evmAddressSchema,
7645
7845
  priceWei: wei
7646
7846
  });
7647
- var mcpContinuumDaoMarketplaceCreateAuctionInputSchema = mcpMultisignInput({
7847
+ var mcpContinuumDaoMarketplaceCreateAuctionInputSchema = mcpContinuumDaoWriteInput("marketplaceCreateAuction", {
7648
7848
  tokenId: wei,
7649
7849
  paymentToken: evmAddressSchema,
7650
7850
  deadline,
7651
7851
  reserveWei: wei,
7652
7852
  minIncrementWei: wei
7653
7853
  });
7654
- var mcpContinuumDaoMarketplaceCancelAuctionInputSchema = mcpMultisignInput({ tokenId: wei });
7655
- var mcpContinuumDaoMarketplaceAuctionBidInputSchema = mcpMultisignInput({
7854
+ var mcpContinuumDaoMarketplaceCancelAuctionInputSchema = mcpContinuumDaoWriteInput("marketplaceCancelAuction", { tokenId: wei });
7855
+ var mcpContinuumDaoMarketplaceAuctionBidInputSchema = mcpContinuumDaoWriteInput("marketplaceAuctionBid", {
7656
7856
  tokenId: wei,
7657
7857
  seller: evmAddressSchema,
7658
7858
  priceWei: wei
7659
7859
  });
7660
- var mcpContinuumDaoMarketplaceSettleAuctionInputSchema = mcpMultisignInput({
7860
+ var mcpContinuumDaoMarketplaceSettleAuctionInputSchema = mcpContinuumDaoWriteInput("marketplaceSettleAuction", {
7661
7861
  tokenId: wei,
7662
7862
  seller: evmAddressSchema
7663
7863
  });
@@ -7727,9 +7927,13 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7727
7927
  defineRead({
7728
7928
  name: "ctm_continuum_dao_marketplace_search",
7729
7929
  actionId: "continuum-dao-marketplace.search",
7730
- description: "Rank veCTMs for sale. Returns a short list already sorted by price per locked CTM, price, locked CTM, unlock, or deadline. Filters: min/max locked CTM, unlock window, maxUnlockMonths. Pass paymentToken to compare prices. Pass executor to drop veCTMs this KeyGen sells. Use this to choose a buy. Do not fetch the raw listing page and then offer to sort it.",
7930
+ description: 'Rank veCTMs for sale. Returns a short list already sorted by price per locked CTM, price, locked CTM, unlock, or deadline. Filters: min/max locked CTM, unlock window, maxUnlockMonths. Pass paymentToken to compare prices. Pass executor so this KeyGen\u2019s own listings come back with action "delist" and fillable false. Call the delist builder for those. Do not buy them. Use this to choose a buy. Do not fetch the raw listing page and then offer to sort it.',
7731
7931
  prerequisites: ["chainId 59144", "rpcUrl when lock snapshots are missing"],
7732
- followUp: ["ctm_continuum_dao_marketplace_build_fulfill_listing_multisign", "ctm_continuum_dao_marketplace_build_auction_bid_multisign"],
7932
+ followUp: [
7933
+ "ctm_continuum_dao_marketplace_build_delist_multisign",
7934
+ "ctm_continuum_dao_marketplace_build_fulfill_listing_multisign",
7935
+ "ctm_continuum_dao_marketplace_build_auction_bid_multisign"
7936
+ ],
7733
7937
  inputZod: mcpContinuumDaoMarketplaceSearchInputSchema,
7734
7938
  outputZod: mcpContinuumDaoMarketplaceSearchOutputSchema,
7735
7939
  exportName: "searchContinuumDaoMarketplace"
@@ -7737,9 +7941,12 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7737
7941
  defineRead({
7738
7942
  name: "ctm_continuum_dao_marketplace_fetch_listings",
7739
7943
  actionId: "continuum-dao-marketplace.fetch-listings",
7740
- description: "Unfiltered page of open veCTM listings, created order, up to 100, with nextCursor. includeInactive adds past sales. To choose a buy by price, locked CTM, or unlock time, use search instead.",
7944
+ description: 'Unfiltered page of open veCTM listings, created order, up to 100, with nextCursor. includeInactive adds past sales. Pass viewer as the KeyGen. viewerAction "delist" means that KeyGen already sells the veCTM: build a delist, not a buy. To choose a buy by price, locked CTM, or unlock time, use search instead.',
7741
7945
  prerequisites: ["chainId 59144"],
7742
- followUp: ["ctm_continuum_dao_marketplace_build_fulfill_listing_multisign"],
7946
+ followUp: [
7947
+ "ctm_continuum_dao_marketplace_build_delist_multisign",
7948
+ "ctm_continuum_dao_marketplace_build_fulfill_listing_multisign"
7949
+ ],
7743
7950
  inputZod: mcpContinuumDaoMarketplaceFetchListingsInputSchema,
7744
7951
  outputZod: mcpContinuumDaoMarketplaceListOutputSchema,
7745
7952
  exportName: "fetchContinuumDaoMarketplaceListings"
@@ -7757,7 +7964,7 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7757
7964
  defineRead({
7758
7965
  name: "ctm_continuum_dao_marketplace_fetch_auctions",
7759
7966
  actionId: "continuum-dao-marketplace.fetch-auctions",
7760
- description: "Live veCTM auctions (Pending, Active, Complete). includeInactive adds sold, canceled, and expired. Each auction includes bids.",
7967
+ description: "Live veCTM auctions. derivedStatus is Active while the auction is open, including before any bid meets the reserve. storedStatus stays Pending until a qualifying bid, then Active. Complete still needs settle. includeInactive adds sold, canceled, and expired. Each auction includes bids.",
7761
7968
  prerequisites: ["chainId 59144"],
7762
7969
  followUp: ["ctm_continuum_dao_marketplace_build_auction_bid_multisign", "ctm_continuum_dao_marketplace_build_settle_auction_multisign"],
7763
7970
  inputZod: mcpContinuumDaoMarketplaceFetchAuctionsInputSchema,
@@ -7797,15 +8004,15 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7797
8004
  defineWrite({
7798
8005
  name: "ctm_continuum_dao_marketplace_build_create_listing_multisign",
7799
8006
  actionId: "continuum-dao-marketplace.create-listing",
7800
- description: "List a veCTM. Approves the marketplace for the token id when needed. Linea only.",
7801
- prerequisites: ["keyGen", "tokenId owned by the KeyGen", "askWei", "deadline"],
8007
+ description: "List a veCTM. Approves the marketplace for the token id when needed. Refuses an attached KeyGen. Linea only.",
8008
+ prerequisites: ["keyGen", "tokenId owned by the KeyGen", "unattached", "askWei", "deadline"],
7802
8009
  inputZod: mcpContinuumDaoMarketplaceCreateListingInputSchema,
7803
8010
  exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateListing"
7804
8011
  }),
7805
8012
  defineWrite({
7806
8013
  name: "ctm_continuum_dao_marketplace_build_delist_multisign",
7807
8014
  actionId: "continuum-dao-marketplace.delist",
7808
- description: "Delist this KeyGen\u2019s open veCTM listing.",
8015
+ description: "Delist this KeyGen\u2019s open veCTM listing. Use this when the KeyGen is the seller. Do not buy that listing.",
7809
8016
  prerequisites: ["keyGen", "tokenId"],
7810
8017
  inputZod: mcpContinuumDaoMarketplaceDelistInputSchema,
7811
8018
  exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceDelist"
@@ -7813,7 +8020,7 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7813
8020
  defineWrite({
7814
8021
  name: "ctm_continuum_dao_marketplace_build_fulfill_listing_multisign",
7815
8022
  actionId: "continuum-dao-marketplace.fulfill-listing",
7816
- description: "Buy a listed veCTM. Refuses when this KeyGen already owns it or is the seller. WETH sends msg.value.",
8023
+ description: "Buy a listed veCTM. Refuses when this KeyGen already owns it or is the seller, and tells you to delist instead. WETH sends msg.value.",
7817
8024
  prerequisites: ["keyGen", "tokenId", "seller", "priceWei"],
7818
8025
  inputZod: mcpContinuumDaoMarketplaceFulfillListingInputSchema,
7819
8026
  exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceFulfillListing"
@@ -7821,8 +8028,8 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7821
8028
  defineWrite({
7822
8029
  name: "ctm_continuum_dao_marketplace_build_create_offering_multisign",
7823
8030
  actionId: "continuum-dao-marketplace.create-offering",
7824
- description: "Offer on a veCTM this KeyGen does not own. WETH sends msg.value and still approves WETH for later fulfillment.",
7825
- prerequisites: ["keyGen", "tokenId", "bidWei", "deadline"],
8031
+ description: "Offer on a veCTM this KeyGen does not own. Refuses an attached KeyGen. WETH sends msg.value and still approves WETH for later fulfillment.",
8032
+ prerequisites: ["keyGen", "tokenId", "unattached", "bidWei", "deadline"],
7826
8033
  inputZod: mcpContinuumDaoMarketplaceCreateOfferingInputSchema,
7827
8034
  exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateOffering"
7828
8035
  }),
@@ -7846,7 +8053,7 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7846
8053
  name: "ctm_continuum_dao_marketplace_build_create_auction_multisign",
7847
8054
  actionId: "continuum-dao-marketplace.create-auction",
7848
8055
  description: "Start an auction and escrow the veCTM. Refuses an attached KeyGen.",
7849
- prerequisites: ["keyGen", "tokenId", "reserveWei", "minIncrementWei", "deadline"],
8056
+ prerequisites: ["keyGen", "tokenId", "unattached", "reserveWei", "minIncrementWei", "deadline"],
7850
8057
  inputZod: mcpContinuumDaoMarketplaceCreateAuctionInputSchema,
7851
8058
  exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateAuction"
7852
8059
  }),
@@ -9171,7 +9378,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
9171
9378
  actionId: "circle-cctp.fetch-fees",
9172
9379
  protocolId: "circle-cctp",
9173
9380
  chainCategory: "evm",
9174
- 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.",
9381
+ description: "Quote Circle Iris CCTP fees (?forward=true). maxFee = forwardFee[tier] + protocol fee (minimumFee bps of transferAmountHuman). Pass transferAmountHuman before building a burn. forwardFee* fields are the forwarding component only. Does NOT create a sign request.",
9175
9382
  prerequisites: ["supported route (ctm_cctp_fetch_supported_routes)"],
9176
9383
  followUp: ["ctm_cctp_fetch_usdc_balance", "ctm_cctp_build_burn_multisign"],
9177
9384
  handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchBurnFeesForRoute" },
@@ -11586,9 +11793,9 @@ registerProtocolModule(hyperliquidProtocolModule);
11586
11793
  // src/protocols/evm/arcus/index.ts
11587
11794
  init_support();
11588
11795
  init_support();
11589
- init_constants();
11796
+ init_constants2();
11590
11797
  init_api();
11591
- init_constants();
11798
+ init_constants2();
11592
11799
  var arcusProtocolModule = {
11593
11800
  id: ARCUS_PROTOCOL_ID,
11594
11801
  chainCategory: "evm",
@@ -12110,7 +12317,7 @@ var circleCctpProtocolModule = {
12110
12317
  id: "circle-cctp.fetch-fees",
12111
12318
  protocolId: CIRCLE_CCTP_PROTOCOL_ID,
12112
12319
  chainCategory: "evm",
12113
- description: "Quote Iris Forwarding Service burn fees for a route",
12320
+ description: "Quote Iris forwarding fee plus fast-transfer protocol fee for a route",
12114
12321
  commonParams: [],
12115
12322
  params: {
12116
12323
  sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
@@ -12342,10 +12549,10 @@ var aerodromeProtocolModule = {
12342
12549
  registerProtocolModule(aerodromeProtocolModule);
12343
12550
 
12344
12551
  // src/protocols/evm/continuum-dao/index.ts
12345
- init_constants2();
12552
+ init_constants();
12346
12553
 
12347
12554
  // src/protocols/evm/continuum-dao/marketplaceModule.ts
12348
- init_constants2();
12555
+ init_constants();
12349
12556
  var common = ["keyGen", "purposeText", "useCustomGas"];
12350
12557
  var continuumDaoMarketplaceProtocolModule = {
12351
12558
  id: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID,
@@ -12382,7 +12589,7 @@ var continuumDaoMarketplaceProtocolModule = {
12382
12589
  };
12383
12590
 
12384
12591
  // src/protocols/evm/continuum-dao/index.ts
12385
- init_constants2();
12592
+ init_constants();
12386
12593
  init_committeeList();
12387
12594
  init_proposalCatalog();
12388
12595
  init_governance();
@@ -13193,16 +13400,16 @@ async function pendleCoreFetch(args) {
13193
13400
  lastError = new PendleApiError(`Pendle API rate limited (429) on ${path}`, 429, path);
13194
13401
  continue;
13195
13402
  }
13196
- const text = await res.text();
13403
+ const text2 = await res.text();
13197
13404
  if (!res.ok) {
13198
13405
  throw new PendleApiError(
13199
- `Pendle API ${res.status} ${path}: ${text.slice(0, 400)}`,
13406
+ `Pendle API ${res.status} ${path}: ${text2.slice(0, 400)}`,
13200
13407
  res.status,
13201
13408
  path
13202
13409
  );
13203
13410
  }
13204
- if (!text.trim()) return {};
13205
- return JSON.parse(text);
13411
+ if (!text2.trim()) return {};
13412
+ return JSON.parse(text2);
13206
13413
  } catch (err) {
13207
13414
  lastError = err;
13208
13415
  if (err instanceof PendleApiError && err.status !== 429) throw err;
@@ -13592,15 +13799,15 @@ async function deriveRpcPost(args) {
13592
13799
  cache: "no-store",
13593
13800
  signal: AbortSignal.timeout(15e3)
13594
13801
  });
13595
- const text = await res.text().catch(() => "");
13596
- if (!res.ok || !text.trim() || text.trim() === "Not Found") {
13597
- throw new Error(`Derive ${method} HTTP ${res.status}: ${text.slice(0, 240) || "empty body"}`);
13802
+ const text2 = await res.text().catch(() => "");
13803
+ if (!res.ok || !text2.trim() || text2.trim() === "Not Found") {
13804
+ throw new Error(`Derive ${method} HTTP ${res.status}: ${text2.slice(0, 240) || "empty body"}`);
13598
13805
  }
13599
13806
  let json;
13600
13807
  try {
13601
- json = JSON.parse(text);
13808
+ json = JSON.parse(text2);
13602
13809
  } catch {
13603
- throw new Error(`Derive ${method} returned non-JSON: ${text.slice(0, 160)}`);
13810
+ throw new Error(`Derive ${method} returned non-JSON: ${text2.slice(0, 160)}`);
13604
13811
  }
13605
13812
  const result = unwrapResult(json, method);
13606
13813
  if (isEmptyDerivePublicResult(method, result)) {
@@ -14006,7 +14213,7 @@ init_support();
14006
14213
  init_support2();
14007
14214
  init_addresses();
14008
14215
  init_stockTokens();
14009
- init_constants2();
14216
+ init_constants();
14010
14217
  function advisor(protocolId, tokenFilter, impl) {
14011
14218
  return { protocolId, tokenFilter, ...impl };
14012
14219
  }
@@ -14738,12 +14945,14 @@ exports.mcpCompoundV3RepayInputSchema = mcpCompoundV3RepayInputSchema;
14738
14945
  exports.mcpCompoundV3SupplyInputSchema = mcpCompoundV3SupplyInputSchema;
14739
14946
  exports.mcpCompoundV3WithdrawInputSchema = mcpCompoundV3WithdrawInputSchema;
14740
14947
  exports.mcpContinuumDaoAttachInputSchema = mcpContinuumDaoAttachInputSchema;
14948
+ exports.mcpContinuumDaoCancelInputSchema = mcpContinuumDaoCancelInputSchema;
14741
14949
  exports.mcpContinuumDaoCastVoteBravoInputSchema = mcpContinuumDaoCastVoteBravoInputSchema;
14742
14950
  exports.mcpContinuumDaoCastVoteDeltaInputSchema = mcpContinuumDaoCastVoteDeltaInputSchema;
14743
14951
  exports.mcpContinuumDaoComposeProposalActionInputSchema = mcpContinuumDaoComposeProposalActionInputSchema;
14744
14952
  exports.mcpContinuumDaoComposeProposalActionOutputSchema = mcpContinuumDaoComposeProposalActionOutputSchema;
14745
14953
  exports.mcpContinuumDaoCreateLockInputSchema = mcpContinuumDaoCreateLockInputSchema;
14746
14954
  exports.mcpContinuumDaoDelegateInputSchema = mcpContinuumDaoDelegateInputSchema;
14955
+ exports.mcpContinuumDaoExecuteInputSchema = mcpContinuumDaoExecuteInputSchema;
14747
14956
  exports.mcpContinuumDaoExplainProposalInputSchema = mcpContinuumDaoExplainProposalInputSchema;
14748
14957
  exports.mcpContinuumDaoExplainProposalOutputSchema = mcpContinuumDaoExplainProposalOutputSchema;
14749
14958
  exports.mcpContinuumDaoFetchDelegatesInputSchema = mcpContinuumDaoFetchDelegatesInputSchema;
@@ -14801,6 +15010,7 @@ exports.mcpContinuumDaoForumUserPostIdsInputSchema = mcpContinuumDaoForumUserPos
14801
15010
  exports.mcpContinuumDaoForumUserPostIdsOutputSchema = mcpContinuumDaoForumUserPostIdsOutputSchema;
14802
15011
  exports.mcpContinuumDaoIncreaseAmountInputSchema = mcpContinuumDaoIncreaseAmountInputSchema;
14803
15012
  exports.mcpContinuumDaoIncreaseUnlockTimeInputSchema = mcpContinuumDaoIncreaseUnlockTimeInputSchema;
15013
+ exports.mcpContinuumDaoLiquidateInputSchema = mcpContinuumDaoLiquidateInputSchema;
14804
15014
  exports.mcpContinuumDaoMergeInputSchema = mcpContinuumDaoMergeInputSchema;
14805
15015
  exports.mcpContinuumDaoMpaFlagInputSchema = mcpContinuumDaoMpaFlagInputSchema;
14806
15016
  exports.mcpContinuumDaoMpaFlagOutputSchema = mcpContinuumDaoMpaFlagOutputSchema;
@@ -14829,6 +15039,8 @@ exports.mcpContinuumDaoTechnocoreBindOutputSchema = mcpContinuumDaoTechnocoreBin
14829
15039
  exports.mcpContinuumDaoTokenIdInputSchema = mcpContinuumDaoTokenIdInputSchema;
14830
15040
  exports.mcpContinuumDaoTransferInputSchema = mcpContinuumDaoTransferInputSchema;
14831
15041
  exports.mcpContinuumDaoUndelegateInputSchema = mcpContinuumDaoUndelegateInputSchema;
15042
+ exports.mcpContinuumDaoWithdrawInputSchema = mcpContinuumDaoWithdrawInputSchema;
15043
+ exports.mcpContinuumDaoWriteInput = mcpContinuumDaoWriteInput;
14832
15044
  exports.mcpCurveDaoBuildAddLiquidityMultisignInputSchema = mcpCurveDaoBuildAddLiquidityMultisignInputSchema;
14833
15045
  exports.mcpCurveDaoBuildGaugeDepositMultisignInputSchema = mcpCurveDaoBuildGaugeDepositMultisignInputSchema;
14834
15046
  exports.mcpCurveDaoBuildRemoveLiquidityMultisignInputSchema = mcpCurveDaoBuildRemoveLiquidityMultisignInputSchema;