Hyperledger-fabric サービスを Bluemix にデプロイし、そこから資格情報を取得しました。1 行は次のようになります。
{"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 エンドポイントに POST して、いくつかのチェーンコードを登録しようとします。
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": "User not login.Use the '/registrar' endpoint to get aセキュリティトークン。」}、「ID」: 1 }
何か案が?