-
Notifications
You must be signed in to change notification settings - Fork 261
Feat: 4.8.1 change in api #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
f8a2ac7
4231ef2
8deddac
41a3dd7
78f6c5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1369,6 +1369,7 @@ The following are voting and SR related APIs: | |
| - [wallet/createwitness](#walletcreatewitness) | ||
| - [wallet/updatewitness](#walletupdatewitness) | ||
| - [wallet/listwitnesses](#walletlistwitnesses) | ||
| - [wallet/getpaginatednowwitnesslist](#walletgetpaginatednowwitnesslist) | ||
| - [wallet/withdrawbalance](#walletwithdrawbalance) | ||
| - [wallet/votewitnessaccount](#walletvotewitnessaccount) | ||
| - [wallet/getBrokerage](#walletgetbrokerage) | ||
|
|
@@ -1418,6 +1419,23 @@ Parameter: None | |
|
|
||
| Return Value: A list of all Super Representative information. | ||
|
|
||
| #### wallet/getpaginatednowwitnesslist | ||
| Description: Query the real-time vote count of each witness and return a paginated list of witnesses, sorted by real-time vote count in descending order. | ||
| ``` | ||
| curl -X POST http://127.0.0.1:8090/wallet/getpaginatednowwitnesslist -d '{ | ||
| "offset": 0, | ||
| "limit": 100, | ||
| "visible": true | ||
| }' | ||
| ``` | ||
| Parameters: | ||
|
|
||
| * `offset`: `long` type, indicates the starting index, must be `>=0`. | ||
| * `limit`: `long` type, indicates the number of witnesses to return, must be `>0`, with an upper limit of system constant `1000`. | ||
| * `visible`: `boolean` type, optional parameter, defaults to false, controls the format of the returned address. | ||
|
|
||
| Return value: A paginated list of witnesses meeting the parameter conditions, sorted by real-time vote count in descending order. | ||
|
|
||
| #### wallet/withdrawbalance | ||
| Description:** SR or users withdraw rewards to their balance. This can be done once every 24 hours. | ||
|
|
||
|
|
@@ -2042,6 +2060,23 @@ Parameter: None | |
|
|
||
| Return Value: A list of all witness information. | ||
|
|
||
| #### walletsolidity/getpaginatednowwitnesslist | ||
| Description: Query the real-time vote count of each witness and return a paginated list of witnesses, sorted by real-time vote count in descending order. | ||
| ``` | ||
| curl -X POST http://127.0.0.1:8091/wallet/getpaginatednowwitnesslist -d '{ | ||
| "offset": 0, | ||
| "limit": 100, | ||
| "visible": true | ||
| }' | ||
| ``` | ||
| Parameters: | ||
|
|
||
| * `offset`: `long` type, indicates the starting index, must be `>=0`. | ||
| * `limit`: `long` type, indicates the number of witnesses to return, must be `>0`, with an upper limit of system constant `1000`. | ||
| * `visible`: `boolean` type, optional parameter, defaults to false, controls the format of the returned address. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line 2076 |
||
|
|
||
| Return value: A paginated list of witnesses meeting the parameter conditions, sorted by real-time vote count in descending order. | ||
|
|
||
| ### TRC-10 Token | ||
|
|
||
| #### walletsolidity/getassetissuelist | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -940,6 +940,41 @@ Result | |
|
|
||
| ``` | ||
|
|
||
| ### eth_getBlockReceipts | ||
|
|
||
| *Returns transaction receipts for all transactions in the specified block. Returns null for the genesis block, blocks that have been pruned by light nodes, or blocks that have not yet been produced.* | ||
|
|
||
| **Parameters** | ||
|
|
||
| String - block number, it supports three types: block number represented as hexadecimal string, blockHash (with or without the "0x" prefix), or tags ("latest", "earliest", "finalized"). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. String - block number, -> String - Block identifier. |
||
|
|
||
| **Returns** | ||
|
|
||
| An array of objects - An array of transaction receipt objects, each object matches the return value of [eth_getTransactionReceipt](#eth_gettransactionreceipt) | ||
|
|
||
| **Example** | ||
|
|
||
| ```curl | ||
|
|
||
| curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{ | ||
|
|
||
| "jsonrpc": "2.0", | ||
|
|
||
| "method": "eth_getBlockReceipts", | ||
|
|
||
| "params": ["0x5416c22"], | ||
|
|
||
| "id": 64 | ||
|
|
||
| }' | ||
|
|
||
| ``` | ||
|
|
||
| Result | ||
|
|
||
| ```json | ||
| {"jsonrpc":"2.0","id":1,"result":null} | ||
| ``` | ||
|
|
||
| ### eth_getWork | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 1435
'visible': 'boolean' type, optional parameter, defaults to false, controls the format of the returned address.
->
'visible': 'boolean' type. Optional parameter (defaults to false). Controls the format of the returned address.