Methods

Find below a list of JSON-RPC methods supported on Financiyo, sorted by namespaces.

Curl Examples Explainedarrow-up-right

The curl options below might return a response where the node complains about the content type, this is because the --data option sets the content type to application/x-www-form-urlencoded. If your node does complain, manually set the header by placing -H "Content-Type: application/json" at the start of the call.

The examples also do not include the URL/IP & port combination which must be the last argument given to curl e.x. 127.0.0.1:8545

Method
Namespace
Implemented
Public
Notes

eth_getBlockByHash

Eth

eth_getTransactionbyBlockNumberAndIndex

Eth

eth_getWork

Eth

N/A

PoW-only

eth_submitWork

Eth

N/A

PoW-only

eth_submitHashrate

Eth

eth_getCompilers

Eth

eth_compileLLL

Eth

eth_compileSolidity

Eth

eth_compileSerpent

Eth

eth_signTransaction

Eth

eth_mining

Eth

eth_hashrate

Eth

N/A

PoW-only

eth_getUncleCountByBlockHash

Eth

N/A

PoW-only

eth_getUncleCountByBlockNumber

Eth

N/A

PoW-only

eth_getUncleByBlockHashAndIndex

Eth

N/A

PoW-only

eth_getUncleByBlockNumberAndIndex

Eth

N/A

PoW-only

eth_getProof

Eth

eth_subscribe

Websocket

eth_unsubscribe

Websocket

personal_importRawKey

Personal

personal_listAccounts

Personal

personal_sendTransaction

Personal

personal_ecRecover

Personal

personal_unpair

Personal

db_putString

DB

db_getString

DB

shh_newGroup

SSH

shh_addToGroup

SSH

shh_newFilter

SSH

shh_uninstallFilter

SSH

shh_getFilterChanges

SSH

shh_getMessages

SSH

admin_addPeer

Admin

admin_datadir

Admin

admin_nodeInfo

Admin

admin_peers

Admin

admin_startRPC

Admin

admin_startWS

Admin

admin_stopRPC

Admin

admin_stopWS

Admin

clique_propose

Clique

clique_discard

Clique

clique_status

Clique

debug_blockProfile

Debug

debug_cpuProfile

Debug

debug_dumpBlock

Debug

debug_gcStats

Debug

debug_getBlockRlp

Debug

debug_seedHash

Debug

debug_setHead

Debug

debug_setBlockProfileRate

Debug

debug_setGCPercent

Debug

debug_setMutexProfileFraction

Debug

debug_stacks

Debug

debug_writeMemProfile

Debug

debug_writeMutexProfile

Debug

les_addBalance

Les

les_getCheckpointContractAddress

Les

miner_getHashrate

Miner

No-op

miner_setExtra

Miner

No-op

miner_setGasPrice

Miner

Needs node restart

miner_start

Miner

No-op

miner_stop

Miner

No-op

miner_setGasLimit

Miner

No-op

miner_setEtherbase

Miner

txpool_content

TxPool

txpool_inspect

TxPool

txpool_status

TxPool

circle-info

TIP

Block Number can be entered as a Hex string, "earliest", "latest" or "pending".

Below is a list of the RPC methods, the parameters and an example response from the namespaces.

Web3 Methodsarrow-up-right

web3_clientVersionarrow-up-right

Get the web3 client version.

Parameters (0)arrow-up-right

Resultarrow-up-right

Client Examplesarrow-up-right

Shell HTTP

Websocket

Javascript Console

Returns Keccak-256 (not the standardized SHA3-256) of the given data.

Parameters (1)arrow-up-right

1: input hexutil.Bytes

  • Required: ✓ Yes

Resultarrow-up-right

Client Examplesarrow-up-right

Shell HTTP

Websocket

Javascript Console

Returns the current network id.

net_peerCountarrow-up-right

Returns the number of peers currently connected to the client.

net_listeningarrow-up-right

Returns if client is actively listening for network connections.

eth_protocolVersionarrow-up-right

Returns the current ethereum protocol version.

