Skip to content

Commit

Permalink
Merge pull request #2 from mh739025250/main
Browse files Browse the repository at this point in the history
[doc] identity contract document
  • Loading branch information
lencyforce authored Nov 9, 2021
2 parents b66ca65 + 757cc16 commit cb28c4a
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 3 deletions.
1 change: 0 additions & 1 deletion docs/contracts_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)|

Expand Down
3 changes: 1 addition & 2 deletions docs/contracts_zh.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 合约方法文档
# 横向联邦学习合约方法文档

## 合约函数

Expand All @@ -11,7 +11,6 @@ params:

| name | type | description |
| --- | --- | --- |
| creatorUrl | string | 创建任务的服务器url |
| dataset | string | 任务所需要的数据库名称 |
| commitment | bytes32 | 任务训练代码的哈希(用于客户端校验任务训练代码) |

Expand Down
59 changes: 59 additions & 0 deletions docs/identity_en.md
Original file line number Diff line number Diff line change
@@ -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 |

59 changes: 59 additions & 0 deletions docs/identity_zh.md
Original file line number Diff line number Diff line change
@@ -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 |

0 comments on commit cb28c4a

Please sign in to comment.