@continuumdao/ctm-mpc-defi 0.2.50 → 0.2.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/agent/catalog.cjs +770 -28
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +6 -1
  4. package/dist/agent/catalog.js +770 -28
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/agent/skills/continuum-dao/SKILL.md +2 -0
  7. package/dist/agent/skills/continuum-dao-marketplace/SKILL.md +58 -0
  8. package/dist/agent/skills/hyperliquidOutcome/SKILL.md +47 -0
  9. package/dist/core/index.cjs +2 -1
  10. package/dist/core/index.cjs.map +1 -1
  11. package/dist/core/index.js +2 -1
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/index.cjs +2 -1
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +2 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
  18. package/dist/protocols/evm/aerodrome/index.js.map +1 -1
  19. package/dist/protocols/evm/continuum-dao/index.cjs +2274 -59
  20. package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
  21. package/dist/protocols/evm/continuum-dao/index.d.ts +690 -2
  22. package/dist/protocols/evm/continuum-dao/index.js +2218 -61
  23. package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
  24. package/dist/protocols/evm/hyperliquidOutcome/index.cjs +1294 -0
  25. package/dist/protocols/evm/hyperliquidOutcome/index.cjs.map +1 -0
  26. package/dist/protocols/evm/hyperliquidOutcome/index.d.ts +465 -0
  27. package/dist/protocols/evm/hyperliquidOutcome/index.js +1247 -0
  28. package/dist/protocols/evm/hyperliquidOutcome/index.js.map +1 -0
  29. package/dist/protocols/evm/pendle/index.cjs +2 -1
  30. package/dist/protocols/evm/pendle/index.cjs.map +1 -1
  31. package/dist/protocols/evm/pendle/index.js +2 -1
  32. package/dist/protocols/evm/pendle/index.js.map +1 -1
  33. package/dist/protocols/evm/trueo/index.cjs +569 -9
  34. package/dist/protocols/evm/trueo/index.cjs.map +1 -1
  35. package/dist/protocols/evm/trueo/index.d.ts +42 -1
  36. package/dist/protocols/evm/trueo/index.js +569 -9
  37. package/dist/protocols/evm/trueo/index.js.map +1 -1
  38. package/package.json +6 -1
@@ -538,6 +538,10 @@ function votingEscrowAddressOnEvmChain(chainId) {
538
538
  const ve = continuumDaoDeployment(chainId)?.votingEscrow;
539
539
  return ve && isConfiguredAddress(ve) ? viem.getAddress(ve) : null;
540
540
  }