The sync status object may need to be different depending on the details of Tendermint's sync protocol. However, the 'synced' result is simply a boolean, and can easily be derived from Tendermint's internal sync state.

eth_gasPricearrow-up-right

Returns the current gas price in the default EVM denomination parameter.

eth_accountsarrow-up-right

Returns array of all eth accounts.

eth_blockNumberarrow-up-right

Returns the current block height.

eth_getBalancearrow-up-right

Returns the account balance for a given account address and Block Number.

Parametersarrow-up-right

eth_getStorageAtarrow-up-right

Returns the storage address for a given account address.

Parametersarrow-up-right

eth_getTransactionCountarrow-up-right

Returns the total transaction for a given account address and Block Number.

Parametersarrow-up-right

eth_getBlockTransactionCountByNumberarrow-up-right

Returns the total transaction count for a given block number.

Parametersarrow-up-right

  • Block number

eth_getBlockTransactionCountByHasharrow-up-right

Returns the total transaction count for a given block hash.

Parametersarrow-up-right

  • Block Hash

Returns the code for a given account address and Block Number.

Parametersarrow-up-right

The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))).

By adding a prefix to the message makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.

triangle-exclamation

Parametersarrow-up-right

  • Account Address

  • Message to sign

eth_sendTransactionarrow-up-right

Sends transaction from given account to a given account.

Parametersarrow-up-right

  • Object containing:

    from: DATA, 20 Bytes - The address the transaction is send from.

    to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.

    gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.

    gasPrice: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas

    value: QUANTITY - value sent with this transaction

    data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI

    nonce: QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.

eth_sendRawTransactionarrow-up-right

Creates new message call transaction or a contract creation for signed transactions. You can get signed transaction data using the personal_sign arrow-up-rightmethod.

Parametersarrow-up-right

  • The signed transaction data

Executes a new message call immediately without creating a transaction on the block chain.

Parametersarrow-up-right

  • Object containing:

    from: DATA, 20 Bytes - (optional) The address the transaction is sent from.

    to: DATA, 20 Bytes - The address the transaction is directed to.

    gas: QUANTITY - gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.

    gasPrice: QUANTITY - gasPrice used for each paid gas

    value: QUANTITY - value sent with this transaction

    data: DATA - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation

  • Block number or Block Hash (EIP-1898arrow-up-right)

eth_estimateGasarrow-up-right

Returns an estimate value of the gas required to send the transaction.

Parametersarrow-up-right

  • Object containing:

    from: DATA, 20 Bytes - The address the transaction is send from.

    to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.

    value: QUANTITY - value sent with this transaction

eth_getBlockByNumberarrow-up-right

Returns information about a block by block number.

Parametersarrow-up-right

  • Block Number

  • If true it returns the full transaction objects, if false only the hashes of the transactions.

eth_getBlockByHasharrow-up-right

Returns the block info given the hash found in the command above and a bool.

Parametersarrow-up-right

  • Hash of a block.

  • If true it returns the full transaction objects, if false only the hashes of the transactions.

eth_getTransactionByHasharrow-up-right

Returns transaction details given the ethereum tx something.

Parametersarrow-up-right

  • hash of a transaction

eth_getTransactionByBlockHashAndIndexarrow-up-right

Returns transaction details given the block hash and the transaction index.

Parametersarrow-up-right

  • Hash of a block.

  • Transaction index position.

eth_getTransactionReceiptarrow-up-right

Returns the receipt of a transaction by transaction hash.

Note: Tx Code from Tendermint and the Ethereum receipt status are switched: | | Tendermint | Ethereum | |---------|------------|----------| | Success | 0 | 1 | | Fail | 1 | 0 |

Parametersarrow-up-right

  • Hash of a transaction

eth_newFilterarrow-up-right

Create new filter using topics of some kind.

Parametersarrow-up-right

  • hash of a transaction

eth_newBlockFilterarrow-up-right

Creates a filter in the node, to notify when a new block arrives.

eth_newPendingTransactionFilterarrow-up-right

Creates a filter in the node, to notify when new pending transactions arrive.

