eth_subscription notifications without the client needing to poll.
Parameters
The event type to subscribe to.
Optional filter options. Only applicable for the
"logs" subscription type.Subscription Types
| Type | Description | Notification payload |
|---|---|---|
newHeads | Fires for each new block appended to the chain | Block header object (~200ms on Flashblocks endpoints) |
logs | Fires for each new log matching filter criteria | Log object |
newPendingTransactions | Fires for each new transaction hash added to the mempool | Transaction hash string |
Returns
A hex-encoded subscription ID. All event notifications from this subscription include this ID in
params.subscription.