From f216ccc541c7ddd3b9c24c61252c5ff905158561 Mon Sep 17 00:00:00 2001 From: liweihang Date: Wed, 27 Sep 2023 09:05:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?doc:=20Weidentity-Rest-Service=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0Evidence=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zh_CN/docs/weidentity-rest-api.rst | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) diff --git a/readthedocs/zh_CN/docs/weidentity-rest-api.rst b/readthedocs/zh_CN/docs/weidentity-rest-api.rst index 6dff32a..4c805f2 100644 --- a/readthedocs/zh_CN/docs/weidentity-rest-api.rst +++ b/readthedocs/zh_CN/docs/weidentity-rest-api.rst @@ -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 ------------------------------------ From 08f8e46154286504559c70336d0ac90483de59a5 Mon Sep 17 00:00:00 2001 From: youwenbusi <1245549353@qq.com> Date: Fri, 11 Oct 2024 09:51:32 +0800 Subject: [PATCH 2/2] change weid-install from github --- readthedocs/zh_CN/docs/weidentity-installation-by-web.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/zh_CN/docs/weidentity-installation-by-web.rst b/readthedocs/zh_CN/docs/weidentity-installation-by-web.rst index 04b4b85..010ace1 100644 --- a/readthedocs/zh_CN/docs/weidentity-installation-by-web.rst +++ b/readthedocs/zh_CN/docs/weidentity-installation-by-web.rst @@ -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.执行安装脚本