Skip to content

Commit

Permalink
style(*): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeqi Tao committed Oct 9, 2020
1 parent 14af5c4 commit 08de1d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,17 @@ Maven
<dependency>
<groupId>cn.hyperchain</groupId>
<artifactId>litesdk</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
```

Gradle

```
compile group: 'cn.hyperchain', name: 'litesdk', version: '1.0.2'
compile group: 'cn.hyperchain', name: 'litesdk', version: '1.0.3'
```

| platform version | sdk version |
| ---- | ---- |
| hyperchain 1.x | v0.1.0 |
| solo 2.0 | v1.0.0 |
| hyperchain 2.0 | v1.0.2 |

If you want to use latest sdk for sending transaction to hyperchain, may you can read the docs for more information about how to use.
It's better to use latest sdk to send transaction, now it will be compatible with hyperchain 1.0 and 2.0

### Usage

Expand Down
7 changes: 2 additions & 5 deletions docs/hyperchain_litesdk_document.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ HttpProvider httpProvider = new DefaultHttpProvider.Builder(10, 10, 10)

另外,每个节点都有一个对应的TxVersion,可通过`getTxVersion(nodeId)`接口获取对应节点的TxVersion,发送到节点的transaction的TxVersion必须与节点一致才能通过验签。`providerManager`对象在创建时会通过`TxVersion.setGlobalTxVersion`设置全局的TxVersion。`Transaction`对象也可通过`setTxVersion`函数设置单次交易的TxVersion。

为全局设置txVersion:
为全局设置txVersion(不推荐修改)

```java
static {
Expand All @@ -154,7 +154,7 @@ static {
Transaction transaction = new Transaction.HVMBuilder(account.getAddress()).deploy(payload).txVersion(TxVersion.TxVersion10).build();
```

一般而言,使用新版本LiteSDK访问hyperchain是需要设置txVersion为1.0,对于hyperchain2.0来说,sdk将自动识别平台txVersion,不需要手动进行设置。
一般而言,使用新版本LiteSDK访问hyperchain默认txVersion为1.0,对于hyperchain2.0来说,sdk将自动识别平台txVersion,**不需要手动进行设置**

节点平台与TxVersion对应关系如下:

Expand Down Expand Up @@ -1013,9 +1013,6 @@ Request<TxVersionResponse> getTxVersion(int nodeId) throws RequestException;
```





## 第五章. BlockService相关接口

BlockService接口与TxService相似,只是获取的对象是区块信息。同样地,BlockService对象也有很多对应的响应类型:
Expand Down

0 comments on commit 08de1d4

Please sign in to comment.