5. queryCpt

    接口入参: java.lang.Integer

    接口返回: com.webank.weid.protocol.response.ResponseData<Cpt>;

    名称类型说明备注
    errorCodeInteger返回结果码此接口返回的code
    errorMessageString返回结果描述
    resultCpt CPT内容,见下
    transactionInfoTransactionInfo交易信息

    com.webank.weid.protocol.base.Cpt

    名称类型说明备注
    cptJsonSchemaMap<String, Object>Map类型的cptJsonSchema信息
    cptBaseInfoCptBaseInfo CPT基础数据,见下
    cptMetaDataCptMetaData CPT元数据内部类,见下

    com.webank.weid.protocol.base.CptBaseInfo

    名称类型说明备注
    cptPublisherStringCPT发布者的WeIdentity DIDWeIdentity DID格式数据
    cptSignatureString签名数据cptPublisher与cptJsonSchema拼接的签名数据
    updatedlong更新时间
    createdlong创建日期

    此方法返回code

    调用示例

    sequenceDiagram调用者->>WeIdentity SDK : 传入指定的cptIdopt 参数校验Note over WeIdentity SDK:检查传入的cptId是否为空或负数WeIdentity SDK->>WeIdentity SDK:报错,提示weid不合法并退出endWeIdentity SDK->>区块链节点: 调用合约查询链上的指定cpt对应的信息区块链节点—>>WeIdentity SDK:返回WeIdentity SDK->>WeIdentity SDK:根据合约返回的值构建返回的java对象WeIdentity SDK—>>调用者:返回调用结果