如何将数据库钱包创建为超级模式?

发布于 2025-01-24 21:53:07 字数 66 浏览 4 评论 0 原文

我需要使用数据库(MySQL/MongoDB)而不是文件将用户的钱包身份存储到HyperLeDger-Fabric中。

I need to use a database (mysql/mongodb) instead of files to store the user's wallet identity into hyperledger-fabric.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甲如呢乙后呢 2025-01-31 21:53:07

Fabric Client SDK仅提供文件系统和CouchDB Wallet储物库,因此您有两个选择:

  1. 编写自己的WalletStore实现,以存储和从MongoDB检索数据。
  2. 根据需要存储客户端凭据(在您选择的数据库或任何其他位置)中,然后将其直接传递给SDK,作为 X509Identity Identity

请参阅此 tutorial =“ https://hyperledger.github.io/fabric-sdk-node/release-2.2.2/module-fabric-network.walletstore.html” rel =“ nofollow noreferrer”> nofollow noreferrer“> walletstore store文档有关如何详细信息使用自定义的钱店实现。您还可以参考 CouchDB商店实现作为参考。

请注意,对于HyperLeDger织物v2.4及以后,迁移指南有关详细信息。

The Fabric client SDKs only provide file-system and CouchDB wallet storage out-of-the-box so you have two options:

  1. Write your own WalletStore implementation that stores and retrieves data from MongoDB.
  2. Store the client credentials however you want (in your database of choice or any other location), and then pass them to the SDK directly as an X509Identity object in the identity field of the connection options.

See this tutorial and the WalletStore documentation for details of how to use a custom WalletStore implementation. You might also refer to the CouchDB store implementation as a reference.

Note that for Hyperledger Fabric v2.4 and later, the Fabric Gateway client API is the preferred API for Node, Java and Go applications. The model used with this API is for you to store client credentials however you chose (which could still be in a wallet) and then just supply an identity and signing implementation using those credentials to the API on connection. See the migration guide for details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文