建议和反馈

请填写你的反馈内容

问答 > 联盟链 > 问答详情

如何获取HFC SDK中用于链代码开发环境的凭证文件?10LK

我在hyperledger fabric提供的开发环境中编写我的链代码应用程序。我想为这个应用程序提供一个Web UI。IBM-BlockChain提供了一个使用带有node.js应用程序的HFC SDK的示例。我试图按照SDK-Demo中显示的相同示例进行操作此示例部署在IBM-BlueMix上,并且包含ServiceCredentials.json文件,其中包含类似的条目

{"peers": [{
  "discovery_host": "36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com",
  "discovery_port": 30001,
  "api_host": "36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com",
  "api_port_tls": 5001,
  "api_port": 5001,
  "event_host": "36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com",
  "event_port": 31001,
  "type": "peer",
  "network_id": "36a78535bcdf4ef0g96h85619i046271",
  "container_id": "b90e4977ff987e34ceb193daafdf7723751f6a195771125a12051ac44442367e",
  "id": "36a78535bcdf4ef0g96h85619i046271-vp3",
  "api_url": "http://36a78535bcdf4ef0g96h85619i046271-vp3.us.blockchain.ibm.com:5001"},{
  "discovery_host": "36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com",
  "discovery_port": 30001,
  "api_host": "36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com",
  "api_port_tls": 5001,
  "api_port": 5001,
  "event_host": "36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com",
  "event_port": 31001,
  "type": "peer",
  "network_id": "36a78535bcdf4ef0g96h85619i046271",
  "container_id": "dea7d34e49827e1ddb465fae16bb40724a7aeaac8775d8193a7071f0cf51e13b",
  "id": "36a78535bcdf4ef0g96h85619i046271-vp0",
  "api_url": "http://36a78535bcdf4ef0g96h85619i046271-vp0.us.blockchain.ibm.com:5001"},],"ca": {
  "36a78535bcdf4ef0g96h85619i046271-ca": {
  "url": "36a78535bcdf4ef0g96h85619i046271-ca.us.blockchain.ibm.com:30001",
  "discovery_host": "36a78535bcdf4ef0g96h85619i046271-ca.us.blockchain.ibm.com",
  "discovery_port": 30001,
  "api_host": "36a78535bcdf4ef0g96h85619i046271-ca.us.blockchain.ibm.com",
  "api_port_tls": 30001,
  "api_port": 30001,
  "type": "ca",
  "network_id": "36a78535bcdf4ef0g96h85619i046271",
  "container_id":   "0083cc6af273d82a18698763348494708063af871bead073f1899ce1726f5e07"}},"users": [
  {
  "enrollId": "admin",
  "enrollSecret": "c62d4d9a5d",
  "affiliation": "group1",
  "username": "admin",
  "secret": "c62d4d9a5d"
  },
  {
  "enrollId": "WebAppAdmin",
  "enrollSecret": "50dd43e4c0",
  "affiliation": "group1",
  "username": "WebAppAdmin",
  "secret": "50dd43e4c0"
  }],"cert": "https://blockchain-certs.mybluemix.net/us.blockchain.ibm.com.cert","cert_path": "/certs/peer/cert.pem"}

我没有使用IBM-BlueMix,因此无法获取自动生成的凭证文件。如何为我的环境生成凭证文件?


2019-09-16
0
请先登陆或注册

暂无回答!

求助中

解决了这个问题,预计可以帮助到

  • 0
  • 1
  • 4
  • 8
  • 6
邀请

感谢您的善举,每一次解答会成为新人的灯塔,回答被采纳后获得20算力和相应的LK币奖励