eth_subscribe
Returns event that matches the subscription.
https://api.1inch.com/web3/10
Supported on: Optimism
Request
Request
object jsonrpc
* string (Enum)JSON-RPC version
2.0
method
* string The method to call
params
array Method parameters
items
any id
* number Request ID
JavaScript
Copy
1
Response
subscription
subscription
any oneOf[0]
object newHeads subscription. Subscribing to this returns a notification each time a new header is appended to the chain, including chain reorganizations.
number
* string hash
* string parentHash
* string nonce
* string sha3Uncles
* string logsBloom
* string transactionsRoot
* string stateRoot
* string receiptsRoot
* string miner
* string difficulty
string extraData
* string gasLimit
* string gasUsed
* string timestamp
* string baseFeePerGas
string additionalProperties
none oneOf[1]
string newPendingTransactions subscription. Returns the hash for all transactions that are added to the pending state and are signed with a key that's available in the node. When a transaction that was previously part of the canonical chain isn't part of the new canonical chain after a reorganization, it's emitted again.
oneOf[2]
object removed
boolean logIndex
string transactionIndex
string transactionHash
* string blockHash
string blockNumber
string address
string data
string topics
array items
string additionalProperties
none