Returns the account information of a given address in the Klaytn. For more details about the types of an account in Klaytn, please refer to Klaytn Account Types.
NOTEcaver.rpc.klay.getAccount returns the account that exists on the network, so null is returned if the account matching the address does not exist on the actual blockchain network.
Parameters
Return Value
Promise returns object
Example
// Get account with EOA>caver.rpc.klay.getAccount('0x{address in hex}').then(console.log){ accType:1, account: { nonce:0, balance:'0x', humanReadable:false, key: { keyType:1, key: {} } }}// Get account with SCA>caver.rpc.klay.getAccount('0x{address in hex}').then(console.log){ accType:2, account: { nonce:1, balance:'0x0', humanReadable:false, key: { keyType:3, key: {} }, storageRoot:'0xd0ce6b9ba63cf727d48833bcaf69f398bb353e9a5b6235ac5bb3a8e95ff90ecf', codeHash:'7pemrmP8fcguH/ut/SYHJoUSecfUIcUyeCpMf0sBYVI=', codeFormat:0 }}
Returns AccountKey of a given address. If the account has AccountKeyLegacy or the account of the given address is a Smart Contract Account, it will return an empty key value. Please refer to Account Key for more details.
NOTEcaver.rpc.klay.getAccountKey returns an object that differs by each AccountKey type. If a Klaytn account matching the given address does not exist in the network, null is returned.
Encodes an object that contains AccountKey information using the Recursive Length Prefix (RLP) encoding scheme. Also you can use account.getRLPEncodingAccountKey to get RLP-encoded AccountKey.
Returns true if an input account has a non-empty codeHash at the time of a specific block number. It returns false if the account is an EOA or a smart contract account which doesn't have codeHash. Please refer to Smart Contract Account for more details.
Parameters
Return Value
Promise returns boolean
Example
>caver.rpc.klay.isContractAccount('0x{address in hex}').then(console.log)false>caver.rpc.klay.isContractAccount('0x{address in hex}').then(console.log)true
Generates signed data specific to the Klaytn. Refer to Klaytn Platform API - klay_sign to know how the signature is generated.
NOTE: This API provides the function to sign a message using an imported account in your Klaytn node. The imported account in your node must be unlocked to sign the message. To sign a transaction with imported account in your Klaytn node, use caver.rpc.klay.signTransaction.
Parameters
Return Value
Promise returns string
Example
>caver.rpc.klay.sign('0x{address in hex}','0xdeadbeaf').then(console.log)0x1066e052c4be821daa4d0a0cd1e9e75ccb200bb4001c2e38853ba41b712a5a226da2acd67c86a13b266e0d75d0a6e7d1551c8924af413267615a5948617c746c1c
caver.rpc.klay.getAccounts
caver.rpc.klay.getAccounts([callback])
Returns a list of addresses owned by the Klaytn Node.
Returns information about a block by block hash or block number. If the user passes the block hash as a parameter, caver.rpc.klay.getBlockByHash is called, and if the block number is called as a parameter, caver.rpc.klay.getBlockByNumber is called.
Executes a new message call immediately without sending a transaction on the blockchain. It returns data or an error object of JSON RPC if an error occurs.
Generates and returns an estimate of how much gas is necessary to allow a transaction to complete. The transaction from this method will not be added to the blockchain.
Parameters
See caver.rpc.klay.call parameters, expect that all properties are optional.
Generates and returns an estimate of how much computation cost will be spent to execute the transaction. Klaytn limits the computation cost of a transaction to 100000000 currently not to take too much time by a single transaction. The transaction will not be added to the blockchain like caver.rpc.klay.estimateGas.
Parameters
See caver.rpc.klay.call parameters, expect that all properties are optional.
Returns the information about a transaction requested by transaction hash.
Parameters
Return Value
Promise returns object - A transaction object, or null when no transaction was found:
If the transaction is in pending status that has not yet been processed, default values for blockHash, blockNumber and transactionIndex are returned. See the example below.
Returns the information about a transaction requested by the sender transaction hash.
Please note that this API returns the correct result only if the indexing feature is enabled in the node by --sendertxhashindexing. Use caver.rpc.klay.isSenderTxHashIndexingEnabled to check if the indexing feature is enabled or not.
Returns the receipt of a transaction by sender transaction hash.
Please note that this API returns the correct result only if the indexing feature is enabled in the node by --sendertxhashindexing. Use caver.rpc.klay.isSenderTxHashIndexingEnabled to check if the indexing feature is enabled or not.
NOTE Receipt is not available for pending transactions whose transactions have not yet been processed.
The signedTransaction parameter can be a "RLP-encoded signed transaction." You can get the RLP-encoded transaction of a signed transaction using transaction.getRLPEncoding. For convenience, caver.rpc.klay.sendRawTransaction also accepts a "signed transaction instance" as parameter.
Parameters
Return Value
For PromiEvent, the following events are available:
transactionHash returns string: Is fired right after a transaction is sent and a transaction hash is available.
Signs a transaction as a transaction sender with an "imported account's private key" in your Klaytn Node and propagates the transaction to the Klaytn.
For more information about each transaction type, refer to Transaction.
NOTE: This API provides the function to sign a transaction using an imported account in your Klaytn node. The imported account in your node must be unlocked to sign a transaction.
Parameters
Return Value
For PromiEvent, the following events are available:
transactionHash returns string: Is fired right after a transaction is sent and a transaction hash is available.
Signs a fee delegated transaction as a transaction fee payer with an imported account's private key in your Klaytn Node and propagates the transaction to the Klaytn.
Before using sendTransaction as a fee payer, the transaction sender must have signed with valid signature(s) and the nonce must have been defined.
For more information about each transaction type, refer to Transaction.
NOTE: This API provides the function to sign a transaction using an imported account in your Klaytn node. The imported account in your node must be unlocked to sign a transaction.
Parameters
Return Value
For PromiEvent, the following events are available:
transactionHash returns string: Is fired right after a transaction is sent and a transaction hash is available.
Signs a transaction as a transaction sender with an "imported account's private key" in your Klaytn Node.
For more information about each transaction type, refer to Transaction.
NOTE: This API provides the function to sign a transaction using an imported account in your Klaytn node. The imported account in your node must be unlocked to sign a transaction.
Parameters
Return Value
Promise returns object - An object includes signed transaction:
Signs a transaction as a transaction fee payer with an "imported account's private key" in your Klaytn Node.
For more information about each transaction type, refer to Transaction.
NOTE: This API provides the function to sign a transaction using an imported account in your Klaytn node. The imported account in your node must be unlocked to sign a transaction.
Parameters
Return Value
Promise returns object - An object includes signed transaction:
This method creates an accessList based on a given Transaction. The accessList contains all storage slots and addresses read and written by the transaction, except for the sender account and the precompiles. This method uses the same transaction call object and blockNumberOrTag object as caver.rpc.klay.call. An accessList can be used to release stuck contracts that became inaccessible due to gas cost increases. Adding an accessList to your transaction does not necessary result in lower gas usage compared to a transaction without an access list.
Parameters
Return Value
Promise returns object - An object includes an access list:
Creates a filter in the node, to receive the information about new pending transaction arrival. To check if the state has changed, call caver.rpc.klay.getFilterChanges.
Uninstalls a filter with a given id. Should always be called when a watch is no longer needed. Additionally, filters time out when they are not being called with caver.rpc.klay.getFilterChanges for a period of time.
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
A RLP-encoded AccountKey.
encodedKey
string
A RLP-encoded AccountKey.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
object
An object defines keyType and key inside.
address
string
The address of the account for which you want to get balance.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The current balance for the given address in peb.
address
string
The address to get the code from.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The code from the given address.
address
string
The address to get the number of transactions from.
blockNumber
number | string
(optional) A block number, the string pending for the pending nonce, or the string earliest or latest as in the default block parameter. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The number of transactions sent from the given address in hex.
address
string
The address you want to check for isContractAccount.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
boolean
true means the input parameter is an existing smart contract address.
address
String
The address of the imported account to sign the message.
message
String
Message to sign.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The signature made from an imported account.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
Array
An array of addresses owned by the Klaytn Node.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The number of the most recent block in hex.
blockNumberOrHash
number | string
The block hash, number or the block tag string.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
baseFeePerGas
string
The base fee per gas. This value is returned only when EthTxTypeCompatibleBlock is activated for that block number.
blockScore
string
The difficulty of mining in the blockchain network. The use of blockScore differs from the consensus of the network. Always 1 in the BFT consensus engine.
extraData
string
The "extra data" field of this block.
gasUsed
string
The gas in total that was used by all transactions in this block.
governanceData
string
RLP encoded governance configuration
hash
string
Hash of the block. null when it is a pending block.
logsBloom
string
The bloom filter for the logs of the block. null when it is a pending block.
number
string
The block number. null when it is a pending block.
parentHash
string
Hash of the parent block.
receiptsRoot
string
The root of the receipts trie of the block.
reward
string
The address of the beneficiary to whom the block rewards were given.
stateRoot
string
The root of the final state trie of the block.
timestamp
string
The unix timestamp for when the block was collated.
timestampFoS
string
The fraction of a second of the timestamp for when the block was collated.
transactionsRoot
string
The root of the transaction trie of the block.
blockNumberOrHash
number | string
The block hash, number or the block tag string.
returnTransactionObjects
boolean
(optional, default false) If true, the returned block will contain all transactions as objects, and if false, it will only contain the transaction hashes.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
The block number or the block which is tagged with a string (genesis or latest).
returnTransactionObjects
boolean
(optional, default false) If true, the returned block will contain all transactions as objects, and if false, it will only contain the transaction hashes.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
(optional, default false) If true, the returned block will contain all transactions as objects, and if false, it will only contain the transaction hashes.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
baseFeePerGas
string
The base fee per gas. This value is returned only when EthTxTypeCompatibleBlock is activated for that block number.
blockScore
string
The difficulty of mining in the blockchain network. The use of blockScore differs from the consensus of the network. Always 1 in the BFT consensus engine.
extraData
string
The "extra data" field of this block.
gasUsed
string
The gas in total that was used by all transactions in this block.
governanceData
string
RLP encoded governance configuration
hash
string
Hash of the block. null when it is a pending block.
logsBloom
string
The bloom filter for the logs of the block. null when it is a pending block.
number
string
The block number. null when it is a pending block.
parentHash
string
Hash of the parent block.
receiptsRoot
string
The root of the receipts trie of the block.
reward
string
The address of the beneficiary to whom the block rewards were given.
size
string
Integer the size of this block in bytes.
stateRoot
string
The root of the final state trie of the block.
timestamp
string
The unix timestamp for when the block was collated.
timestampFoS
string
The fraction of a second of the timestamp for when the block was collated.
totalBlockScore
string
Integer of the total blockScore of the chain until this block.
transactions
Array
Array of transaction objects, or 32-byte transaction hashes depending on the returnTransactionObjects parameter.
transactionsRoot
string
The root of the transaction trie of the block.
voteData
string
RLP encoded governance vote of the proposer.
blockHash
string
The block hash.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
Array
The transaction receipts included in a block. If the target block contains no transaction, an empty array [] is returned. For detailed description of transaction receipt, please refer to caver.rpc.klay.getTransactionReceipt.
blockNumber
number | string
The block number or the block tag string (genesis or latest).
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The number of transactions in the given block in hex.
blockHash
string
The block hash.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The number of transactions in the given block in hex.
blockNumber
number | string
The block number or the block tag string (genesis or latest).
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
blockScore
string
Former difficulty. Always 1 in the BFT consensus engine
committee
Array
Array of addresses of committee members of this block. The committee is a subset of validators who participated in the consensus protocol for this block.
extraData
string
The "extra data" field of this block.
gasUsed
string
The gas in total that was used by all transactions in this block.
governanceData
string
RLP encoded governance configuration
hash
string
Hash of the block. null when it is a pending block.
logsBloom
string
The bloom filter for the logs of the block. null when it is a pending block.
number
string
The block number. null when it is a pending block.
originProposer
string
The proposal of 0 round at the same block number.
parentHash
string
Hash of the parent block.
proposer
string
The address of the block proposer.
receiptsRoot
string
The root of the receipts trie of the block.
reward
string
The address of the beneficiary to whom the block rewards were given.
round
number
The round number.
size
string
Integer the size of this block in bytes.
stateRoot
string
The root of the final state trie of the block.
timestamp
string
The unix timestamp for when the block was collated.
timestampFoS
string
The fraction of a second of the timestamp for when the block was collated.
totalBlockScore
string
Integer of the total blockScore of the chain until this block.
transactions
Array
Array of transaction objects.
transactionsRoot
string
The root of the transaction trie of the block.
voteData
string
RLP encoded governance vote of the proposer
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
Array
Addresses of all validators in the committee at the given block.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
number
The size of the committee at the given block.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
Array
An array of validator addresses of the council at the given block, or null when no council was found.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
number
The size of the council at the given block.
address
string
The address to get the storage from.
position
number
The index position of the storage. For more information on calculating the position, refer to klay_getStorageAt.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The value at this storage position.
callback
function
(optional) Optional callback, which returns an error object as the first parameter and the result as the second.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
startingBlock
string
The block number in hex where the sync started.
currentBlock
string
The block number in hex where the node currently synced to.
highestBlock
string
The estimated block number in hex to sync to.
knownStates
string
The estimated states in hex to download.
pulledStates
string
The already downloaded states in hex.
callObject
object
A transaction call object. See the next table for the object's properties.
blockNumber
number | string
(optional) A block number, or the string latest or earliest. If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
to
string
(optional when testing the deployment of a new contract) The address the transaction is directed to.
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
blockHash
string
Hash of the block where this transaction was in.
blockNumber
string
Block number where this transaction was in.
codeFormat
string
(optional) The code format of smart contract code.
feePayer
string
(optional) Address of the fee payer.
feePayerSignatures
Array
(optional) An array of fee payer's signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
feeRatio
string
(optional) Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender.
from
string
Address of the sender.
gas
string
Gas provided by the sender.
gasPrice
string
Gas price provided by the sender in peb.
hash
string
Hash of the transaction.
humanReadable
Boolean
(optional) true if the address is humanReadable, false if the address is not humanReadable.
key
string
(optional) The RLP-encoded AccountKey used to update AccountKey of an Klaytn account. See AccountKey for more details.
input
string
(optional) The data sent along with the transaction.
nonce
string
The number of transactions made by the sender prior to this one.
senderTxHash
string
(optional) Hash of the tx without the fee payer's address and signature. This value is always the same as the value of hash for non-fee-delegated transactions.
signatures
Array
An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
to
string
Address of the receiver. null when it is a contract deploying transaction.
transactionIndex
string
Integer of the transaction index position in the block.
type
string
A string representing the type of the transaction.
typeInt
number
An integer representing the type of the transaction.
value
string
Value transferred in peb.
senderTxHash
string
The sender transaction hash. See SenderTxHash for more detail.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
blockHash
string
Hash of the block where this transaction was in.
blockNumber
string
Block number where this transaction was in.
codeFormat
string
(optional) The code format of smart contract code.
contractAddress
string
The contract address created, if the transaction was a contract creation, otherwise null.
effectiveGasPrice
string
The actual value per gas deducted from the sender. Before the Magma hard fork, this value was equal to the transaction’s gas price. After the Magma hard fork, it is equal to the value of baseFee in the block header.
feePayer
string
(optional) Address of the fee payer.
feePayerSignatures
Array
(optional) An array of fee payer's signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
feeRatio
string
(optional) Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender.
from
string
Address of the sender.
gas
string
Gas provided by the sender.
gasPrice
string
Gas price provided by the sender in peb.
gasUsed
string
The amount of gas used by this specific transaction alone.
humanReadable
Boolean
(optional) true if the address is humanReadable, false if the address is not humanReadable.
key
string
(optional) The RLP-encoded AccountKey used to update AccountKey of a Klaytn account.
input
string
(optional) The data sent along with the transaction.
logs
Array
Array of log objects, which this transaction generated.
logsBloom
string
Bloom filter for light clients to quickly retrieve related logs.
nonce
string
The number of transactions made by the sender prior to this one.
senderTxHash
string
(optional) Hash of a transaction that is signed only by the sender. See SenderTxHash. This value is always the same as transactionHash for non-fee-delegated transactions.
signatures
Array
An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
status
string
0x1 if the transaction was successful, 0x0 if the Klaytn Virtual Machine reverted the transaction.
txError
string
(optional) detailed error code if status is equal to 0x0.
to
string
Address of the receiver. null when it is a contract creation transaction.
transactionHash
string
Hash of the transaction.
transactionIndex
string
Integer of the transaction index position in the block.
type
string
A string representing the type of the transaction.
typeInt
number
An integer representing the type of the transaction.
value
string
Value transferred in peb.
senderTxHash
string
The sender transaction hash. See SenderTxHash for more detail.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
A RLP-encoded signed transaction or an instance of signed transaction.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
PromiEvent
A promise combined event emitter. It will be resolved when a transaction receipt is available.
transaction
object
An instance of a transaction to be sent to the Klaytn.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
PromiEvent
A promise combined event emitter. It will be resolved when a transaction receipt is available.
transaction
object
An instance of fee delegated transaction to send to the Klaytn.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
PromiEvent
A promise combined event emitter. It will be resolved when a transaction receipt is available.
transaction
object
An instance of a transaction to sign.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
raw
string
A RLP-encoded signed transaction.
tx
object
The transaction object including the sender's signature.
transaction
object
An instance of a transaction to sign.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
raw
string
A RLP-encoded signed transaction.
tx
object
The transaction object to sign as fee payer.
transactionHash
string
A transaction hash.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
BlockHash
string
Hash of the child chain block that this anchoring transaction was performed.
BlockNumber
number
The child chain block number that this anchoring transaction was performed.
ParentHash
string
Hash of the parent block.
TxHash
string
The root of the transaction trie of the block.
StateRootHash
string
The root of the final state trie of the block.
ReceiptHash
string
The root of the receipts trie of the block.
BlockCount
number
The number of blocks generated during this anchoring period. In most cases, this number is equal to the child chain's SC_TX_PERIOD, except the case that this transaction was the first anchoring tx after turning on the anchoring.
TxCount
number
The number of transactions generated in the child chain during this anchoring period.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The chain ID of the chain.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The current client version of a Klaytn node.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The current gas price in peb.
blockNumber
number
(optional) The block number. If omitted, the latest unit price will be returned.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The current gas price in peb.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The suggested gas tip cap in peb.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The lower bound gas price in peb.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The upper bound gas price in peb.
blockCount
number|BigNumber|BN|string
Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
lastBlock
number|BigNumber|BN|string
Highest number block (or block tag string) of the requested range.
rewardPercentiles
Array
A monotonically increasing list of percentile values to sample from each block’s effective priority fees per gas in ascending order, weighted by gas used. (Example: ['0', '25', '50', '75', '100'] or ['0', '0.5', '1', '1.5', '3', '80'])
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
oldestBlock
string
Lowest number block of returned range.
reward
Array
A two-dimensional array of effective priority fees per gas at the requested block percentiles.
baseFeePerGas
Array
An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.
(optional) A block number, blockhash or the block tag string (latest or earliest). If omitted, latest will be used.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
oldestBlock
string
Lowest number block of returned range.
reward
Array
A two-dimensional array of effective priority fees per gas at the requested block percentiles.
baseFeePerGas
Array
An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.
gasUsedRatio
Array
An array of gasUsed/gasLimit in the block.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
boolean
true means the node is writing blockchain data in a parallel manner. It is false if the node is serially writing the data.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
boolean
true means the node is indexing sender transaction hash to transaction hash mapping information.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The Klaytn protocol version of the node.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
The rewardbase address.
filterId
String
The filter id.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
logIndex
string
The log index position in the block.
transactionIndex
string
The index position of transactions where this log was created from.
transactionHash
string
Hash of the transactions this log was created from. null when pending.
blockHash
string
Hash of the block where this log was in. null when pending.
blockNumber
string
The block number where this log was in. null when pending.
address
string
Address from which this log originated.
data
string
Contains the non-indexed arguments of the log.
topics
Array
Array of 0 to 4 32-byte DATA of indexed log arguments. (In Solidity: The first topic is the hash of the signature of the event (e.g., Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.).
filterId
string
The filter id.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
options
object
The filter options. See the below table to find the description.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
fromBlock
number | string
(optional) The block number of the earliest block to get the logs. ("latest" means the most recent block.) The default value is "latest".
toBlock
number | string
(optional) The block number of the last block to get the logs. ("latest" means the most recent block.). The default value is "latest".
address
string | Array
(optional) An address or a list of addresses. Only the logs related to the particular account(s) will be returned.
topics
Array
(optional) An array of values that must appear in the log entries. The order is important. If you want to leave topics out, use null, e.g., [null, '0x12...']. You can also pass an array for each topic with options for that topic, e.g.,[null, ['option1', 'option2']].
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
A filter id.
options
object
The filter options. See the below table to find the description.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
fromBlock
number | string
(optional) The block number of the earliest block to get the logs. ("latest" means the most recent block.) The default value is "latest".
toBlock
number | string
(optional) The block number of the last block to get the logs. ("latest" means the most recent block.). The default value is "latest".
address
string | Array
(optional) An address or a list of addresses. Only the logs related to the particular account(s) will be returned.
topics
Array
(optional) An array of values that must appear in the log entries. The order is important. If you want to leave topics out, use null, e.g., [null, '0x12...']. You can also pass an array for each topic with options for that topic, e.g.,[null, ['option1', 'option2']].
string
A filter id.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
string
A filter id.
filterId
string
The filter id.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.
boolean
true if the filter was successfully uninstalled, otherwise false.
data
String
The data to be converted into a SHA3 hash.
callback
function
(optional) Optional callback, returns an error object as the first parameter and the result as the second.