我已经在 Bluemix 上部署了 hyperledger-fabric 服务并从那里获得了凭证,其中一行如下所示:
{"enrollId":"user_type1_0","enrollSecret":"XXXXX","group":"group1","affiliation":"0001","username":"user_type1_0","secret":"XXXXX"}
我将以下内容发布到“注册商”REST 端点:
秘密:{“enrollId”:“user_type1_0”,“enrollSecret”:“xxxxx”}
我得到这个回应:
{ "OK": "用户 'user_type1_0' 登录成功。" }
然后我尝试使用将以下内容发布到链代码 REST 端点来注册一些链代码:
QuerySpec { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": " https://github.com/ibm-blockchain /learn-chaincode/finished " }, "ctorMsg": { "function": "init", "args": [ "hi there" ] }, "secureContext": "user_type1_0_xxxxx" }, "id": 1 }
我得到这个回复:
{ "jsonrpc": "2.0", "error": { "code": -32000, "message": "Registration missing", "data": "用户未登录。使用 '/registrar' 端点获取安全令牌。” },“身份证”:1 }
任何的想法?