【问题标题】:how can I integrate web app with fablo API?如何将网络应用程序与 fablo API 集成?
【发布时间】:2023-01-31 05:41:06
【问题描述】:

我已经部署了智能合约 (go) 和 fablo 网络,我也有自己的 fablo rest API,但我需要将此 API 与我的网络应用程序集成,我该怎么做? 我正在使用这个存储库https://github.com/fablo-io/fablo-rest

我在自述文件中调用了以下步骤:

1- Run the script ./hyperledger-citc.sh to install some necessary software 
2- Run the command sudo ./fablo recreate to start the network
3- You may open the file  fablo-config.json to view the network components. It also includes the the installation of the chaincode "asset-transfer-basic" in Golang
4- You may use the commands sudo ./fablo [down | start | stop | up | prune | reset] to interact with the network
5- We use Fablo Rest API (https://github.com/fablo-io/fablo-rest) to interact with chaincodes and execute Transactions. 

6- Create an authorization token using the below command. This token expires in few minutes, so it needs to be regenerated

我了解到我可以使用 fetch API 函数,但它只接收 URL 作为参数,但我没有我的 API 的 URL

【问题讨论】:

    标签: api web-applications hyperledger-fabric fetch-api smartcontracts


    【解决方案1】:

    在 fabric 示例中,检查 asset-basic-transfer 下可用的 rest-api-typescript 项目,或者您可以在 Fabric 示例上搜索带有此文本的“资产传输 REST API 示例”,您将获得项目信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-28
      相关资源
      最近更新 更多