提供业务网络存档 (.bna) 文件

Provide a business network archive (.bna) file

任何人都可以提供一个 link 示例业务网络存档 (.bna) 文件用于 hyperledger composer-playground 上的演示和测试目的。我在任何其他网站上都没有。

我受困于我的业务网络,试图为我自己的加密货币创建一个演示。

提前致谢!

本教程 Playground Tutorial 将指导您创建业务网络,最后您可以通过导出当前网络来创建 .BNA。

如果您想要一个即时示例,那么在该教程开始时不要使用空网络,select 提供的模板之一。如果您需要 .BNA 文件,您可以再次将其导出。

您应该生成自己的业务网络存档。如您所知,业务网络由 composer 中的各种文件组成,例如

  • 模型定义
  • 逻辑javascript文件
  • 权限文件
  • 可选,查询描述文件

在学习本教程时,您会注意到有一个步骤是从这些资产生成 .bna 文件。

composer archive create -t dir -n . -a sample-network@0.0.1.bna

它的作用是从当前目录中的资产创建您的 .bna 文件。 (其实文件就是这些资产的zip文件,包括package.json等)

理解这里的选项就是composer create archive create help

的输出

composer archive create --archiveFile digitialPropertyNetwork.zip --sourceType module --sourceName digitalproperty-network

Options:
--help Show help [boolean]
-v, --version Show version number [boolean]
--archiveFile, -a Business network archive file name. Default is based on the Identifier of the BusinessNetwork [string]
--sourceType, -t The type of the input containing the files used to create the archive [required] [choices: "module", "dir"]
--sourceName, -n The Location to create the archive from e.g. NPM module directory or Name of the npm module to use [required]

当您有网络 运行 时,您可以使用 composer network download 生成存档文件(使用帮助标志了解更多信息)。

您将在 public playground space 中找到示例设置。您可以使用左侧的 "Export" 按钮导出文件。