541
+ function votingEscrowMarketplaceAddressOnEvmChain(chainId) {
542
+ if (chainId !== CONTINUUM_DAO_LINEA_CHAIN_ID) return null;
543
+ return VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS;
544
+ }
541
545
  function listContinuumDaoDefaultAssets() {
542
546
  const out = [];
543
547
  for (const chainId of [
@@ -569,7 +573,7 @@ function listContinuumDaoDefaultAssets() {
569
573
  }
570
574
  return out;
571
575
  }
572
- 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, CONTINUUM_DAO_DEPLOYMENTS;
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_DEPLOYMENTS;
573
577
  var init_constants2 = __esm({
574
578
  "src/protocols/evm/continuum-dao/constants.ts"() {
575
579
  CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
@@ -590,6 +594,11 @@ var init_constants2 = __esm({
590
594
  };
591
595
  CTM_TOKEN_ADDRESS = viem.getAddress("0x2026027054F5beBCEB650aBD62dC623e327658e7");
592
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";
593
602
  viem.getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
594
603
  viem.getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
595
604
  [
@@ -2755,7 +2764,12 @@ var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
2755
2764
  "ctm_trueo_search_markets",
2756
2765
  "ctm_trueo_fetch_market",
2757
2766
  "ctm_trueo_fetch_chance_series",
2758
- "ctm_trueo_fetch_orderbook"
2767
+ "ctm_trueo_fetch_orderbook",
2768
+ "ctm_hyperliquid_outcome_fetch_markets",
2769
+ "ctm_hyperliquid_outcome_fetch_market",
2770
+ "ctm_hyperliquid_outcome_fetch_orderbook",
2771
+ "ctm_hyperliquid_outcome_fetch_positions",
2772
+ "ctm_hyperliquid_outcome_fetch_open_orders"
2759
2773
  ]);
2760
2774
 
2761
2775
  // src/agent/schemas/protocols.ts
@@ -5405,7 +5419,7 @@ var mcpSearchPredictionMarketsInputSchema = zod.z.object({
5405
5419
  "Pass the operator topic verbatim (case-insensitive title substring). Do not substitute a category name. Empty lists trending."
5406
5420
  ),
5407
5421
  category: zod.z.string().optional().describe("Venue category, e.g. Politics"),
5408
- venues: zod.z.array(zod.z.string()).optional().describe("Optional venue filter. v1: trueo"),
5422
+ venues: zod.z.array(zod.z.string()).optional().describe('Optional venue filter. Omit to search trueo and hyperliquid. Restrict with ["trueo"] or ["hyperliquid"].'),
5409
5423
  trending: agentOptionalBooleanSchema().describe(
5410
5424
  "Trending board only when query and category are empty. Ignored when query is set."
5411
5425
  ),
@@ -5467,8 +5481,8 @@ var mcpListMyPredictionMarketsInputSchema = zod.z.object({
5467
5481
  });
5468
5482
  var mcpListMyPredictionMarketsOutputSchema = mcpSearchPredictionMarketsOutputSchema;
5469
5483
  var mcpGetPredictionMarketInputSchema = zod.z.object({
5470
- venue: zod.z.string().optional().describe("Default trueo"),
5471
- venueMarketId: zod.z.string().min(1).describe("Venue id (Trueo: market address)")
5484
+ venue: zod.z.string().optional().describe("trueo (default) or hyperliquid"),
5485
+ venueMarketId: zod.z.string().min(1).describe("Trueo market address, or Hyperliquid outcome id")
5472
5486
  });
5473
5487
  var mcpGetPredictionMarketOutputSchema = mcpPredictionMarketRowSchema.passthrough();
5474
5488
  var mcpTrueoWrapTydInputSchema = mcpMultisignInput({
@@ -5866,6 +5880,131 @@ var mcpCctpBuildBurnMultisignInputSchema = mcpMultisignInput({
5866
5880
  minFinalityThreshold: agentCoercedOptionalIntSchema(zod.z.number().int().positive()),
5867
5881
  feeSnapshot: jsonObjectSchema.optional().describe("Optional output from ctm_cctp_fetch_burn_fees")
5868
5882
  });
5883
+ var outcomeIdSchema = zod.z.number().int().nonnegative();
5884
+ var sideSchema = zod.z.enum(["yes", "no"]);
5885
+ var mcpHyperliquidOutcomeFetchMarketsInputSchema = zod.z.object({
5886
+ chainId: zod.z.number().int().positive().optional().describe("999 mainnet or 998 testnet. Default 999."),
5887
+ query: zod.z.string().optional().describe("Case-insensitive substring of the question, description, or outcome id."),
5888
+ limit: zod.z.number().int().positive().optional(),
5889
+ offset: zod.z.number().int().nonnegative().optional()
5890
+ });
5891
+ var mcpHyperliquidOutcomeMarketSchema = zod.z.object({
5892
+ outcome: zod.z.number(),
5893
+ question: zod.z.string(),
5894
+ description: zod.z.string(),
5895
+ questionId: zod.z.number().nullable(),
5896
+ sideNames: zod.z.tuple([zod.z.string(), zod.z.string()]),
5897
+ quoteToken: zod.z.string(),
5898
+ yesCoin: zod.z.string(),
5899
+ noCoin: zod.z.string(),
5900
+ yesAssetId: zod.z.number(),
5901
+ noAssetId: zod.z.number(),
5902
+ yesPrice: zod.z.number().nullable(),
5903
+ noPrice: zod.z.number().nullable(),
5904
+ yesPriceLabel: zod.z.string().nullable(),
5905
+ noPriceLabel: zod.z.string().nullable(),
5906
+ expiresAt: zod.z.string().nullable(),
5907
+ endOfTrading: zod.z.number(),
5908
+ status: zod.z.enum(["live", "closed"]),
5909
+ tradable: zod.z.boolean(),
5910
+ categories: zod.z.array(zod.z.string())
5911
+ });
5912
+ var mcpHyperliquidOutcomeFetchMarketsOutputSchema = zod.z.object({
5913
+ markets: zod.z.array(mcpHyperliquidOutcomeMarketSchema),
5914
+ notes: zod.z.string(),
5915
+ hasMore: zod.z.boolean(),
5916
+ nextOffset: zod.z.number()
5917
+ });
5918
+ var mcpHyperliquidOutcomeFetchMarketInputSchema = zod.z.object({
5919
+ chainId: zod.z.number().int().positive().optional(),
5920
+ outcome: outcomeIdSchema.describe("outcome id from outcomeMeta / search venueMarketId")
5921
+ });
5922
+ var mcpHyperliquidOutcomeBookSchema = zod.z.object({
5923
+ coin: zod.z.string(),
5924
+ bids: zod.z.array(zod.z.object({ px: zod.z.string(), sz: zod.z.string(), n: zod.z.number() })),
5925
+ asks: zod.z.array(zod.z.object({ px: zod.z.string(), sz: zod.z.string(), n: zod.z.number() }))
5926
+ });
5927
+ var mcpHyperliquidOutcomeFetchMarketOutputSchema = mcpHyperliquidOutcomeMarketSchema.extend({
5928
+ yesBook: mcpHyperliquidOutcomeBookSchema,
5929
+ noBook: mcpHyperliquidOutcomeBookSchema,
5930
+ notes: zod.z.string()
5931
+ });
5932
+ var mcpHyperliquidOutcomeFetchOrderbookInputSchema = zod.z.object({
5933
+ chainId: zod.z.number().int().positive().optional(),
5934
+ outcome: outcomeIdSchema,
5935
+ side: sideSchema.optional().describe("Default yes")
5936
+ });
5937
+ var mcpHyperliquidOutcomeFetchOrderbookOutputSchema = zod.z.object({
5938
+ outcome: zod.z.number(),
5939
+ side: sideSchema,
5940
+ book: mcpHyperliquidOutcomeBookSchema,
5941
+ notes: zod.z.string()
5942
+ });
5943
+ var mcpHyperliquidOutcomeFetchAccountInputSchema = zod.z.object({
5944
+ chainId: zod.z.number().int().positive().optional(),
5945
+ user: zod.z.string().min(1).describe("HyperCore account address (the MPA ethereum address).")
5946
+ });
5947
+ var mcpHyperliquidOutcomeFetchPositionsOutputSchema = zod.z.object({
5948
+ quoteBalances: zod.z.array(zod.z.object({ coin: zod.z.string(), total: zod.z.string(), hold: zod.z.string() })),
5949
+ outcomeBalances: zod.z.array(
5950
+ zod.z.object({
5951
+ coin: zod.z.string(),
5952
+ total: zod.z.string(),
5953
+ hold: zod.z.string(),
5954
+ outcome: zod.z.number().nullable(),
5955
+ side: zod.z.enum(["yes", "no"]).nullable()
5956
+ })
5957
+ ),
5958
+ notes: zod.z.string()
5959
+ });
5960
+ var mcpHyperliquidOutcomeFetchOpenOrdersOutputSchema = zod.z.object({
5961
+ openOrders: zod.z.array(
5962
+ zod.z.object({
5963
+ coin: zod.z.string(),
5964
+ side: zod.z.string(),
5965
+ limitPx: zod.z.string(),
5966
+ sz: zod.z.string(),
5967
+ oid: zod.z.number(),
5968
+ timestamp: zod.z.number(),
5969
+ outcome: zod.z.number().nullable(),
5970
+ outcomeSide: zod.z.enum(["yes", "no"]).nullable()
5971
+ })
5972
+ ),
5973
+ notes: zod.z.string()
5974
+ });
5975
+ var mcpHyperliquidOutcomeOrderInputSchema = mcpMultisignInput({
5976
+ outcome: outcomeIdSchema,
5977
+ side: sideSchema,
5978
+ isBuy: zod.z.boolean().describe("true buys the side, false sells it"),
5979
+ limitPxHuman: zod.z.string().min(1).describe("Limit price in quote per share, typically 0 to 1"),
5980
+ szHuman: zod.z.string().min(1).describe("Share size"),
5981
+ tif: zod.z.enum(["gtc", "ioc", "alo"]).optional().describe("Default gtc. ioc crosses the book."),
5982
+ reduceOnly: agentOptionalBooleanSchema()
5983
+ });
5984
+ var mcpHyperliquidOutcomeCancelInputSchema = mcpMultisignInput({
5985
+ outcome: outcomeIdSchema,
5986
+ side: sideSchema,
5987
+ oid: zod.z.number().int().positive()
5988
+ });
5989
+ var mcpHyperliquidOutcomeSplitInputSchema = mcpMultisignInput({
5990
+ outcome: outcomeIdSchema,
5991
+ amountHuman: zod.z.string().min(1).describe("Quote amount to split into equal Yes and No shares")
5992
+ });
5993
+ var mcpHyperliquidOutcomeMergeInputSchema = mcpMultisignInput({
5994
+ outcome: outcomeIdSchema,
5995
+ amountHuman: zod.z.string().optional().describe("Yes+No amount to merge. Omit or amountMax for the maximum."),
5996
+ amountMax: agentOptionalBooleanSchema()
5997
+ });
5998
+ var mcpHyperliquidOutcomeMergeQuestionInputSchema = mcpMultisignInput({
5999
+ question: outcomeIdSchema.describe("question id from outcomeMeta.questions"),
6000
+ amountHuman: zod.z.string().optional(),
6001
+ amountMax: agentOptionalBooleanSchema()
6002
+ });
6003
+ var mcpHyperliquidOutcomeNegateInputSchema = mcpMultisignInput({
6004
+ question: outcomeIdSchema,
6005
+ outcome: outcomeIdSchema,
6006
+ amountHuman: zod.z.string().min(1)
6007
+ });
5869
6008
 
5870
6009
  // src/agent/mcpProtocolTools.ts
5871
6010
  function defineProtocolMcpTool(def) {
@@ -7250,6 +7389,430 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
7250
7389
  prerequisites: ["keyGenId", "chainId 8453", "marketAddress", "side", "orderId"],
7251
7390
  handler: { importPath: "protocols/evm/trueo", exportName: "buildEvmMultisignBodyTrueoCancelOrder" },
7252
7391
  inputZod: mcpTrueoCancelOrderInputSchema
7392
+ }),
7393
+ defineProtocolMcpTool({
7394
+ name: "ctm_hyperliquid_outcome_build_order_multisign",
7395
+ actionId: "hyperliquidOutcome.order",
7396
+ protocolId: "hyperliquidOutcome",
7397
+ chainCategory: "evm",
7398
+ description: "Limit buy or sell a Hyperliquid HIP-4 outcome side. Asset id is 100000000 + 10*outcome + side (yes=0, no=1). EIP-712 Agent signature, no gas. IOC crosses the book. 30-minute expiry.",
7399
+ prerequisites: ["keyGenId", "chainId 999", "outcome id", "side yes|no", "isBuy", "limitPxHuman", "szHuman", "purposeText"],
7400
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "buildEvmMultisignBodyHyperliquidOutcomeOrder" },
7401
+ inputZod: mcpHyperliquidOutcomeOrderInputSchema
7402
+ }),
7403
+ defineProtocolMcpTool({
7404
+ name: "ctm_hyperliquid_outcome_build_cancel_multisign",
7405
+ actionId: "hyperliquidOutcome.cancel",
7406
+ protocolId: "hyperliquidOutcome",
7407
+ chainCategory: "evm",
7408
+ description: "Cancel a resting Hyperliquid outcome order by oid. EIP-712, no gas.",
7409
+ prerequisites: ["keyGenId", "chainId 999", "outcome", "side", "oid", "purposeText"],
7410
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "buildEvmMultisignBodyHyperliquidOutcomeCancel" },
7411
+ inputZod: mcpHyperliquidOutcomeCancelInputSchema
7412
+ }),
7413
+ defineProtocolMcpTool({
7414
+ name: "ctm_hyperliquid_outcome_build_split_multisign",
7415
+ actionId: "hyperliquidOutcome.split",
7416
+ protocolId: "hyperliquidOutcome",
7417
+ chainCategory: "evm",
7418
+ description: "Split quote tokens into equal Yes and No shares (userOutcome splitOutcome). EIP-712, no gas.",
7419
+ prerequisites: ["keyGenId", "chainId 999", "outcome", "amountHuman", "purposeText"],
7420
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "buildEvmMultisignBodyHyperliquidOutcomeSplit" },
7421
+ inputZod: mcpHyperliquidOutcomeSplitInputSchema
7422
+ }),
7423
+ defineProtocolMcpTool({
7424
+ name: "ctm_hyperliquid_outcome_build_merge_multisign",
7425
+ actionId: "hyperliquidOutcome.merge",
7426
+ protocolId: "hyperliquidOutcome",
7427
+ chainCategory: "evm",
7428
+ description: "Merge Yes and No shares back into quote (userOutcome mergeOutcome). Omit amount or set amountMax to merge the maximum. EIP-712, no gas.",
7429
+ prerequisites: ["keyGenId", "chainId 999", "outcome", "purposeText"],
7430
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "buildEvmMultisignBodyHyperliquidOutcomeMerge" },
7431
+ inputZod: mcpHyperliquidOutcomeMergeInputSchema
7432
+ }),
7433
+ defineProtocolMcpTool({
7434
+ name: "ctm_hyperliquid_outcome_build_merge_question_multisign",
7435
+ actionId: "hyperliquidOutcome.merge-question",
7436
+ protocolId: "hyperliquidOutcome",
7437
+ chainCategory: "evm",
7438
+ description: "Merge Yes shares across one question into quote tokens. EIP-712, no gas.",
7439
+ prerequisites: ["keyGenId", "chainId 999", "question id", "purposeText"],
7440
+ handler: {
7441
+ importPath: "protocols/evm/hyperliquidOutcome",
7442
+ exportName: "buildEvmMultisignBodyHyperliquidOutcomeMergeQuestion"
7443
+ },
7444
+ inputZod: mcpHyperliquidOutcomeMergeQuestionInputSchema
7445
+ }),
7446
+ defineProtocolMcpTool({
7447
+ name: "ctm_hyperliquid_outcome_build_negate_multisign",
7448
+ actionId: "hyperliquidOutcome.negate",
7449
+ protocolId: "hyperliquidOutcome",
7450
+ chainCategory: "evm",
7451
+ description: "Convert No shares of one outcome into Yes shares of the other outcomes in the question. EIP-712, no gas.",
7452
+ prerequisites: ["keyGenId", "chainId 999", "question", "outcome", "amountHuman", "purposeText"],
7453
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "buildEvmMultisignBodyHyperliquidOutcomeNegate" },
7454
+ inputZod: mcpHyperliquidOutcomeNegateInputSchema
7455
+ })
7456
+ ];
7457
+ var catalogQuery = {
7458
+ apiBase: zod.z.string().optional().describe("Override https://app-api.continuumdao.org"),
7459
+ rpcUrl: zod.z.string().optional().describe("Linea RPC used when the marketplace API is offline"),
7460
+ chainId: zod.z.number().int().optional().describe("59144"),
7461
+ includeInactive: zod.z.boolean().optional().describe("Include closed sales, offers, and settled auctions"),
7462
+ paymentToken: evmAddressSchema.optional(),
7463
+ tokenId: zod.z.string().optional(),
7464
+ creator: evmAddressSchema.optional(),
7465
+ seller: evmAddressSchema.optional(),
7466
+ viewer: evmAddressSchema.optional(),
7467
+ limit: zod.z.number().int().optional(),
7468
+ cursor: zod.z.string().optional().describe("nextCursor from the previous page")
7469
+ };
7470
+ var mcpContinuumDaoMarketplaceSearchInputSchema = zod.z.object({
7471
+ apiBase: catalogQuery.apiBase,
7472
+ rpcUrl: catalogQuery.rpcUrl,
7473
+ chainId: catalogQuery.chainId,
7474
+ kind: zod.z.enum(["listing", "auction", "both"]).optional().describe("Default listing. Use auction or both only when the user wants to bid."),
7475
+ paymentToken: evmAddressSchema.optional().describe("Required when ranking by price and more than one payment token is listed"),
7476
+ minLockedCtm: zod.z.string().optional().describe('Minimum locked CTM, human amount such as "1000"'),
7477
+ maxLockedCtm: zod.z.string().optional().describe("Maximum locked CTM, human amount"),
7478
+ unlockBefore: zod.z.string().optional().describe("ISO date or unix seconds"),
7479
+ unlockAfter: zod.z.string().optional().describe("ISO date or unix seconds"),
7480
+ maxUnlockMonths: zod.z.number().optional().describe("Still locked, and unlocks within this many 30-day months"),
7481
+ 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."),
7482
+ sortDirection: zod.z.enum(["asc", "desc"]).optional(),
7483
+ limit: zod.z.number().int().min(1).max(25).optional().describe("Ranked rows to return, default 10"),
7484
+ executor: evmAddressSchema.optional().describe("KeyGen address. veCTMs this address sells are omitted."),
7485
+ excludeOwned: zod.z.boolean().optional()
7486
+ });
7487
+ var mcpContinuumDaoMarketplaceFeeAlternativeInputSchema = zod.z.object({
7488
+ apiBase: catalogQuery.apiBase,
7489
+ rpcUrl: zod.z.string().min(1).describe("Linea RPC. Required to read the monthly fee, threshold, and voting power."),
7490
+ chainId: catalogQuery.chainId,
7491
+ payment: zod.z.enum(["fee", "ctm"]).optional().describe("fee matches a USDC month. ctm matches a CTM month. Default fee."),
7492
+ executor: evmAddressSchema.optional().describe("KeyGen address. veCTMs this address sells are omitted.")
7493
+ });
7494
+ var mcpContinuumDaoMarketplaceFetchListingsInputSchema = zod.z.object(catalogQuery);
7495
+ var mcpContinuumDaoMarketplaceFetchOfferingsInputSchema = zod.z.object(catalogQuery);
7496
+ var mcpContinuumDaoMarketplaceFetchAuctionsInputSchema = zod.z.object(catalogQuery);
7497
+ var mcpContinuumDaoMarketplaceFetchConfigInputSchema = zod.z.object({
7498
+ apiBase: catalogQuery.apiBase,
7499
+ rpcUrl: catalogQuery.rpcUrl,
7500
+ chainId: catalogQuery.chainId
7501
+ });
7502
+ var mcpContinuumDaoMarketplaceFetchTokenInputSchema = zod.z.object({
7503
+ apiBase: catalogQuery.apiBase,
7504
+ rpcUrl: catalogQuery.rpcUrl,
7505
+ chainId: catalogQuery.chainId,
7506
+ tokenId: zod.z.string().min(1),
7507
+ viewer: catalogQuery.viewer
7508
+ });
7509
+ var mcpContinuumDaoMarketplaceFetchActivityInputSchema = zod.z.object({
7510
+ apiBase: catalogQuery.apiBase,
7511
+ rpcUrl: catalogQuery.rpcUrl,
7512
+ chainId: catalogQuery.chainId,
7513
+ address: evmAddressSchema,
7514
+ limit: catalogQuery.limit
7515
+ });
7516
+ var mcpContinuumDaoMarketplaceFetchFeePreviewInputSchema = zod.z.object({
7517
+ apiBase: catalogQuery.apiBase,
7518
+ rpcUrl: catalogQuery.rpcUrl,
7519
+ chainId: catalogQuery.chainId,
7520
+ tokenId: zod.z.string().min(1),
7521
+ price: zod.z.string().min(1).describe("Price in payment-token wei")
7522
+ });
7523
+ var source = zod.z.enum(["api", "logs"]);
7524
+ var loose = zod.z.record(zod.z.unknown());
7525
+ var mcpContinuumDaoMarketplaceFeeAlternativeOutputSchema = zod.z.object({
7526
+ payment: zod.z.enum(["fee", "ctm"]),
7527
+ thresholdHuman: zod.z.string(),
7528
+ monthlyFeeHuman: zod.z.string(),
7529
+ monthlyFeeSymbol: zod.z.string(),
7530
+ annualFeeHuman: zod.z.string(),
7531
+ annualFeeCtmHuman: zod.z.string(),
7532
+ example: loose.nullable(),
7533
+ summary: zod.z.string(),
7534
+ source
7535
+ }).passthrough();
7536
+ var mcpContinuumDaoMarketplaceSearchOutputSchema = zod.z.object({
7537
+ sort: zod.z.string(),
7538
+ sortDirection: zod.z.enum(["asc", "desc"]),
7539
+ paymentToken: zod.z.string().nullable(),
7540
+ scanned: zod.z.number(),
7541
+ truncated: zod.z.boolean(),
7542
+ items: zod.z.array(loose),
7543
+ source
7544
+ }).passthrough();
7545
+ var mcpContinuumDaoMarketplaceListOutputSchema = zod.z.object({
7546
+ items: zod.z.array(loose),
7547
+ nextCursor: zod.z.string().nullable().optional(),
7548
+ source
7549
+ }).passthrough();
7550
+ var mcpContinuumDaoMarketplaceConfigOutputSchema = zod.z.object({ source }).passthrough();
7551
+ var mcpContinuumDaoMarketplaceTokenOutputSchema = zod.z.object({ source }).passthrough();
7552
+ var mcpContinuumDaoMarketplaceActivityOutputSchema = zod.z.object({
7553
+ address: zod.z.string(),
7554
+ orders: zod.z.array(loose),
7555
+ auctions: zod.z.array(loose),
7556
+ source
7557
+ }).passthrough();
7558
+ var mcpContinuumDaoMarketplaceFeeOutputSchema = zod.z.object({ source }).passthrough();
7559
+ var wei = zod.z.union([zod.z.string(), zod.z.number()]);
7560
+ var deadline = zod.z.union([zod.z.string(), zod.z.number()]).describe("Unix seconds");
7561
+ var mcpContinuumDaoMarketplaceCreateListingInputSchema = mcpMultisignInput({
7562
+ tokenId: wei,
7563
+ paymentToken: evmAddressSchema,
7564
+ askWei: wei,
7565
+ deadline
7566
+ });
7567
+ var mcpContinuumDaoMarketplaceDelistInputSchema = mcpMultisignInput({ tokenId: wei });
7568
+ var mcpContinuumDaoMarketplaceFulfillListingInputSchema = mcpMultisignInput({
7569
+ tokenId: wei,
7570
+ seller: evmAddressSchema,
7571
+ paymentToken: evmAddressSchema,
7572
+ priceWei: wei
7573
+ });
7574
+ var mcpContinuumDaoMarketplaceCreateOfferingInputSchema = mcpMultisignInput({
7575
+ tokenId: wei,
7576
+ paymentToken: evmAddressSchema,
7577
+ bidWei: wei,
7578
+ deadline
7579
+ });
7580
+ var mcpContinuumDaoMarketplaceRescindInputSchema = mcpMultisignInput({ tokenId: wei });
7581
+ var mcpContinuumDaoMarketplaceFulfillOfferingInputSchema = mcpMultisignInput({
7582
+ tokenId: wei,
7583
+ buyer: evmAddressSchema,
7584
+ paymentToken: evmAddressSchema,
7585
+ priceWei: wei
7586
+ });
7587
+ var mcpContinuumDaoMarketplaceCreateAuctionInputSchema = mcpMultisignInput({
7588
+ tokenId: wei,
7589
+ paymentToken: evmAddressSchema,
7590
+ deadline,
7591
+ reserveWei: wei,
7592
+ minIncrementWei: wei
7593
+ });
7594
+ var mcpContinuumDaoMarketplaceCancelAuctionInputSchema = mcpMultisignInput({ tokenId: wei });
7595
+ var mcpContinuumDaoMarketplaceAuctionBidInputSchema = mcpMultisignInput({
7596
+ tokenId: wei,
7597
+ seller: evmAddressSchema,
7598
+ priceWei: wei
7599
+ });
7600
+ var mcpContinuumDaoMarketplaceSettleAuctionInputSchema = mcpMultisignInput({
7601
+ tokenId: wei,
7602
+ seller: evmAddressSchema
7603
+ });
7604
+
7605
+ // src/agent/mcpMarketplaceTools.ts
7606
+ var PROTOCOL = "continuum-dao-marketplace";
7607
+ var IMPORT_PATH = "protocols/evm/continuum-dao";
7608
+ function defineRead(def) {
7609
+ return {
7610
+ name: def.name,
7611
+ actionId: def.actionId,
7612
+ protocolId: PROTOCOL,
7613
+ chainCategory: "evm",
7614
+ description: def.description,
7615
+ prerequisites: def.prerequisites,
7616
+ followUp: def.followUp,
7617
+ handler: { importPath: IMPORT_PATH, exportName: def.exportName },
7618
+ inputZod: def.inputZod,
7619
+ outputZod: def.outputZod,
7620
+ inputSchema: zodSchemaToMcpJsonSchema(def.inputZod),
7621
+ outputSchema: zodSchemaToMcpJsonSchema(def.outputZod),
7622
+ parseInput: (data) => def.inputZod.parse(data),
7623
+ parseOutput: (data) => def.outputZod.parse(data)
7624
+ };
7625
+ }
7626
+ function defineWrite(def) {
7627
+ const meta = withMultisignSubmitMcpMeta(def.description, MCP_MULTISIGN_SUBMIT_FOLLOW_UP);
7628
+ const handler = { importPath: IMPORT_PATH, exportName: def.exportName };
7629
+ return {
7630
+ name: def.name,
7631
+ actionId: def.actionId,
7632
+ protocolId: PROTOCOL,
7633
+ chainCategory: "evm",
7634
+ description: meta.description,
7635
+ prerequisites: def.prerequisites,
7636
+ followUp: meta.followUp,
7637
+ handler,
7638
+ inputZod: def.inputZod,
7639
+ outputZod: mcpServerSubmitOutputSchema,
7640
+ inputSchema: agentFacingMultisignJsonSchema(def.inputZod),
7641
+ outputSchema: zodSchemaToMcpJsonSchema(mcpServerSubmitOutputSchema),
7642
+ parseInput: (data) => def.inputZod.parse(data),
7643
+ parseOutput: (data) => mcpServerSubmitOutputSchema.parse(data)
7644
+ };
7645
+ }
7646
+ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
7647
+ defineRead({
7648
+ name: "ctm_continuum_dao_marketplace_fetch_config",
7649
+ actionId: "continuum-dao-marketplace.fetch-config",
7650
+ description: "Marketplace config: payment tokens, WETH, duration bounds, fee tiers. Falls back to the Linea contract when the API is down.",
7651
+ prerequisites: ["chainId 59144", "rpcUrl when the API may be offline"],
7652
+ followUp: ["ctm_continuum_dao_marketplace_search", "ctm_continuum_dao_marketplace_fetch_listings", "ctm_continuum_dao_marketplace_fetch_auctions"],
7653
+ inputZod: mcpContinuumDaoMarketplaceFetchConfigInputSchema,
7654
+ outputZod: mcpContinuumDaoMarketplaceConfigOutputSchema,
7655
+ exportName: "fetchContinuumDaoMarketplaceConfig"
7656
+ }),
7657
+ defineRead({
7658
+ name: "ctm_continuum_dao_marketplace_fee_alternative",
7659
+ actionId: "continuum-dao-marketplace.fee-alternative",
7660
+ description: "Alternative to paying a KeyGen month in the fee token or CTM. Returns the live monthly fee, 12 times that fee, the veCTM threshold, and one direct listing whose locked CTM and voting power are both above the threshold. Auctions are excluded. Relay the summary, then continue the paid month. Buy the listing only if the user chooses it. Skip this when the month is already waived.",
7661
+ prerequisites: ["rpcUrl", "payment fee or ctm"],
7662
+ followUp: ["ctm_continuum_dao_marketplace_build_fulfill_listing_multisign"],
7663
+ inputZod: mcpContinuumDaoMarketplaceFeeAlternativeInputSchema,
7664
+ outputZod: mcpContinuumDaoMarketplaceFeeAlternativeOutputSchema,
7665
+ exportName: "quoteContinuumDaoMarketplaceFeeAlternative"
7666
+ }),
7667
+ defineRead({
7668
+ name: "ctm_continuum_dao_marketplace_search",
7669
+ actionId: "continuum-dao-marketplace.search",
7670
+ 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.",
7671
+ prerequisites: ["chainId 59144", "rpcUrl when lock snapshots are missing"],
7672
+ followUp: ["ctm_continuum_dao_marketplace_build_fulfill_listing_multisign", "ctm_continuum_dao_marketplace_build_auction_bid_multisign"],
7673
+ inputZod: mcpContinuumDaoMarketplaceSearchInputSchema,
7674
+ outputZod: mcpContinuumDaoMarketplaceSearchOutputSchema,
7675
+ exportName: "searchContinuumDaoMarketplace"
7676
+ }),
7677
+ defineRead({
7678
+ name: "ctm_continuum_dao_marketplace_fetch_listings",
7679
+ actionId: "continuum-dao-marketplace.fetch-listings",
7680
+ 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.",
7681
+ prerequisites: ["chainId 59144"],
7682
+ followUp: ["ctm_continuum_dao_marketplace_build_fulfill_listing_multisign"],
7683
+ inputZod: mcpContinuumDaoMarketplaceFetchListingsInputSchema,
7684
+ outputZod: mcpContinuumDaoMarketplaceListOutputSchema,
7685
+ exportName: "fetchContinuumDaoMarketplaceListings"
7686
+ }),
7687
+ defineRead({
7688
+ name: "ctm_continuum_dao_marketplace_fetch_offerings",
7689
+ actionId: "continuum-dao-marketplace.fetch-offerings",
7690
+ description: "Open veCTM offerings. includeInactive adds fulfilled and rescinded rows. API first, then marketplace logs.",
7691
+ prerequisites: ["chainId 59144"],
7692
+ followUp: ["ctm_continuum_dao_marketplace_build_fulfill_offering_multisign"],
7693
+ inputZod: mcpContinuumDaoMarketplaceFetchOfferingsInputSchema,
7694
+ outputZod: mcpContinuumDaoMarketplaceListOutputSchema,
7695
+ exportName: "fetchContinuumDaoMarketplaceOfferings"
7696
+ }),
7697
+ defineRead({
7698
+ name: "ctm_continuum_dao_marketplace_fetch_auctions",
7699
+ actionId: "continuum-dao-marketplace.fetch-auctions",
7700
+ description: "Live veCTM auctions (Pending, Active, Complete). includeInactive adds sold, canceled, and expired. Each auction includes bids.",
7701
+ prerequisites: ["chainId 59144"],
7702
+ followUp: ["ctm_continuum_dao_marketplace_build_auction_bid_multisign", "ctm_continuum_dao_marketplace_build_settle_auction_multisign"],
7703
+ inputZod: mcpContinuumDaoMarketplaceFetchAuctionsInputSchema,
7704
+ outputZod: mcpContinuumDaoMarketplaceListOutputSchema,
7705
+ exportName: "fetchContinuumDaoMarketplaceAuctions"
7706
+ }),
7707
+ defineRead({
7708
+ name: "ctm_continuum_dao_marketplace_fetch_token",
7709
+ actionId: "continuum-dao-marketplace.fetch-token",
7710
+ description: "One veCTM: live listing, offerings, and auction, plus history of closed sales and auctions with bids.",
7711
+ prerequisites: ["tokenId"],
7712
+ followUp: ["ctm_continuum_dao_marketplace_fetch_auctions"],
7713
+ inputZod: mcpContinuumDaoMarketplaceFetchTokenInputSchema,
7714
+ outputZod: mcpContinuumDaoMarketplaceTokenOutputSchema,
7715
+ exportName: "fetchContinuumDaoMarketplaceToken"
7716
+ }),
7717
+ defineRead({
7718
+ name: "ctm_continuum_dao_marketplace_fetch_activity",
7719
+ actionId: "continuum-dao-marketplace.fetch-activity",
7720
+ description: "One address\u2019s marketplace orders and auctions, including past sales and bids.",
7721
+ prerequisites: ["address"],
7722
+ followUp: ["ctm_continuum_dao_marketplace_fetch_token"],
7723
+ inputZod: mcpContinuumDaoMarketplaceFetchActivityInputSchema,
7724
+ outputZod: mcpContinuumDaoMarketplaceActivityOutputSchema,
7725
+ exportName: "fetchContinuumDaoMarketplaceActivity"
7726
+ }),
7727
+ defineRead({
7728
+ name: "ctm_continuum_dao_marketplace_fetch_fee_preview",
7729
+ actionId: "continuum-dao-marketplace.fetch-fee-preview",
7730
+ description: "Protocol fee for a veCTM price. Uses the API, then on-chain fee tiers.",
7731
+ prerequisites: ["tokenId", "price wei"],
7732
+ followUp: ["ctm_continuum_dao_marketplace_build_create_listing_multisign"],
7733
+ inputZod: mcpContinuumDaoMarketplaceFetchFeePreviewInputSchema,
7734
+ outputZod: mcpContinuumDaoMarketplaceFeeOutputSchema,
7735
+ exportName: "fetchContinuumDaoMarketplaceFeePreview"
7736
+ }),
7737
+ defineWrite({
7738
+ name: "ctm_continuum_dao_marketplace_build_create_listing_multisign",
7739
+ actionId: "continuum-dao-marketplace.create-listing",
7740
+ description: "List a veCTM. Approves the marketplace for the token id when needed. Linea only.",
7741
+ prerequisites: ["keyGen", "tokenId owned by the KeyGen", "askWei", "deadline"],
7742
+ inputZod: mcpContinuumDaoMarketplaceCreateListingInputSchema,
7743
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateListing"
7744
+ }),
7745
+ defineWrite({
7746
+ name: "ctm_continuum_dao_marketplace_build_delist_multisign",
7747
+ actionId: "continuum-dao-marketplace.delist",
7748
+ description: "Delist this KeyGen\u2019s open veCTM listing.",
7749
+ prerequisites: ["keyGen", "tokenId"],
7750
+ inputZod: mcpContinuumDaoMarketplaceDelistInputSchema,
7751
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceDelist"
7752
+ }),
7753
+ defineWrite({
7754
+ name: "ctm_continuum_dao_marketplace_build_fulfill_listing_multisign",
7755
+ actionId: "continuum-dao-marketplace.fulfill-listing",
7756
+ description: "Buy a listed veCTM. Refuses when this KeyGen already owns it or is the seller. WETH sends msg.value.",
7757
+ prerequisites: ["keyGen", "tokenId", "seller", "priceWei"],
7758
+ inputZod: mcpContinuumDaoMarketplaceFulfillListingInputSchema,
7759
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceFulfillListing"
7760
+ }),
7761
+ defineWrite({
7762
+ name: "ctm_continuum_dao_marketplace_build_create_offering_multisign",
7763
+ actionId: "continuum-dao-marketplace.create-offering",
7764
+ description: "Offer on a veCTM this KeyGen does not own. WETH sends msg.value and still approves WETH for later fulfillment.",
7765
+ prerequisites: ["keyGen", "tokenId", "bidWei", "deadline"],
7766
+ inputZod: mcpContinuumDaoMarketplaceCreateOfferingInputSchema,
7767
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateOffering"
7768
+ }),
7769
+ defineWrite({
7770
+ name: "ctm_continuum_dao_marketplace_build_rescind_multisign",
7771
+ actionId: "continuum-dao-marketplace.rescind",
7772
+ description: "Rescind this KeyGen\u2019s open offering.",
7773
+ prerequisites: ["keyGen", "tokenId"],
7774
+ inputZod: mcpContinuumDaoMarketplaceRescindInputSchema,
7775
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceRescind"
7776
+ }),
7777
+ defineWrite({
7778
+ name: "ctm_continuum_dao_marketplace_build_fulfill_offering_multisign",
7779
+ actionId: "continuum-dao-marketplace.fulfill-offering",
7780
+ description: "Accept an offering on a veCTM this KeyGen owns. Refuses an attached KeyGen.",
7781
+ prerequisites: ["keyGen", "tokenId", "buyer", "priceWei"],
7782
+ inputZod: mcpContinuumDaoMarketplaceFulfillOfferingInputSchema,
7783
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceFulfillOffering"
7784
+ }),
7785
+ defineWrite({
7786
+ name: "ctm_continuum_dao_marketplace_build_create_auction_multisign",
7787
+ actionId: "continuum-dao-marketplace.create-auction",
7788
+ description: "Start an auction and escrow the veCTM. Refuses an attached KeyGen.",
7789
+ prerequisites: ["keyGen", "tokenId", "reserveWei", "minIncrementWei", "deadline"],
7790
+ inputZod: mcpContinuumDaoMarketplaceCreateAuctionInputSchema,
7791
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateAuction"
7792
+ }),
7793
+ defineWrite({
7794
+ name: "ctm_continuum_dao_marketplace_build_cancel_auction_multisign",
7795
+ actionId: "continuum-dao-marketplace.cancel-auction",
7796
+ description: "Cancel a pending auction that has no bids. The veCTM returns to the seller.",
7797
+ prerequisites: ["keyGen", "tokenId"],
7798
+ inputZod: mcpContinuumDaoMarketplaceCancelAuctionInputSchema,
7799
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCancelAuction"
7800
+ }),
7801
+ defineWrite({
7802
+ name: "ctm_continuum_dao_marketplace_build_auction_bid_multisign",
7803
+ actionId: "continuum-dao-marketplace.auction-bid",
7804
+ description: "Bid on a live auction. Refuses when this KeyGen is the seller or already owns the veCTM.",
7805
+ prerequisites: ["keyGen", "tokenId", "seller", "priceWei"],
7806
+ inputZod: mcpContinuumDaoMarketplaceAuctionBidInputSchema,
7807
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceAuctionBid"
7808
+ }),
7809
+ defineWrite({
7810
+ name: "ctm_continuum_dao_marketplace_build_settle_auction_multisign",
7811
+ actionId: "continuum-dao-marketplace.settle-auction",
7812
+ description: "Settle a completed or expired auction. A completed auction transfers the veCTM to the highest bidder.",
7813
+ prerequisites: ["keyGen", "tokenId", "seller"],
7814
+ inputZod: mcpContinuumDaoMarketplaceSettleAuctionInputSchema,
7815
+ exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceSettleAuction"
7253
7816
  })
7254
7817
  ];
