5. queryCpt
接口入参: java.lang.Integer
接口返回: com.webank.weid.protocol.response.ResponseData<Cpt>;
名称 | 类型 | 说明 | 备注 |
---|---|---|---|
errorCode | Integer | 返回结果码 | 此接口返回的code |
errorMessage | String | 返回结果描述 | |
result | Cpt | CPT内容,见下 | |
transactionInfo | TransactionInfo | 交易信息 |
com.webank.weid.protocol.base.Cpt
名称 | 类型 | 说明 | 备注 |
---|---|---|---|
cptJsonSchema | Map<String, Object> | Map类型的cptJsonSchema信息 | |
cptBaseInfo | CptBaseInfo | CPT基础数据,见下 | |
cptMetaData | CptMetaData | CPT元数据内部类,见下 |
com.webank.weid.protocol.base.CptBaseInfo
名称 | 类型 | 说明 | 备注 |
---|---|---|---|
cptPublisher | String | CPT发布者的WeIdentity DID | WeIdentity DID格式数据 |
cptSignature | String | 签名数据 | cptPublisher与cptJsonSchema拼接的签名数据 |
updated | long | 更新时间 | |
created | long | 创建日期 |
此方法返回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—>>调用者:返回调用结果