@dashevo/dashcore-lib

中文文档
0.26.1发布于 2026/10/30MITTypeScriptCommonJS构建来源已验证近 30 天下载 4.6万

A pure and powerful JavaScript Dash library.

原始使用文档
文档目录14 节
  1. Table of Contents
  2. Install
  3. NodeJS
  4. Browser
  5. Usage
  6. Browser
  7. Modules
  8. Development & Tests
  9. Documentation
  10. Concepts
  11. How To Use
  12. Use Case Examples
  13. Contributing
  14. License

Dashcore Library

NPM Version Build Status Release Date standard-readme compliant

A pure and powerful JavaScript Dash library.

Dash is a powerful new peer-to-peer platform for the next generation of financial technology. The decentralized nature of the Dash network allows for highly resilient Dash infrastructure, and the developer community needs reliable, open-source tools to implement Dash apps and services.

Table of Contents

Install

NodeJS

npm install @dashevo/dashcore-lib

Browser

CDN Standalone

<script src="https://unpkg.com/@dashevo/dashcore-lib"></script>
<script>
  const { PrivateKey } = dashcore;
  const privateKey = new PrivateKey();
  const address = privateKey.toAddress().toString();
  ...
</script>

Building the Browser Bundle

To build a dashcore-lib full bundle for the browser:

npm run build

This will generate a file named dashcore-lib.min.js in the dist/ folder.

Usage

Browser

<script src='./dist/dashcore-lib.min.js' type="text/javascript"></script>
<script>
  const PrivateKey = dashcore.PrivateKey;
  const privateKey = new PrivateKey();
  const address = privateKey.toAddress().toString();
</script>

Modules

Some functionality is implemented as a module that can be installed separately:

Development & Tests

git clone https://github.com/dashevo/dashcore-lib
cd dashcore-lib
npm install

Run all the tests:

npm test

You can also run just the Node.js tests with npm run test:node, just the browser tests with npm run test:browser or run a test coverage report with npm run coverage.

Documentation

Concepts

How To Use

Use Case Examples

Some examples can be found here, below is a list of direct links for some of them.

Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our CONTRIBUTING file.

License

Code released under the MIT license.

Copyright 2013-2017 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.
Copyright 2016-2017 The Dash Foundation, Inc.
Copyright 2017-2020 Dash Core Group, Inc.

版本与发布记录

@dashevo/dashcore-lib 共发布 121 个版本,首次发布于 2018/04/10;过去 12 个月发布了 1 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.26.1latest2026/10/3012 天前
0.25.02025/04/161.6 年前
0.24.02025/04/071.6 年前
0.23.02025/01/141.8 年前
0.22.02024/09/172 年前
0.21.32024/07/192 年前

其他发布通道:alpha → 0.16.0,beta → 0.19.7。

关于 @dashevo/dashcore-lib 的常见问题

@dashevo/dashcore-lib 是什么?

A pure and powerful JavaScript Dash library.

如何安装 @dashevo/dashcore-lib?

在项目目录运行 npm install @dashevo/dashcore-lib,或使用 pnpm add / yarn add / bun add。

@dashevo/dashcore-lib 支持 TypeScript 吗?

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

@dashevo/dashcore-lib 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@dashevo/dashcore-lib 可以商用吗?

@dashevo/dashcore-lib 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dashevo/dashcore-lib 的下载量有多少?

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

@dashevo/dashcore-lib 还在维护吗?

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