@continuumdao/ctm-mpc-defi

中文文档
0.2.65发布于 2026/11/06BUSL-1.1TypeScriptESM + CJS近 30 天下载 2178

Continuum MPC DeFi protocol library — multiSignRequest builders for EVM and future chain categories

原始使用文档
文档目录6 节
  1. Architecture
  2. Install
  3. Package exports
  4. Protocol example (Uniswap V4)
  5. MCP servers
  6. Development

@continuumdao/ctm-mpc-defi

Continuum MPC DeFi protocol library — builds multiSignRequest payloads for EVM (and future chain categories). Bundled into the continuum-mcp-server Docker image; linked locally via file:../ctm-mpc-defi.

License: Business Source License 1.1 (ContinuumDAO). Converts to GPL-3.0-or-later on 2030-01-01.

Architecture

LayerPathRole
Coresrc/core/Purpose text, mpc-auth envelope, protocol registry
Chain categoriessrc/chains/<category>/EVM batch builder; Solana/NEAR stubs
Protocolssrc/protocols/<category>/<name>/DeFi actions (Uniswap V4, Curve DAO, …)
Agentsrc/agent/MCP tool catalog, SKILL.md, support advisors

Management reads, fee helpers, and client-sign utilities live in @continuumdao/continuum-node-sdk — import those from the SDK, not from this package.

Install

This package is published to npm for production deploys (e.g. Railway). For local development against unreleased changes, use a file: link:

"@continuumdao/ctm-mpc-defi": "file:../ctm-mpc-defi"

Run npm run build in this repo after changes so dist/ is up to date before linking.

Package exports

  • @continuumdao/ctm-mpc-defi — registry + protocol modules
  • @continuumdao/ctm-mpc-defi/core — envelope, registry, KeyGenSubset, firstClientIdFromKeyGen
  • @continuumdao/ctm-mpc-defi/chains/evm — buildEvmMultisignBatch, chain helpers
  • @continuumdao/ctm-mpc-defi/protocols/evm/<protocol> — per-protocol builders
  • @continuumdao/ctm-mpc-defi/agent — MCP tool catalog and SKILL.md paths

Protocol example (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 servers

Use the agent export for tool registration and discovery:

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
}

Each MCP tool includes descriptions, Zod-derived JSON schemas, prerequisites/followUp hints, and a handler pointing at the library export. The continuum-node-sdk MCP server enriches slim inputs (keyGenId, chainId) before calling builders.

Development

npm install
npm run build
npm test
npm run typecheck

版本与发布记录

@continuumdao/ctm-mpc-defi 共发布 64 个版本,首次发布于 2026/05/23;过去 12 个月发布了 64 个版本。

版本发布日期距今
0.2.65latest2026/11/065 天前
0.2.642026/11/055 天前
0.2.632026/10/2813 天前
0.2.622026/10/2715 天前
0.2.612026/10/2715 天前
0.2.602026/10/2121 天前

关于 @continuumdao/ctm-mpc-defi 的常见问题

@continuumdao/ctm-mpc-defi 是什么?

Continuum MPC DeFi protocol library — multiSignRequest builders for EVM and future chain categories

如何安装 @continuumdao/ctm-mpc-defi?

在项目目录运行 npm install @continuumdao/ctm-mpc-defi,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:viem(^2.46.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@continuumdao/ctm-mpc-defi 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@continuumdao/ctm-mpc-defi 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@continuumdao/ctm-mpc-defi 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.23.4 || ^24.22.1 || >=26.12.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@continuumdao/ctm-mpc-defi 可以商用吗?

@continuumdao/ctm-mpc-defi 使用 BUSL-1.1 许可。声明的许可为 BUSL-1.1,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@continuumdao/ctm-mpc-defi 的下载量有多少?

根据 npm 官方下载统计,@continuumdao/ctm-mpc-defi 在 2026/10/11 – 2026/11/09 这 30 天内被下载 2,178 次,日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@continuumdao/ctm-mpc-defi 还在维护吗?

最新版本 0.2.65 发布于 2026/11/06(5 天前);至今共发布 64 个版本,其中过去 12 个月发布了 64 个;首次发布于 2026/05/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。