task-svr/docs/cec_claim.md
2024-08-22 15:02:01 +08:00

109 lines
2.5 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
{
"stage": 0, // 当前所处阶段, 0: 预充值阶段, 1, 2: 对应的阶段
"total": "200000000000000000000", // 总量
"available": "100000000000000000000", // 当前可获取的数量
"claimed": "0", // 已领取的数量
"unavailable": "100000000000000000000", // 不可领取的数量
"bindUid": "1231****3333", // 绑定了的交易所账号
"bindAddress": "0x44****3333", // 绑定了的交易所钱包地址
"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",
"address": "bitget交易所账号绑定的钱包地址"
}
#### Response
```js
{
"errcode": 0
}
```