Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions docs/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,7 @@ curl -X POST http://127.0.0.1:8090/wallet/updateasset -d '{
- [wallet/createwitness](#walletcreatewitness)
- [wallet/updatewitness](#walletupdatewitness)
- [wallet/listwitnesses](#walletlistwitnesses)
- [wallet/getpaginatednowwitnesslist](#walletgetpaginatednowwitnesslist)
- [wallet/withdrawbalance](#walletwithdrawbalance)
- [wallet/votewitnessaccount](#walletvotewitnessaccount)
- [wallet/getBrokerage](#walletgetbrokerage)
Expand Down Expand Up @@ -1382,6 +1383,23 @@ curl -X POST http://127.0.0.1:8090/wallet/listwitnesses

返回值:返回所有 SR 信息列表。

#### wallet/getpaginatednowwitnesslist
作用:查询各个witness的实时得票数量并按得票数量的降序返回witness分页列表
```
curl -X POST http://127.0.0.1:8090/wallet/getpaginatednowwitnesslist -d '{
"offset": 0,
"limit": 100,
"visible": true
}'
```
参数:

- `offset`:`long`型,表示起始下标,要求`>=0`
- `limit`:`long`型,表示返回的witness数,要求`>0` ,上限为系统常量`1000`
- `visible`: `boolean`型,可选参数,默认为false,控制返回的地址格式

返回值:满足参数条件的witness分页列表,按实时得票数量降序排序

#### wallet/withdrawbalance
作用:超级代表或者用户提取奖励到 balance,每 24 个小时可以提现一次。

Expand Down Expand Up @@ -1975,7 +1993,7 @@ curl -X POST http://127.0.0.1:8090/walletsolidity/getdelegatedresourceaccountind
返回值:
- 该接口返回一个包含双向代理关系列表的JSON对象。包含两个列表,一个是该帐户将资源委托给的地址列表(toAddress),另一个是将资源委托给该帐户的地址列表(fromAddress)

### 投票和SR
### 投票和超级代表

#### walletsolidity/listwitnesses
作用:查询当前的所有 SR 列表。
Expand All @@ -1986,7 +2004,26 @@ curl -X POST http://127.0.0.1:8091/walletsolidity/listwitnesses

返回值:返回所有 SR 信息列表。

### TRC10 通证

#### walletsolidity/getpaginatednowwitnesslist
作用:查询各个witness的实时得票数量并按得票数量的降序返回witness分页列表
```
curl -X POST http://127.0.0.1:8091/walletsolidity/getpaginatednowwitnesslist -d '{
"offset": 0,
"limit": 100,
"visible": true
}'
```
参数:

- `offset`:`long`型,表示起始下标,要求`>=0`
- `limit`:`long`型,表示返回的witness数,要求`>0` ,上限为系统常量`1000`
- `visible`: `boolean`型,可选参数,默认为false,控制返回的地址格式

返回值:满足参数条件的witness分页列表,按实时得票数量降序排序


### TRC-10通证

#### walletsolidity/getassetissuelist
作用:查询所有Token列表
Expand Down
36 changes: 36 additions & 0 deletions docs/api/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,42 @@ curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{

```

### eth_getBlockReceipts

*通过`blockNumber`查询指定区块中的所有交易收据(Transaction Receipts)。对于创世块,轻节点已经裁剪的块和未生产的块返回`null`。*

**参数**

String - `blockNumber`:支持十六进制字符串表示的区块号、blockHash(有无0x开头均支持)或标签( "latest"、"earliest"、"finalized")三种类型

**返回值**

An array of objects - 交易收据对象的数组,交易收据对象同[eth_getTransactionReceipt](#eth_gettransactionreceipt)的返回值

**示例**

```curl

curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{

"jsonrpc": "2.0",

"method": "eth_getBlockReceipts",

"params": ["0x5416c22"],

"id": 64

}'

```

结果

```json
{"jsonrpc":"2.0","id":64,"result":null}
```


### eth_getWork

Expand Down
6 changes: 6 additions & 0 deletions docs/api/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ rpc ListWitnesses (EmptyMessage) returns (WitnessList) {}
```
Nodes: FullNode and SolidityNode

## Get the paged list of witnesses in descending order by real-time vote count
```protobuf
rpc GetPaginatedNowWitnessList (PaginatedMessage) returns (WitnessList) {}
```
Nodes: FullNode

## Application for super representative
```protobuf
rpc CreateWitness (WitnessCreateContract) returns (Transaction) {}
Expand Down