From 757cc1652afd2656ee8f8ae504d8f3e736a4b301 Mon Sep 17 00:00:00 2001 From: hmiao <739025250@qq.com> Date: Tue, 9 Nov 2021 14:53:59 +0800 Subject: [PATCH] [doc] identity contract document --- docs/contracts_en.md | 1 - docs/contracts_zh.md | 3 +-- docs/identity_en.md | 59 ++++++++++++++++++++++++++++++++++++++++++++ docs/identity_zh.md | 59 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 docs/identity_en.md create mode 100644 docs/identity_zh.md diff --git a/docs/contracts_en.md b/docs/contracts_en.md index 977bcab..b6e26f5 100644 --- a/docs/contracts_en.md +++ b/docs/contracts_en.md @@ -10,7 +10,6 @@ params: | name | type | description | | --- | --- | --- | -| creatorUrl | string | server url| | dataset | string | the dataset name for this computation task | | commitment | bytes32 | hash of the training code (for client validation purpose)| diff --git a/docs/contracts_zh.md b/docs/contracts_zh.md index 362f212..bb6200d 100644 --- a/docs/contracts_zh.md +++ b/docs/contracts_zh.md @@ -1,4 +1,4 @@ -# 合约方法文档 +# 横向联邦学习合约方法文档 ## 合约函数 @@ -11,7 +11,6 @@ params: | name | type | description | | --- | --- | --- | -| creatorUrl | string | 创建任务的服务器url | | dataset | string | 任务所需要的数据库名称 | | commitment | bytes32 | 任务训练代码的哈希(用于客户端校验任务训练代码) | diff --git a/docs/identity_en.md b/docs/identity_en.md new file mode 100644 index 0000000..7c2df70 --- /dev/null +++ b/docs/identity_en.md @@ -0,0 +1,59 @@ +# Identity Contract Document + +## Contract Methods + +### join + +Node join in the task network. + +params: + +| name | type | description | +| --- | --- | --- | +| url | string | node server url | +| name | string | node display name | + +### updateUrl + +Update node server url + +params: + +| name | type | description | +| --- | --- | --- | +| url | string | server url | + +### updateName + +Update node display name + +params: + +| name | type | description | +| --- | --- | --- | +| name | string | node display name | + +### leave + +Node leave the task network + +params: + +None + +### getNodeInfo + +Get node information by node address. + +params: + +| name | type | description | +| --- | --- | --- | +| address | address | node address | + +returns: + +| name | type | description | +| --- | --- | --- | +| info | tuple[string, string ] | url and name | + diff --git a/docs/identity_zh.md b/docs/identity_zh.md new file mode 100644 index 0000000..2e8cee5 --- /dev/null +++ b/docs/identity_zh.md @@ -0,0 +1,59 @@ +# 身份合约方法文档 + +## 合约函数 + +### join + +节点加入任务网络 + +params: + +| name | type | description | +| --- | --- | --- | +| url | string | 服务器的url | +| name | string | 节点的显示名称 | + +### updateUrl + +更新节点的url + +params: + +| name | type | description | +| --- | --- | --- | +| url | string | 服务器新的url | + +### updateName + +更新节点的名称 + +params: + +| name | type | description | +| --- | --- | --- | +| name | string | 节点新的显示名称 | + +### leave + +节点退出任务网络 + +params: + +None + +### getNodeInfo + +通过节点地址获取节点信息 + +params: + +| name | type | description | +| --- | --- | --- | +| address | address | 节点的地址 | + +returns: + +| name | type | description | +| --- | --- | --- | +| info | tuple[string, string ] | url和name | +