admin管理员组文章数量:1410706
I am new to Hyperledger Fabric and, hence, to Fabric integrations with apps. My intent was on creating an API using Node that would register and enroll new Users. I know and have been successful doing this using the CLI, however, for integrations the only code that I see doing that uses the already deprecated fabric-ca-client
. I've checked both forums and the documentation for the recommended @hyperledger/fabric-gateway
but can't seem to find a way to register and enroll new Users like it used to be possible before.
Any help would be gladly appreciated.
Thank you in advance!
I am new to Hyperledger Fabric and, hence, to Fabric integrations with apps. My intent was on creating an API using Node that would register and enroll new Users. I know and have been successful doing this using the CLI, however, for integrations the only code that I see doing that uses the already deprecated fabric-ca-client
. I've checked both forums and the documentation for the recommended @hyperledger/fabric-gateway
but can't seem to find a way to register and enroll new Users like it used to be possible before.
Any help would be gladly appreciated.
Thank you in advance!
Share Improve this question edited Mar 6 at 5:47 VLAZ 29.2k9 gold badges63 silver badges84 bronze badges asked Mar 5 at 15:32 PensoGlidePensoGlide 113 bronze badges1 Answer
Reset to default 0Reproduced from my comment in this discussion...
The Fabric Gateway client API (similar to the fabric-network package that preceded it) focuses only on enabling client business applications to invoke (evaluate and submit) transactions, and receive chaincode and block events. It intentionally omits capability for administrative operations, such as chaincode deployment, channel creation, or identity registration / enrolment.
For administrative tasks, there are a few potential options:
- Use the Fabric CLI commands.
- If deploying to Kubernetes, a Kubernetes operator designed for managing Fabric might provide the capability you need. Two alternatives that I know of are Hyperledger Fabric Operator and fabric-operator.
- Continue using the existing fabric-ca-client. While it is no longer actively developed, the Fabric CA is pretty stable in its capability so this client API should continue to work.
- Use the REST API of the Fabric CA directly with your own client. I don't know of any specific documentation of the API, but the fabric-ca-client implementation just interacts with the Fabric CA using HTTP requests. You could inspect the implementation (or perhaps the unit tests to identify the correct HTTP request structure. The Swagger definition of the CA REST services and this StackOverflow post might also be helpful.
For chaincode deployment and channel management, there is a pretty complete Golang implementation in the fabric-admin-sdk repository. That repository also contains a Node admin implementation (based on code developed here) with code to interact with the CA. I am not sure how stable and/or functional the Node implementation is.
本文标签: nodejsHyperledger FabricRegister and Enroll new UsersStack Overflow
版权声明:本文标题:node.js - Hyperledger Fabric - Register and Enroll new Users - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745024019a2638299.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论