Skip to content

Commit

Permalink
Merge pull request #132 from WeBankBlockchain/master
Browse files Browse the repository at this point in the history
update from master
  • Loading branch information
youwenbusi authored Oct 11, 2024
2 parents a2aaebd + 8828a3c commit 65d814c
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 1 deletion.
2 changes: 1 addition & 1 deletion readthedocs/zh_CN/docs/weidentity-installation-by-web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WeIdentity 安装部署工具使用文档(可视化安装部署方式)

.. code-block:: shell
wget -c https://gitee.com/WeBank/WeIdentity-Build-Tools/raw/master/common/script/install/weid_install.sh
wget -c https://github.com/WeBankBlockchain/WeIdentity-Build-Tools/blob/master/common/script/install/weid_install.sh
2.执行安装脚本
Expand Down
204 changes: 204 additions & 0 deletions readthedocs/zh_CN/docs/weidentity-rest-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,210 @@ WeIdentity RestService API 说明文档
"ErrorMessage": "success"
}
12. 验证CreateEvidence
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

调用接口:

.. list-table::
:header-rows: 1
:widths: 30 50

* - 标题
- 描述
* - 接口名
- weid/api/invoke
* - Method
- POST
* - Content-Type
- application/json


接口入参:

.. list-table::
:header-rows: 1
:widths: 30 60 20

* - Key
- Value
- Required
* - functionName
- createEvidence
- Y
* - functionArg
-
- Y
* - functionArg.id
- uuid,该存证的唯一id值
- Y
* - functionArg.hash
- 上链存证信息的hash值
- Y
* - functionArg.proof
- 存证信息的签名
- Y
* - functionArg.log
- 记录额外的上链信息
- Y
* - transactionArg
-
- Y
* - transactionArg.groupId
- groupId的值
- Y
* - v
- 版本号
- Y

接口入参:

.. code-block:: java
{
"functionArg": {
"id": "31c38f4c-4d12-40fd-92c4-4d9f1dce0135",
"hash": "0x6726391a7fa259470c26a2e9c9467ddbb1f1e7108eeb6f279248b70bb91f8235",
"proof": "3divzA7mgEv3774UtZRIxjUeQP0IEzMv/FfnRE6RgMjN1lMuyRJNvHF+N8NJjVydRmC9cWffKJjE30W8Vbk+MwA=",
"log": "temp"
},
"transactionArg": {
"groupId": 1000
},
"v": "1.0.0",
"functionName": "createEvidence"
}
接口返回: application/json

.. list-table::
:header-rows: 1
:widths: 30 50

* - Key
- Value
* - ErrorCode
- 错误码,0表示成功
* - ErrorMessage
- 错误信息
* - respBody
- True/False


接口返回:

.. code-block:: java
{
"respBody": true,
"loopback": null,
"errorCode": 0,
"errorMessage": "success"
}
13. 获取存证信息GetEvidence
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

调用接口:

.. list-table::
:header-rows: 1
:widths: 30 50

* - 标题
- 描述
* - 接口名
- weid/api/invoke
* - Method
- POST
* - Content-Type
- application/json


接口入参:

.. list-table::
:header-rows: 1
:widths: 30 60 20

* - Key
- Value
- Required
* - functionName
- getEvidence
- Y
* - functionArg
-
- Y
* - functionArg.hashValue
- 上链存证信息的hash值
- Y
* - transactionArg
-
- Y
* - transactionArg.groupId
- groupId的值
- Y
* - v
- 版本号
- Y

接口入参:

.. code-block:: java
{
"functionArg": {
"hashValue": "0x6726391a7fa259470c26a2e9c9467ddbb1f1e7108eeb6f279248b70bb91f8235"
},
"transactionArg": {
"groupId": 1
},
"v": "1.0.0",
"functionName": "getEvidence"
}
接口返回: application/json

.. list-table::
:header-rows: 1
:widths: 30 50

* - Key
- Value
* - ErrorCode
- 错误码,0表示成功
* - ErrorMessage
- 错误信息
* - respBody
- True/False


接口返回:

.. code-block:: java
{
"respBody": {
"credentialHash": "0x6726391a7fa259470c26a2e9c9467ddbb1f1e7108eeb6f279248b70bb91f8235",
"signInfo": {
"0xcaf924d782c83e134860951ed750945c1ff484a2": {
"logs": [
"temp"
],
"revoked": false,
"signature": "3divzA7mgEv3774UtZRIxjUeQP0IEzMv/FfnRE6RgMjN1lMuyRJNvHF+N8NJjVydRmC9cWffKJjE30W8Vbk+MwA=",
"timestamp": "1695708037"
}
}
},
"loopback": null,
"errorCode": 0,
"errorMessage": "success"
}
基于轻客户端模式的RestService API
------------------------------------

Expand Down

0 comments on commit 65d814c

Please sign in to comment.