Skip to content

Commit f87c30c

Browse files
committed
feat: add playground endpoints to json-rpc api
1 parent 6810b25 commit f87c30c

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

public/content/developers/docs/apis/json-rpc/index.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ You can use the [playground tool](https://ethereum-json-rpc.com) to discover and
143143

144144
Returns the current client version.
145145

146+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=web3_clientVersion)
147+
146148
**Parameters**
147149

148150
None
@@ -168,6 +170,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],
168170

169171
Returns Keccak-256 (_not_ the standardized SHA3-256) of the given data.
170172

173+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=web3_sha3)
174+
171175
**Parameters**
172176

173177
1. `DATA` - The data to convert into a SHA3 hash
@@ -197,6 +201,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c
197201

198202
Returns the current network id.
199203

204+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=net_version)
205+
200206
**Parameters**
201207

202208
None
@@ -228,6 +234,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67
228234

229235
Returns `true` if client is actively listening for network connections.
230236

237+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=net_listening)
238+
231239
**Parameters**
232240

233241
None
@@ -253,6 +261,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":
253261

254262
Returns number of peers currently connected to the client.
255263

264+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=net_peerCount)
265+
256266
**Parameters**
257267

258268
None
@@ -278,6 +288,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":
278288

279289
Returns the current Ethereum protocol version. Note that this method is [not available in Geth](https://github.com/ethereum/go-ethereum/pull/22064#issuecomment-788682924).
280290

291+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_protocolVersion)
292+
281293
**Parameters**
282294

283295
None
@@ -303,6 +315,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[]
303315

304316
Returns an object with data about the sync status or `false`.
305317

318+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_syncing)
319+
306320
**Parameters**
307321

308322
None
@@ -387,6 +401,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}
387401

388402
Returns the client coinbase address.
389403

404+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_coinbase)
405+
390406
> **Note:** This method has been deprecated as of **v1.14.0** and is no longer supported. Attempting to use this method will result in a "Method not supported" error.
391407
392408
**Parameters**
@@ -414,6 +430,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":6
414430

415431
Returns the chain ID used for signing replay-protected transactions.
416432

433+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_chainId)
434+
417435
**Parameters**
418436

419437
None
@@ -439,6 +457,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67
439457

440458
Returns `true` if client is actively mining new blocks. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/).
441459

460+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_mining)
461+
442462
**Parameters**
443463

444464
None
@@ -464,6 +484,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":71}
464484

465485
Returns the number of hashes per second that the node is mining with. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/).
466486

487+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_hashrate)
488+
467489
**Parameters**
468490

469491
None
@@ -489,6 +511,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":7
489511

490512
Returns an estimate of the current price per gas in wei. For example, the Besu client examines the last 100 blocks and returns the median gas unit price by default.
491513

514+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_gasPrice)
515+
492516
**Parameters**
493517

