BCS
  • Blockchain Station™
  • Quick Start
    • Quick Guide
  • API
    • Public API endpoints
    • Getting Started
    • Installation
    • Hyperthereum Schema Basics
    • Schema Structure
    • Implementation Details and Notes
    • Covalent indexing and querying API
    • API Methods
    • API Objects
    • Postman
  • Tutorials
    • Setup MetaMask (testnet)
    • Deploy a Smart Contract
    • Create a Fixed-cap Asset
    • Create a Variable-cap Asset
    • Create an NFT-based Game
  • Technology
    • Bonsai Tries
    • HBFT
    • Rewards
    • FAQ
Powered by GitBook
On this page
  • ADMIN methods
  • CLIQUE methods
  • DEBUG methods
  • EEA methods
  • ETH methods
  • IBFT 2.0 methods
  • MINER methods
  • NET methods
  • PERM (Permissioning) methods
  • PLUGINS methods
  • PRIV methods
  • QBFT methods
  • TRACE methods
  • TXPOOL methods
  • WEB3 methods
  • Miscellaneous methods
  1. API

API Methods

PreviousCovalent indexing and querying APINextAPI Objects

Last updated 3 years ago

ADMIN methods

The ADMIN API methods provide administrative functionality to manage your node.

Note

The ADMIN API methods are not enabled by default for JSON-RPC. To enable the ADMIN API methods, use the or options.

admin_addPeer

Adds a .

Caution

If connections are timing out, ensure the node ID in the is correct.

Parameters

enode: string - of peer to add

Returns

result: boolean - true if peer added or false if peer already a

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_addPeer","params":["enode://f59c0ab603377b6ec88b89d5bb41b98fc385030ab1e4b03752db6f7dab364559d92c757c13116ae6408d2d33f0138e7812eb8b696b2a22fe3332c4b5127b22a3@127.0.0.1:30304"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

admin_changeLogLevel

Changes the log level without restarting Besu. You can change the log level for all logs, or you can change the log level for specific packages or classes.

You can specify only one log level per RPC call.

Parameters

  • log_filter: array - (optional) packages or classes for which to change the log level

Returns

result: string - Success if the log level has changed, otherwise error

Example

The following example changes the debug level for specified classes to DEBUG.

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0", "method":"admin_changeLogLevel", "params":["DEBUG", ["org.hyperledger.besu.ethereum.eth.manager","org.hyperledger.besu.ethereum.p2p.rlpx.connections.netty.ApiHandler"]], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

The following example changes the debug level of all logs to WARN.

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_changeLogLevel","params":["WARN"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

admin_generateLogBloomCache

Tip

Note

Each index file contains 100000 blocks. The last fragment of blocks less than 100000 are not indexed.

Parameters

  • startBlock: string - block to start generating indexes

  • endBlock: string - block to stop generating indexes

Returns

result: object - log bloom index details:

  • startBlock: string - starting block for the last requested cache generation

  • endBlock: string - ending block for the last requested cache generation

  • currentBlock: string - most recent block added to the cache

  • indexing: boolean - indicates if indexing is in progress

  • boolean - indicates acceptance of the request from this call to generate the cache

Example

curl HTTP request

curl -X POST --data '{jsonrpc":"2.0","method":"admin_generateLogBloomCache", "params":["0x0", "0x10000"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

admin_logsRemoveCache

Removes cache files for the specified range of blocks.

Parameters

You can skip a parameter by using an empty string, "". If you specify:

  • No parameters, the call removes cache files for all blocks.

  • Only fromBlock, the call removes cache files for the specified block.

  • Only toBlock, the call removes cache files from the genesis block to the specified block.

Returns

result: object - Cache Removed status or error.

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_logsRemoveCache","params":["1", "100"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

admin_logsRepairCache

Repairs cached logs by fixing all segments starting with the specified block number.

Parameters

startBlock: string - decimal index of the starting block to fix; defaults to the head block

Returns

result: object - status of the repair request; Started or Already running

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_logsRepairCache","params":["1200"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

admin_nodeInfo

Returns networking information about the node. The information includes general information about the node and specific information from each running Ethereum sub-protocol (for example, eth).

Parameters

None

Returns

result: object - node object with the following fields:

  • listenAddr: string - host and port for the node

  • name: string - client name

  • protocols: object - list of objects containing information for each Ethereum sub-protocol

Note

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

admin_peers

Returns networking information about connected remote nodes.

Parameters

None

Returns

result: array of objects - list of objects returned for each remote node, with the following fields.

  • version: string - P2P protocol version

  • name: string - client name

  • caps: array of strings - list of Ethereum sub-protocol capabilities

  • network: object - local and remote addresses established at time of bonding with the peer (the remote address might not match the hex value for port; it depends on which node initiated the connection.)

  • port: string - port on the remote node on which P2P discovery is listening

  • enode: string - enode URL of the remote node

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

admin_removePeer

Parameters

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_removePeer","params":["enode://f59c0ab603377b6ec88b89d5bb41b98fc385030ab1e4b03752db6f7dab364559d92c757c13116ae6408d2d33f0138e7812eb8b696b2a22fe3332c4b5127b22a3@127.0.0.1:30304"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

CLIQUE methods

Note

clique_discard

Parameters

address: string - 20-byte address of proposed signer

Returns

result: boolean - indicates if the proposal is discarded

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"clique_discard","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

clique_getSigners

Parameters

Returns

result: array of string - list of 20-byte addresses of signers

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"clique_getSigners","params":["latest"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

clique_getSignerMetrics

Provides the following validator metrics for the specified range:

  • Number of blocks from each validator

  • Block number of the last block proposed by each validator (if any proposed in the specified range)

  • All validators present in the last block

Parameters

If you specify:

  • No parameters, the call provides metrics for the last 100 blocks, or all blocks if there are less than 100 blocks.

  • Only the first parameter, the call provides metrics for all blocks from the block specified to the latest block.

Returns

result: array of objects - list of validator objects

Note

The proposer of the genesis block has address 0x0000000000000000000000000000000000000000.

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"clique_getSignerMetrics","params":["1", "100"], "id":1}' http://127.0.0.1:8545

wscat WSJSON result

clique_getSignersAtHash

Lists signers for the specified block.

Parameters

hash: string - 32-byte block hash

Returns

