@ continuumdao/ctm-mpc-defi
Continum MPC DeFi 协议库 — 正在建设 多签名请求 eVM(和未来链类)的有效载荷。 被捆绑在 连续 mcp 服务器 Docker 图像; 通过本地链接 file:../ctm-mpc-defi。 。 。 .
许可证 : 业务来源许可证1.1 (续通达. 于2030-01-01转换为GPL-3.0-后期.
建筑
| 层 | 路径 | 作用 |
|---|---|---|
| 核心 | src/core/ | 目的文本、mpc-auth信封、协议登记处 |
| 链类 | src/chains/<category>/ | EVM分批建设器;Solana/NEAR分机 |
| 议定书 | src/protocols/<category>/<name>/ | DeFi 动作( Uniswap V4, Curve DAO,...) |
| 探员 | src/agent/ | MCP工具目录,SKILL.md,支助顾问 |
管理阅读、收费助手和客户签名公用事业 @continuumdao/continuum-node-sdk ——从SDK导入,而不是从这个包中导入.
安装
这个包被发布到npm,用于生产部署(例如铁路). 对于地方发展与未释放的变化,使用a file: 链接 :
"@continuumdao/ctm-mpc-defi": "file:../ctm-mpc-defi"
运行 npm run build 更改后在此重播 dist/ 在链接前更新.
软件包出口
@continuumdao/ctm-mpc-defi登记+协议模块@continuumdao/ctm-mpc-defi/core信封、登记册、,KeyGenSubset, (中文(简体) ),firstClientIdFromKeyGen@continuumdao/ctm-mpc-defi/chains/evm—— 说buildEvmMultisignBatch,链式帮助@continuumdao/ctm-mpc-defi/protocols/evm/<protocol>——每个议定书建造者@continuumdao/ctm-mpc-defi/agent– MCP 工具目录和 SKILL.md 路径
协议实例(Uniswap V4)
import { uniswapV4 } from '@continuumdao/ctm-mpc-defi/protocols/evm/uniswap-v4'
const quote = await uniswapV4.quote({ /* … */ })
const { bodyForSign, messageToSign } = await uniswapV4.buildSwapMultisignBody({ /* … */ })
// Sign messageToSign, POST { ...bodyForSign, clientSig, signedMessage }
MCP 服务器
使用代理导出工具注册和发现 :
import { getMcpToolDefinitions, getAgentCatalogForMcp } from '@continuumdao/ctm-mpc-defi/agent'
for (const tool of getMcpToolDefinitions()) {
// Register tool.name, tool.description, tool.inputSchema, tool.outputSchema
// Invoke via tool.handler.importPath + exportName
}
每个MCP工具包括描述,Zod-衍生出JSON schemas,先决条件/跟随提示,以及指向库导的处理器. 连续节点-sdk MCP 服务器丰富了微小的输入(keyGenId, (中文(简体) ), chainId),在召唤建筑师之前.
发展
npm install
npm run build
npm test
npm run typecheck