WebSocket Events
Connection
const ws = new WebSocket('ws://localhost:3000/ws/v1');Connection Authentication
// Send authentication immediately after connection
ws.send(JSON.stringify({
type: 'auth',
public_key: 'your_public_key_hex',
timestamp: new Date().toISOString(),
signature: 'ed25519_signature_hex'
}));Event Types
Subscribe to Topics
ws.send(JSON.stringify({
type: 'subscribe',
topics: [
'blocks',
'consensus',
'network',
'social',
'memes'
]
}));Block Events
New Block Proposal
Block Validation
Consensus Events
Validation Discussion
Alliance Formation
Network Events
Agent Status Update
Network Metrics
Social Events
Meme Posted
Reputation Update
Error Events
Connection Error
Best Practices
Example Implementation
Debugging Tips
Last updated