result: array of string - list of 20-byte addresses of signers

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"clique_getSignersAtHash","params":["0x98b2ddb5106b03649d2d337d42154702796438b3c74fd25a5782940e84237a48"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

clique_proposals

Parameters

None

Returns

result: map of strings to booleans - map of account addresses to corresponding boolean values indicating the proposal for each account (if true, the proposal is to add a signer; if false, the proposal is to remove a signer.)

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"clique_proposals","params":[], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

clique_propose

Parameters

  • address: string - 20-byte address

  • proposal: boolean - true to propose adding signer or false to propose removing signer

Returns

result: boolean - true

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"clique_propose","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

DEBUG methods

Note

debug_accountRange

Returns the accounts for a specified block.

Parameters

  • blockHashOrNumber: string - block hash or number

  • txIndex: number - transaction index from which to start

  • address: string - address hash from which to start

  • limit: integer - maximum number of account entries to return

Returns

result: object - account details object with the following fields:

  • addressMap: map of strings to strings - map of address hashes and account addresses

  • nextKey: string - hash of the next address if any addresses remain in the state, otherwise zero

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_accountRange","params":["12345", 0, "0", 5],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_batchSendRawTransaction

Parameters

data: string - signed transaction data array

Returns

result: array of objects - object returned for each transaction, with the following fields:

  • index: string - index of the transaction in the request parameters array

  • success: boolean - indicates whether or not the transaction has been added to the transaction pool

  • errorMessage: string - (optional) error message

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_batchSendRawTransaction","params":["0xf868808203e882520894627306090abab3a6e1400e9345bc60c78a8bef57872386f26fc10000801ba0ac74ecfa0e9b85785f042c143ead4780931234cc9a032fce99fab1f45e0d90faa02fd17e8eb433d4ca47727653232045d4f81322619c0852d3fe8ddcfcedb66a43","0x416","0xf868018203e882520894627306090abab3a6e1400e9345bc60c78a8bef57872386f26fc10000801ca0b24ea1bee8fe36984c36acbf80979a4509f23fc17141851e08d505c0df158aa0a00472a05903d4cd7a811bd4d5c59cc105d93f5943f3393f253e92e65fc36e7ce0","0xf868808203e882520894627306090abab3a6e1400e9345bc60c78a8bef5787470de4df820000801ca0f7936b4de04792e3c65095cfbfd1399d231368f5f05f877588c0c8509f6c98c9a01834004dead527c8da1396eede42e1c60e41f38a77c2fd13a6e495479c729b99"],"id":1}' http://127.0.0.1:8545

wscat WSJSON result

debug_getBadBlocks

Returns a list of invalid blocks. This is used to detect and analyze consensus flaws.

Parameters

None

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_getBadBlocks","params":[],"id":1}' http://127.0.0.1:8545

wscat WSJSON result

debug_standardTraceBlockToFile

Generates files containing the block trace. A separate file is generated for each transaction in the block.

You can also specify a trace file for a specific transaction in a block.

Parameters

blockHash: string - block hash

txHash: string - (optional) transaction hash; if omitted, a trace file is generated for each transaction in the block.

disableMemory: boolean - (optional) specifies whether to capture EVM memory during the trace; defaults to true

Returns

result: string - location of the generated trace files

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_standardTraceBlockToFile","params":["0x2dc0b6c43144e314a86777b4bd4f987c0790a6a0b21560671d221ed81a23f2dc", {
"txHash": "0x4ff04c4aec9517721179c8dd435f47fbbfc2ed26cd4926845ab687420d5580a6", "disableMemory": false}], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_standardTraceBadBlockToFile

Generates files containing the block trace of invalid blocks. A separate file is generated for each transaction in the block.

Parameters

blockHash: string - block hash

Returns

result: string - location of the generated trace files

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_standardTraceBadBlockToFile","params":["0x53741e9e94791466d117c5f9e41a2ed1de3f73d39920c621dfc2f294e7779baa"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_storageRangeAt

Returns the contract storage for the specified range.

Parameters

  • blockHash: string - block hash

  • txIndex: number - transaction index from which to start

  • address: string - contract address

  • startKey: string - start key

  • limit: number - number of storage entries to return

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_storageRangeAt","params":["0x2b76b3a2fc44c0e21ea183d06c846353279a7acf12abcc6fb9d5e8fb14ae2f8c",0,"0x0e0d2c8f7794e82164f11798276a188147fbd415","0x0000000000000000000000000000000000000000000000000000000000000000",1], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_metrics

Returns metrics providing information on the internal operation of Besu.

The available metrics might change over time. The JVM metrics might vary based on the JVM implementation used.

The metric types are:

  • Timer

  • Counter

  • Gauge

Parameters

None

Returns

result: object - metrics object

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_metrics","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_traceTransaction

Reruns the transaction with the same state as when the transaction executed.

Parameters

  • transactionHash: string - transaction hash

  • options: object - request options object with the following fields (all optional and default to false):

    • disableStorage: boolean - true disables storage capture.

    • disableMemory: boolean - true disables memory capture.

    • disableStack : boolean - true disables stack capture.

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x2cc6c94c21685b7e0f8ddabf277a5ccf98db157c62619cde8baea696a74ed18e",{"disableStorage":true}],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_traceBlock

Returns full trace of all invoked opcodes of all transactions included in the block.

Parameters

  • block: string - RLP of the block

  • options: object - request options object with the following fields (all optional and default to false):

    • disableStorage: boolean - true disables storage capture.

    • disableMemory: boolean - true disables memory capture.

    • disableStack : boolean - true disables stack capture.

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlock","params":["0xf90277f90208a05a41d0e66b4120775176c09fcf39e7c0520517a13d2b57b18d33d342df038bfca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794e6a7a1d47ff21b6321162aea7c6cb457d5476bcaa00e0df2706b0a4fb8bd08c9246d472abbe850af446405d9eba1db41db18b4a169a04513310fcb9f6f616972a3b948dc5d547f280849a87ebb5af0191f98b87be598a0fe2bf2a941abf41d72637e5b91750332a30283efd40c424dc522b77e6f0ed8c4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000860153886c1bbd82b44382520b8252088455c426598b657468706f6f6c2e6f7267a0b48c515a9dde8d346c3337ea520aa995a4738bb595495506125449c1149d6cf488ba4f8ecd18aab215f869f86780862d79883d2000825208945df9b87991262f6ba471f09758cde1c0fc1de734827a69801ca088ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0a045e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33ac0"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_traceBlockByHash

Returns full trace of all invoked opcodes of all transactions included in the block.

Parameters

  • blockHash: string - block hash

  • options: object - request options object with the following fields (all optional and default to false):

    • disableStorage: boolean - true disables storage capture.

    • disableMemory: boolean - true disables memory capture.

    • disableStack : boolean - true disables stack capture.

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0xaceb3b2c9b25b0589230873921eb894b28722011b8df63977145517d754875a5"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

debug_traceBlockByNumber

Returns full trace of all invoked opcodes of all transactions included in the block.

Parameters

  • options: object - request options object with the following fields (all optional and default to false):

    • disableStorage: boolean - true disables storage capture.

    • disableMemory: boolean - true disables memory capture.

    • disableStack : boolean - true disables stack capture.

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","params":["0x7224",{"disableStorage":true}], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

EEA methods

Note

eea_sendRawTransaction

To avoid exposing your private key, create signed transactions offline and send the signed transaction data using eea_sendRawTransaction.

Important

Parameters

transaction: string - signed RLP-encoded private transaction

Returns

Tip

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eea_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

ETH methods

The ETH API methods allow you to interact with the blockchain.

Note

eth_accounts

Returns a list of account addresses a client owns.

Note

Parameters

None

Returns

result: array of strings - list of 20-byte account addresses owned by the client

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":53}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_blockNumber

Returns the index corresponding to the block number of the current chain head.

Parameters

None

Returns

result: string - hexadecimal integer representing the index corresponding to the block number of the current chain head

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":51}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_call

Invokes a contract function locally and does not change the state of the blockchain.

Parameters

Note

Returns

result: string - return value of the executed contract

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"}, "latest"],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_chainId

Parameters

None

Returns

result: string - chain ID in hexadecimal

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":51}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_coinbase

Returns the client coinbase address. The coinbase address is the account to pay mining rewards to.

To set a coinbase address, start Besu with the --miner-coinbase option set to a valid Ethereum account address. You can get the Ethereum account address from a client such as MetaMask or Etherscan. For example:

Example

besu --miner-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73" --rpc-http-enabled

Parameters

None

Returns

result: string - coinbase address

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":53}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_estimateGas

Returns an estimate of the gas required for a transaction to complete. The estimation process does not use gas and the transaction is not added to the blockchain. The resulting estimate can be greater than the amount of gas the transaction ends up using, for reasons including EVM mechanics and node performance.

Parameters

For eth_estimateGas, all fields are optional because setting a gas limit is irrelevant to the estimation process (unlike transactions, in which gas limits apply).

Returns

result: string - amount of gas used

Example of cost estimate of a value transaction

