@continuumdao/ctm-mpc-defi 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -0
- package/README.md +111 -0
- package/dist/agent/catalog.cjs +484 -0
- package/dist/agent/catalog.cjs.map +1 -0
- package/dist/agent/catalog.d.cts +117 -0
- package/dist/agent/catalog.d.ts +117 -0
- package/dist/agent/catalog.js +474 -0
- package/dist/agent/catalog.js.map +1 -0
- package/dist/chains/evm/index.cjs +474 -0
- package/dist/chains/evm/index.cjs.map +1 -0
- package/dist/chains/evm/index.d.cts +62 -0
- package/dist/chains/evm/index.d.ts +62 -0
- package/dist/chains/evm/index.js +459 -0
- package/dist/chains/evm/index.js.map +1 -0
- package/dist/chains/near/index.cjs +25 -0
- package/dist/chains/near/index.cjs.map +1 -0
- package/dist/chains/near/index.d.cts +37 -0
- package/dist/chains/near/index.d.ts +37 -0
- package/dist/chains/near/index.js +20 -0
- package/dist/chains/near/index.js.map +1 -0
- package/dist/chains/solana/index.cjs +25 -0
- package/dist/chains/solana/index.cjs.map +1 -0
- package/dist/chains/solana/index.d.cts +40 -0
- package/dist/chains/solana/index.d.ts +40 -0
- package/dist/chains/solana/index.js +20 -0
- package/dist/chains/solana/index.js.map +1 -0
- package/dist/core/index.cjs +128 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +10 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.js +116 -0
- package/dist/core/index.js.map +1 -0
- package/dist/envelope-CcE5Cz_q.d.ts +35 -0
- package/dist/envelope-DYDPnrHZ.d.cts +35 -0
- package/dist/index.cjs +2481 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2446 -0
- package/dist/index.js.map +1 -0
- package/dist/keygen-CfNp8yKJ.d.cts +9 -0
- package/dist/keygen-DsINazx8.d.ts +9 -0
- package/dist/nodeRead-BnmSaMGO.d.cts +8 -0
- package/dist/nodeRead-BnmSaMGO.d.ts +8 -0
- package/dist/protocols/evm/curve-dao/index.cjs +869 -0
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -0
- package/dist/protocols/evm/curve-dao/index.d.cts +147 -0
- package/dist/protocols/evm/curve-dao/index.d.ts +147 -0
- package/dist/protocols/evm/curve-dao/index.js +846 -0
- package/dist/protocols/evm/curve-dao/index.js.map +1 -0
- package/dist/protocols/evm/uniswap-v4/index.cjs +1700 -0
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -0
- package/dist/protocols/evm/uniswap-v4/index.d.cts +323 -0
- package/dist/protocols/evm/uniswap-v4/index.d.ts +323 -0
- package/dist/protocols/evm/uniswap-v4/index.js +1659 -0
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -0
- package/dist/registry-BwZoE668.d.cts +8 -0
- package/dist/registry-oMKlO_5z.d.ts +8 -0
- package/dist/txParams-BC7ogvdR.d.cts +19 -0
- package/dist/txParams-BC7ogvdR.d.ts +19 -0
- package/dist/types-5u863Fd9.d.ts +34 -0
- package/dist/types-B8idm_gu.d.cts +34 -0
- package/dist/types-Ce2qNHai.d.cts +57 -0
- package/dist/types-Ce2qNHai.d.ts +57 -0
- package/package.json +94 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/core/registry.ts","../../src/chains/evm/chainIdParse.ts","../../src/protocols/evm/uniswap-v4/constants.ts","../../src/protocols/evm/uniswap-v4/index.ts","../../src/protocols/evm/curve-dao/support.ts","../../src/protocols/evm/curve-dao/index.ts","../../src/agent/commonParamDocs.ts","../../src/agent/mcpTools.ts","../../src/agent/catalog.ts"],"names":[],"mappings":";;;;;AAEA,IAAM,UAA4B,EAAC;AAE5B,SAAS,uBAAuB,GAAA,EAA2B;AAChE,EAAA,MAAM,QAAA,GAAW,QAAQ,SAAA,CAAU,CAAC,MAAM,CAAA,CAAE,EAAA,KAAO,IAAI,EAAE,CAAA;AACzD,EAA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;AAAA,MACV,GAAA,EAAK,0BAA0B,KAAK,CAAA;AAAA,MACpC,MAAA,EAAQ,0BAA0B,QAAQ,CAAA;AAAA,MAC1C,IAAA,EAAM,0BAA0B,MAAM;AAAA,KACxC;AAAA,IACA,SAAA,EAAW,uBAAA;AAAA,IACX,QAAA,EAAU,sBAAA;AAAA;AAAA,IAEV,KAAK,qBAAA;AAAsB,GAC7B;AACF","file":"catalog.cjs","sourcesContent":["import type { ProtocolModule } from './types.js'\n\nconst modules: ProtocolModule[] = []\n\nexport function registerProtocolModule(mod: ProtocolModule): void {\n const existing = modules.findIndex((m) => m.id === mod.id)\n if (existing >= 0) {\n modules[existing] = mod\n } else {\n modules.push(mod)\n }\n}\n\nexport function getProtocolModules(): readonly ProtocolModule[] {\n return modules\n}\n\nexport function getProtocolModule(id: string): ProtocolModule | undefined {\n return modules.find((m) => m.id === id)\n}\n\nexport function getActionsByChainCategory(category: string): ProtocolModule['actions'] {\n return modules.filter((m) => m.chainCategory === category).flatMap((m) => m.actions)\n}\n","/** Parse chain id for comparisons (decimal, 0x hex, CAIP-2 eip155:N, bigint). */\nexport function parseEvmChainIdToNumber(chainId: string | number | bigint | null | undefined): number {\n if (chainId == null) return Number.NaN\n if (typeof chainId === 'bigint') {\n const n = Number(chainId)\n return Number.isSafeInteger(n) && n >= 0 ? n : Number.NaN\n }\n if (typeof chainId === 'number') {\n return Number.isInteger(chainId) && chainId >= 0 ? chainId : Number.NaN\n }\n const t = String(chainId).trim()\n if (!t) return Number.NaN\n const low = t.toLowerCase()\n if (low.startsWith('eip155:')) {\n const rest = t.slice('eip155:'.length).trim()\n const n = Number.parseInt(rest, 10)\n return Number.isNaN(n) || n < 0 ? Number.NaN : n\n }\n if (low.startsWith('0x')) {\n return Number.parseInt(t, 16)\n }\n return Number.parseInt(t, 10)\n}\n","import { getAddress, type Address } from 'viem'\nimport { parseEvmChainIdToNumber } from '../../../chains/evm/chainIdParse.js'\n\n/** Canonical Uniswap token-allowance contract on most EVM chains. */\nexport const PERMIT2_ADDRESS: Address = '0x000000000022D473030F116dDEE9F6B43aC78BA3'\n\nconst UNIVERSAL_ROUTER_SPENDER: Partial<Record<number, string>> = {\n 1: '0x66a9893cc07d91d95644aedd05d03f95e1dba8af',\n 5: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',\n 11155111: '0x3a9d48ab9751398bbfa63ad67599bb04e4bdf98b',\n 137: '0x1095692a6237d83c6a72f3f5efedb9a670c49223',\n 80001: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',\n 10: '0x851116d9223fabed8e56c0e6b8ad0c31d98b3507',\n 420: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',\n 42161: '0xa51afafe0263b40edaef0df8781ea9aa03e381a3',\n 421613: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',\n 42220: '0xcb695bc5D3Aa22cAD1E6DF07801b061a05A0233A',\n 44787: '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD',\n 56: '0x1906c1d672b88cd1b9ac7593301ca990f94eae07',\n 43114: '0x94b75331ae8d42c1b61065089b7d48fe14aa73b7',\n 84531: '0xd0872d928672ae2ff74bdb2f5130ac12229cafaf',\n 8453: '0x6fF5693b99212da76ad316178a184ab56d299b43',\n 81457: '0xeabbcb3e8e415306207ef514f660a3f820025be3',\n 7777777: '0x3315ef7ca28db74abadc6c44570efdf06b04b020',\n 324: '0x28731BCC616B5f51dD52CF2e4dF0E78dD1136C06',\n 480: '0x8ac7bee993bb44dab564ea4bc9ea67bf9eb5e743',\n 1301: '0xf70536b3bcc1bd1a972dc186a2cf84cc6da6be5d',\n 130: '0xef740bf23acae26f6492b10de645d6b98dc8eaf3',\n 10143: '0x3ae6d8a282d67893e17aa70ebffb33ee5aa65893',\n 84532: '0x492e6456d9528771018deb9e87ef7750ef184104',\n 1868: '0x0e2850543f69f678257266e0907ff9a58b3f13de',\n 143: '0x0d97dc33264bfc1c226207428a79b26757fb9dc3',\n 59144: '0x661e93cca42afacb172121ef892830ca3b70f08d',\n 4217: '0x1febb76be10aaf3a1402f04e8e835f2c382f7914',\n 196: '0x5507749f2c558bb3e162c6e90c314c092e7372ff',\n}\n\nexport function isUniswapV4ChainSupported(chainId: string | number | bigint | null | undefined): boolean {\n if (chainId == null) return false\n const n = parseEvmChainIdToNumber(chainId)\n if (Number.isNaN(n) || n < 0) return false\n const a = UNIVERSAL_ROUTER_SPENDER[n]\n return typeof a === 'string' && a.startsWith('0x')\n}\n\nexport function getUniswapUniversalRouterSpenderOrThrow(chainId: number): Address {\n const raw = UNIVERSAL_ROUTER_SPENDER[chainId]\n if (!raw || !raw.startsWith('0x')) {\n throw new Error(\n `No Uniswap Universal Router (spender) is configured for chainId ${chainId}. Add this chain to uniswap-v4/constants or use a chain supported by the Uniswap SDK.`,\n )\n }\n return getAddress(raw)\n}\n\nexport const MAX_UINT160 = (1n << 160n) - 1n\nexport const MAX_UINT48 = (1n << 48n) - 1n\n\nexport const UNISWAP_UNIVERSAL_ROUTER_DEFAULT_GAS_UNITS = 1_500_000n\nexport const UNISWAP_TRADE_BASE_DEFAULT = 'https://trade-api.gateway.uniswap.org/v1'\nexport const UNISWAP_UNIVERSAL_ROUTER_VERSION_DEFAULT = '2.0'\nexport const UNISWAP_SWAP_DEFAULT_EXPIRY_MINUTES = 30\nexport const UNISWAP_SWAP_DEFAULT_DEADLINE_SEC_OFFSET = UNISWAP_SWAP_DEFAULT_EXPIRY_MINUTES * 60\n","import type { ProtocolModule } from '../../../core/types.js'\nimport { registerProtocolModule } from '../../../core/registry.js'\nimport { isUniswapV4ChainSupported } from './constants.js'\n\nexport * from './constants.js'\nexport * from './quote.js'\nexport * from './swapMultisign.js'\nexport * from './purpose.js'\nexport * from './support.js'\nexport * from './swap.js'\n\nexport {\n isUniswapV4SwapEvmSignRequest,\n resolveRouterSwapGasUnitsFromSignRequest,\n} from './swapMultisign.js'\n\nexport const UNISWAP_V4_PROTOCOL_ID = 'uniswap-v4'\n\nexport const uniswapV4ProtocolModule: ProtocolModule = {\n id: UNISWAP_V4_PROTOCOL_ID,\n chainCategory: 'evm',\n isChainSupported(ctx) {\n if (ctx.chainCategory !== 'evm') return false\n return isUniswapV4ChainSupported(ctx.chainId)\n },\n isTokenSupported(token) {\n if (token.category !== 'evm') return false\n return token.kind === 'native' || token.kind === 'erc20'\n },\n actions: [\n {\n id: 'uniswap-v4.swap-exact-input',\n protocolId: UNISWAP_V4_PROTOCOL_ID,\n chainCategory: 'evm',\n description: 'Swap ERC-20 or native token via Uniswap V4 Universal Router (classic allowance path)',\n commonParams: ['keyGen', 'purposeText', 'useCustomGas'],\n params: {\n tokenIn: { type: 'address', required: true, description: 'Input token (0x0 for native)' },\n tokenOut: { type: 'address', required: true, description: 'Output token address' },\n amount: { type: 'string', required: true, description: 'Human or wei amount per trade type' },\n slippagePercent: { type: 'number', required: true, description: 'Slippage tolerance percent' },\n swapTransactionDeadlineUnix: {\n type: 'number',\n required: false,\n description: 'On-chain swap deadline (unix seconds)',\n },\n uniswapApiKey: { type: 'string', required: true, description: 'Uniswap Trade API key' },\n },\n },\n {\n id: 'uniswap-v4.quote',\n protocolId: UNISWAP_V4_PROTOCOL_ID,\n chainCategory: 'evm',\n description: 'Fetch Uniswap Trade API quote',\n commonParams: ['keyGen'],\n params: {\n tokenIn: { type: 'address', required: true, description: 'Input token' },\n tokenOut: { type: 'address', required: true, description: 'Output token' },\n amount: { type: 'string', required: true, description: 'Amount for quote' },\n type: { type: 'EXACT_INPUT | EXACT_OUTPUT', required: true, description: 'Trade type' },\n },\n },\n ],\n}\n\nregisterProtocolModule(uniswapV4ProtocolModule)\n\nimport { uniswapTradeQuote } from './quote.js'\nimport { buildEvmMultisignBodyUniswapV4SkipPermit2Batch } from './swapMultisign.js'\nimport { swapExactInput as swapExactInputFn, quoteSwap, createSwap, swapFromQuote } from './swap.js'\n\nexport const uniswapV4 = {\n quoteSwap,\n createSwap,\n swapExactInput: swapExactInputFn,\n swapFromQuote,\n buildSwapMultisignBody: buildEvmMultisignBodyUniswapV4SkipPermit2Batch,\n quote: uniswapTradeQuote,\n isChainSupported: isUniswapV4ChainSupported,\n}\n","import { parseEvmChainIdToNumber } from '../../../chains/evm/chainIdParse.js'\n\nconst CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS: ReadonlySet<number> = new Set([\n 1, 10, 56, 100, 137, 146, 196, 250, 252, 324, 999, 1284, 2222, 5000, 8453, 42161, 42220, 43114, 1313161554,\n])\n\nexport function isCurveApiChainSupported(chainId: string | number | bigint | null | undefined): boolean {\n const n = parseEvmChainIdToNumber(chainId)\n if (Number.isNaN(n) || n < 0) return false\n return CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS.has(n)\n}\n\nexport { isCurveApiChainSupported as isCurveDaoChainSupported }\n","import type { ProtocolModule } from '../../../core/types.js'\nimport { registerProtocolModule } from '../../../core/registry.js'\nimport { isCurveApiChainSupported } from './support.js'\n\nexport * from './support.js'\nexport * from './swapDestinations.js'\nexport * from './apiSession.js'\nexport * from './purpose.js'\nexport * from './executeHelpers.js'\nexport * from './multisign.js'\n\nexport const CURVE_DAO_PROTOCOL_ID = 'curve-dao'\n\nexport const curveDaoProtocolModule: ProtocolModule = {\n id: CURVE_DAO_PROTOCOL_ID,\n chainCategory: 'evm',\n isChainSupported(ctx) {\n if (ctx.chainCategory !== 'evm') return false\n return isCurveApiChainSupported(ctx.chainId)\n },\n isTokenSupported(token) {\n if (token.category !== 'evm') return false\n return token.kind === 'native' || token.kind === 'erc20'\n },\n actions: [\n {\n id: 'curve-dao.swap',\n protocolId: CURVE_DAO_PROTOCOL_ID,\n chainCategory: 'evm',\n description: 'Swap via Curve Router NG (optional ERC-20 approve batch)',\n commonParams: ['keyGen', 'purposeText', 'useCustomGas'],\n params: {\n tokenIn: { type: 'address', required: true, description: 'ERC-20 token in (native uses WETH path in UI)' },\n tokenOut: { type: 'address', required: true, description: 'Output token or 0xeeee… native placeholder' },\n amountHuman: { type: 'string', required: true, description: 'Human-readable input amount' },\n slippagePercent: { type: 'number', required: true, description: 'Slippage percent (0–100 exclusive)' },\n },\n },\n ],\n}\n\nregisterProtocolModule(curveDaoProtocolModule)\n\nimport { buildEvmMultisignBodyCurveDaoBatch } from './multisign.js'\nimport { loadFullCurveSessionForRpc } from './apiSession.js'\n\nexport const curveDao = {\n buildSwapMultisignBody: buildEvmMultisignBodyCurveDaoBatch,\n isChainSupported: isCurveApiChainSupported,\n loadSession: loadFullCurveSessionForRpc,\n}\n","import type { ParamDoc } from '../core/types.js'\n\n/** Shared inputs documented once for all EVM multisign builders. */\nexport const EVM_COMMON_PARAM_DOCS: Record<string, ParamDoc> = {\n keyGen: {\n type: 'object',\n required: true,\n description:\n 'MPC key slice: { pubkeyhex: string (required), keylist: string[], ClientKeys?: Record<string,string> }. Used for pubKey/keyList on POST /multiSignRequest.',\n },\n purposeText: {\n type: 'string',\n required: true,\n description:\n 'Human-readable purpose for the sign request. Stored in bodyForSign.purpose (may be appended with an automatic batch suffix).',\n },\n useCustomGas: {\n type: 'boolean',\n required: true,\n description:\n 'When true, apply chain gas settings from chainDetail / customGasChainDetails instead of raw RPC estimates only.',\n },\n chainId: {\n type: 'number',\n required: true,\n description: 'EVM chain id (decimal). Becomes destinationChainID on the sign request.',\n },\n rpcUrl: {\n type: 'string',\n required: true,\n description: 'HTTPS JSON-RPC URL for gas estimation, nonce, and allowance reads.',\n },\n executorAddress: {\n type: 'address',\n required: true,\n description: 'MPC wallet address (from keyGen ethereumaddress) — tx sender for estimates and approvals.',\n },\n chainDetail: {\n type: 'object',\n required: true,\n description:\n 'Optional gas config: { legacy?, gasLimit?, gasMultiplier?, gasPrice?, baseFee?, priorityFee?, baseFeeMultiplier? }.',\n },\n customGasChainDetails: {\n type: 'object',\n required: false,\n description: 'Snapshot written to extraJSON.customGasChainDetails when useCustomGas is true.',\n },\n}\n\nexport const MULTISIGN_OUTPUT_DOC = {\n description:\n 'Unsigned mpc-auth multiSignRequest payload. The caller must sign messageToSign (MetaMask personal_sign or Ed25519) and POST { ...bodyForSign, clientSig, signedMessage: messageToSign } to /multiSignRequest.',\n fields: {\n bodyForSign: {\n type: 'object',\n description:\n 'POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs.',\n },\n messageToSign: {\n type: 'string',\n description: 'JSON.stringify(bodyForSign) — exact string to sign before adding clientSig.',\n },\n },\n} as const\n","import type { ChainCategory, ParamDoc } from '../core/types.js'\nimport { EVM_COMMON_PARAM_DOCS, MULTISIGN_OUTPUT_DOC } from './commonParamDocs.js'\nimport { getProtocolModules } from '../core/registry.js'\n\n/** JSON-schema-like object for MCP tool `inputSchema` / `outputSchema`. */\nexport type McpSchemaProperty = {\n type: string\n description?: string\n}\n\nexport type McpJsonSchema = {\n type: string\n description?: string\n properties?: Record<string, McpSchemaProperty>\n required?: string[]\n items?: McpJsonSchema\n enum?: string[]\n}\n\nexport type McpToolHandler = {\n /** Import path subpath, e.g. protocols/evm/uniswap-v4 */\n importPath: string\n /** Named export to invoke */\n exportName: string\n}\n\nexport type McpToolDefinition = {\n /** Stable MCP tool name (snake_case). */\n name: string\n /** Registry action id, e.g. uniswap-v4.quote */\n actionId: string\n protocolId: string\n chainCategory: ChainCategory\n /** Long description for the LLM — what it does, when to use it, what it does NOT do. */\n description: string\n /** Prerequisites (other tools or data that must exist first). */\n prerequisites: string[]\n /** Typical next tools after this one succeeds. */\n followUp: string[]\n inputSchema: McpJsonSchema\n outputSchema: McpJsonSchema\n handler: McpToolHandler\n}\n\nfunction paramProperties(\n params: Record<string, ParamDoc>,\n includeCommon: Array<keyof typeof EVM_COMMON_PARAM_DOCS> = [],\n): Record<string, McpSchemaProperty> {\n const out: Record<string, McpSchemaProperty> = {}\n for (const k of includeCommon) {\n const d = EVM_COMMON_PARAM_DOCS[k]\n if (d) out[k] = { type: d.type, description: d.description }\n }\n for (const [k, d] of Object.entries(params)) {\n out[k] = { type: d.type, description: d.description }\n }\n return out\n}\n\nfunction requiredKeys(\n params: Record<string, ParamDoc>,\n includeCommon: Array<keyof typeof EVM_COMMON_PARAM_DOCS> = [],\n): string[] {\n const req: string[] = []\n for (const k of includeCommon) {\n if (EVM_COMMON_PARAM_DOCS[k]?.required) req.push(k)\n }\n for (const [k, d] of Object.entries(params)) {\n if (d.required) req.push(k)\n }\n return req\n}\n\nconst multisignOutputSchema: McpJsonSchema = {\n type: 'object',\n description: MULTISIGN_OUTPUT_DOC.description,\n properties: {\n bodyForSign: {\n type: 'object',\n description: MULTISIGN_OUTPUT_DOC.fields.bodyForSign.description,\n },\n messageToSign: {\n type: 'string',\n description: MULTISIGN_OUTPUT_DOC.fields.messageToSign.description,\n },\n },\n required: ['bodyForSign', 'messageToSign'],\n}\n\n/** Curated MCP tools with rich descriptions — use this to register MCP server tools. */\nexport const MCP_TOOL_DEFINITIONS: McpToolDefinition[] = [\n {\n name: 'ctm_uniswap_v4_quote',\n actionId: 'uniswap-v4.quote',\n protocolId: 'uniswap-v4',\n chainCategory: 'evm',\n description:\n 'Fetch a Uniswap V4 Trade API quote (POST /v1/quote). Returns classic quote JSON including quote.input/output amounts and routing. Does NOT create a sign request — use ctm_uniswap_v4_create_swap and ctm_uniswap_v4_build_swap_multisign after quoting. Requires uniswapApiKey and swapper (MPC executor address) or keyGen + managementNodeUrl to resolve swapper.',\n prerequisites: ['Chain must be supported by Uniswap V4 (Universal Router map).'],\n followUp: ['ctm_uniswap_v4_create_swap', 'ctm_uniswap_v4_build_swap_multisign'],\n handler: { importPath: 'protocols/evm/uniswap-v4', exportName: 'uniswapTradeQuote' },\n inputSchema: {\n type: 'object',\n properties: paramProperties({\n type: { type: 'string', required: true, description: 'EXACT_INPUT or EXACT_OUTPUT' },\n amount: { type: 'string', required: true, description: 'Amount in token-in base units (wei string for ERC-20)' },\n tokenIn: { type: 'address', required: true, description: 'Input token; 0x0 for native ETH' },\n tokenOut: { type: 'address', required: true, description: 'Output token address' },\n chainId: { type: 'number', required: true, description: 'tokenInChainId / same-chain default' },\n uniswapApiKey: { type: 'string', required: true, description: 'Uniswap Trade API x-api-key' },\n swapper: { type: 'address', required: false, description: 'MPC executor; omit if keyGen + managementNodeUrl provided' },\n slippage: { type: 'number', required: false, description: 'Slippage percent; omit for API auto slippage' },\n }),\n required: requiredKeys({\n type: { type: 'string', required: true, description: '' },\n amount: { type: 'string', required: true, description: '' },\n tokenIn: { type: 'address', required: true, description: '' },\n tokenOut: { type: 'address', required: true, description: '' },\n chainId: { type: 'number', required: true, description: '' },\n uniswapApiKey: { type: 'string', required: true, description: '' },\n }),\n },\n outputSchema: {\n type: 'object',\n description: 'Full Uniswap POST /quote JSON (includes nested quote object with input/output amounts).',\n },\n },\n {\n name: 'ctm_uniswap_v4_create_swap',\n actionId: 'uniswap-v4.create-swap',\n protocolId: 'uniswap-v4',\n chainCategory: 'evm',\n description:\n 'Call Uniswap Trade API POST /v1/swap to build Universal Router calldata from a prior quote. Returns { swap: { to, data, value, gasLimit? }, requestId? }. Does NOT produce a multiSignRequest — call ctm_uniswap_v4_build_swap_multisign next.',\n prerequisites: ['ctm_uniswap_v4_quote output (fullQuoteFromPermit)'],\n followUp: ['ctm_uniswap_v4_build_swap_multisign'],\n handler: { importPath: 'protocols/evm/uniswap-v4', exportName: 'uniswapCreateSwap' },\n inputSchema: {\n type: 'object',\n properties: paramProperties({\n uniswapApiKey: { type: 'string', required: true, description: 'Uniswap Trade API key' },\n fullQuoteFromPermit: { type: 'object', required: true, description: 'Full quote JSON from ctm_uniswap_v4_quote' },\n swapTransactionDeadlineUnix: {\n type: 'number',\n required: false,\n description: 'On-chain deadline unix seconds; default ~30 min from now',\n },\n useServerProxy: {\n type: 'boolean',\n required: false,\n description: 'Set false in Node/agents; true only in browser via Next API route',\n },\n }),\n required: requiredKeys({\n uniswapApiKey: { type: 'string', required: true, description: '' },\n fullQuoteFromPermit: { type: 'object', required: true, description: '' },\n }),\n },\n outputSchema: {\n type: 'object',\n description: '{ swap: TransactionRequest, requestId?, gasFee? }',\n },\n },\n {\n name: 'ctm_uniswap_v4_build_swap_multisign',\n actionId: 'uniswap-v4.swap-exact-input',\n protocolId: 'uniswap-v4',\n chainCategory: 'evm',\n description:\n 'Build mpc-auth multiSignRequest body for a Uniswap V4 swap. May batch 1–3 EVM txs: ERC-20 approve(s) to Permit2/router path + Universal Router swap (or 1 tx for native-in). Estimates gas, serializes unsigned txs, sets proposalTxParams. Output must be signed and POSTed to /multiSignRequest by the caller.',\n prerequisites: [\n 'ctm_uniswap_v4_create_swap output',\n 'keyGen with pubkeyhex',\n 'executorAddress matching MPC wallet',\n 'RPC URL and chainDetail from node chain config',\n ],\n followUp: ['Sign messageToSign', 'POST /multiSignRequest with clientSig'],\n handler: { importPath: 'protocols/evm/uniswap-v4', exportName: 'buildEvmMultisignBodyUniswapV4SkipPermit2Batch' },\n inputSchema: {\n type: 'object',\n properties: paramProperties(\n {\n tokenIn: { type: 'address', required: true, description: 'Token in; 0x0 for native ETH' },\n swap: { type: 'object', required: true, description: 'swap field from create_swap response' },\n createSwapResponse: { type: 'object', required: true, description: 'Full create_swap response' },\n fullQuoteSnapshot: { type: 'object', required: true, description: 'Quote JSON used for the swap' },\n swapDeadlineUnix: { type: 'number', required: true, description: 'Same deadline passed to create_swap' },\n slippagePercent: { type: 'number', required: false, description: 'Extra approve headroom for EXACT_OUTPUT' },\n },\n ['keyGen', 'purposeText', 'useCustomGas', 'chainId', 'rpcUrl', 'executorAddress', 'chainDetail', 'customGasChainDetails'],\n ),\n required: requiredKeys(\n {\n tokenIn: { type: 'address', required: true, description: '' },\n swap: { type: 'object', required: true, description: '' },\n createSwapResponse: { type: 'object', required: true, description: '' },\n fullQuoteSnapshot: { type: 'object', required: true, description: '' },\n swapDeadlineUnix: { type: 'number', required: true, description: '' },\n },\n ['keyGen', 'purposeText', 'useCustomGas', 'chainId', 'rpcUrl', 'executorAddress', 'chainDetail'],\n ),\n },\n outputSchema: multisignOutputSchema,\n },\n {\n name: 'ctm_curve_dao_build_swap_multisign',\n actionId: 'curve-dao.swap',\n protocolId: 'curve-dao',\n chainCategory: 'evm',\n description:\n 'Build mpc-auth multiSignRequest for a Curve Router NG swap via @curvefi/api populateSwap. Optionally batches ERC-20 approve txs when allowance is insufficient, then exchange. Requires JSON-RPC and Curve-supported chain.',\n prerequisites: ['keyGen', 'executorAddress', 'tokenIn/tokenOut/amountHuman/slippage', 'RPC URL'],\n followUp: ['Sign messageToSign', 'POST /multiSignRequest'],\n handler: { importPath: 'protocols/evm/curve-dao', exportName: 'buildEvmMultisignBodyCurveDaoBatch' },\n inputSchema: {\n type: 'object',\n properties: paramProperties(\n {\n tokenIn: { type: 'address', required: true, description: 'ERC-20 sold (native in uses WETH path in UI)' },\n tokenOut: { type: 'string', required: true, description: 'Output token or 0xeeee… native placeholder' },\n amountHuman: { type: 'string', required: true, description: 'Human-readable amount of tokenIn' },\n slippagePercent: { type: 'number', required: true, description: 'Slippage 0–100 exclusive' },\n },\n ['keyGen', 'purposeText', 'useCustomGas', 'chainId', 'rpcUrl', 'executorAddress', 'chainDetail', 'customGasChainDetails'],\n ),\n required: requiredKeys(\n {\n tokenIn: { type: 'address', required: true, description: '' },\n tokenOut: { type: 'string', required: true, description: '' },\n amountHuman: { type: 'string', required: true, description: '' },\n slippagePercent: { type: 'number', required: true, description: '' },\n },\n ['keyGen', 'purposeText', 'useCustomGas', 'chainId', 'rpcUrl', 'executorAddress', 'chainDetail'],\n ),\n },\n outputSchema: multisignOutputSchema,\n },\n]\n\nexport function getMcpToolDefinitions(): readonly McpToolDefinition[] {\n return MCP_TOOL_DEFINITIONS\n}\n\nexport function getMcpToolByName(name: string): McpToolDefinition | undefined {\n return MCP_TOOL_DEFINITIONS.find((t) => t.name === name)\n}\n\n/** Summary from protocol registry (shorter) plus full MCP tool list. */\nexport function getAgentCatalogForMcp() {\n return {\n tools: MCP_TOOL_DEFINITIONS,\n protocols: getProtocolModules(),\n commonParams: EVM_COMMON_PARAM_DOCS,\n multisignOutput: MULTISIGN_OUTPUT_DOC,\n workflow: {\n evmSwapTypical: [\n '1. Quote (protocol-specific API if needed)',\n '2. Build protocol calldata (e.g. create_swap)',\n '3. build_*_multisign → { bodyForSign, messageToSign }',\n '4. Sign messageToSign (MetaMask or Ed25519)',\n '5. POST /multiSignRequest with clientSig and signedMessage',\n ],\n },\n }\n}\n","import { getProtocolModules, getActionsByChainCategory, registerProtocolModule } from '../core/registry.js'\nimport { uniswapV4ProtocolModule } from '../protocols/evm/uniswap-v4/index.js'\nimport { curveDaoProtocolModule } from '../protocols/evm/curve-dao/index.js'\nimport { getAgentCatalogForMcp } from './mcpTools.js'\n\nexport {\n getMcpToolDefinitions,\n getMcpToolByName,\n getAgentCatalogForMcp,\n MCP_TOOL_DEFINITIONS,\n} from './mcpTools.js'\nexport { EVM_COMMON_PARAM_DOCS, MULTISIGN_OUTPUT_DOC } from './commonParamDocs.js'\n\nregisterProtocolModule(uniswapV4ProtocolModule)\nregisterProtocolModule(curveDaoProtocolModule)\n\n/** Machine-readable catalog of protocol actions grouped by chain category. */\nexport function getAgentCatalog() {\n return {\n protocols: getProtocolModules(),\n byCategory: {\n evm: getActionsByChainCategory('evm'),\n solana: getActionsByChainCategory('solana'),\n near: getActionsByChainCategory('near'),\n },\n uniswapV4: uniswapV4ProtocolModule,\n curveDao: curveDaoProtocolModule,\n /** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */\n mcp: getAgentCatalogForMcp(),\n }\n}\n\nexport { getProtocolModules, getActionsByChainCategory }\n"]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { C as ChainCategory, d as ProtocolModule, P as ParamDoc, c as ProtocolActionDescriptor } from '../types-Ce2qNHai.cjs';
|
|
2
|
+
export { g as getActionsByChainCategory, b as getProtocolModules } from '../registry-BwZoE668.cjs';
|
|
3
|
+
|
|
4
|
+
/** JSON-schema-like object for MCP tool `inputSchema` / `outputSchema`. */
|
|
5
|
+
type McpSchemaProperty = {
|
|
6
|
+
type: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
};
|
|
9
|
+
type McpJsonSchema = {
|
|
10
|
+
type: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
properties?: Record<string, McpSchemaProperty>;
|
|
13
|
+
required?: string[];
|
|
14
|
+
items?: McpJsonSchema;
|
|
15
|
+
enum?: string[];
|
|
16
|
+
};
|
|
17
|
+
type McpToolHandler = {
|
|
18
|
+
/** Import path subpath, e.g. protocols/evm/uniswap-v4 */
|
|
19
|
+
importPath: string;
|
|
20
|
+
/** Named export to invoke */
|
|
21
|
+
exportName: string;
|
|
22
|
+
};
|
|
23
|
+
type McpToolDefinition = {
|
|
24
|
+
/** Stable MCP tool name (snake_case). */
|
|
25
|
+
name: string;
|
|
26
|
+
/** Registry action id, e.g. uniswap-v4.quote */
|
|
27
|
+
actionId: string;
|
|
28
|
+
protocolId: string;
|
|
29
|
+
chainCategory: ChainCategory;
|
|
30
|
+
/** Long description for the LLM — what it does, when to use it, what it does NOT do. */
|
|
31
|
+
description: string;
|
|
32
|
+
/** Prerequisites (other tools or data that must exist first). */
|
|
33
|
+
prerequisites: string[];
|
|
34
|
+
/** Typical next tools after this one succeeds. */
|
|
35
|
+
followUp: string[];
|
|
36
|
+
inputSchema: McpJsonSchema;
|
|
37
|
+
outputSchema: McpJsonSchema;
|
|
38
|
+
handler: McpToolHandler;
|
|
39
|
+
};
|
|
40
|
+
/** Curated MCP tools with rich descriptions — use this to register MCP server tools. */
|
|
41
|
+
declare const MCP_TOOL_DEFINITIONS: McpToolDefinition[];
|
|
42
|
+
declare function getMcpToolDefinitions(): readonly McpToolDefinition[];
|
|
43
|
+
declare function getMcpToolByName(name: string): McpToolDefinition | undefined;
|
|
44
|
+
/** Summary from protocol registry (shorter) plus full MCP tool list. */
|
|
45
|
+
declare function getAgentCatalogForMcp(): {
|
|
46
|
+
tools: McpToolDefinition[];
|
|
47
|
+
protocols: readonly ProtocolModule[];
|
|
48
|
+
commonParams: Record<string, ParamDoc>;
|
|
49
|
+
multisignOutput: {
|
|
50
|
+
readonly description: "Unsigned mpc-auth multiSignRequest payload. The caller must sign messageToSign (MetaMask personal_sign or Ed25519) and POST { ...bodyForSign, clientSig, signedMessage: messageToSign } to /multiSignRequest.";
|
|
51
|
+
readonly fields: {
|
|
52
|
+
readonly bodyForSign: {
|
|
53
|
+
readonly type: "object";
|
|
54
|
+
readonly description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs.";
|
|
55
|
+
};
|
|
56
|
+
readonly messageToSign: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly description: "JSON.stringify(bodyForSign) — exact string to sign before adding clientSig.";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
workflow: {
|
|
63
|
+
evmSwapTypical: string[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** Shared inputs documented once for all EVM multisign builders. */
|
|
68
|
+
declare const EVM_COMMON_PARAM_DOCS: Record<string, ParamDoc>;
|
|
69
|
+
declare const MULTISIGN_OUTPUT_DOC: {
|
|
70
|
+
readonly description: "Unsigned mpc-auth multiSignRequest payload. The caller must sign messageToSign (MetaMask personal_sign or Ed25519) and POST { ...bodyForSign, clientSig, signedMessage: messageToSign } to /multiSignRequest.";
|
|
71
|
+
readonly fields: {
|
|
72
|
+
readonly bodyForSign: {
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs.";
|
|
75
|
+
};
|
|
76
|
+
readonly messageToSign: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly description: "JSON.stringify(bodyForSign) — exact string to sign before adding clientSig.";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** Machine-readable catalog of protocol actions grouped by chain category. */
|
|
84
|
+
declare function getAgentCatalog(): {
|
|
85
|
+
protocols: readonly ProtocolModule[];
|
|
86
|
+
byCategory: {
|
|
87
|
+
evm: ProtocolActionDescriptor[];
|
|
88
|
+
solana: ProtocolActionDescriptor[];
|
|
89
|
+
near: ProtocolActionDescriptor[];
|
|
90
|
+
};
|
|
91
|
+
uniswapV4: ProtocolModule;
|
|
92
|
+
curveDao: ProtocolModule;
|
|
93
|
+
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
94
|
+
mcp: {
|
|
95
|
+
tools: McpToolDefinition[];
|
|
96
|
+
protocols: readonly ProtocolModule[];
|
|
97
|
+
commonParams: Record<string, ParamDoc>;
|
|
98
|
+
multisignOutput: {
|
|
99
|
+
readonly description: "Unsigned mpc-auth multiSignRequest payload. The caller must sign messageToSign (MetaMask personal_sign or Ed25519) and POST { ...bodyForSign, clientSig, signedMessage: messageToSign } to /multiSignRequest.";
|
|
100
|
+
readonly fields: {
|
|
101
|
+
readonly bodyForSign: {
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs.";
|
|
104
|
+
};
|
|
105
|
+
readonly messageToSign: {
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
readonly description: "JSON.stringify(bodyForSign) — exact string to sign before adding clientSig.";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
workflow: {
|
|
112
|
+
evmSwapTypical: string[];
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export { EVM_COMMON_PARAM_DOCS, MCP_TOOL_DEFINITIONS, MULTISIGN_OUTPUT_DOC, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { C as ChainCategory, d as ProtocolModule, P as ParamDoc, c as ProtocolActionDescriptor } from '../types-Ce2qNHai.js';
|
|
2
|
+
export { g as getActionsByChainCategory, b as getProtocolModules } from '../registry-oMKlO_5z.js';
|
|
3
|
+
|
|
4
|
+
/** JSON-schema-like object for MCP tool `inputSchema` / `outputSchema`. */
|
|
5
|
+
type McpSchemaProperty = {
|
|
6
|
+
type: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
};
|
|
9
|
+
type McpJsonSchema = {
|
|
10
|
+
type: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
properties?: Record<string, McpSchemaProperty>;
|
|
13
|
+
required?: string[];
|
|
14
|
+
items?: McpJsonSchema;
|
|
15
|
+
enum?: string[];
|
|
16
|
+
};
|
|
17
|
+
type McpToolHandler = {
|
|
18
|
+
/** Import path subpath, e.g. protocols/evm/uniswap-v4 */
|
|
19
|
+
importPath: string;
|
|
20
|
+
/** Named export to invoke */
|
|
21
|
+
exportName: string;
|
|
22
|
+
};
|
|
23
|
+
type McpToolDefinition = {
|
|
24
|
+
/** Stable MCP tool name (snake_case). */
|
|
25
|
+
name: string;
|
|
26
|
+
/** Registry action id, e.g. uniswap-v4.quote */
|
|
27
|
+
actionId: string;
|
|
28
|
+
protocolId: string;
|
|
29
|
+
chainCategory: ChainCategory;
|
|
30
|
+
/** Long description for the LLM — what it does, when to use it, what it does NOT do. */
|
|
31
|
+
description: string;
|
|
32
|
+
/** Prerequisites (other tools or data that must exist first). */
|
|
33
|
+
prerequisites: string[];
|
|
34
|
+
/** Typical next tools after this one succeeds. */
|
|
35
|
+
followUp: string[];
|
|
36
|
+
inputSchema: McpJsonSchema;
|
|
37
|
+
outputSchema: McpJsonSchema;
|
|
38
|
+
handler: McpToolHandler;
|
|
39
|
+
};
|
|
40
|
+
/** Curated MCP tools with rich descriptions — use this to register MCP server tools. */
|
|
41
|
+
declare const MCP_TOOL_DEFINITIONS: McpToolDefinition[];
|
|
42
|
+
declare function getMcpToolDefinitions(): readonly McpToolDefinition[];
|
|
43
|
+
declare function getMcpToolByName(name: string): McpToolDefinition | undefined;
|
|
44
|
+
/** Summary from protocol registry (shorter) plus full MCP tool list. */
|
|
45
|
+
declare function getAgentCatalogForMcp(): {
|
|
46
|
+
tools: McpToolDefinition[];
|
|
47
|
+
protocols: readonly ProtocolModule[];
|
|
48
|
+
commonParams: Record<string, ParamDoc>;
|
|
49
|
+
multisignOutput: {
|
|
50
|
+
readonly description: "Unsigned mpc-auth multiSignRequest payload. The caller must sign messageToSign (MetaMask personal_sign or Ed25519) and POST { ...bodyForSign, clientSig, signedMessage: messageToSign } to /multiSignRequest.";
|
|
51
|
+
readonly fields: {
|
|
52
|
+
readonly bodyForSign: {
|
|
53
|
+
readonly type: "object";
|
|
54
|
+
readonly description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs.";
|
|
55
|
+
};
|
|
56
|
+
readonly messageToSign: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly description: "JSON.stringify(bodyForSign) — exact string to sign before adding clientSig.";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
workflow: {
|
|
63
|
+
evmSwapTypical: string[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** Shared inputs documented once for all EVM multisign builders. */
|
|
68
|
+
declare const EVM_COMMON_PARAM_DOCS: Record<string, ParamDoc>;
|
|
69
|
+
declare const MULTISIGN_OUTPUT_DOC: {
|
|
70
|
+
readonly description: "Unsigned mpc-auth multiSignRequest payload. The caller must sign messageToSign (MetaMask personal_sign or Ed25519) and POST { ...bodyForSign, clientSig, signedMessage: messageToSign } to /multiSignRequest.";
|
|
71
|
+
readonly fields: {
|
|
72
|
+
readonly bodyForSign: {
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs.";
|
|
75
|
+
};
|
|
76
|
+
readonly messageToSign: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly description: "JSON.stringify(bodyForSign) — exact string to sign before adding clientSig.";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** Machine-readable catalog of protocol actions grouped by chain category. */
|
|
84
|
+
declare function getAgentCatalog(): {
|
|
85
|
+
protocols: readonly ProtocolModule[];
|
|
86
|
+
byCategory: {
|
|
87
|
+
evm: ProtocolActionDescriptor[];
|
|
88
|
+
solana: ProtocolActionDescriptor[];
|
|
89
|
+
near: ProtocolActionDescriptor[];
|
|
90
|
+
};
|
|
91
|
+
uniswapV4: ProtocolModule;
|
|
92
|
+
curveDao: ProtocolModule;
|
|
93
|
+
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
94
|
+
mcp: {
|
|
95
|
+
tools: McpToolDefinition[];
|
|
96
|
+
protocols: readonly ProtocolModule[];
|
|
97
|
+
commonParams: Record<string, ParamDoc>;
|
|
98
|
+
multisignOutput: {
|
|
99
|
+
readonly description: "Unsigned mpc-auth multiSignRequest payload. The caller must sign messageToSign (MetaMask personal_sign or Ed25519) and POST { ...bodyForSign, clientSig, signedMessage: messageToSign } to /multiSignRequest.";
|
|
100
|
+
readonly fields: {
|
|
101
|
+
readonly bodyForSign: {
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs.";
|
|
104
|
+
};
|
|
105
|
+
readonly messageToSign: {
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
readonly description: "JSON.stringify(bodyForSign) — exact string to sign before adding clientSig.";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
workflow: {
|
|
112
|
+
evmSwapTypical: string[];
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export { EVM_COMMON_PARAM_DOCS, MCP_TOOL_DEFINITIONS, MULTISIGN_OUTPUT_DOC, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions };
|