task-svr/docs/cec_claim.md
2024-08-21 16:30:49 +08:00

121 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 1.\* 查询可获得的CEC(所有)
#### Request
- URL`/api/cec/info_all/:address`
- 方法:`GET`
#### Response
```js
{
"total": "200000000000000000000", // 总量
"available": "100000000000000000000", // 当前可获取的数量
"claimed": "0", // 已领取的数量
"outerAccount": 0, // 是否已绑定交易所账号
"stages": [ // 阶段信息
{
"stage": 1,
"amount": "100000000000000000000", // 当前阶段可获取的数量
"status": 0, // 领取状态, 0: 未领取, 1: 领取中, 9: 已领取
"unlocked": true, // 是否已解锁
"claimTime": 1720685893000, // 领取时间
"unlockTime": 1720685893000 // 解锁时间
},
{
"stage": 2,
"amount": "100000000000000000000",
"status": 0,
"unlocked": false,
"unlockTime": 1720772293000
}
],
"records": [
{
"address": "0x50a8e60041a206acaa5f844a1104896224be6f39",
"amount": "100000000000000000000", // 获得数量
"desc": "UAW", // 获得原因
"earnTime": "2024/04/01-2024/06/01" // 获得的时间
},
{
"address": "0x50a8e60041a206acaa5f844a1104896224be6f39",
"amount": "100000000000000000000",
"desc": "UAW ingame",
"earnTime": "2024/04/01-2024/06/01"
}
]
}
```
### 2.\* 查询可获得的CEC(所有)
#### Request
- URL`/api/cec/claim`
- 方法:`POST`
- 头部:
- Authorization: Bearer JWT_token
body:
```js
{
"address": "操作用的钱包"
}
#### Response
```js
{
"calls": [
{
"trans_req": {
"data": "0xd718f2fe00000000000000000000000050a8e60041a206acaa5f844a1104896224be6f39000000000000000000000000e34c5ea0c3083d11a735dc0609533b92130319f5000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000066c5a3be00000000000000000000000000000000000000000000000000009cd152f9e5c300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000417e20d59d85b8a49a9ea0e117f98e7d8ec92d6fdc8d3f7320347686734b320a967e75e307197badb266eacc97cbe70321916b5a74f721f00e2ec4eaa2dbbf6ad51b00000000000000000000000000000000000000000000000000000000000000",
"to": "0xC95bDFAaFBf79b435e4d2bF8d77842fc19e6fE56"
},
"trans_id": ""
}
],
"errcode": 0
}
```
### 3.\* 绑定交易所账号
#### Request
- URL`/api/cec/bind_account`
- 方法:`POST`
- 头部:
- Authorization: Bearer JWT_token
body:
```js
{
"accid": "bitget交易所账号id"
}
#### Response
```js
{
"errcode": 0
}
```