@canton-network/core-signing-blockdaemon

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

Wallet Gateway signing driver for Blockdaemon

原始使用文档
文档目录8 节
  1. Installation
  2. Usage
  3. Initialization
  4. Features
  5. Integration
  6. Configuration
  7. Wallet Gateway Configuration
  8. License

@canton-network/core-signing-blockdaemon

This package provides a signing driver for integrating the Wallet Gateway with Blockdaemon. It implements the SigningDriverInterface defined in @canton-network/core-signing-lib, allowing the Wallet Gateway to manage keys and sign transactions using Blockdaemon's infrastructure.

Installation

This package is part of the Wallet Gateway monorepo and is typically installed as a workspace dependency.

pnpm add @canton-network/core-signing-blockdaemon

Usage

The BlockdaemonSigningDriver is designed to be used within the Wallet Gateway's signing architecture. It requires a configuration object containing the baseUrl and apiKey for the Blockdaemon service.

Initialization

import BlockdaemonSigningDriver, {
    BlockdaemonConfig,
} from '@canton-network/core-signing-blockdaemon'

const config: BlockdaemonConfig = {
    baseUrl: 'https://api.blockdaemon.com/...', // Replace with actual Blockdaemon API URL
    apiKey: 'your-api-key',
}

const driver = new BlockdaemonSigningDriver(config)

Features

The driver supports the following operations:

  • Key Management:
    • createKey: Creates a new key pair on Blockdaemon.
    • getKeys: Retrieves a list of available keys.
  • Signing:
    • signTransaction: Signs a transaction using a specified key.
  • Transaction Monitoring:
    • getTransaction: Retrieves the status and details of a specific transaction.
    • getTransactions: Retrieves a list of transactions based on transaction IDs or public keys.
  • Configuration:
    • getConfiguration: Returns the current configuration (masking sensitive secrets).
    • setConfiguration: Updates the driver's configuration at runtime.

Integration

This driver is intended to be registered with the SigningController in the Wallet Gateway, which manages multiple signing providers.

// Example integration (conceptual)
import { SigningController } from '@canton-network/core-signing-internal' // or similar

const signingController = new SigningController()
signingController.registerDriver(driver)

Configuration

The driver accepts a BlockdaemonConfig object:

PropertyTypeDescription
baseUrlstringThe base URL for the Blockdaemon Signing API.
apiKeystringThe API key for authentication.

Wallet Gateway Configuration

When running the Wallet Gateway (Remote), configure non-secret settings in the Gateway config. Listing blockdaemon under signingProviders opts the provider in:

  • signingProviders.blockdaemon.baseUrl: The base URL for the Blockdaemon API. Defaults to http://localhost:5080/api/cwp/canton.
  • signingProviders.blockdaemon.caip2: The CAIP-2 network identifier. Defaults to canton:testnet.
  • signingProviders.blockdaemon.apiKeyEnv: Name of the environment variable that holds the API key. Defaults to BLOCKDAEMON_API_KEY.

The API key value stays in that environment variable and is never stored in the config file.

If signingProviders is omitted, BLOCKDAEMON_API_KEY, BLOCKDAEMON_API_URL, and BLOCKDAEMON_CAIP2 are read from the environment. Non-secret variables are ignored once signingProviders is present.

Example usage:

{
    "signingProviders": {
        "blockdaemon": {
            "baseUrl": "https://api.blockdaemon.com/...",
            "caip2": "canton:testnet",
            "apiKeyEnv": "BLOCKDAEMON_API_KEY"
        }
    }
}

License

Apache-2.0

版本与发布记录

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

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

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

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

Wallet Gateway signing driver for Blockdaemon

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

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

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

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

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

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

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

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

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

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

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

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