From f8a2ac7d454930e41896802bbbd702d3c57fb64e Mon Sep 17 00:00:00 2001 From: Leem Date: Mon, 15 Dec 2025 12:58:14 +0800 Subject: [PATCH 1/5] change in 4.8.1 of api --- docs/api/http.md | 35 +++++++++++++++++++++++++++++++++++ docs/api/json-rpc.md | 35 +++++++++++++++++++++++++++++++++++ docs/api/rpc.md | 6 ++++++ 3 files changed, 76 insertions(+) diff --git a/docs/api/http.md b/docs/api/http.md index 40143162..318274a8 100644 --- a/docs/api/http.md +++ b/docs/api/http.md @@ -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 in descending order by real-time vote count. +``` +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 in descending order by real-time vote count. + #### 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. +#### wallet/getpaginatednowwitnesslist +Description: Query the real-time vote count of each witness and return a paginated list of witnesses, sorted in descending order by real-time vote count. +``` +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. + +Return value: A paginated list of witnesses meeting the parameter conditions, sorted in descending order by real-time vote count. + ### TRC-10 Token #### walletsolidity/getassetissuelist diff --git a/docs/api/json-rpc.md b/docs/api/json-rpc.md index eca10d03..3fee9b00 100644 --- a/docs/api/json-rpc.md +++ b/docs/api/json-rpc.md @@ -940,6 +940,41 @@ Result ``` +### eth_getBlockReceipts + +*Return the transaction receipts for all transactions in the specified block. For the genesis block, blocks that have been pruned by light nodes, and blocks that have not yet been produced, it returns null.* + +**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"). + +**Returns** + +An array of objects - An array of transaction receipt objects, the object is the same as 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": ["0x377a8a2"], + + "id": 64 + +}' + +``` + +Result + +```json + +``` ### eth_getWork diff --git a/docs/api/rpc.md b/docs/api/rpc.md index 7c2c25a1..a8e74834 100644 --- a/docs/api/rpc.md +++ b/docs/api/rpc.md @@ -79,6 +79,12 @@ rpc ListWitnesses (EmptyMessage) returns (WitnessList) {} ``` Nodes: FullNode and SolidityNode +## Get the paged list of witnesses info, sorted 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) {} From 4231ef20fb9436f30e3a9316936036628e1eca66 Mon Sep 17 00:00:00 2001 From: Leem Date: Mon, 15 Dec 2025 14:28:49 +0800 Subject: [PATCH 2/5] Simplify the description of the GetPaginatedNowWitnessList api --- docs/api/rpc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/rpc.md b/docs/api/rpc.md index a8e74834..38039650 100644 --- a/docs/api/rpc.md +++ b/docs/api/rpc.md @@ -79,7 +79,7 @@ rpc ListWitnesses (EmptyMessage) returns (WitnessList) {} ``` Nodes: FullNode and SolidityNode -## Get the paged list of witnesses info, sorted in descending order by real-time vote count. +## Get the paged list of witnesses in descending order by real-time vote count ```protobuf rpc GetPaginatedNowWitnessList (PaginatedMessage) returns (WitnessList) {} ``` From 8deddaca04b8ac34b5a30980b62ed16b38f4e74b Mon Sep 17 00:00:00 2001 From: Leem Date: Mon, 15 Dec 2025 15:05:52 +0800 Subject: [PATCH 3/5] Create a null return value example;After version 4.8.1 goes live on Shasta, provide a new example with a non-null return value. --- docs/api/json-rpc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/json-rpc.md b/docs/api/json-rpc.md index 3fee9b00..90c0b026 100644 --- a/docs/api/json-rpc.md +++ b/docs/api/json-rpc.md @@ -962,7 +962,7 @@ curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{ "method": "eth_getBlockReceipts", - "params": ["0x377a8a2"], + "params": ["0x5416c22"], "id": 64 @@ -973,7 +973,7 @@ curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{ Result ```json - + {"jsonrpc":"2.0","id":1,"result":null} ``` ### eth_getWork From 41a3dd76f8245f3353d255ec10e2a166260f6ef2 Mon Sep 17 00:00:00 2001 From: Leem Date: Mon, 15 Dec 2025 17:38:28 +0800 Subject: [PATCH 4/5] should be a solidity api --- docs/api/http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/http.md b/docs/api/http.md index 318274a8..9add06ee 100644 --- a/docs/api/http.md +++ b/docs/api/http.md @@ -2060,7 +2060,7 @@ Parameter: None Return Value: A list of all witness information. -#### wallet/getpaginatednowwitnesslist +#### walletsolidity/getpaginatednowwitnesslist Description: Query the real-time vote count of each witness and return a paginated list of witnesses, sorted in descending order by real-time vote count. ``` curl -X POST http://127.0.0.1:8091/wallet/getpaginatednowwitnesslist -d '{ From 78f6c5ebaa73dd4f94b48d1c1222cb7a88f6a4ca Mon Sep 17 00:00:00 2001 From: Leem Date: Wed, 17 Dec 2025 12:04:00 +0800 Subject: [PATCH 5/5] Correct English grammar. --- docs/api/http.md | 8 ++++---- docs/api/json-rpc.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/api/http.md b/docs/api/http.md index 9add06ee..f3e236c5 100644 --- a/docs/api/http.md +++ b/docs/api/http.md @@ -1420,7 +1420,7 @@ 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 in descending order by real-time vote count. +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, @@ -1434,7 +1434,7 @@ Parameters: * `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 in descending order by real-time vote count. +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. @@ -2061,7 +2061,7 @@ 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 in descending order by real-time vote count. +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, @@ -2075,7 +2075,7 @@ Parameters: * `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 in descending order by real-time vote count. +Return value: A paginated list of witnesses meeting the parameter conditions, sorted by real-time vote count in descending order. ### TRC-10 Token diff --git a/docs/api/json-rpc.md b/docs/api/json-rpc.md index 90c0b026..0b630a6d 100644 --- a/docs/api/json-rpc.md +++ b/docs/api/json-rpc.md @@ -942,7 +942,7 @@ Result ### eth_getBlockReceipts -*Return the transaction receipts for all transactions in the specified block. For the genesis block, blocks that have been pruned by light nodes, and blocks that have not yet been produced, it returns null.* +*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** @@ -950,7 +950,7 @@ String - block number, it supports three types: block number represented as hexa **Returns** -An array of objects - An array of transaction receipt objects, the object is the same as the return value of [eth_getTransactionReceipt](#eth_gettransactionreceipt) +An array of objects - An array of transaction receipt objects, each object matches the return value of [eth_getTransactionReceipt](#eth_gettransactionreceipt) **Example**