Skip to content

update from master #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -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.执行安装脚本
204 changes: 204 additions & 0 deletions readthedocs/zh_CN/docs/weidentity-rest-api.rst
Original file line number Diff line number Diff line change
@@ -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
------------------------------------