eth_uninstallFilterarrow-up-right

Removes the filter with the given filter id. Returns true if the filter was successfully uninstalled, otherwise false.

Parametersarrow-up-right

  • The filter id

eth_getFilterChangesarrow-up-right

Polling method for a filter, which returns an array of logs which occurred since last poll.

Parametersarrow-up-right

  • The filter id

eth_getFilterLogsarrow-up-right

Returns an array of all logs matching filter with given id.

Parametersarrow-up-right

  • QUANTITY - The filter id

Returns an array of all logs matching a given filter object.

Parametersarrow-up-right

  • Object containing:

    fromBlock: QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.

    toBlock: QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.

    address: DATA|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.

    topics: Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options.

    blockhash: (optional, future) With the addition of EIP-234arrow-up-right, blockHash will be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in in the filter criteria, then neither fromBlock nor toBlock are allowed.

eth_coinbasearrow-up-right

Returns the account the mining rewards will be send to.

eth_getProofarrow-up-right

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

Parametersarrow-up-right

  • Address of account or contract

  • Integer of the position in the storage

  • Block Number or Block Hash (EIP-1898arrow-up-right)

WebSocket Methodsarrow-up-right

Read about websockets in Tendermint Eventsarrow-up-right

eth_subscribearrow-up-right

subscribe using JSON-RPC notifications. This allows clients to wait for events instead of polling for them.

It works by subscribing to particular events. The node will return a subscription id. For each event that matches the subscription a notification with relevant data is send together with the subscription id.

Parametersarrow-up-right

  • Subscription Name

  • Optional Arguments

eth_unsubscribearrow-up-right

Unsubscribe from an event using the subscription id

Parametersarrow-up-right

  • Subscription ID

Personal Methodsarrow-up-right

personal_importRawKeyarrow-up-right

circle-info

TIP

Private: Requires authentication.

Imports the given unencrypted private key (hex encoded string) into the key store, encrypting it with the passphrase.

Returns the address of the new account.

Parameters (2)arrow-up-right

1: privkey string

  • Required: ✓ Yes

2: password string

  • Required: ✓ Yes

personal_listAccountsarrow-up-right

circle-info

TIP

Private: Requires authentication.

Returns a list of addresses for accounts this node manages.

personal_lockAccountarrow-up-right

circle-info

TIP

Private: Requires authentication.

Removes the private key with given address from memory. The account can no longer be used to send transactions.

Parametersarrow-up-right

  • Account Address

personal_newAccountarrow-up-right

circle-info

TIP

Private: Requires authentication.

Generates a new private key and stores it in the key store directory. The key file is encrypted with the given passphrase. Returns the address of the new account.

Parametersarrow-up-right

  • Passphrase

personal_unlockAccountarrow-up-right

circle-info

TIP

Private: Requires authentication.

Decrypts the key with the given address from the key store.

Both passphrase and unlock duration are optional when using the JavaScript console. The unencrypted key will be held in memory until the unlock duration expires. If the unlock duration defaults to 300 seconds. An explicit duration of zero seconds unlocks the key until geth exits.

The account can be used with eth_signarrow-up-right and eth_sendTransactionarrow-up-right while it is unlocked.

Parametersarrow-up-right

  • Account Address

  • Passphrase

  • Duration

personal_sendTransactionarrow-up-right

circle-info

TIP

Private: Requires authentication.

Validate the given passphrase and submit transaction.

The transaction is the same argument as for eth_sendTransactionarrow-up-right and contains the from address. If the passphrase can be used to decrypt the private key belonging to tx.from the transaction is verified, signed and send onto the network.

triangle-exclamation

Parametersarrow-up-right

  • Object containing:

    from: DATA, 20 Bytes - The address the transaction is send from.

    to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.

    value: QUANTITY - value sent with this transaction

  • Passphrase

personal_signarrow-up-right

circle-info

TIP

Private: Requires authentication.

The sign method calculates an Ethereum specific signature with: sign(keccack256("\x19Ethereum Signed Message:\n" + len(message) + message))),

