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

时间:2016-11-28 03:57:17

标签: blockchain hyperledger-fabric

我在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,因此无法获得自动生成的凭证文件。 如何为我的环境生成凭证文件?

0 个答案:

没有答案