Skip to content

Warp (Real-Time Streaming)

Beta Feature: Warp is currently in beta. While fully functional, some features are still being refined.

Available on All Plans: Warp is available on all plans including Free tier. See stream limits by plan.

Overview

Inodra Warp delivers real-time blockchain data via Server-Sent Events (SSE). Unlike webhooks which push to your endpoint, Warp allows your application to maintain a persistent connection and receive events as they occur.

Ready to get started?

Create your free account and configure your first Warp stream in the dashboard.

How It Works

┌────────────────┐      ┌─────────────┐                    ┌─────────────┐
│ Sui Blockchain │─────►│   Inodra    │───SSE Connection──►│  Your App   │
│                │      │    Warp     │   (Real-time data) │             │
└────────────────┘      └─────────────┘                    └─────────────┘
  1. Create a stream in the Inodra dashboard
  2. Connect to the stream endpoint using EventSource
  3. Receive real-time events as they occur on-chain

Stream Types

Choose the right stream type for your use case:

TypeWhat It MonitorsExample Use CaseLearn More
EventsPackage event typesReact to DEX swaps, NFT mintsIncludes field filtering
AddressesWallet activityTrack treasury or user walletsSender & receiver activity
CoinsToken balance changesPayment confirmationsFilter by coin type
ObjectsObject mutationsWatch NFTs or AMM poolsTrack ownership changes

Warp vs Webhooks

FeatureWarp (SSE)Webhooks
Connection TypeClient-initiated, persistsServer pushes to your endpoint
Endpoint SetupNo public endpoint neededRequires HTTPS endpoint
LatencyLower (persistent conn)Slightly higher (HTTP request)
Best ForReal-time dashboards, appsBackend services, integrations
ReconnectionAutomatic (EventSource)N/A (retry on delivery failure)
Browser SupportNative EventSource APIN/A

Key Features

  • Real-time streaming via Server-Sent Events (SSE)
  • Multiple filter types: Events, addresses, coins, and objects
  • Event field filtering: Filter events by specific field values
  • Automatic reconnection: EventSource handles reconnects automatically
  • Compute unit billing: Charged per event received
  • Dashboard UI: Manage streams, view connection status

Quick Start

1. Create a Stream

Add a stream via the dashboard:

  1. Navigate to Warp Streams
  2. Click Add Stream
  3. Select the stream type (Event, Address, Coin, or Object)
  4. Configure your filters
  5. Save and copy the Stream ID

2. Connect to the Stream

Connect using fetch with the x-api-key header:

javascript
const streamId = 'your-stream-id'
const apiKey = 'your-api-key'

// AbortController is required for graceful shutdown
const abort = new AbortController()
process.on('SIGINT', () => abort.abort())

const res = await fetch(`https://api.inodra.com/v1/warp/${streamId}/stream`, {
  headers: { 'x-api-key': apiKey },
  signal: abort.signal
})

let buffer = ''
for await (const chunk of res.body) {
  buffer += new TextDecoder().decode(chunk)
  const parts = buffer.split('\n\n')
  buffer = parts.pop() // Keep incomplete part
  for (const part of parts) {
    const dataLine = part.split('\n').find((l) => l.startsWith('data:'))
    if (dataLine) console.log(JSON.parse(dataLine.slice(5)))
  }
}

Note: Native browser EventSource doesn't support custom headers. Use fetch as shown above, or the eventsource npm package for Node.js which supports headers.

3. Handle Events

The stream sends different event types:

  • connected - Connection established (includes connId, subscriptionType)
  • event - Blockchain event (includes txDigest, checkpoint, timestamp, type, sender, data)
  • heartbeat - Keep-alive every 5s (includes eventCount)
  • quota_exceeded - CU limit reached, close connection

See Setup & Connection for complete examples with error handling and reconnection logic.

Common Use Cases

Real-Time Dashboards

Build live dashboards that update instantly:

  • Trading interfaces: Show price changes and swaps in real-time
  • Portfolio trackers: Display balance updates as they happen
  • Analytics dashboards: Stream metrics without polling

Browser Applications

Perfect for frontend applications:

  • Notification systems: Alert users of wallet activity
  • Game state updates: Sync on-chain game state instantly
  • Marketplace feeds: Show new listings and sales live

Backend Services

Use with server-side applications:

  • Event processing: React to on-chain events immediately
  • Data pipelines: Stream blockchain data to your systems
  • Alert systems: Trigger notifications based on activity

Next Steps

  • Setup & Connection - Authentication, connection handling, best practices
  • Webhooks - Alternative push-based delivery for backend services

Released under the MIT License.