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) or WebSocket. 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
┌────────────────┐ ┌─────────────┐ SSE or WebSocket ┌─────────────┐
│ Sui Blockchain │─────►│ Inodra │───────Connection────────►│ Your App │
│ │ │ Warp │ (Real-time data) │ │
└────────────────┘ └─────────────┘ └─────────────┘- Create a stream in the Inodra dashboard
- Connect via SSE or WebSocket
- Receive real-time events as they occur on-chain
Connection Protocols
| Protocol | Delivery Guarantee | Best For |
|---|---|---|
| SSE | At-least-once | Higher throughput |
| WebSocket | Exactly-once | When you need delivery guarantees |
SSE: Events are delivered at-least-once. On ungraceful disconnect, up to 30 seconds of events may be redelivered on reconnect.
WebSocket: Client ACKs enable exactly-once delivery. Events are only marked as delivered after your client acknowledges them.
Stream Types
Choose the right stream type for your use case:
| Type | What It Monitors | Example Use Case | Learn More |
|---|---|---|---|
| Events | Package event types | React to DEX swaps, NFT mints | Includes field filtering |
| Addresses | Wallet activity | Track treasury or user wallets | Sender & receiver activity |
| Coins | Token balance changes | Payment confirmations | Filter by coin type |
| Objects | Object mutations | Watch NFTs or AMM pools | Track ownership changes |
Warp vs Webhooks
| Feature | Warp (SSE/WebSocket) | Webhooks |
|---|---|---|
| Connection Type | Client-initiated, persists | Server pushes to your endpoint |
| Endpoint Setup | No public endpoint needed | Requires HTTPS endpoint |
| Latency | Lower (persistent conn) | Slightly higher (HTTP request) |
| Best For | Real-time dashboards, apps | Backend services, integrations |
| Reconnection | Resume with lastEventId | N/A (retry on delivery failure) |
| Browser Support | Native EventSource API | N/A |
Key Features
- Real-time streaming via SSE or WebSocket
- Multiple filter types: Events, addresses, coins, and objects
- Event field filtering: Filter events by specific field values
- Automatic reconnection: Resume from last event on reconnect
- Exactly-once delivery: Available via WebSocket with client ACKs
- Compute unit billing: Charged per event + connection time
- Dashboard UI: Manage streams, view connection status
Quick Start
1. Create a Stream
Add a stream via the dashboard:
- Navigate to Warp Streams
- Click Add Stream
- Select the stream type (Event, Address, Coin, or Object)
- Configure your filters
- Save and copy the Stream ID
2. Connect to the Stream
Using SSE (fetch with x-api-key header):
const streamId = 'your-stream-id'
const apiKey = 'your-api-key'
const abort = new AbortController()
process.on('SIGINT', () => abort.abort())
const res = await fetch(`https://mainnet-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()
for (const part of parts) {
const dataLine = part.split('\n').find((l) => l.startsWith('data:'))
if (dataLine) console.log(JSON.parse(dataLine.slice(5)))
}
}Using WebSocket (with query params):
const streamId = 'your-stream-id'
const apiKey = 'your-api-key'
const ws = new WebSocket(`wss://mainnet-api.inodra.com/v1/warp/${streamId}/ws?api_key=${apiKey}`)
ws.onmessage = (event) => {
const msg = JSON.parse(event.data)
console.log(msg.event, msg.data)
// Send ACK for exactly-once delivery
if (msg.id) {
ws.send(JSON.stringify({ type: 'ack', id: msg.id }))
}
}Note: Native browser
EventSourcedoesn't support custom headers. Usefetchas shown above, or theeventsourcenpm package for Node.js which supports headers.
3. Handle Events
The stream sends different event types:
connected- Connection established (includesconnId,subscriptionType,protocol)event- Blockchain event (includestxDigest,checkpoint,timestamp,type,sender,data)quota_exceeded- CU limit reached, connection will close
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