Skip to content
Alexander Sinyagin edited this page Aug 3, 2015 · 14 revisions

JSON RPC API

JSON RPC API Reference

web3_clientVersion

Returns the current client version.

Parameters

none

Returns

String - The current client version

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}'

// Result
{
  "id":67,
  "jsonrpc":"2.0",
  "result": "ethereum-sandbox/v0.0.1"
}

web3_sha3

Returns SHA3 of the given data.

Parameters
  1. String - the data to convert into a SHA3 hash
params: [
  '0x68656c6c6f20776f726c64'
]
Returns

DATA - The SHA3 result of the given string.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":64}'

// Result
{
  "id":64,
  "jsonrpc": "2.0",
  "result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}

net_version

Returns the current network protocol version.

Parameters

none

Returns

String - The current network protocol version

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67}'

// Result
{
  "id":67,
  "jsonrpc": "2.0",
  "result": "59"
}

net_listening

Returns true if client is actively listening for network connections.

Parameters

none

Returns

Boolean - true when listening, otherwise false.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":67}'

// Result
{
  "id":67,
  "jsonrpc":"2.0",
  "result":true
}

net_peerCount

Returns number of peers currently connected to the client. Always returns 0x0.

Parameters

none

Returns

QUANTITY - integer of the number of connected peers.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":74}'

// Result
{
  "id":74,
  "jsonrpc": "2.0",
  "result": "0x0"
}

eth_protocolVersion

Returns the current ethereum protocol version.

Parameters

none

Returns

String - The current ethereum protocol version

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":67}'

// Result
{
  "id":67,
  "jsonrpc": "2.0",
  "result": "54"
}

eth_coinbase

Returns the client coinbase address.

Parameters

none

Returns

DATA, 20 bytes - the current coinbase address.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":64}'

// Result
{
  "id":64,
  "jsonrpc": "2.0",
  "result": "0x407d73d8a49eeb85d32cf465507dd71d507100c1"
}

eth_mining

Returns true if client is actively mining new blocks. Always returns false.

Parameters

none

Returns

Boolean - returns true of the client is mining, otherwise false.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":71}'

// Result
{
  "id":71,
  "jsonrpc": "2.0",
  "result": true
}

eth_hashrate

Returns the number of hashes per second that the node is mining with. Always returns 0x0.

Parameters

none

Returns

QUANTITY - number of hashes per second.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":71}'

// Result
{
  "id":71,
  "jsonrpc": "2.0",
  "result": "0x0"
}

eth_gasPrice

Returns the current price per gas in wei. Always returns 0x0.

Parameters

none

Returns

QUANTITY - integer of the current gas price in wei.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":73}'

// Result
{
  "id":73,
  "jsonrpc": "2.0",
  "result": "0x0"
}

eth_accounts

Returns a list of addresses owned by client.

Parameters

none

Returns

Array of DATA, 20 Bytes - addresses owned by the client.

Example
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'

// Result
{
  "id":1,
  "jsonrpc": "2.0",
  "result": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1"]
}

eth_blockNumber

Not implemented.

eth_getBalance

Not implemented.

eth_getStorageAt

Not implemented.

eth_getTransactionCount

Not implemented.

eth_getBlockTransactionCountByHash

Not implemented.

eth_getBlockTransactionCountByNumber

Not implemented.

eth_getUncleCountByBlockHash

Not implemented.

eth_getUncleCountByBlockNumber

Not implemented.

eth_getCode

Not implemented.

eth_sign

Not implemented.

eth_sendTransaction

Not implemented.

eth_call

Not implemented.

eth_estimateGas

Not implemented.

eth_getBlockByHash

Not implemented.

eth_getBlockByNumber

Not implemented.

eth_getTransactionByHash

Not implemented.

eth_getTransactionByBlockHashAndIndex

Not implemented.

eth_getTransactionByBlockNumberAndIndex

Not implemented.

eth_getTransactionReceipt

Not implemented.

eth_getUncleByBlockHashAndIndex

Not implemented.

eth_getUncleByBlockNumberAndIndex

Not implemented.

eth_getCompilers

Not implemented.

eth_compileLLL

Not implemented.

eth_compileSolidity

Not implemented.

eth_compileSerpent

Not implemented.

eth_newFilter

Not implemented.

eth_newBlockFilter

Not implemented.

eth_newPendingTransactionFilter

Not implemented.

eth_uninstallFilter

Not implemented.

eth_getFilterChanges

Not implemented.

eth_getFilterLogs

Not implemented.

eth_getLogs

Not implemented.

eth_getWork

Not implemented.

eth_submitWork

Not implemented.

db_putString

Not implemented.

db_getString

Not implemented.

db_putHex

Not implemented.

db_getHex

Not implemented.

shh_post

Not implemented.

shh_version

Not implemented.

shh_newIdentity

Not implemented.

shh_hasIdentity

Not implemented.

shh_newGroup

Not implemented.

shh_addToGroup

Not implemented.

shh_newFilter

Not implemented.

shh_uninstallFilter

Not implemented.

shh_getFilterChanges

Not implemented.

shh_getMessages

Not implemented.

Clone this wiki locally