跳至主要內容

[Filter] eth_subscribe

Creates a new subscription to specific events by using either RPC Pub/Sub over WebSockets or filters over HTTP. It allows clients to wait for events instead of polling for them.

The node will return a subscription id for each subscription created. For each event that matches the subscription, a notification with relevant data is sent together with the subscription id. If a connection is closed, all subscriptions created over the connection are removed.

JSONRPC: eth_subscribe

Request

Responses

Return a subscription id when a subscription is created.

讓這個頁面變得更好