@canton-network/core-signing-lib

中文文档
1.17.0发布于 2026/11/06Apache-2.0TypeScriptESM + CJS近 30 天下载 32.9万

Core library for signing driver implementations

原始使用文档

signing-lib

This library provides:

export interface SigningDriverInterface {
    partyMode: PartyMode
    signingProvider: SigningProvider
    controller: (authContext: AuthContext | undefined) => Methods
}

The controller function should be an implementation of buildController from ./src/rpc-gen/index.ts which takes an optional AuthContext.

To see a simple example of a signing driver, see core/signing-internal.

Data Encodings

When implementing a signing driver, note that the Wallet Gateway expects all keys and signatures to be base64-encoded. If the signing provider represents keys in some other format (i.e. hex-encoded strings), then the driver is responsible for converting between the formats. This provides a consistent and predictible interface to the Wallet Gateway.

Important Note

Other than the optional internalTxId parameter in signTransaction, ALL instances of txId refer to the TransactionID given by the signing provider, not the Wallet Gateway.

While some signing providers allow an external transaction to be stored with the transaction, this cannot be relied upon, therefore in order to lookup specific transactions, the Wallet Gateway must store and use the transaction ID given by the signing provider (which is returned by the signTransaction method).

版本与发布记录

@canton-network/core-signing-lib 共发布 73 个版本,首次发布于 2025/08/29;过去 12 个月发布了 58 个版本。

版本发布日期距今
1.17.0latest2026/11/063 天前
1.16.02026/10/2910 天前
1.12.1-backport.3bugfix2026/10/2613 天前
1.15.02026/10/2317 天前
1.14.02026/10/1227 天前
1.12.1-backport.12026/10/031 个月前

关于 @canton-network/core-signing-lib 的常见问题

@canton-network/core-signing-lib 是什么?

Core library for signing driver implementations

如何安装 @canton-network/core-signing-lib?

在项目目录运行 npm install @canton-network/core-signing-lib,或使用 pnpm add / yarn add / bun add。

@canton-network/core-signing-lib 支持 TypeScript 吗?

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

@canton-network/core-signing-lib 支持 ESM 还是 CommonJS?

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

@canton-network/core-signing-lib 可以商用吗?

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

@canton-network/core-signing-lib 的下载量有多少?

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

@canton-network/core-signing-lib 还在维护吗?

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