SahyadriSahyadriAPI

WebSocket Subscriptions

Real-time notifications via WebSocket. Subscribe to chain events for live data feeds.

All subscriptions are over WebSocket.
Connect to ws://127.0.0.1:27110, then send subscribe/unsubscribe RPC calls.

WSsubscribeVirtualChainChanged

Receive notifications when the virtual chain changes with new accepted blocks and their transaction IDs.

// Subscribe
{
  "id": 1,
  "method": "subscribeVirtualChainChanged",
  "params": [{ "includeAcceptedTransactionIds": true }]
}

// Notification received
{
  "type": "VirtualChainChangedNotification",
  "chainBlocks": [{
    "acceptingBlockHash": "0bea8500...",
    "acceptedTransactionIds": ["8f3a9b2..."]
  }]
}
WSsubscribeUtxosChanged

Receive notifications when account balances change for specified addresses. Essential for exchange hot wallets to detect deposits in real-time.

// Subscribe to specific addresses
{
  "id": 2,
  "method": "subscribeUtxosChanged",
  "params": [[
    "csm1sp5fndd452...",
    "csm1sar30mvpd..."
  ]]
}

// Notification received
{
  "type": "UtxosChangedNotification",
  "address": "csm1sp5fndd452...",
  "added": [{ "outpoint": {...}, "utxoEntry": {...} }],
  "removed": [{ "outpoint": {...} }]
}
WSsubscribeVirtualDaaScoreChanged

Receive notification when virtual DAA score changes. Ideal for mining dashboards tracking difficulty adjustments.

// Subscribe
{
  "id": 3,
  "method": "subscribeVirtualDaaScoreChanged",
  "params": [{}]
}

// Notification received
{
  "type": "VirtualDaaScoreChangedNotification",
  "virtualDaaScore": 11101
}