Skip to content

Commit

Permalink
Merge pull request #161 from WeBankFinTech/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mingzhenliu authored Dec 24, 2019
2 parents c71baed + 5a55d8c commit a7f4f04
Showing 1 changed file with 186 additions and 1 deletion.
187 changes: 186 additions & 1 deletion docs/WeBASE-Transaction/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,96 @@ b.异常返回结果示例(信息详情请参看附录1)
}
```

### 1.5. 部署信息查询接口

#### 接口描述

根据群组编号和和部署业务流水号查询部署的信息。

#### 接口URL

http://localhost:5003/WeBASE-Transaction/contract/deployInfo/{groupId}/{uuidDeploy}

#### 调用方法

HTTP GET

#### 请求参数

**1)参数表**

| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
| -------- | -------------- | ---------- | -------- | ------------ | -------- | -------- |
| 1 | 群组编号 | groupId | int | 16 || |
| 2 | 部署业务流水号 | uuidDeploy | String | 64 || |

**2)数据格式**

```
http://127.0.0.1:5003/WeBASE-Transaction/contract/deployInfo/1/10001
```

#### 响应参数

**1)参数表**

| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
| -------- | ------------ | --------------- | -------- | ------------ | -------- | -------------------- |
| 1 | 返回码 | code | String | || 返回码信息请附录1 |
| 2 | 提示信息 | message | String | || |
| 3 | 返回数据 | data | Object | | | |
| 3.1 | 编号 | id | int | || |
| 3.2 | 群组编号 | groupId | int | || |
| 3.3 | 流水号 | uuidDeploy | String | || |
| 3.4 | 合约bin | contractBin | String | || |
| 3.5 | 合约abi | contractAbi | String | || |
| 3.6 | 合约地址 | contractAddress | String | || |
| 3.7 | 方法参数 | funcParam | String | || |
| 3.8 | 签名类型 | signType | int | || |
| 3.9 | 签名用户编号 | signUserId | int | || |
| 3.10 | 请求上链次数 | requestCount | int | || |
| 3.11 | 处理状态 | handleStatus | int | || 0-待处理,1-处理成功 |
| 3.12 | 交易hash | transHash | String | || |
| 3.13 | 交易回执状态 | receiptStatus | boolean | || 0-异常,1-正常 |
| 3.14 | 创建时间 | gmtCreate | Date | || |

**2)数据格式**

a.请求正常返回结果

```
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"groupId": 1,
"uuidDeploy": "10001",
"contractBin": "XXX",
"contractAbi": "XXX"
"contractAddress": "XXX",
"funcParam": "[]",
"signType": 0,
"signUserId": 0,
"requestCount": 1,
"handleStatus": 1,
"transHash": "XXX",
"receiptStatus": true,
"gmtCreate": 1574853659000
}
}
```

b.异常返回结果示例(信息详情请参看附录1)

```
{
"code": 103001,
"message": "system error",
"data": null
}
```

## 2. keystore接口

### 2.1. 查询账户地址接口
Expand Down Expand Up @@ -573,6 +663,100 @@ b.异常返回结果示例(信息详情请参看附录1)
}
```

### 3.5. 交易信息查询接口

#### 接口描述

根据群组编号和交易业务流水号查询交易信息。

#### 接口URL

http://localhost:5003/WeBASE-Transaction/trans/transInfo/{groupId}/{uuidStateless}

#### 调用方法

HTTP GET

#### 请求参数

**1)参数表**

| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
| -------- | -------------- | ------------- | -------- | ------------ | -------- | -------- |
| 1 | 群组编号 | groupId | int | 16 || |
| 2 | 交易业务流水号 | uuidStateless | String | 64 || |

**2)数据格式**

```
http://127.0.0.1:5003/WeBASE-Transaction/trans/transInfo/1/20001
```

#### 响应参数

**1)参数表**

| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
| -------- | ------------ | --------------- | -------- | ------------ | -------- | -------------------- |
| 1 | 返回码 | code | String | || 返回码信息请附录1 |
| 2 | 提示信息 | message | String | || |
| 3 | 返回数据 | data | Object | | | |
| 3.1 | 编号 | id | int | || |
| 3.2 | 群组编号 | groupId | int | || |
| 3.3 | 交易流水号 | uuidStateless | String | || |
| 3.4 | 部署流水号 | uuidDeploy | String | || |
| 3.5 | 合约abi | contractAbi | String | || |
| 3.6 | 合约地址 | contractAddress | String | || |
| 3.7 | 方法名 | funcName | String | || |
| 3.8 | 方法参数 | funcParam | String | || |
| 3.9 | 签名类型 | signType | int | || |
| 3.10 | 签名用户编号 | signUserId | int | || |
| 3.11 | 请求上链次数 | requestCount | int | || |
| 3.12 | 处理状态 | handleStatus | int | || 0-待处理,1-处理成功 |
| 3.13 | 交易hash | transHash | String | || |
| 3.14 | 交易返回原文 | transOutput | String | || |
| 3.15 | 交易回执状态 | receiptStatus | boolean | || 0-异常,1-正常 |
| 3.16 | 创建时间 | gmtCreate | Date | || |

**2)数据格式**

a.请求正常返回结果

```
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"groupId": 1,
"uuidStateless": "20001",
"uuidDeploy": "10001",
"contractAbi": "XXX"
"contractAddress": "XXX",
"funcName": "set",
"funcParam": "XXX",
"signType": 0,
"signUserId": 0,
"requestCount": 1,
"handleStatus": 1,
"transHash": "XXX",
"transOutput": "0x",
"receiptStatus": true,
"gmtCreate": 1574854118000
}
}
```

b.异常返回结果示例(信息详情请参看附录1)

```
{
"code": 103001,
"message": "system error",
"data": null
}
```

## 附录

### 1. 返回码信息列表
Expand Down Expand Up @@ -606,8 +790,9 @@ b.异常返回结果示例(信息详情请参看附录1)
| 303015 | trans has not been sent to the chain | 交易还没有上链 |
| 303016 | if deploy uuid is empty, contract address and contract abi cannot be empty | 部署业务流水号为空时,合约地址和abi不能为空 |
| 303017 | trans output is empty | 交易返回值为空 |
| 303018 | trans is not exist | 交易不存在 |
| 303018 | trans is not exists | 交易不存在 |
| 303019 | request group id has not been configured | 请求的群组编号未配置 |
| 303020 | sign user id cannot be empty while sign type is 2 | 签名类型为2是签名用户编号不能为空 |
| 303021 | sign user id check failed | 签名用户编号校验失败 |
| 303022 | function is not exists | 合约方法不存在 |
| 303023 | data is not exists | 数据不存在 |

0 comments on commit a7f4f04

Please sign in to comment.