The following example returns an estimate of 21000 wei (0x5208) for the transaction.

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"from":"0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73","to":"0x44Aa93095D6749A706051658B970b941c72c1D53","value":"0x1"}],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

Example of cost estimate of deploying a simple storage smart contract

The following example request estimates the cost of deploying a simple storage smart contract to the network. The data field contains the hash of the compiled contract you want to deploy. (You can get the compiled contract hash from your IDE, for example, Remix > Compile tab > details > WEB3DEPLOY.) The result is 113355 wei.

curl HTTP request

 curl -X POST \
    http://127.0.0.1:8545 \
    -H 'Content-Type: application/json' \
    -d '{
      "jsonrpc": "2.0",
      "method": "eth_estimateGas",
      "params": [{
        "from": "0x8bad598904ec5d93d07e204a366d084a80c7694e",
        "data": "0x608060405234801561001057600080fd5b5060e38061001f6000396000f3fe6080604052600436106043576000357c0100000000000000000000000000000000000000000000000000000000900480633fa4f24514604857806355241077146070575b600080fd5b348015605357600080fd5b50605a60a7565b6040518082815260200191505060405180910390f35b348015607b57600080fd5b5060a560048036036020811015609057600080fd5b810190808035906020019092919050505060ad565b005b60005481565b806000819055505056fea165627a7a7230582020d7ad478b98b85ca751c924ef66bcebbbd8072b93031073ef35270a4c42f0080029"
      }],
      "id": 1
    }'

JSON result

eth_feeHistory

Returns base fee per gas and transaction effective priority fee per gas history for the requested block range, allowing you to track trends over time.

Parameters

  • blockCount: integer - Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. If blocks in the specified block range are not available, then only the fee history for available blocks is returned.

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[2, "latest"],"id":28}' http://127.0.0.1:8545

wscat WSJSON result

eth_gasPrice

Returns a percentile gas unit price for the most recent blocks, in Wei. By default, the last 100 blocks are examined and the 50th percentile gas unit price (that is, the median value) is returned.

Parameters

None

Returns

result: string - percentile gas unit price for the most recent blocks, in Wei, as a hexadecimal value

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getBalance

Returns the account balance of the specified address.

Parameters

  • address: string - 20-byte account address from which to retrieve the balance

Returns

result: string - current balance, in Wei, as a hexadecimal value

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "latest"],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getBlockByHash

Returns information about the block matching the specified block hash.

Parameters

  • hash: string - 32-byte hash of a block

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getBlockByNumber

Returns information about the block matching the specified block number.

Parameters

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x68B3", true],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getBlockTransactionCountByHash

Returns the number of transactions in the block matching the specified block hash.

Parameters

hash: string - 32-byte block hash

Returns

result: number - integer representing the number of transactions in the specified block, or null if no matching block hash is found

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getBlockTransactionCountByNumber

Returns the number of transactions in a block matching the specified block number.

Parameters

Returns

result: string - integer representing the number of transactions in the specified block, or null if no matching block number is found

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0xe8"],"id":51}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getCode

Returns the code of the smart contract at the specified address. Besu stores compiled smart contract code as a hexadecimal value.

Parameters

address: string - 20-byte contract address

Returns

result: data - code stored at the specified address

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getCode","params":["0xa50a51c09a5c451c52bb714527e1974b686d8e77", "latest"],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getFilterChanges

Polls the specified filter and returns an array of changes that have occurred since the last poll.

Parameters

filterId: string - filter ID

Returns

result: array of strings or objects - if nothing changed since the last poll, an empty list; otherwise:

  • For filters created with eth_newBlockFilter, returns block hashes.

  • For filters created with eth_newPendingTransactionFilter, returns transaction hashes.

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0xf8bf5598d9e04fbe84523d42640b9b0e"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_getFilterLogs

Note

eth_getFilterLogs is only used for filters created with eth_newFilter. To specify a filter object and get logs without creating a filter, use eth_getLogs .

Parameters

filterId: string - filter ID

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x5ace5de3985749b6a1b2b0d3f3e1fb69"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_getLogs

Attention

Using eth_getLogs to get the logs from a large range of blocks, especially an entire chain from its genesis block, can cause Besu to hang and never return a response. We recommend splitting one large query into multiple ones for better performance.

Parameters

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"earliest", "toBlock":"latest", "address": "0x2e1f232a9439c3d459fceca0beef13acc8259dd8", "topics":[]}], "id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getMinerDataByBlockHash

Returns miner data for the specified block.

Parameters

hash: string - 32-byte block hash

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getMinerDataByBlockHash","params": ["0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7"],"id": 1}' http://127.0.0.1:8545

wscat WSJSON result

eth_getMinerDataByBlockNumber

Returns miner data for the specified block.

Parameters

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getMinerDataByBlockNumber","params": ["0x7689D2"],"id": 1}' http://127.0.0.1:8545

wscat WSJSON result

eth_getProof

Returns the account and storage values of the specified account, including the Merkle proof.

The API allows IoT devices or mobile apps which are unable to run light clients to verify responses from untrusted sources, by using a trusted block hash.

Parameters

address: string - 20-byte address of the account or contract

keys: array of strings - list of 32-byte storage keys to generate proofs for

Returns

result: object - account details object with the following fields:

  • balance: string - account balance

  • codeHash: string - 32-byte hash of the account code

  • nonce: string - number of transactions sent from the account

  • storageHash: string - 32-byte SHA3 of the storageRoot

  • accountProof: array of strings - list of RLP-encoded Merkle tree nodes, starting with the stateRoot

  • storageProof: array of objects - list of storage entry objects with the following fields:

    • key: string - storage key

    • value: string - storage value

    • proof: array of strings - list of RLP-encoded Merkle tree nodes, starting with the storageHash

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getProof","params": [
"0a8156e7ee392d885d10eaa86afd0e323afdcd95", ["0x0000000000000000000000000000000000000000000000000000000000000347"], "latest"],"id": 1}' http://127.0.0.1:8545

wscat WSJSON result

eth_getQuorumPayload

Parameters

id: string - the generated SHA3-512 hash of the encrypted payload from Tessera, in hex (the input value in the transaction)

Returns

result: string - unencrypted transaction payload in hex

Example

curl HTTP

curl -X POST http://127.0.0.1:22000 --data '{"jsonrpc":"2.0","method":"eth_getQuorumPayload","params":["0x5e902fa2af51b186468df6ffc21fd2c26235f4959bf900fc48c17dc1774d86d046c0e466230225845ddf2cf98f23ede5221c935aac27476e77b16604024bade0"],"id":67}'

wscat WSJSON result

eth_getStorageAt

Returns the value of a storage position at a specified address.

Parameters

address: string - 20-byte storage address

index: string - integer index of the storage position

Returns

result : string - value at the specified storage position

Example

Calculating the correct position depends on the storage you want to retrieve.

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getStorageAt","params": ["0x‭3B3F3E‬","0x0","latest"],"id": 53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getTransactionByBlockHashAndIndex

Returns transaction information for the specified block hash and transaction index position.

Parameters

block: string - 32-byte hash of a block

index: string - integer representing the transaction index position

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7", "0x2"], "id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getTransactionByBlockNumberAndIndex

Returns transaction information for the specified block number and transaction index position.

Parameters

index: string - transaction index position

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["82990", "0x2"], "id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getTransactionByHash

Returns transaction information for the specified transaction hash.

Parameters

transaction: string - 32-byte transaction hash

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getTransactionCount

Returns the number of transactions sent from a specified address. Use the pending tag to get the next account nonce not used by any pending transactions.

Parameters

address: string - 20-byte account address

Returns

result: string - integer representing the number of transactions sent from the specified address

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f","latest"],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash. Receipts for pending transactions are not available.

Parameters

