class WebhookProcessor {
async handleEvent(event, data) {
switch(event) {
case 'score.updated':
await this.handleScoreUpdate(data);
break;
case 'achievement.claimed':
await this.handleAchievementClaim(data);
break;
}
}
async handleScoreUpdate(data) {
console.log(`Score updated: ${data.address} - ${data.newScore}`);
// Process score update
}
}