-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01bcad2
commit 9b91a74
Showing
13 changed files
with
288 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
.. _deploy-via-commandline: | ||
|
||
使用 WeIdentity 部署工具完成部署(命令行部署方式) | ||
================================================= | ||
|
||
|
||
1. 联盟链管理员: \ `参考文档 <./weidentity-build-with-deploy.html>`_\ 完成部署和配置。 | ||
|
||
2. 非联盟链管理员: \ `参考文档 <./weidentity-build-without-deploy.html>`_\ 完成配置。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
.. _deploy-via-web: | ||
|
||
使用 WeIdentity 部署工具完成部署(可视化部署方式) | ||
================================================= | ||
|
||
步骤说明 | ||
-------- | ||
|
||
|
||
0. 打开 WeIdentity 部署工具的 Web 页面 | ||
"""""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
* 通过安装 “WeIdentity 部署工具”的服务器的 IP 访问 Web 页面 :code:`http://ip:6102/index.html` 。 | ||
|
||
.. note:: | ||
如果还没有安装 WeIdentity 部署工具,请参考: \ `安装 WeIdentity 部署工具 <./weidentity-installation.html>`_\ | ||
|
||
.. note:: | ||
如果不方便通过网页完成部署,可以使用命令行的方式完成部署,详见文档:\ `部署文档(命令行部署方式) <./deploy-via-commandline.html>`_\。 | ||
|
||
|
||
1. 配置admin账户 | ||
""""""""""""""""" | ||
|
||
此步骤将配置您在 weid-build-tools 里面的账户,后续的部署等操作将使用该账户(请妥善保管私钥,谨防丢失)。 | ||
|
||
2. 配置区块链节点 | ||
""""""""""""""""" | ||
|
||
此步骤将配置连接的区块链节点,您需要提前部署区块链节点。 | ||
|
||
.. note:: | ||
1. 请选择合适的部署环境,联盟链成员的环境需要一致。 | ||
2. 配置区块链节点端口时请使用channel端口。 | ||
3. 配置chainId时,联盟链成员的chainId需要一致 | ||
4. 配置主群组时,联盟链成员的主群组Id需要一致 | ||
|
||
3. 配置数据库 | ||
""""""""""""""""" | ||
|
||
此步骤将配置连接的数据库环境,请提前准备数据库名称。 | ||
|
||
4. 主群组部署合约 | ||
"""""""""""""""""" | ||
|
||
完成以上3步操作即完成了 weid-build-tools 的基础配置工作,此步骤将区分联盟链管理员和非管理员进行操作。 | ||
|
||
* 联盟链管理员 | ||
|
||
如果您是联盟链管理员,请点击页面的合约部署功能按钮,此步骤将在联盟链的当前主群组中部署您的WeID智能合约, 并且将会自动启用该合约的CNS地址。 | ||
|
||
|
||
* 联盟链的普通成员 | ||
|
||
如果您不是联盟链管理员,请先联系联盟链管理员部署WeId智能合约,联盟链管理员部署完WeId智能合约后,请刷新当前页面并确认智能合约的CNS地址,请启用该CNS地址。 | ||
|
||
.. note:: | ||
当您启用完CNS地址后,weid-build-tools 将自动帮您在第一步配置的账户注册成WeID, 如果有需要请将WeId地址发给联盟链管理员进行权威机构注册,可以通过WeId管理菜单查看您的WeId地址。 | ||
|
||
5. 部署Evidence合约 | ||
"""""""""""""""""""" | ||
|
||
此步骤可根据群组Id部署Evidence合约,如果您的机构不需要部署Evidence合约,只需要启用群组管理员部署的Evidence合约,请跟当前群组Id的管理员机构确认CNS编码,确认后再点击启用即可。 | ||
|
||
|
||
附 | ||
"""""""""""""""""""""""""""""""" | ||
|
||
1. 请访问主页通过指引来完成配置和部署合约等相关操作。 | ||
|
||
* 需要提前准备区块链节点 | ||
|
||
* 需要有可访问的MySql数据库 | ||
|
||
|
||
2. 合约部署完成将会生成相关的配置文件: | ||
|
||
* admin密钥文件目录 : ./output/admin/ | ||
|
||
* 资源文件目录(用于应用集成SDK): ./resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
.. _sdk-integration: | ||
|
||
在 Java 应用中集成 WeIdentity Java SDK | ||
============================================================= | ||
|
||
整体介绍 | ||
-------- | ||
|
||
|
||
集成步骤 | ||
-------- | ||
|
||
1. 在自己的 Java 应用中引入 weid-java-sdk | ||
''''''''''''''''''''''''''''''''''''''''''''' | ||
|
||
编辑 ``build.gradle`` 文件,添加: | ||
|
||
:: | ||
|
||
compile("com.webank:weid-java-sdk:x.x.x") | ||
|
||
.. note:: | ||
x.x.x为您使用的weid-java-sdk版本,建议使用最新版本。 查看 \ `版本历史 <https://mvnrepository.com/artifact/com.webank/weid-java-sdk>`__ | ||
|
||
|
||
|
||
2. 配置您的 Java 应用 | ||
'''''''''''''''''''''''' | ||
|
||
将 weid-build-tools 里配置好的配置文件拷贝至您的 Java 应用中: | ||
:: | ||
|
||
cd resources/ | ||
ls | ||
|
||
|
||
您可以将 ``resources`` 目录下的所有文件拷贝至您的Java应用的 ``resources`` 目录下,weid-java-sdk 会自动加载相应的资源文件。 | ||
|
||
|
||
|
||
3. 集成完成 | ||
'''''''''''''''' | ||
|
||
现在您可以使用 WeIdentity 开发您的区块链身份应用。weid-java-sdk 相关接口请见:\ `WeIdentity JAVA SDK文档 <./projects/javasdk/weidentity-java-sdk-doc.html>`__ 。 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.