transaction: string - 32-byte hash of a transaction

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"],"id":53}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getUncleByBlockHashAndIndex

Returns uncle specified by block hash and index.

Parameters

block: string - 32-byte block hash

uncleIndex: string - index of the uncle

Returns

Note

Uncles do not contain individual transactions.

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7", "0x0"],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getUncleByBlockNumberAndIndex

Returns uncle specified by block number and index.

Parameters

  • uncleIndex: string - index of the uncle

Returns

Note

Uncles do not contain individual transactions.

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x7689D2", "0x0"],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getUncleCountByBlockHash

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

Parameters

block: string - 32-byte block hash

Returns

result: string - integer representing the number of uncles in the specified block

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getUncleCountByBlockNumber

Returns the number of uncles in a block matching the specified block number.

Parameters

Returns

result: string - integer representing the number of uncles in the specified block

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0xe8"],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_getWork

Returns the hash of the current block, the seed hash, and the required target boundary condition.

Parameters

None

Returns

result: array of strings - array with the following items:

  • header: string - 32-byte hash of the current block header (PoW-hash)

  • seed: string - 32-byte seed hash used for the DAG

  • target: string - 32-byte required target boundary condition: 2^256 / difficulty

  • blockNumber: string - hexadecimal integer representing the current block number

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getWork","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_hashrate

Returns the number of hashes per second with which the node is mining.

When the stratum server is enabled, this method returns the cumulative hashrate of all sealers reporting their hashrate.

Parameters

None

Returns

result: string - number of hashes per second

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_mining

Whether the client is actively mining new blocks. Besu pauses mining while the client synchronizes with the network regardless of command settings or methods called.

Parameters

None

Returns

result: boolean - indicates if the client is actively mining new blocks

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":53}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_newBlockFilter

Parameters

None

Returns

result: string - filter ID

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_newFilter

Parameters

Note

fromBlock and toBlock in the filter options object default to latest.

Returns

result: string - filter ID

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock":"earliest", "toBlock":"latest", "topics":[]}],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_newPendingTransactionFilter

Parameters

None

Returns

result: string - filter ID

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_protocolVersion

Returns current Ethereum protocol version.

Parameters

None

Returns

result: string - Ethereum protocol version

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_sendRawTransaction

To avoid exposing your private key, create signed transactions offline and send the signed transaction data using eth_sendRawTransaction.

Important

Parameters

Note

Returns

result: string - 32-byte transaction hash

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_submitHashrate

Parameters

  • hashrate: string - 32-byte hexadecimal string representation of the hashrate

  • id: string - 32-byte random hexadecimal ID identifying the client

Returns

result: boolean - indicates if submission is successful

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0", "method":"eth_submitHashrate", "params":["0x0000000000000000000000000000000000000000000000000000000000500000", "0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_submitWork

Parameters

  • nonce: string - retrieved 8-byte nonce

  • header: string - 32-byte hash of the block header (PoW-hash)

  • digest: string - 32-bytes mix digest

Returns

result: boolean - indicates if the provided solution is valid

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0", "method":"eth_submitWork", "params":["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

eth_syncing

Returns an object with data about the synchronization status, or false if not synchronizing.

Note

Once the node reaches the head of the chain, eth_syncing returns false, indicating that there is no active syncing target.

Parameters

None

Returns

result: object or boolean - synchronization status data object with the following fields, or false if not synchronizing:

  • startingBlock: string - index of the highest block on the blockchain when the network synchronization starts

  • highestBlock: string - index of the highest known block in the peer network (that is, the highest block so far discovered among peer nodes. This is the same value as currentBlock if the current node has no peers.)

  • pulledStates: string - if fast synchronizing, the number of state entries fetched so far, or null if this is not known or not relevant (if full synchronizing or fully synchronized, this field is not returned.)

  • knownStates: string - if fast synchronizing, the number of states the node knows of so far, or null if this is not known or not relevant (if full synchronizing or fully synchronized, this field is not returned.)

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":51}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

eth_uninstallFilter

Uninstalls a filter with the specified ID. When a filter is no longer required, call this method.

Parameters

filterId: string - filter ID

Returns

result: boolean - indicates if the filter is successfully uninstalled

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0x70355a0b574b437eaa19fe95adfedc0a"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

IBFT 2.0 methods

Note

ibft_discardValidatorVote

Parameters

address: string - 20-byte address of proposed validator

Returns

result: boolean - indicates if the proposal is discarded

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_discardValidatorVote","params":["0xef1bfb6a12794615c9b0b5a21e6741f01e570185"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

ibft_getPendingVotes

Parameters

None

Returns

result: map of strings to booleans - map of account addresses to corresponding boolean values indicating the vote for each account; if true, the vote is to add a validator. If false, the proposal is to remove a validator.

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_getPendingVotes","params":[], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

ibft_getSignerMetrics

Provides the following validator metrics for the specified range:

  • Number of blocks from each validator

  • Block number of the last block proposed by each validator (if any proposed in the specified range)

  • All validators present in the last block of the range

Parameters

If you specify:

  • No parameters, the call provides metrics for the last 100 blocks, or all blocks if there are less than 100 blocks.

  • Only the first parameter, the call provides metrics for all blocks from the block specified to the latest block.

Returns

result: array of objects - list of validator objects

Note

The proposer of the genesis block has address 0x0000000000000000000000000000000000000000.

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_getSignerMetrics","params":["1", "100"], "id":1}' http://127.0.0.1:8545

wscat WSJSON result

ibft_getValidatorsByBlockHash

Lists the validators defined in the specified block.

Parameters

block: string - 32-byte block hash

Returns

result: array of strings - list of validator addresses

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockHash","params":["0xbae7d3feafd743343b9a4c578cab5e5d65eb735f6855fb845c00cab356331256"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

ibft_getValidatorsByBlockNumber

Lists the validators defined in the specified block.

Parameters

Returns

result: array of strings - list of validator addresses

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockNumber","params":["latest"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

ibft_proposeValidatorVote

Parameters

  • address: string - account address

  • proposal: boolean - true to propose adding validator or false to propose removing validator

Returns

result: boolean - true

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_proposeValidatorVote","params":["42d4287eac8078828cf5f3486cfe601a275a49a5",true], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

MINER methods

The MINER API methods allow you to control the node’s mining operation.

Note

miner_changeTargetGasLimit

Parameters

gasPrice: number - target gas price in Wei

Returns

result: string - Success or error

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"miner_changeTargetGasLimit","params":[800000], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

miner_start

Parameters

None

Returns

result: boolean - true if mining starts, or if the node is already mining

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"miner_start","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

miner_stop

Stops the mining process on the client.

Parameters

None

Returns

result: boolean - true if mining stops, or if the node is not mining

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"miner_stop","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

NET methods

The NET API methods provide network-related information.

net_enode

Parameters

None

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"net_enode","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

net_listening

Whether the client is actively listening for network connections.

Parameters

None

Returns

result: boolean - indicates if the client is actively listening for network connections

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":53}' http://127.0.0.1:8545

wscat WS requestJSON result

net_peerCount

Returns the number of peers currently connected to the client.

Parameters

None

Returns

result: string - number of connected peers in hexadecimal

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":53}' http://127.0.0.1:8545

wscat WS requestJSON result

net_services

Returns enabled services (for example, jsonrpc) and the host and port for each service.

Note

Parameters

None

Returns

result: object - enabled services

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"net_services","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

net_version

Parameters

None

Returns

result: string - current network ID

Network ID
Chain
Network
Description

1

ETH

Mainnet

Main Ethereum network

3

ETH

Ropsten

PoW test network

4

ETH

Rinkeby

PoA test network using Clique

5

ETH

Goerli

PoA test network using Clique