7255
7818
 
@@ -9704,12 +10267,72 @@ var CORE_MCP_TOOL_DEFINITIONS = [
9704
10267
  inputZod: mcpDeriveFetchOpenOrdersInputSchema,
9705
10268
  outputZod: mcpDeriveFetchOpenOrdersOutputSchema
9706
10269
  }),
10270
+ defineMcpTool({
10271
+ name: "ctm_hyperliquid_outcome_fetch_markets",
10272
+ actionId: "hyperliquidOutcome.fetch-markets",
10273
+ protocolId: "hyperliquidOutcome",
10274
+ chainCategory: "evm",
10275
+ description: "Live Hyperliquid HIP-4 outcome markets from outcomeMeta, with Yes/No mids. Optional query substring. Chain 999.",
10276
+ prerequisites: ["load_defi_protocol hyperliquidOutcome"],
10277
+ followUp: ["ctm_hyperliquid_outcome_fetch_market", "ctm_hyperliquid_outcome_build_order_multisign"],
10278
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "hyperliquidOutcomeFetchMarketsSummary" },
10279
+ inputZod: mcpHyperliquidOutcomeFetchMarketsInputSchema,
10280
+ outputZod: mcpHyperliquidOutcomeFetchMarketsOutputSchema
10281
+ }),
10282
+ defineMcpTool({
10283
+ name: "ctm_hyperliquid_outcome_fetch_market",
10284
+ actionId: "hyperliquidOutcome.fetch-market",
10285
+ protocolId: "hyperliquidOutcome",
10286
+ chainCategory: "evm",
10287
+ description: "One Hyperliquid outcome market plus both Yes and No order books.",
10288
+ prerequisites: ["load_defi_protocol hyperliquidOutcome", "outcome id"],
10289
+ followUp: ["ctm_hyperliquid_outcome_build_order_multisign"],
10290
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "hyperliquidOutcomeFetchMarketSummary" },
10291
+ inputZod: mcpHyperliquidOutcomeFetchMarketInputSchema,
10292
+ outputZod: mcpHyperliquidOutcomeFetchMarketOutputSchema
10293
+ }),
10294
+ defineMcpTool({
10295
+ name: "ctm_hyperliquid_outcome_fetch_orderbook",
10296
+ actionId: "hyperliquidOutcome.fetch-orderbook",
10297
+ protocolId: "hyperliquidOutcome",
10298
+ chainCategory: "evm",
10299
+ description: "l2Book for one Hyperliquid outcome side (default yes).",
10300
+ prerequisites: ["load_defi_protocol hyperliquidOutcome", "outcome id"],
10301
+ followUp: ["ctm_hyperliquid_outcome_build_order_multisign"],
10302
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "hyperliquidOutcomeFetchOrderbookSummary" },
10303
+ inputZod: mcpHyperliquidOutcomeFetchOrderbookInputSchema,
10304
+ outputZod: mcpHyperliquidOutcomeFetchOrderbookOutputSchema
10305
+ }),
10306
+ defineMcpTool({
10307
+ name: "ctm_hyperliquid_outcome_fetch_positions",
10308
+ actionId: "hyperliquidOutcome.fetch-positions",
10309
+ protocolId: "hyperliquidOutcome",
10310
+ chainCategory: "evm",
10311
+ description: "Quote balances and HIP-4 share balances (+encoding) for a HyperCore address. Not ERC20s \u2014 do not add_to_token_registry.",
10312
+ prerequisites: ["load_defi_protocol hyperliquidOutcome", "user address"],
10313
+ followUp: ["ctm_hyperliquid_outcome_build_merge_multisign"],
10314
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "hyperliquidOutcomeFetchPositionsSummary" },
10315
+ inputZod: mcpHyperliquidOutcomeFetchAccountInputSchema,
10316
+ outputZod: mcpHyperliquidOutcomeFetchPositionsOutputSchema
10317
+ }),
10318
+ defineMcpTool({
10319
+ name: "ctm_hyperliquid_outcome_fetch_open_orders",
10320
+ actionId: "hyperliquidOutcome.fetch-open-orders",
10321
+ protocolId: "hyperliquidOutcome",
10322
+ chainCategory: "evm",
10323
+ description: "Open Hyperliquid outcome orders (#encoding coins) for a user.",
10324
+ prerequisites: ["load_defi_protocol hyperliquidOutcome", "user address"],
10325
+ followUp: ["ctm_hyperliquid_outcome_build_cancel_multisign"],
10326
+ handler: { importPath: "protocols/evm/hyperliquidOutcome", exportName: "hyperliquidOutcomeFetchOpenOrdersSummary" },
10327
+ inputZod: mcpHyperliquidOutcomeFetchAccountInputSchema,
10328
+ outputZod: mcpHyperliquidOutcomeFetchOpenOrdersOutputSchema
10329
+ }),
9707
10330
  defineMcpTool({
9708
10331
  name: "search_prediction_markets",
9709
10332
  actionId: "prediction-markets.search",
9710
10333
  protocolId: "prediction-markets",
9711
10334
  chainCategory: "evm",
9712
- description: 'Venue-agnostic prediction market search for MPA chat. v1 adapter is Trueo on Base. Pass the operator topic verbatim as query (case-insensitive title substring). Do not substitute a category or synonym. Do not set trending when query is set. Empty query lists trending (max 10; cannot page). If hasMore, call again with offset/nextOffset, trending=false, indexBase=nextIndexBase, excludeAddresses of listed venueMarketIds. Default: live and recently finished (14 days) \u2014 do not pass includeAll unless the operator asked for closed or historical markets. If the live board is empty, say so. After a pick, get_prediction_market. Writes (mint / limit / burn / redeem / Yes-No swap) are not in the opening catalog \u2014 load_defi_protocol({ protocolId: "trueo" }) then get_defi_protocol_skill or search_continuum_tools for ctm_trueo_build_*.',
10335
+ description: 'Venue-agnostic prediction market search (Trueo on Base and Hyperliquid outcome markets). Pass the operator topic verbatim as query. Omit venues to search both. Restrict with venues ["trueo"] or ["hyperliquid"]. Do not set trending when query is set. If hasMore, page Trueo with offset/nextOffset. Hyperliquid matches are included on the first page. After a pick, get_prediction_market (venue from the row). Trueo writes: load_defi_protocol trueo. Hyperliquid bets: load_defi_protocol hyperliquidOutcome.',
9713
10336
  prerequisites: [],
9714
10337
  followUp: ["get_prediction_market", "load_defi_protocol", "get_defi_protocol_skill"],
9715
10338
  handler: { importPath: "protocols/evm/trueo", exportName: "searchPredictionMarketsSummary" },
@@ -9721,7 +10344,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
9721
10344
  actionId: "prediction-markets.get",
9722
10345
  protocolId: "prediction-markets",
9723
10346
  chainCategory: "evm",
9724
- description: 'Full selected prediction market (rules, Yes/No, volume, TVL, expiry). Use after search_prediction_markets pick #N. Does not require load_defi_protocol. Writes stay behind load_defi_protocol({ protocolId: "trueo" }): ctm_trueo_build_wrap_tyd_multisign, ctm_trueo_build_unwrap_tyd_multisign, ctm_trueo_build_mint_multisign, ctm_trueo_build_create_order_multisign, ctm_trueo_build_burn_multisign, ctm_trueo_build_redeem_multisign, ctm_trueo_build_swap_multisign. Discover via get_defi_protocol_skill or search_continuum_tools \u2014 they are not on the opening chat catalog.',
10347
+ description: "Full selected prediction market. venue defaults to trueo (market address). For Hyperliquid pass venue hyperliquid and venueMarketId = outcome id. Does not require load_defi_protocol. Trueo writes stay behind load_defi_protocol trueo. Hyperliquid bets stay behind load_defi_protocol hyperliquidOutcome (ctm_hyperliquid_outcome_build_order_multisign). Yes/No Hyperliquid shares are not ERC20s \u2014 do not add_to_token_registry.",
9725
10348
  prerequisites: ["venueMarketId from search_prediction_markets"],
9726
10349
  followUp: [
9727
10350
  "load_defi_protocol",
@@ -9838,7 +10461,8 @@ var CORE_MCP_TOOL_DEFINITIONS = [
9838
10461
  ];
9839
10462
  var MCP_TOOL_DEFINITIONS = [
9840
10463
  ...CORE_MCP_TOOL_DEFINITIONS,
9841
- ...MCP_PROTOCOL_TOOL_DEFINITIONS
10464
+ ...MCP_PROTOCOL_TOOL_DEFINITIONS,
10465
+ ...MCP_MARKETPLACE_TOOL_DEFINITIONS
9842
10466
  ];
9843
10467
  function buildToolSchemaMap(kind) {
9844
10468
  const out = {};
@@ -11659,12 +12283,52 @@ registerProtocolModule(aerodromeProtocolModule);
11659
12283
 
11660
12284
  // src/protocols/evm/continuum-dao/index.ts
11661
12285
  init_constants2();
12286
+
12287
+ // src/protocols/evm/continuum-dao/marketplaceModule.ts
12288
+ init_constants2();
12289
+ var common = ["keyGen", "purposeText", "useCustomGas"];
12290
+ var continuumDaoMarketplaceProtocolModule = {
12291
+ id: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID,
12292
+ chainCategory: "evm",
12293
+ isChainSupported(ctx) {
12294
+ if (ctx.chainCategory !== "evm") return false;
12295
+ const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
12296
+ return n === CONTINUUM_DAO_LINEA_CHAIN_ID;
12297
+ },
12298
+ isTokenSupported(token) {
12299
+ return token.category === "evm" && (token.kind === "erc20" || token.kind === "erc721");
12300
+ },
12301
+ actions: [
12302
+ { id: "continuum-dao-marketplace.fetch-config", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Marketplace payment tokens, durations, and fees", commonParams: [], params: {} },
12303
+ { id: "continuum-dao-marketplace.search", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Rank veCTMs for sale by price, locked CTM, or unlock time", commonParams: [], params: {} },
12304
+ { id: "continuum-dao-marketplace.fee-alternative", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "One qualifying direct listing beside 12 times the KeyGen monthly fee", commonParams: [], params: {} },
12305
+ { id: "continuum-dao-marketplace.fetch-listings", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Open listings, or past sales when includeInactive is set", commonParams: [], params: {} },
12306
+ { id: "continuum-dao-marketplace.fetch-offerings", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Open offerings, or closed offers when includeInactive is set", commonParams: [], params: {} },
12307
+ { id: "continuum-dao-marketplace.fetch-auctions", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Live auctions, or settled auctions when includeInactive is set. Each row includes bids.", commonParams: [], params: {} },
12308
+ { id: "continuum-dao-marketplace.fetch-token", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "One veCTM: live orders plus history of sales and auctions", commonParams: [], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12309
+ { id: "continuum-dao-marketplace.fetch-activity", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "An address\u2019s sales, buys, and auctions including bids", commonParams: [], params: { address: { type: "string", required: true, description: "KeyGen or wallet" } } },
12310
+ { id: "continuum-dao-marketplace.fetch-fee-preview", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Protocol fee for a price and veCTM", commonParams: [], params: {} },
12311
+ { id: "continuum-dao-marketplace.create-listing", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Approve veCTM if needed and create a listing", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" }, askWei: { type: "string", required: true, description: "Ask in payment-token wei" } } },
12312
+ { id: "continuum-dao-marketplace.delist", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Delist an open listing", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12313
+ { id: "continuum-dao-marketplace.fulfill-listing", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Buy a listed veCTM", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12314
+ { id: "continuum-dao-marketplace.create-offering", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Make an offering on a veCTM", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12315
+ { id: "continuum-dao-marketplace.rescind", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Rescind an open offering", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12316
+ { id: "continuum-dao-marketplace.fulfill-offering", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Accept an offering on a veCTM you own", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12317
+ { id: "continuum-dao-marketplace.create-auction", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Escrow a veCTM into an auction", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12318
+ { id: "continuum-dao-marketplace.cancel-auction", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Cancel a pending auction with no bids", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12319
+ { id: "continuum-dao-marketplace.auction-bid", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Bid on a live auction", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
12320
+ { id: "continuum-dao-marketplace.settle-auction", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Settle a completed or expired auction", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } }
12321
+ ]
12322
+ };
12323
+
12324
+ // src/protocols/evm/continuum-dao/index.ts
11662
12325
  init_constants2();
11663
12326
  init_governance();
11664
12327
  init_simulateProposal();
11665
12328
  init_foundryProposalScript();
11666
12329
  init_explainProposal();
11667
12330
  init_forum();
12331
+ registerProtocolModule(continuumDaoMarketplaceProtocolModule);
11668
12332
  var continuumDaoProtocolModule = {
11669
12333
  id: CONTINUUM_DAO_PROTOCOL_ID,
11670
12334
  chainCategory: "evm",
@@ -13058,6 +13722,9 @@ function isTrueoChainSupported(chainId) {
13058
13722
  return TRUEO_CHAIN_IDS.includes(chainId);
13059
13723
  }
13060
13724
 
13725
+ // src/protocols/evm/hyperliquidOutcome/api.ts
13726
+ var HYPERLIQUID_OUTCOME_PROTOCOL_ID = "hyperliquidOutcome";
13727
+
13061
13728
  // src/protocols/evm/trueo/index.ts
13062
13729
  var trueoProtocolModule = {
13063
13730
  id: TRUEO_PROTOCOL_ID,
@@ -13137,6 +13804,71 @@ var trueoProtocolModule = {
13137
13804
  ]
13138
13805
  };
13139
13806
  registerProtocolModule(trueoProtocolModule);
13807
+
13808
+ // src/protocols/evm/hyperliquidOutcome/index.ts
13809
+ var hyperliquidOutcomeProtocolModule = {
13810
+ id: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
13811
+ chainCategory: "evm",
13812
+ isChainSupported(ctx) {
13813
+ if (ctx.chainCategory !== "evm") return false;
13814
+ const chainId = typeof ctx.chainId === "number" ? ctx.chainId : Number(ctx.chainId);
13815
+ return Number.isFinite(chainId) && isHyperliquidChainSupported(chainId);
13816
+ },
13817
+ isTokenSupported(token) {
13818
+ return token.category === "evm" && token.kind === "native";
13819
+ },
13820
+ actions: [
13821
+ {
13822
+ id: "hyperliquidOutcome.order",
13823
+ protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
13824
+ chainCategory: "evm",
13825
+ description: "Limit buy or sell a HIP-4 outcome side via Hyperliquid /exchange",
13826
+ commonParams: ["keyGen", "purposeText"],
13827
+ params: {}
13828
+ },
13829
+ {
13830
+ id: "hyperliquidOutcome.cancel",
13831
+ protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
13832
+ chainCategory: "evm",
13833
+ description: "Cancel a resting HIP-4 outcome order",
13834
+ commonParams: ["keyGen", "purposeText"],
13835
+ params: {}
13836
+ },
13837
+ {
13838
+ id: "hyperliquidOutcome.split",
13839
+ protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
13840
+ chainCategory: "evm",
13841
+ description: "Split quote tokens into Yes and No shares",
13842
+ commonParams: ["keyGen", "purposeText"],
13843
+ params: {}
13844
+ },
13845
+ {
13846
+ id: "hyperliquidOutcome.merge",
13847
+ protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
13848
+ chainCategory: "evm",
13849
+ description: "Merge Yes and No shares back into quote tokens",
13850
+ commonParams: ["keyGen", "purposeText"],
13851
+ params: {}
13852
+ },
13853
+ {
13854
+ id: "hyperliquidOutcome.merge-question",
13855
+ protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
13856
+ chainCategory: "evm",
13857
+ description: "Merge Yes shares across a question into quote tokens",
13858
+ commonParams: ["keyGen", "purposeText"],
13859
+ params: {}
13860
+ },
13861
+ {
13862
+ id: "hyperliquidOutcome.negate",
13863
+ protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
13864
+ chainCategory: "evm",
13865
+ description: "Convert No shares of one outcome into Yes shares of the other outcomes",
13866
+ commonParams: ["keyGen", "purposeText"],
13867
+ params: {}
13868
+ }
13869
+ ]
13870
+ };
13871
+ registerProtocolModule(hyperliquidOutcomeProtocolModule);
13140
13872
  var skillsDir = path.join(path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('catalog.cjs', document.baseURI).href)))), "skills");
13141
13873
  var SKILL_PROTOCOL_IDS = [
13142
13874
  "aave-v4",
@@ -13155,9 +13887,11 @@ var SKILL_PROTOCOL_IDS = [
13155
13887
  "aerodrome",
13156
13888
  "pendle",
13157
13889
  "continuum-dao",
13890
+ "continuum-dao-marketplace",
13158
13891
  "compound-v3",
13159
13892
  "derive",
13160
13893
  "trueo",
13894
+ "hyperliquidOutcome",
13161
13895
  "yield-compare"
13162
13896
  ];
13163
13897
  function getToolsForProtocol(protocolId) {
@@ -13526,6 +14260,17 @@ var PROTOCOL_SUPPORT_ADVISORS = {
13526
14260
  }
13527
14261
  }
13528
14262
  }),
14263
+ hyperliquidOutcome: advisor("hyperliquidOutcome", "api_underlyings", {
14264
+ async supportedChainIds() {
14265
+ return [...HYPERLIQUID_SUPPORTED_CHAIN_IDS];
14266
+ },
14267
+ async supportedTokens() {
14268
+ return {
14269
+ tokens: [],
14270
+ notes: 'HIP-4 outcome markets on HyperCore (chainId 999). Yes/No shares are exchange balances, not ERC20s. Search with search_prediction_markets venues ["hyperliquid"].'
14271
+ };
14272
+ }
14273
+ }),
13529
14274
  hyperliquid: advisor("hyperliquid", "api_underlyings", {
13530
14275
  async supportedChainIds() {
13531
14276
  return [...HYPERLIQUID_SUPPORTED_CHAIN_IDS];
@@ -13590,6 +14335,22 @@ var PROTOCOL_SUPPORT_ADVISORS = {
13590
14335
  };
13591
14336
  }
13592
14337
  }),
14338
+ [CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID]: advisor(CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, "fixed_addresses", {
14339
+ async supportedChainIds() {
14340
+ return [59144];
14341
+ },
14342
+ async supportedTokens(chainId) {
14343
+ const ve = votingEscrowAddressOnEvmChain(chainId);
14344
+ const market = votingEscrowMarketplaceAddressOnEvmChain(chainId);
14345
+ const tokens = [];
14346
+ if (ve) tokens.push({ address: ve, symbol: "veCTM", roles: ["position_nft"] });
14347
+ if (market) tokens.push({ address: market, symbol: "veCTM-market", roles: ["protocol"] });
14348
+ return {
14349
+ tokens,
14350
+ notes: "Linea veCTM marketplace. Load continuum-dao-marketplace, not continuum-dao. Search ranks buys by locked CTM, unlock time, or price per CTM and returns a short list. fetch_listings is the unfiltered page. fetch_auctions is the live book; includeInactive adds settled auctions and each row includes bids. Do not buy or bid a veCTM this KeyGen already owns."
14351
+ };
14352
+ }
14353
+ }),
13593
14354
  [COMPOUND_V3_PROTOCOL_ID]: advisor(COMPOUND_V3_PROTOCOL_ID, "api_underlyings", {
13594
14355
  async supportedChainIds() {
13595
14356
  return listCompoundV3SupportedChainIds();
@@ -13773,26 +14534,6 @@ function listProtocolSupportAdvisorIds() {
13773
14534
  }
13774
14535
 
13775
14536
  // src/agent/catalog.ts
13776
- registerProtocolModule(uniswapV4ProtocolModule);
13777
- registerProtocolModule(curveDaoProtocolModule);
13778
- registerProtocolModule(lidoProtocolModule);
13779
- registerProtocolModule(ethenaProtocolModule);
13780
- registerProtocolModule(mapleProtocolModule);
13781
- registerProtocolModule(skyProtocolModule);
13782
- registerProtocolModule(aaveV4ProtocolModule);
13783
- registerProtocolModule(eulerV2ProtocolModule);
13784
- registerProtocolModule(gmxProtocolModule);
13785
- registerProtocolModule(hyperliquidProtocolModule);
13786
- registerProtocolModule(arcusProtocolModule);
13787
- registerProtocolModule(morphoProtocolModule);
13788
- registerProtocolModule(circleCctpProtocolModule);
13789
- registerProtocolModule(veniceProtocolModule);
13790
- registerProtocolModule(aerodromeProtocolModule);
13791
- registerProtocolModule(continuumDaoProtocolModule);
13792
- registerProtocolModule(compoundV3ProtocolModule);
13793
- registerProtocolModule(pendleProtocolModule);
13794
- registerProtocolModule(deriveProtocolModule);
13795
- registerProtocolModule(trueoProtocolModule);
13796
14537
  function getAgentCatalog() {
13797
14538
  return {
13798
14539
  protocols: getProtocolModules(),
@@ -13821,6 +14562,7 @@ function getAgentCatalog() {
13821
14562
  pendle: pendleProtocolModule,
13822
14563
  derive: deriveProtocolModule,
13823
14564
  trueo: trueoProtocolModule,
14565
+ hyperliquidOutcome: hyperliquidOutcomeProtocolModule,
13824
14566
  /** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
13825
14567
  mcp: getAgentCatalogForMcp()
13826
14568
  };