SDK Reference
Events
Real-time event watching for transactions, scores, and actions.
Watch on-chain events in real-time.
watchTransactions
import { watchTransactions } from "@brnmwai/qova-core";
const unwatch = watchTransactions(client, (event) => {
console.log(`Agent ${event.agent} - ${event.amount} wei`);
});
// Stop watching
unwatch();watchScoreUpdates
import { watchScoreUpdates } from "@brnmwai/qova-core";
watchScoreUpdates(client, (event) => {
console.log(`${event.agent}: ${event.oldScore} -> ${event.newScore}`);
});watchAgentActions
import { watchAgentActions } from "@brnmwai/qova-core";
watchAgentActions(client, (event) => {
console.log(`Action: ${event.agent} spent ${event.amount}`);
});Event Types
import type {
TransactionRecordedEvent,
ScoreUpdatedEvent,
AgentActionExecutedEvent,
QovaEvent,
WatchConfig,
} from "@brnmwai/qova-core";