2018

ETH

Dev

PoW development network

1

ETC

Classic

Main Ethereum Classic network

7

ETC

Mordor

PoW test network

6

ETC

Kotti

PoA test network using Clique

212

ETC

Astor

PoW test network

Note

For almost all networks network ID and chain ID are the same.

The only networks in the table above with different network and chain IDs are Classic with a chain ID of 61 and Mordor with a chain ID of 63.

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":53}' http://127.0.0.1:8545

wscat WS requestJSON result for MainnetJSON result for Ropsten

PERM (Permissioning) methods

Important

perm_addAccountsToAllowlist

Parameters

addresses: array of strings - list of account addresses

Note

The parameters list contains a list which is why the account addresses are enclosed by double square brackets.

Returns

result: string - Success or error (errors include attempting to add accounts already on the allowlist and including invalid account addresses.)

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"perm_addAccountsToAllowlist","params":[["0xb9b81ee349c3807e46bc71aa2632203c5b462032", "0xb9b81ee349c3807e46bc71aa2632203c5b462034"]], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

perm_addNodesToAllowlist

Warning

Enode URL domain name support is an experimental feature.

Parameters

Note

The parameters list contains a list which is why the enode URLs are enclosed by double square brackets.

Returns

result: string - Success or error; errors include attempting to add nodes already on the allowlist or including invalid enode URLs.

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"perm_addNodesToAllowlist","params":[["enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"]], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

perm_getAccountsAllowlist

Parameters

None

Returns

result: array of strings - list of accounts (participants) in the accounts allowlist

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"perm_getAccountsAllowlist","params":[], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

perm_getNodesAllowlist

Parameters

None

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"perm_getNodesAllowlist","params":[], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

perm_reloadPermissionsFromFile

Parameters

None

Returns

result: string - Success, or error if the permissions configuration file is not valid

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"perm_reloadPermissionsFromFile","params":[], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

perm_removeAccountsFromAllowlist

Parameters

addresses: array of strings - list of account addresses

Note

The parameters list contains a list which is why the account addresses are enclosed by double square brackets.

Returns

result: string - Success or error (errors include attempting to remove accounts not on the allowlist and including invalid account addresses.)

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"perm_removeAccountsFromAllowlist","params":[["0xb9b81ee349c3807e46bc71aa2632203c5b462032", "0xb9b81ee349c3807e46bc71aa2632203c5b462034"]], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

perm_removeNodesFromAllowlist

Parameters

Note

The parameters list contains a list which is why the enode URLs are enclosed by double square brackets.

Returns

result: string - Success or error (errors include attempting to remove nodes not on the allowlist and including invalid enode URLs.)

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"perm_removeNodesFromAllowlist","params":[["enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"]], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

PLUGINS methods

The PLUGINS API methods provide plugin-related functionality.

Note

plugins_reloadPluginConfig

Reloads specified plugin configuration.

Parameters

plugin: string - plugin

Returns

result: string - Success

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"plugins_reloadPluginConfig","params":["tech.pegasys.plus.plugin.kafka.KafkaPlugin"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

PRIV methods

Note

priv_call

Invokes a private contract function locally and does not change the privacy group state.

Parameters

Returns

result: data - return value of the executed contract

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_call","params":["tb8NVyQqZnHNegf/3mYsyB+HEud4SPWn90rz3GoskRw=", {"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","data": "0x3fa4f245"}, "latest"],"id":1}' http://127.0.0.1:8545

wscat WSJSON resultcurl GraphQLGraphQLGraphQL result

priv_createPrivacyGroup

Parameters

options: object - request options object with the following fields:

  • name: string - (optional) privacy group name

  • description: string - (optional) privacy group description

Returns

result: string - privacy group ID

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method": "priv_createPrivacyGroup", "params": [{"addresses":["sTZpbQhcOfd9ZaFDnC00e/N2Ofv9p4/ZTBbEeVtXJ3E=","quhb1pQPGN1w8ZSZSyiIfncEAlVY/M/rauSyQ5wVMRE="],"name":"Group A","description":"Description Group A"}],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_debugGetStateRoot

Returns the state root of the specified privacy group at the specified block.

Parameters

Returns

result: string - 32-byte state root

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_debugGetStateRoot","params":["xJdxvWOEmrs2MCkKWlgArTzWIXFfU/tmVxI3EKssVTk=","latest"],"id":1}' http://127.0.0.1:8545

wscat WSJSON result

priv_deletePrivacyGroup

Deletes the specified privacy group.

Parameters

privacyGroupId: string - privacy group ID

Returns

result: string - deleted privacy group ID

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_deletePrivacyGroup","params":["ewuTVoc5nlvWMwTFdRRK/wvV0dcyQo/Pauvx5bNEbTk="],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_distributeRawTransaction

Tip

Parameters

transaction: string - signed RLP-encoded private transaction

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_distributeRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_findPrivacyGroup

Returns a list of privacy groups containing only the listed members. For example, if the listed members are A and B, a privacy group containing A, B, and C is not returned.

Parameters

Returns

  • LEGACY for EEA-compliant groups.

  • PANTHEON for Besu-extended groups.

Example

curl HTTP request

curl -X POST --data '{"jsonrpc": "2.0","method": "priv_findPrivacyGroup","params": [["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=", "g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="]],"id": 1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_getCode

Returns the code of the private smart contract at the specified address. Compiled smart contract code is stored as a hexadecimal value.

Parameters

  • address: string - 20-byte contract address

Returns

result: data - code stored at the specified address

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getCode","params":["1lJxSIP4JOp6uRn9wYsPeWwqoOP1c4nPQjylB4FExUA=", "0xeaf1c1bd00ef0bec5e39fba81740f1c5d05aa201", "latest"],"id":1}' http://127.0.0.1:8545

wscat WSJSON result

priv_getEeaTransactionCount

Important

If sending more than one transaction to be mined in the same block (that is, you are not waiting for the transaction receipt), you must calculate the private transaction nonce outside Besu instead of using priv_getEeaTransactionCount.

Parameters

  • address: string - account address

  • sender: string - base64-encoded Tessera address of the sender

  • recipients: array of strings - base64-encoded Tessera addresses of recipients

Returns

result: string - integer representing the number of private transactions sent from the address to the specified group of sender and recipients

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getEeaTransactionCount","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "GGilEkXLaQ9yhhtbpBT03Me9iYa7U/mWXxrJhnbl1XY=", ["KkOjNLmCI6r+mICrC6l+XuEDjFEzQllaMQMpWLl4y1s=","eLb69r4K8/9WviwlfDiZ4jf97P9czyS3DkKu0QYGLjg="]], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_getFilterChanges

Polls the specified filter for a private contract and returns an array of changes that have occurred since the last poll.

Parameters

  • filterId: string - filter ID

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc": "2.0","method": "priv_getFilterChanges","params": ["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_getFilterLogs

Note

Parameters

  • filterId: string - filter ID

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc": "2.0","method": "priv_getFilterLogs","params":["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_getLogs

Parameters

Returns

Example

curl HTTP

curl -X POST --data '{"jsonrpc": "2.0","method": "priv_getLogs","params":["vGy/TZgO6y8VPMVeJAQ99MF1NaTf5ohA3TFfzoEF71k=",{"fromBlock": "earliest","toBlock": "latest","addresses": ["0x630c507ff633312087dc33c513b66276abcd2fc3"],"topics": ["0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410"]}],"id": 1}' http://127.0.0.1:8545

wscat WSJSON result

priv_getPrivacyPrecompileAddress

Parameters

None

Returns

result: string - address of the privacy precompile

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getPrivacyPrecompileAddress","params":[], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_getPrivateTransaction