Parametersarrow-up-right

  • Message

  • Account Address

  • Password

personal_ecRecoverarrow-up-right

circle-info

TIP

Private: Requires authentication.

ecRecover returns the address associated with the private key that was used to calculate the signature in personal_signarrow-up-right.

Parametersarrow-up-right

personal_initializeWalletarrow-up-right

circle-info

TIP

Private: Requires authentication.

Initializes a new wallet at the provided URL, by generating and returning a new private key.

Parameters (1)arrow-up-right

Parameters must be given by position.

1: url string

  • Required: ✓ Yes

Client Examplesarrow-up-right

Shell HTTP

Websocket

Javascript Console

personal_unpairarrow-up-right

circle-info

TIP

Private: Requires authentication.

Unpair deletes a pairing between wallet and the node.

Parameters (2)arrow-up-right

  • URL

  • Pairing password

Client Examplesarrow-up-right

Shell HTTP

WebSocket

Javascript Console

Debug Methodsarrow-up-right

debug_traceTransactionarrow-up-right

The traceTransaction debugging method will attempt to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it will finally attempt to execute the transaction that corresponds to the given hash.

Parametersarrow-up-right

  • Trace Config

debug_traceBlockByNumberarrow-up-right

The traceBlockByNumber endpoint accepts a block number and will replay the block that is already present in the database.

Parametersarrow-up-right

  • Trace Config

Miner Methodsarrow-up-right

miner_getHashratearrow-up-right

circle-info

TIP

Private: Requires authentication.

Get the hashrate in H/s (Hash operations per second).

DANGER

Proof-of-Work specific. This endpoint always returns 0.

miner_setExtraarrow-up-right

circle-info

TIP

Private: Requires authentication.

Sets the extra data a validator can include when proposing blocks. This is capped at 32 bytes.

triangle-exclamation

Parametersarrow-up-right

  • Data

miner_setGasPricearrow-up-right

circle-info

TIP

Private: Requires authentication.

Sets the minimal gas price used to accept transactions. Any transaction below this limit is excluded from the validator block proposal process.

This method requires a node restart after being called because it changes the configuration file.

Make sure your financiyod start call is not using the flag minimum-gas-prices because this value will be used instead of the one set on the configuration file.

Parametersarrow-up-right

  • Hex Gas Price

circle-info

TIP

Private: Requires authentication.

Start the CPU validation process with the given number of threads.

circle-info

DANGER

Unsupported. This endpoint always returns an error

Parametersarrow-up-right

  • Hex Number of threads

circle-info

TIP

Private: Requires authentication.

Stop the validation operation.

circle-info

DANGER

Unsupported. This endpoint always performs a no-op.

miner_setGasLimitarrow-up-right

circle-info

TIP

Private: Requires authentication.

Sets the gas limit the miner will target when mining. Note: on networks where EIP-1559arrow-up-right is activated, this should be set to twice what you want the gas target (i.e. the effective gas used on average per block) to be.

circle-info

DANGER

Unsupported. This endpoint always returns false

Parametersarrow-up-right

  • Hex gas limit

miner_setEtherbasearrow-up-right

circle-info

TIP

Private: Requires authentication.

Sets the etherbase. It changes the wallet where the validator rewards will be deposited.

Parametersarrow-up-right

  • Account Address

TxPool Methodsarrow-up-right

txpool_contentarrow-up-right

Returns a list of the exact details of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.

Parame (0)arrow-up-right

Client Examplesarrow-up-right

Shell HTTP

Websocket

Javascript Console

Resultarrow-up-right

txpool_inspectarrow-up-right

Returns a list on text format to summarize all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. This is a method specifically tailored to developers to quickly see the transactions in the pool and find any potential issues.

Parameters (0)arrow-up-right

Client Examplesarrow-up-right

Shell HTTP

Websocket

Javascript Console

Resultarrow-up-right

txpool_statusarrow-up-right

Returns the number of transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.

Parameters (0)arrow-up-right

Client Examplesarrow-up-right

Shell HTTP

Websocket

Javascript Console

Resultarrow-up-right

Last updated