后端接口v1.0 - leeduckgo/weidentity-explorer GitHub Wiki
后端接口遵循 Restful 规范。
配合以下文档食用:
https://weidentity.readthedocs.io/zh_CN/latest/docs/terminologies.html
1 GET 方法
1.1 Get Contract Information
接口描述: 获取合约信息。
Path: /api/contract
Method: GET
Params: None
Successful Response:
{
"result":"success",
"payload":{
"weid_contract_addr": 【addr】,
"cpt_contract_addr": 【addr】,
"authority_issuer_contract_addr": 【addr】,
"evidence_contract_addr": 【addr】,
"specificIssuer_contract_addr": 【addr】,
"deployer_org_id": 【string】
}
}
Mock Addr:
https://nei.netease.com/api/apimock-v2/74cf463da4573779d5a2b902a3b7a9fa/api/v1/contract
1.2 Get Committee Information
接口描述:获取委员会信息
Path: /api/committee
Method: GET
Params: None
Successful Response:
{
"result":"success",
"payload":{
"org_id":【String】,
"name":【String】,
"describe":【Text】
}
}
Mock Addr:
https://nei.netease.com/api/apimock-v2/74cf463da4573779d5a2b902a3b7a9faapi/v1/committee
1.3 Get Authority Issuers
接口描述:获取所有权威发行者的信息
Path: /api/authority_issuers
Method: GET
Params: None
Successful Response:
{
"result":"success",
"payload":[
{
"id":【Integer】,
"weid":【String】,
"org_id":【String】,
"name":【String】,
"describe":【Text】
},
{……}
]
}
Mock Addr:
https://nei.netease.com/api/apimock-v2/74cf463da4573779d5a2b902a3b7a9fa/api/v1/authority_issuers
1.4 Get CPTs
接口描述:获取某个 Authority Issuer 的所有 CPTs
Path: /api/authority_issuer/[ID]/cpts
Method: GET
Params: None
Successful Response:
{
"result":"success",
"payload":[
{
"cpt_id":【Integer】,
"name":【String】,
"protocol":【Json】,
"tx_id": 【Text】,
"total_num":【Integer】,
"issued_num":【Integer】,
},
{……}
]
}
Mock Addr: