首页 > 解决方案 > Hyperledger Composer 身份发布

问题描述

尝试发布新身份时遇到以下问题:

将未知的远程处理类型“issueidentityrequest”视为“任何”

身份已正确发布(当我检查composer-playground时),但代码以 ERROR 结尾,我无法下载卡。我的代码如下:

`const identity = {
    "participant": 'org.acme.sample.Company#'+companyId,
    "userID": companyId,
    "options": {}
};`

`$.ajax({
    url: "http://localhost:3000/api/system/identities/issue",
    type: "POST",
    dataType: 'blob',
    data: identity,`

    success: function (cardData) {
        console.log('CARD-DATA', cardData);
    },`
    error: function (xhr, status) {
        console.log("Sorry, there was a problem!");
    },
    complete: function (xhr, status) {
        console.log("The request is complete!");
    }
});`

请帮我 !

标签: hyperledger-fabrichyperledgerhyperledger-composer

解决方案


最好看一个端到端的例子https://medium.com/@CazChurchUk/developing-multi-user-application-using-the-hyperledger-composer-rest-server-b3b88e857ccc确实端点返回了一个业务被导入的网卡。然后用于在磁盘上创建卡文件

例如

$.ajax({
  url: "http://localhost:3000/api/system/issue",
  type: "POST",
  dataType: 'blob',
  data: identity,
  xhrFields: {
    withCredentials: true
  }

推荐阅读