Matter Labs · AsyncAPI Specification

ZKsync Era Pub/Sub (WebSocket) API

Version 1.0.0

Generated from the ZKsync Era pub-sub JSON-RPC documentation. ZKsync Era supports the Ethereum-style eth_subscribe / eth_unsubscribe subscription model over WebSocket. This is a faithful description of the documented subscription channels, not a provider- published AsyncAPI. Subscribe by sending {"jsonrpc":"2.0","id":1,"method":"eth_subscribe", "params":[, ...]} over the WebSocket connection; notifications arrive as eth_subscription messages.

View Spec View on GitHub CompanyBlockchainEthereumLayer 2Zero-Knowledge ProofsRollupJSON-RPCWeb3CryptographyScalingAsyncAPIEventsWebSockets

Channels

newHeads
Emits a notification for each new block header added to the chain.
logs
Emits logs matching the supplied filter (address and topics) as they are included in new blocks.
newPendingTransactions
Emits the hash of each new pending transaction seen by the node.

Servers

wss
mainnet
ZKsync Era Mainnet WebSocket endpoint (chain id 324).
wss
sepolia
ZKsync Era Sepolia Testnet WebSocket endpoint (chain id 300).

AsyncAPI Specification

matter-labs-pubsub-asyncapi.yml Raw ↑
asyncapi: 3.0.0
# generated: '2026-07-20'
# method: generated
# source: https://docs.zksync.io/zksync-protocol/api/pub-sub-rpc
info:
  title: ZKsync Era Pub/Sub (WebSocket) API
  version: '1.0.0'
  description: >-
    Generated from the ZKsync Era pub-sub JSON-RPC documentation. ZKsync Era supports the
    Ethereum-style eth_subscribe / eth_unsubscribe subscription model over WebSocket. This
    is a faithful description of the documented subscription channels, not a provider-
    published AsyncAPI. Subscribe by sending {"jsonrpc":"2.0","id":1,"method":"eth_subscribe",
    "params":[<subscription_type>, ...]} over the WebSocket connection; notifications arrive
    as eth_subscription messages.
servers:
  mainnet:
    host: mainnet.era.zksync.dev
    pathname: /ws
    protocol: wss
    description: ZKsync Era Mainnet WebSocket endpoint (chain id 324).
  sepolia:
    host: sepolia.era.zksync.dev
    pathname: /ws
    protocol: wss
    description: ZKsync Era Sepolia Testnet WebSocket endpoint (chain id 300).
channels:
  newHeads:
    address: newHeads
    description: Emits a notification for each new block header added to the chain.
    messages:
      newHead:
        summary: New block header.
  logs:
    address: logs
    description: >-
      Emits logs matching the supplied filter (address and topics) as they are included
      in new blocks.
    messages:
      log:
        summary: Matching event log.
  newPendingTransactions:
    address: newPendingTransactions
    description: Emits the hash of each new pending transaction seen by the node.
    messages:
      pendingTx:
        summary: Pending transaction hash.
operations:
  subscribeNewHeads:
    action: receive
    channel:
      $ref: '#/channels/newHeads'
  subscribeLogs:
    action: receive
    channel:
      $ref: '#/channels/logs'
  subscribeNewPendingTransactions:
    action: receive
    channel:
      $ref: '#/channels/newPendingTransactions'

Work with this as data

Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for asyncapi

4 MCP tools reach this
  • find_asyncapisBrowse and filter every AsyncAPI spec in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This AsyncAPI spec
curl "https://apis.io/api/v1/asyncapis/matter-labs-pubsub-asyncapi"
All asyncapi
curl "https://apis.io/api/v1/asyncapis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.