Returns the private transaction if you are a participant, otherwise, null.

Parameters

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getPrivateTransaction","params":["0x623c4ce5275a87b91f4f1c521012d39ca19311c787bde405490f4c0426a71498"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_getTransactionCount

Returns the private transaction count for specified account and privacy group.

Important

If sending more than one transaction to be mined in the same block (that is, you are not waiting for the transaction receipt), you must calculate the private transaction nonce outside Besu instead of using priv_getTransactionCount.

Parameters

  • address: string - account address

  • privacyGroupId: string - privacy group ID

Returns

result: string - integer representing the number of private transactions sent from the address to the specified privacy group

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getTransactionCount","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "kAbelwaVW7okoEn1+okO+AbA4Hhz/7DaCOWVQz9nx5M="], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_getTransactionReceipt

Returns information about the private transaction after mining the transaction. Receipts for pending transactions are not available.

Parameters

transaction: string - 32-byte hash of a transaction

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"priv_getTransactionReceipt","params":["0xf3ab9693ad92e277bf785e1772f29fb1864904bbbe87b0470455ddb082caab9d"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_newFilter

Parameters

Note

fromBlock and toBlock in the filter options object default to latest.

Returns

result: string - filter ID

Example

curl HTTP request

curl -X POST --data '{"jsonrpc": "2.0","method": "priv_newFilter","params": ["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=",{"fromBlock": "earliest","toBlock": "latest","addresses": ["0x991cc548c154b2953cc48c02f782e1314097dfbb"],"topics": ["0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410"]}],"id": 1}' http://127.0.0.1:8545

wscat WS requestJSON result

priv_uninstallFilter

Uninstalls a filter for a private contract with the specified ID. When a filter is no longer required, call this method.

Parameters

  • filterId: string - filter ID

Returns

result: boolean - indicates if the filter is successfully uninstalled

Example

curl HTTP request

curl -X POST --data '{"jsonrpc": "2.0","method": "priv_uninstallFilter","params":["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}' http://127.0.0.1:8545

wscat WS requestJSON result

QBFT methods

Note

qbft_discardValidatorVote

Parameters

address: string - 20-byte address of proposed validator

Returns

result: boolean - indicates if the proposal is discarded

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_discardValidatorVote","params":["0xef1bfb6a12794615c9b0b5a21e6741f01e570185"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

qbft_getPendingVotes

Parameters

None

Returns

result: map of strings to booleans - map of account addresses to corresponding boolean values indicating the vote for each account; if true, the vote is to add a validator. If false, the proposal is to remove a validator.

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_getPendingVotes","params":[], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

qbft_getSignerMetrics

Provides the following validator metrics for the specified range:

  • Number of blocks from each validator

  • Block number of the last block proposed by each validator (if any proposed in the specified range)

  • All validators present in the last block of the range

Parameters

If you specify:

  • No parameters, the call provides metrics for the last 100 blocks, or all blocks if there are less than 100 blocks.

  • Only the first parameter, the call provides metrics for all blocks from the block specified to the latest block.

Returns

result: array of objects - list of validator objects

Note

The proposer of the genesis block has address 0x0000000000000000000000000000000000000000.

Example

curl HTTP

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_getSignerMetrics","params":["1", "100"], "id":1}' http://127.0.0.1:8545

wscat WSJSON result

qbft_getValidatorsByBlockHash

Lists the validators defined in the specified block.

Parameters

block: string - 32-byte block hash

Returns

result: array of strings - list of validator addresses

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockHash","params":["0xbae7d3feafd743343b9a4c578cab5e5d65eb735f6855fb845c00cab356331256"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

qbft_getValidatorsByBlockNumber

Lists the validators defined in the specified block.

Parameters

Returns

result: array of strings - list of validator addresses

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockNumber","params":["latest"], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

qbft_proposeValidatorVote

Parameters

  • address: string - account address

  • proposal: boolean - true to propose adding validator or false to propose removing validator

Returns

result: boolean - true

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_proposeValidatorVote","params":["42d4287eac8078828cf5f3486cfe601a275a49a5",true], "id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

TRACE methods

Note

trace_block

Important

Parameters

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

trace_replayBlockTransactions

Provides transaction processing tracing per block.

Important

Parameters

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc": "2.0", "method": "trace_replayBlockTransactions","params": ["0x12",["trace","vmTrace","stateDiff"]],"id": 1}' http://127.0.0.1:8545

wscat WS requestJSON result

trace_transaction

Important

Parameters

transaction: string - transaction hash

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' http://127.0.0.1:8545

wscat WS requestJSON result

TXPOOL methods

The TXPOOL API methods allow you to inspect the contents of the transaction pool.

Note

txpool_besuPendingTransactions

Lists pending transactions that match the supplied filter conditions.

Parameters

  • numResults: number - integer representing the maximum number of results to return

  • fields: object - object of fields used to create the filter condition

Each field in the object corresponds to a field name containing an operator, and a value for the operator. A field name can only be specified once, and can only contain one operator. For example, you cannot query transactions with a gas price between 8 and 9 Gwei by using both the gt and lt operator in the same field name instance.

All filters must be satisfied for a transaction to be returned.

Field name
Value
Value type
Supported operators

from

Address of the sender.

Data, 20 bytes

eq

to

Address of the receiver, or "contract_creation".

Data, 20 bytes

eq, action

gas

Gas provided by the sender.

Quantity

eq, gt, lt

gasPrice

Gas price, in wei, provided by the sender.

Quantity

eq, gt, lt

value

Value transferred, in wei.

Quantity

eq, gt, lt

nonce

Number of transactions made by the sender.

Quantity

eq, gt, lt

Supported operators:

  • eq (equal to)

  • lt (less than)

  • gt (greater than)

  • action

Note

The only supported action is "contract_creation".

Returns

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_besuPendingTransactions","params":[2,{"from":{"eq":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"},"gas":{"lt":"0x5209"},"nonce":{"gt":"0x1"}}],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

txpool_besuStatistics

Lists statistics about the node transaction pool.

Parameters

None

Returns

result: object - transaction pool statistics object with the following fields:

  • localCount: number - number of transactions submitted directly to this node

  • remoteCount: number - number of transactions received from remote nodes

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_besuStatistics","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

txpool_besuTransactions

Lists transactions in the node transaction pool.

Parameters

None

Returns

result: array of objects - list of transactions

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_besuTransactions","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

WEB3 methods

The WEB3 API methods provide functionality for the Ethereum ecosystem.

web3_clientVersion

Returns the current client version.

Parameters

None

Returns

result: string - current client version

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://127.0.0.1:8545

wscat WS requestJSON result

web3_sha3

Parameters

data: string - data to convert to a SHA3 hash

Returns

result: string - SHA3 result of the input data

Example

curl HTTP request

curl -X POST --data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c00"],"id":53}' http://127.0.0.1:8545

wscat WS requestJSON result

Miscellaneous methods

rpc_modules

Parameters

None

Returns

result: map of strings to strings - enabled APIs and their versions

level: string -

Generates cached log bloom indexes for blocks. APIs such as and use the cache for improved performance.

Manually executing admin_generateLogBloomCache is not required unless the command line option is set to false.

fromBlock: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

toBlock: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

enode: string - of the node

id: string -

ports: object - peer discovery and listening

If the node is running locally, the host of the enode and listenAddr display as [::] in the result. When advertising externally, the external address displayed for the enode and listenAddr is defined by .