494518
None
@@ -510,10 +534,14 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":7
510534
}
511535
```
512536

537+
538+
513539
### eth_accounts {#eth_accounts}
514540

515541
Returns a list of addresses owned by client.
516542

543+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_accounts)
544+
517545
**Parameters**
518546

519547
None
@@ -538,6 +566,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1
538566
### eth_blockNumber {#eth_blocknumber}
539567

540568
Returns the number of most recent block.
569+
570+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_blockNumber)
541571

542572
**Parameters**
543573

@@ -564,6 +594,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id
564594

565595
Returns the balance of the account of given address.
566596

597+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBalance)
598+
567599
**Parameters**
568600

569601
1. `DATA`, 20 Bytes - address to check for balance.
@@ -594,6 +626,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407
594626

595627
Returns the value from a storage position at a given address.
596628

629+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getStorageAt)
630+
597631
**Parameters**
598632

599633
1. `DATA`, 20 Bytes - address of the storage.
@@ -695,6 +729,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params
695729

696730
Returns the number of transactions in a block from a block matching the given block hash.
697731

732+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByHash)
733+
698734
**Parameters**
699735

700736
1. `DATA`, 32 Bytes - hash of a block
@@ -724,6 +760,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHa
724760

725761
Returns the number of transactions in a block matching the given block number.
726762

763+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByNumber)
764+
727765
**Parameters**
728766

729767
1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block).
@@ -755,6 +793,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNu
755793

756794
Returns the number of uncles in a block from a block matching the given block hash.
757795

796+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockHash)
797+
758798
**Parameters**
759799

760800
1. `DATA`, 32 Bytes - hash of a block
@@ -784,6 +824,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","p
784824

785825
Returns the number of uncles in a block from a block matching the given block number.
786826

827+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockNumber)
787828
**Parameters**
788829

789830
1. `QUANTITY|TAG` - integer of a block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [default block parameter](/developers/docs/apis/json-rpc/#default-block)
@@ -815,6 +856,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber",
815856

816857
Returns code at a given address.
817858

859+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getCode)
860+
818861
**Parameters**
819862

820863
1. `DATA`, 20 Bytes - address
@@ -994,6 +1037,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params"
9941037

9951038
Executes a new message call immediately without creating a transaction on the blockchain. Often used for executing read-only smart contract functions, for example the `balanceOf` for an ERC-20 contract.
9961039

1040+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_call)
1041+
9971042
**Parameters**
9981043

9991044
1. `Object` - The transaction call object
@@ -1028,6 +1073,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{see above}]
10281073

10291074
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
10301075

1076+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_estimateGas)
1077+
10311078
**Parameters**
10321079

10331080
See [eth_call](#eth_call) parameters, except that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.
@@ -1053,6 +1100,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{see
10531100

10541101
Returns information about a block by hash.
10551102

1103+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockByHash)
1104+
10561105
**Parameters**
10571106

10581107
1. `DATA`, 32 Bytes - Hash of a block.
@@ -1105,7 +1154,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0
11051154
"gasLimit": "0x1388",
11061155
"gasUsed": "0x0",
11071156
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
1108-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1157+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
11091158
"miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
11101159
"mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
11111160
"nonce": "0x689056015818adbe",
@@ -1130,6 +1179,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0
11301179
11311180
Returns information about a block by block number.
11321181
1182+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getBlockByNumber)
1183+
11331184
**Parameters**
11341185
11351186
1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block).
@@ -1158,6 +1209,8 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash)
11581209
11591210
Returns the information about a transaction requested by transaction hash.
11601211
1212+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getTransactionByHash)
1213+
11611214
**Parameters**
11621215
11631216
1. `DATA`, 32 Bytes - hash of a transaction
@@ -1217,6 +1270,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","param
12171270
12181271
Returns information about a transaction by block hash and transaction index position.
12191272
1273+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockHashAndIndex)
12201274
**Parameters**
12211275
12221276
1. `DATA`, 32 Bytes - hash of a block.
@@ -1245,6 +1299,8 @@ Result see [eth_getTransactionByHash](#eth_gettransactionbyhash)
12451299
12461300
Returns information about a transaction by block number and transaction index position.
12471301
1302+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockNumberAndIndex)
1303+
12481304
**Parameters**
12491305
12501306
1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block).
@@ -1341,6 +1397,8 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","para
13411397
13421398
Returns information about a uncle of a block by hash and uncle index position.
13431399
1400+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleByBlockHashAndIndex)
1401+
13441402
**Parameters**
13451403
13461404
1. `DATA`, 32 Bytes - The hash of a block.
@@ -1371,6 +1429,8 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash)
13711429
13721430
Returns information about a uncle of a block by number and uncle index position.
13731431
1432+
[![Try this endpoint](./playground.svg)](https://ethereum-json-rpc.com/?method=eth_getUncleByBlockNumberAndIndex)
1433+
13741434
**Parameters**
13751435
13761436
1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"`, `"finalized"`, as in the [default block parameter](/developers/docs/apis/json-rpc/#default-block).
@@ -1589,6 +1649,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":[
15891649
15901650
Returns an array of all logs matching filter with given id.
15911651
1652+
15921653
**Parameters**
15931654
15941655
1. `QUANTITY` - The filter id.
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)