@canton-network/tool-conformance-cli

中文文档
1.2.0发布于 2026/10/12Apache-2.0TypeScriptES Module近 30 天下载 4640

CLI and Playwright harness for the CIP-103 conformance dApp

原始使用文档
文档目录5 节
  1. Quick Start
  2. Headless / CI
  3. Configuration
  4. Signed Reports
  5. Development

CIP-103 Conformance CLI

Runs the CIP-103 conformance suite against a wallet and exports a CTRF report, optionally signed. Test cases live in the conformance dApp; hooks for automating wallet approvals live in @canton-network/core-provider-conformance.

Quick Start

Requires Node 24 or newer.

npm install @canton-network/tool-conformance-cli
npx conformance-cli serve

Open the printed URL (default http://127.0.0.1:8082), choose a provider and wrapper, and select Run suite. By default you'll have to perform each requested action in your wallet, then select Action completed. Download the report when the run finishes.

Use disposable test wallets and credentials. Approving the transaction case creates a real Ping contract, so the ledger must have #canton-builtin-admin-workflow-ping:Canton.Internal.Ping:Ping available.

Headless / CI

npx playwright install chromium
npx conformance-cli run --config conformance.config.json

Failed or incomplete runs exit with code 1. See npx conformance-cli --help for all commands (serve, run, sign, verify).

Configuration

All commands read an optional JSON config file passed via --config, with one section per command. Relative paths resolve from the config file's directory. The run.suite section uses the same format as the browser app's configuration editor; see ConfigSchema in src/config.ts for all options.

{
    "run": {
        "suite": {
            "provider": {
                "type": "remote",
                "url": "http://localhost:3030/api/v0/dapp"
            },
            "wrapper": { "type": "manual" },
            "disabledTests": []
        },
        "headed": true,
        "out": "./result.json",
        "signingKey": "./tester.pem"
    }
}
  • provider.type: picker (interactive SDK wallet picker), remote (url), or extension (target). Use remote or extension for unattended runs.
  • wrapper.type: manual (requires run.headed: true), window, or webhook (url). See core-provider-conformance for how a wallet answers window/webhook interactions.
  • run.extension: path to an unpacked extension to load.

Signed Reports

Reports can be signed with an Ed25519 key file (run.signingKey or the sign command) or with a wallet (Sign with wallet in the UI), and checked with verify. Signatures are detached: the report is never modified, and a separate <report>.sig JSON file carries the algorithm, the SHA-256 digest of the report file, the signature over that hex digest string, and optional signer metadata.

Reports downloaded with diagnostics are not covered by the signature and may contain sensitive data.

Development

See docs/CONTRIBUTING.md for environment setup.

pnpm exec nx run @canton-network/tool-conformance-cli:build
pnpm exec nx run @canton-network/tool-conformance-cli:test

版本与发布记录

@canton-network/tool-conformance-cli 共发布 2 个版本,首次发布于 2026/09/30;过去 12 个月发布了 2 个版本。

版本发布日期距今
1.2.0latest2026/10/1227 天前
1.1.02026/09/301 个月前

关于 @canton-network/tool-conformance-cli 的常见问题

@canton-network/tool-conformance-cli 是什么?

CLI and Playwright harness for the CIP-103 conformance dApp

如何安装 @canton-network/tool-conformance-cli?

在项目目录运行 npm install @canton-network/tool-conformance-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 conformance-cli,可以用 npx conformance-cli 直接运行。

@canton-network/tool-conformance-cli 支持 TypeScript 吗?

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

@canton-network/tool-conformance-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@canton-network/tool-conformance-cli 可以商用吗?

@canton-network/tool-conformance-cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@canton-network/tool-conformance-cli 的下载量有多少?

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

@canton-network/tool-conformance-cli 还在维护吗?

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