id: string - node public key (excluding the 0x prefix, the node public key is the ID in the enode://<id ex 0x>@<host>:<port>.)

protocols: object - including difficulty and head (head is the hash of the highest known block for the peer.)

Removes a .

enode: string - of peer to remove

result: boolean - true if peer removed or false if peer not a

The CLIQUE API methods provide access to the consensus engine.

The CLIQUE API methods are not enabled by default for JSON-RPC. To enable the CLIQUE API methods use the or options.

Discards a proposal to .

Lists .

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

fromBlockNumber: string - integer representing a block number or the string tag earliest, as described in

toBlockNumber: string - integer representing a block number or one of the string tags latest or pending, as described in

Returns .

Proposes to .

The DEBUG API methods allow you to inspect and debug the network. The DEBUG API is a more verbose alternative to the , and its main purpose is compatibility with tools such as . We recommend using the for production use over the DEBUG API.

The DEBUG API methods are not enabled by default for JSON-RPC. To enable the DEBUG API methods, use the or options.

uses debug_accountRange to implement debugging.

Sends a list of . This is used to quickly load a network with a lot of transactions. This does the same thing as calling multiple times.

result: array of objects - list of

Use to view the trace for an invalid block.

Use to view the trace for a valid block.

uses debug_storageRangeAt to implement debugging. Use the Debugger tab in Remix instead of calling debug_storageRangeAt directly.

result: object - .

uses debug_traceTransaction to implement debugging. Use the Debugger tab in Remix instead of calling debug_traceTransaction directly.

result: object -

result: object -

result: array of objects - list of

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

result: array of objects - list of

The EEA API methods provide functionality for and .

The EEA API methods are not enabled by default for JSON-RPC. To enable the EEA API methods, use the or options.

Distributes the , generates the and submits it to the transaction pool, and returns the transaction hash of the .

The signed transaction passed as an input parameter includes the privateFrom, , and restriction fields.

The gas and gasPrice are used by the not the private transaction itself.

For production systems requiring private transactions, use a network with a consensus mechanism supporting transaction finality to make sure the private state does not become inconsistent with the chain. For example, and provide the required finality.

Using private transactions with or is not supported.

Besu does not implement .

provides transaction signing and implements .

result: string - 32-byte transaction hash of the

If creating a contract, use to retrieve the contract address after the transaction is finalized.

Methods with an equivalent query include a GraphQL request and result in the method example. The parameter and result descriptions apply to the JSON-RPC requests. The GraphQL specification is defined in the .

This method returns an empty object because Besu inside the client.

To provide access to your key store and and then sign transactions, use with Besu.

You can interact with contracts using or eth_call.

If revert reason is enabled with , the eth_call error response includes the .

call: object -

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

By default, eth_call does not fail if the sender account has an insufficient balance. This is done by setting the balance of the account to a large amount of ether. To enforce balance rules, set the in the transaction call object to true.

Returns the .

The eth_estimateGas call does not send a transaction. You must call to execute the transaction.

If revert reason is enabled with , the eth_estimateGas error response includes the .

call: object -

newestBlock: string - Integer representing the highest number block of the requested range or one of the string tags latest, earliest, or pending, as described in .

result: object - .

If there are no blocks, the value for is returned. The value returned is restricted to values between and . By default, 1000 Wei and 500GWei.

Use the , , and command line options to configure the eth_gasPrice default values.

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

verbose: boolean - if true, returns the full ; if false, returns the transaction hashes

result: object - , or null when there is no block

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

verbose: boolean - if true, returns the full ; if false, returns only the hashes of the transactions.

result: object - , or null when there is no block.

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

For filters created with eth_newFilter, returns .

Returns an array of for the specified filter.

Leave the command line option at the default value of true to improve log retrieval performance.

result: array of objects - list of

Returns an array of matching a specified filter object.

Leave the command line option at the default value of true to improve log retrieval performance.

filterOptions: object -

result: array of objects - list of

result: object -

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

result: object -

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

When using , returns the .

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

result: object - , or null when there is no transaction

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

result: object - , or null when there is no transaction

This request returns the third transaction in the 82990 block on the Ropsten testnet. You can also view this and on Etherscan.

result: object - , or null when there is no transaction

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

If you enabled , the receipt includes available revert reasons in the response.

result: object - , or null when there is no receipt

result: object -

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

result: object -

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

Creates a filter to retrieve new block hashes. To poll for new blocks, use .

Creates a . To poll for logs associated with the created filter, use . To get all logs associated with the filter, use .

filterOptions: object -

Creates a filter to retrieve new pending transactions hashes. To poll for new pending transactions, use .

Sends a . A transaction can send ether, deploy a contract, or interact with a contract. Set the maximum transaction fee for transactions using the CLI option.

You can interact with contracts using eth_sendRawTransaction or .

Besu does not implement .

provides transaction signing and implements .

includes examples of creating signed transactions using the library.

Submits the mining hashrate. This is used by mining software such as .

Submits a proof of work (Ethash) solution. This is used by mining software such as .

currentBlock: string - index of the latest block (also known as the best block) for the current node (this is the same index that returns.)

Filters time out when not requested by or for 10 minutes.

The IBFT API methods provide access to the consensus engine.

The IBFT API methods are not enabled by default for JSON-RPC. To enable the IBFT API methods, use the or options.

Discards a proposal to with the specified address.

Returns cast in the current .

fromBlockNumber: string - integer representing a block number or the string tag earliest as described in

toBlockNumber: string - integer representing a block number or one of the string tags latest or pending, as described in

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

Proposes to with the specified address.

The MINER API methods are not enabled by default for JSON-RPC. To enable the MINER API methods, use the or options.

Updates the target gas limit set using the command line option.

Starts the mining process. To start mining, you must first specify a miner coinbase using the command line option.

Returns the .

result: string - of the node

The setting affects the JSON-RPC and P2P host and port values, but not the metrics host and port values.

Returns the .

The PERM API methods provide permissioning functionality. Use these methods for only.

The PERM API methods are not enabled by default for JSON-RPC. To enable the PERM API methods, use the or CLI options.

Adds accounts (participants) to the .

Adds nodes to the .

To use domain names in enode URLs, ensure you to avoid receiving a request contains an invalid node error.

enodes: array of strings - list of

Lists accounts (participants) in the .

Lists nodes in the .

result: array of strings - of nodes in the nodes allowlist

Reloads the accounts and nodes allowlists from the .

Removes accounts (participants) from the .

Removes nodes from the .

enodes: array of strings - list of

The PLUGINS API methods are not enabled by default for JSON-RPC. To enable the PLUGINS API methods, use the or options.

The PRIV API methods provide functionality for and .

The PRIV API methods are not enabled by default for JSON-RPC. To enable the PRIV API methods, use the or options.

For private contracts, priv_call is the same as for public contracts.

privacyGroupId: string - 32-byte

call: object -

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

Creates a group of nodes, specified by their public key.

addresses: array of strings - list of nodes specified by public keys

privacyGroupId: string - 32-byte

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

Distributes a signed, RLP encoded .

If you want to sign the Privacy Marker Transaction outside of Besu, use instead of .

result: string - 32-byte enclave key (the enclave key is a pointer to the private transaction in .)

members: array of strings - members specified by public keys

result: array of objects - privacy group objects containing only the specified members; privacy groups are or with types:

privacyGroupId: string - 32-byte

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

Returns the private transaction count for the specified account and .

Filters for private contracts can only be created by so unlike , priv_getFilterChanges always returns an array of log objects or an empty list.

privacyGroupId: string - 32-byte

result: array of objects - list of , or an empty list if nothing has changed since the last poll

Returns an array of for the specified filter for a private contract.

For private contracts, priv_getFilterLogs is the same as for public contracts except there is no for private contracts.

priv_getFilterLogs is only used for filters created with . To specify a filter object and get logs without creating a filter, use .

privacyGroupId: string - 32-byte

result: array of objects - list of

Returns an array of matching a specified filter object.

For private contracts, priv_getLogs is the same as for public contracts except there is no for private contracts.

privacyGroupId: string - 32-byte

filterOptions: object -

result: array of objects - list of

Returns the address of the . The address is derived and based on the value of the option.

transaction: string - transaction hash returned by or .

result: object - , or null if not a participant in the private transaction

result: object - , or null if no receipt found

Creates a for a private contract. To poll for logs associated with the created filter, use . To get all logs associated with the filter, use .

For private contracts, priv_newFilter is the same as for public contracts.

privacyGroupId: string - 32-byte

filterOptions: object -

Filters time out when not requested by or for 10 minutes.

For private contracts, priv_uninstallFilter is the same as for public contracts.

privacyGroupId: string - 32-byte

The QBFT API methods provide access to the consensus engine.

The QBFT API methods are not enabled by default for JSON-RPC. To enable the QBFT API methods, use the or options.

Discards a proposal to with the specified address.

Returns cast in the current .

fromBlockNumber: string - integer representing a block number or the string tag earliest as described in

toBlockNumber: string - integer representing a block number or one of the string tags latest or pending, as described in

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

Proposes to with the specified address.

The TRACE API is a more concise alternative to the .

The TRACE API methods are not enabled by default for JSON-RPC. To enable the TRACE API methods, use the or options.

Provides transaction processing of for the specified block.

Your node must be an archive node (that is, synchronized without pruning or fast sync) or the requested block must be within (by default, 1024).

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

result: array of objects - list of containing one object per call, in transaction execution order; if revert reason is enabled with , the returned list items include the .

Your node must be an archive node (that is, synchronized without pruning or fast sync) or the requested block must be within (by default, 1024).

blockNumber: string - integer representing a block number or one of the string tags latest, earliest, or pending, as described in

options: array of strings - list of tracing options; tracing options are . Specify any combination of the three options including none of them.

result: array of objects - list of containing one object per transaction, in transaction execution order; if revert reason is enabled with , the list items in the returned transaction trace object include the .

Provides transaction processing of for the specified transaction.

Your node must be an archive node (that is, synchronized without pruning or fast sync) or the requested transaction must be contained in a block within (by default, 1024).

result: array of objects - list of containing one object per call, in the order called by the transaction; if revert reason is enabled with , the returned list items include the .

The TXPOOL API methods are not enabled by default for JSON-RPC. To enable the TXPOOL API methods, use the or options.

result: array of objects - list of objects with

maxSize: number - maximum number of transactions kept in the transaction pool; use the option to configure the maximum size.

Returns a hash of the specified data. The result value is a hash, not the standardized SHA3-256.

Lists and the version of each.

--rpc-http-api
--rpc-ws-api
static node
enode URL
enode URL
static node
log level
eth_getLogs
eth_getFilterLogs
--auto-log-bloom-caching-enabled
Block Parameter
Block Parameter
enode URL
node public key
ports
--nat-method
enode URL
current state of peer
static node
enode URL
static node
Clique
--rpc-http-api
--rpc-ws-api
add or remove a signer with the specified address
signers for the specified block
Block Parameter
Block Parameter
Block Parameter
current proposals
add or remove a signer with the specified address
TRACE API
Remix
TRACE API
--rpc-http-api
--rpc-ws-api
Retesteth
signed transactions
eth_sendRawTransaction
block objects
debug_standardTraceBadBlockToFile
debug_standardTraceBlockToFile
Remix
range object
Remix
trace object
trace object
trace objects
Block Parameter
trace objects
private transactions
privacy groups
--rpc-http-api
--rpc-ws-api
private transaction
privacy marker transaction
privacy marker transaction
privateFor or privacyGroupId
privacy marker transaction
IBFT 2.0
QBFT
pruning
fast sync
eea_sendTransaction
EthSigner
eea_sendTransaction
Privacy Marker Transaction
priv_getTransactionReceipt
GraphQL
schema
doesn’t support key management
EthSigner
eth_sendRawTransaction
--revert-reason-enabled
revert reason
transaction call object
Block Parameter
strict parameter
chain ID
eth_sendRawTransaction
--revert-reason-enabled
revert reason
transaction call object
Block parameter
Fee history results object
--min-gas-price
--min-gas-price
--api-gas-price-max
--api-gas-price-blocks
--api-gas-price-percentile
--api-gas-price-max
Block Parameter
transaction objects
block object
Block Parameter
transaction objects
block object
Block Parameter
Block Parameter
log objects
logs
--auto-log-bloom-caching-enabled
log objects
logs
--auto-log-bloom-caching-enabled
filter options object
log objects
miner data object
Block Parameter
miner data object
Block Parameter
GoQuorum-compatible privacy
unencrypted payload from Tessera
Block Parameter
transaction object
Block Parameter
transaction object
block
transaction
transaction object
Block Parameter
revert reason
transaction receipt object
block object
Block Parameter
block object
Block Parameter
eth_getFilterChanges
log filter
eth_getFilterChanges
eth_getFilterLogs
filter options object
eth_getFilterChanges
signed transaction
--rpc-tx-feecap
eth_call
eth_sendTransaction
EthSigner
eth_sendTransaction
Creating and Sending Transactions
web3.js
Ethminer
Ethminer
eth_blockNumber
eth_getFilterChanges
eth_getFilterLogs
IBFT 2.0
--rpc-http-api
--rpc-ws-api
add or remove a validator
votes
epoch
Block Parameter
Block Parameter
Block Parameter
add or remove a validator
--rpc-http-api
--rpc-ws-api
--target-gas-limit
--miner-coinbase
enode URL
enode URL
--nat-method
network ID
local permissioning
--rpc-http-api
--rpc-ws-api
accounts permission list
nodes allowlist
enable DNS support
enode URLs
accounts permissions list
nodes allowlist
enode URLs
permissions configuration file
accounts permissions list
nodes allowlist
enode URLs
--rpc-http-api
--rpc-ws-api
private transactions
privacy groups
--rpc-http-api
--rpc-ws-api
eth_call
privacy Group ID
transaction call object
Block Parameter
Tessera
Tessera
privacy Group ID
Block Parameter
private transaction
priv_distributeRawTransaction
eea_sendRawTransaction
Tessera
Tessera
EEA-compliant
Besu-extended
privacy Group ID
Block Parameter
group of sender and recipients
priv_newFilter
eth_getFilterChanges
privacy Group ID
log objects
logs
eth_getFilterLogs
automatic log bloom caching
priv_newFilter
priv_getLogs
privacy Group ID
log objects
logs
eth_getLogs
automatic log bloom caching
privacy Group ID
filter options object
log objects
privacy precompiled contract
privacy-flexible-groups-enabled
eea_sendRawTransaction
eea_sendTransaction
private transaction object
private Transaction receipt object
log filter
priv_getFilterChanges
priv_getFilterLogs
eth_newFilter
privacy Group ID
filter options object
priv_getFilterChanges
priv_getFilterLogs
eth_uninstallFilter
privacy Group ID
QBFT
--rpc-http-api
--rpc-ws-api
add or remove a validator
votes
epoch
Block Parameter
Block Parameter
Block Parameter
add or remove a validator
DEBUG API
--rpc-http-api
--rpc-ws-api
type trace
the number of pruning blocks retained
Block Parameter
calls to other contracts
--revert-reason-enabled
revert reason
the number of pruning blocks retained
Block Parameter
trace, vmTrace, and stateDiff
transaction trace objects
--revert-reason-enabled
trace
revert reason
type trace
the number of pruning blocks retained
calls to other contracts
--revert-reason-enabled
revert reason
--rpc-http-api
--rpc-ws-api
details of the pending transaction
--tx-pool-max-size
SHA3
Keccak-256
enabled APIs