简体   繁体   English

Angular 应用程序作为 Hyperledger Fabric 组织的客户端应用程序

[英]Angular App as client app for an Org of Hyperledger Fabric

I am new to Hyperledger.我是超级账本的新手。 I am using Hyperledger Fabric and defined my network, installed and instantiated the chaincode over peers.我正在使用 Hyperledger Fabric 并定义了我的网络,安装并实例化了对等节点的链代码。

Could someone share their thoughts on:有人可以分享他们的想法:

What should be the steps to create client app for each organization in the network?为网络中的每个组织创建客户端应用程序步骤是什么? What is the required configurations at client side?客户端需要什么配置? Is there a sample example available?可用的示例吗?

Note: I can't use composer.注意:我不能使用作曲家。

You can use Hyperledger Fabric SDKs create your client app, SDKs are available in various programming languages.您可以使用 Hyperledger Fabric SDK 创建您的客户端应用程序,SDK 可用于各种编程语言。 you can find supported languages here , you can create your APIs using these SDKs as per your requirement and call it from your Angular App, To get started with you can refer into sample apps provided by the Hyperledger fabric here 您可以在此处找到支持的语言,您可以根据您的要求使用这些 SDK 创建 API,并从您的 Angular 应用程序中调用它,要开始使用,您可以在此处参考 Hyperledger 结构提供的示例应用程序

There's an interesting example available under fabric-samples GitHub repository opn how to interact with already-created network (w/o manually creating channels, peers etc.).fabric-samples GitHub 存储库opn 下有一个有趣的例子,如何与已经创建的网络进行交互(无需手动创建通道、对等点等)。 The idea behind this fabcar is stored in query and invoke methods that interact with the ledger using chaincode.这个fabcar背后的想法存储在使用链码与账本交互的queryinvoke方法中。

You could eg develop an express.js application to create a REST API to interact with the network using the NodeJS SDK for Hyperledger.例如,您可以开发一个express.js应用程序来创建一个 REST API,以便使用适用于 Hyperledger 的 NodeJS SDK 与网络交互。 I've tried that approach and it works just fine - with my network being started using different scripts (modified byfn.sh ), the client application is only responsible for querying/recording data to the ledger, w/o any explicit actions taken to network itself.我已经尝试过这种方法并且它工作得很好 - 我的网络使用不同的脚本启动(由byfn.sh修改),客户端应用程序只负责查询/记录数据到分类帐,没有采取任何显式操作网络本身。 All you have to do is to create and enroll admin and user accounts to be able to call chaincode and you are all set.您所要做的就是创建并注册adminuser帐户,以便能够调用链代码,然后一切就绪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM