From a96c80cc5fdd4dcaffe873b5fc7dbde6520fe70a Mon Sep 17 00:00:00 2001 From: LPX Date: Mon, 23 Oct 2023 19:07:49 +0900 Subject: [PATCH] add: data to use later - full eth rpc json specification as a json --- data/eth-rpc-specs.json | 212 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 data/eth-rpc-specs.json diff --git a/data/eth-rpc-specs.json b/data/eth-rpc-specs.json new file mode 100644 index 0000000..7a0aad5 --- /dev/null +++ b/data/eth-rpc-specs.json @@ -0,0 +1,212 @@ +{ + "methods": { + "web3_clientVersion": [[], "S"], + "web3_sha3": [["S"], "D", 1], + "net_version": [[], "S"], + "net_peerCount": [[], "Q"], + "net_listening": [[], "B"], + "personal_sign": [["D", "D20", "S"], "D", 2], + "personal_ecRecover": [["D", "D"], "D20", 2], + "eth_protocolVersion": [[], "S"], + "eth_syncing": [[], "B|EthSyncing"], + "eth_coinbase": [[], "D20"], + "eth_mining": [[], "B"], + "eth_hashrate": [[], "Q"], + "eth_gasPrice": [[], "Q"], + "eth_accounts": [[], ["D20"]], + "eth_blockNumber": [[], "Q"], + "eth_getBalance": [["D20", "Q|T"], "Q", 1, 2], + "eth_getStorageAt": [["D20", "Q", "Q|T"], "D", 2, 2], + "eth_getTransactionCount": [["D20", "Q|T"], "Q", 1, 2], + "eth_getBlockTransactionCountByHash": [["D32"], "Q", 1], + "eth_getBlockTransactionCountByNumber": [["Q|T"], "Q", 1], + "eth_getUncleCountByBlockHash": [["D32"], "Q", 1], + "eth_getUncleCountByBlockNumber": [["Q"], "Q", 1], + "eth_getCode": [["D20", "Q|T"], "D", 1, 2], + "eth_sign": [["D20", "D"], "D", 2], + "eth_signTypedData": [["Array|DATA", "D20"], "D", 1], + "eth_sendTransaction": [["SendTransaction"], "D", 1], + "eth_sendRawTransaction": [["D"], "D32", 1], + "eth_call": [["CallTransaction", "Q|T"], "D", 1, 2], + "eth_estimateGas": [["EstimateTransaction", "Q|T"], "Q", 1], + "eth_getBlockByHash": [["D32", "B"], "Block", 2], + "eth_getBlockByNumber": [["Q|T", "B"], "Block", 2], + "eth_getTransactionByHash": [["D32"], "Transaction", 1], + "eth_getTransactionByBlockHashAndIndex": [["D32", "Q"], "Transaction", 2], + "eth_getTransactionByBlockNumberAndIndex": [["Q|T", "Q"], "Transaction", 2], + "eth_getTransactionReceipt": [["D32"], "Receipt", 1], + "eth_getUncleByBlockHashAndIndex": [["D32", "Q"], "Block", 1], + "eth_getUncleByBlockNumberAndIndex": [["Q|T", "Q"], "Block", 2], + "eth_getCompilers": [[], ["S"]], + "eth_compileLLL": [["S"], "D", 1], + "eth_compileSolidity": [["S"], "D", 1], + "eth_compileSerpent": [["S"], "D", 1], + "eth_newFilter": [["Filter"], "Q", 1], + "eth_newBlockFilter": [[], "Q"], + "eth_newPendingTransactionFilter": [[], "Q"], + "eth_uninstallFilter": [["QP"], "B", 1], + "eth_getFilterChanges": [["QP"], ["FilterChange"], 1], + "eth_getFilterLogs": [["QP"], ["FilterChange"], 1], + "eth_getLogs": [["Filter"], ["FilterChange"], 1], + "eth_getWork": [[], ["D"]], + "eth_submitWork": [["D", "D32", "D32"], "B", 3], + "eth_submitHashrate": [["D", "D"], "B", 2], + "db_putString": [["S", "S", "S"], "B", 2], + "db_getString": [["S", "S"], "S", 2], + "db_putHex": [["S", "S", "D"], "B", 2], + "db_getHex": [["S", "S"], "D", 2], + "shh_post": [["SHHPost"], "B", 1], + "shh_version": [[], "S"], + "shh_newIdentity": [[], "D"], + "shh_hasIdentity": [["D"], "B"], + "shh_newGroup": [[], "D"], + "shh_addToGroup": [["D"], "B", 1], + "shh_newFilter": [["SHHFilter"], "Q", 1], + "shh_uninstallFilter": [["Q"], "B", 1], + "shh_getFilterChanges": [["Q"], ["SHHFilterChange"], 1], + "shh_getMessages": [["Q"], ["SHHFilterChange"], 1] + }, + "tags": ["latest", "earliest", "pending"], + "objects": { + "EthSyncing": { + "__required": [], + "startingBlock": "Q", + "currentBlock": "Q", + "highestBlock": "Q" + }, + "SendTransaction": { + "__required": ["from", "data"], + "from": "D20", + "to": "D20", + "gas": "Q", + "gasPrice": "Q", + "value": "Q", + "data": "D", + "nonce": "Q" + }, + "EstimateTransaction": { + "__required": [], + "from": "D20", + "to": "D20", + "gas": "Q", + "gasPrice": "Q", + "value": "Q", + "data": "D", + "nonce": "Q" + }, + "CallTransaction": { + "__required": ["to"], + "from": "D20", + "to": "D20", + "gas": "Q", + "gasPrice": "Q", + "value": "Q", + "data": "D", + "nonce": "Q" + }, + "Block": { + "__required": [], + "number": "Q", + "hash": "D32", + "parentHash": "D32", + "nonce": "D", + "sha3Uncles": "D", + "logsBloom": "D", + "transactionsRoot": "D", + "stateRoot": "D", + "receiptsRoot": "D", + "miner": "D", + "difficulty": "Q", + "totalDifficulty": "Q", + "extraData": "D", + "size": "Q", + "gasLimit": "Q", + "gasUsed": "Q", + "timestamp": "Q", + "transactions": ["DATA|Transaction"], + "uncles": ["D"] + }, + "Transaction": { + "__required": [], + "hash": "D32", + "nonce": "Q", + "blockHash": "D32", + "blockNumber": "Q", + "transactionIndex": "Q", + "from": "D20", + "to": "D20", + "value": "Q", + "gasPrice": "Q", + "gas": "Q", + "input": "D" + }, + "Receipt": { + "__required": [], + "transactionHash": "D32", + "transactionIndex": "Q", + "blockHash": "D32", + "blockNumber": "Q", + "cumulativeGasUsed": "Q", + "gasUsed": "Q", + "contractAddress": "D20", + "logs": ["FilterChange"] + }, + "Filter": { + "__required": [], + "fromBlock": "Q|T", + "toBlock": "Q|T", + "address": "D20", + "topics": ["D"] + }, + "FilterChange": { + "__required": [], + "removed": "B", + "logIndex": "Q", + "transactionIndex": "Q", + "transactionHash": "D32", + "blockHash": "D32", + "blockNumber": "Q", + "address": "D20", + "data": "Array|DATA", + "topics": ["D"] + }, + "SHHPost": { + "__required": ["topics", "payload", "priority", "ttl"], + "from": "D", + "to": "D", + "topics": ["D"], + "payload": "D", + "priority": "Q", + "ttl": "Q" + }, + "SHHFilter": { + "__required": ["topics"], + "to": "D", + "topics": ["D"] + }, + "SHHFilterChange": { + "__required": [], + "hash": "D", + "from": "D", + "to": "D", + "expiry": "Q", + "ttl": "Q", + "sent": "Q", + "topics": ["D"], + "payload": "D", + "workProved": "Q" + }, + "SHHMessage": { + "__required": [], + "hash": "D", + "from": "D", + "to": "D", + "expiry": "Q", + "ttl": "Q", + "sent": "Q", + "topics": ["D"], + "payload": "D", + "workProved": "Q" + } + } +}