πŸ”ŒRelayer WebSocket API

The XOXNO Relayer provides real-time blockchain data and transaction services via WebSocket connections. Subscribe to live updates for gas statistics, account changes, and transaction status tracking.

Connection

wss://relayer.xoxno.com/ws

Features

Feature
Description

Gas Statistics

Real-time gas prices and PPU per shard

Account Updates

Balance and nonce changes for addresses

Transaction Status

Track transaction confirmation status

Transaction Broadcasting

Submit transactions for P2P broadcast

Transaction Relaying

Co-sign and broadcast transactions

Wormhole Tracking

Cross-chain transfer status updates

Quick Start

const ws = new WebSocket('wss://relayer.xoxno.com/ws');

ws.onopen = () => {
  // Subscribe to gas statistics
  ws.send(JSON.stringify({
    action: 'subscribe',
    topic: 'gasStats'
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Received:', data);
};

Message Protocol

All messages use JSON format with an action field indicating the operation type.

Client Actions

Action
Description

subscribe

Subscribe to a topic

unsubscribe

Unsubscribe from a topic

broadcast

Broadcast pre-signed transactions

relay

Sign and broadcast transactions

wormhole

Track Wormhole cross-chain transfers

Server Responses

Type
Description

Subscription ACK

Confirmation of subscribe/unsubscribe

Topic Events

Real-time data for subscribed topics

Transaction Results

Hash or error for broadcast/relay

Error

Error messages for failed operations

Topics

Gas Statistics

Real-time gas price and PPU (Price Per Unit) statistics per shard, updated every 50ms.

Address Updates

Account balance and nonce changes for a specific address.

Transaction Status

Track the status of a specific transaction by hash.

Limits

Limit
Value

Max topics per connection

100

Max message size

1 MB

Rate limit

100 messages/second

Connection timeout

30 seconds (ping/pong)

Documentation

Last updated

Was this helpful?