Testnet: https://rpc1.newchain.newtonproject.org
Gets the current block number
Ethereum equivalent: eth_blockNumber
None
An integer of the current block number where the client is located
Gets the block number of the specified block
Ethereum equivalent: eth_getBlockByNumber
Two parameters:
- A block-numbered integer (such as 0x1b4), or the string "earliest", "latest" or "pending".
- The boolean type. If true, it returns all the complete transaction objects. If it is false, it only returns the hash value of the transaction object.
Returns a block object, if it is not found to be null.
Value | Type | Returns |
---|---|---|
Number | QUANTITY | The block number. null when its pending block. |
Hash | DATA, 32 Bytes | Hash of the block. null when its pending block. |
parentHash | DATA, 32 Bytes | Hash of the parent block. |
Nonce | DATA, 8 Bytes | Hash of the generated proof-of-work. null when its pending block. |
sha3Uncles | DATA, 32 Bytes | SHA3 of the uncles data in the block. |
logsBloom | DATA, 256 Bytes | The bloom filter for the logs of the block. null when its pending block. |
transactionsRoot | DATA, 32 Bytes | The root of the transaction trie of the block. |
stateRoot | DATA, 32 Bytes | The root of the final state trie of the block. |
receiptsRoot | DATA, 32 Bytes | The root of the receipts trie of the block. |
Miner | DATA, 20 Bytes | The address of the beneficiary to whom the mining rewards were given. |
Difficulty | QUANTITY | Integer of the difficulty for this block. |
totalDifficulty | QUANTITY | Integer of the total difficulty of the chain until this block. |
extraData | DATA | The "extra data" field of this block. |
Size | QUANTITY | Integer the size of this block in bytes. |
gasLimit | QUANTITY | The maximum gas allowed in this block. |
gasUsed | QUANTITY | The total used gas by all transactions in this block. |
Timestamp | QUANTITY | The unix timestamp for when the block was collated. |
Transactions | Array | Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. |
Uncles | Array | Array of uncle hashes. |
Gets the block with the specified hash
Ethereum equivalent: eth_getBlockByHash
Two parameters:
- The hash value of the block (32 bytes)
- The boolean type. If true, it returns all the complete transaction objects. If false, it only returns the hash value of the transaction object.
Returns a block object, if it is not found to be null.
Value | Type | Returns |
---|---|---|
Number | QUANTITY | The block number. null when its pending block. |
Hash | DATA, 32 Bytes | Hash of the block. null when its pending block. |
parentHash | DATA, 32 Bytes | Hash of the parent block. |
Nonce | DATA, 8 Bytes | Hash of the generated proof-of-work. null when its pending block. |
sha3Uncles | DATA, 32 Bytes | SHA3 of the uncles data in the block. |
logsBloom | DATA, 256 Bytes | The bloom filter for the logs of the block. null when its pending block. |
transactionsRoot | DATA, 32 Bytes | The root of the transaction trie of the block. |
stateRoot | DATA, 32 Bytes | The root of the final state trie of the block. |
receiptsRoot | DATA, 32 Bytes | The root of the receipts trie of the block. |
Miner | DATA, 20 Bytes | The address of the beneficiary to whom the mining rewards were given. |
Difficulty | QUANTITY | Integer of the difficulty for this block. |
totalDifficulty | QUANTITY | Integer of the total difficulty of the chain until this block. |
extraData | DATA | The "extra data" field of this block. |
Size | QUANTITY | Integer the size of this block in bytes. |
gasLimit | QUANTITY | The maximum gas allowed in this block. |
gasUsed | QUANTITY | The total used gas by all transactions in this block. |
Timestamp | QUANTITY | The unix timestamp for when the block was collated. |
Transactions | Array | Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. |
Uncles | Array | Array of uncle hashes. |
Ethereum equivalent: eth_getBlockTransactionCountByNumberParameter:
The integer of the block number (such as 0x1b4), or the string "earliest", "latest" or "pending".
Number of transactions, hexadecimal integer
Ethereum equivalent: eth_getTransactionByBlockNumberAndIndex
Two arguments:
- A block-numbered integer (such as 0x1b4), or the string "earliest", "latest" or "pending".
- The index position of the transaction (for example: 0x0)
A transaction object, or null if there is no transaction
Value | Type | Returns |
---|---|---|
Hash | DATA, 32 Bytes | Hash of the transaction. |
Nonce | QUANTITY | The number of transactions made by the sender prior to this one. |
blockHash | DATA, 32 Bytes | Hash of the block where this transaction was in. null when its pending. |
blockNumber | QUANTITY | Block number where this transaction was in. null when its pending. |
transactionIndex | QUANTITY | Integer of the transactions index position in the block. null when its pending. |
From | DATA, 20 Bytes | Address of the sender. |
To | DATA, 20 Bytes | Address of the receiver. null when its a contract creation transaction. |
Value | QUANTITY | Value transferred in Wei. |
gasPrice | QUANTITY | Gas price provided by the sender in Wei. |
Gas | QUANTITY | Gas provided by the sender. |
Input | DATA | The data send along with the transaction. |
Ethereum equivalent: eth_getTransactionByHash
The hash value of the block (32 bytes).
A transaction object, or null if there is no transaction
Value | Type | Returns |
---|---|---|
Hash | DATA, 32 Bytes | Hash of the transaction. |
Nonce | QUANTITY | The number of transactions made by the sender prior to this one. |
blockHash | DATA, 32 Bytes | Hash of the block where this transaction was in. null when its pending. |
blockNumber | QUANTITY | Block number where this transaction was in. null when its pending. |
transactionIndex | QUANTITY | Integer of the transactions index position in the block. null when its pending. |
From | DATA, 20 Bytes | Address of the sender. |
To | DATA, 20 Bytes | Address of the receiver. null when its a contract creation transaction. |
Value | QUANTITY | Value transferred in Wei. |
gasPrice | QUANTITY | Gas price provided by the sender in Wei. |
Gas | QUANTITY | Gas provided by the sender. |
Input | DATA | The data send along with the transaction. |
Ethereum equivalent: eth_getBalance
Two parameters:
- A 20-byte address
- A block-numbered integer (such as 0x1b4), or the string "earliest", "latest" or "pending".
An integer of the current balance in wei
Ethereum equivalent: eth_sendRawTransaction
Signed transaction data
The transaction hash value, if the transaction is not available, the hash is 0.