SENTINEL Docs

Payments

Viewing and filtering the payment audit trail.

Every payment produces an audit record. This page covers how to query and interpret them.

Record Structure

FieldDescription
idDeterministic hash ID
agent_idAgent that made the payment
teamTeam grouping
amountHuman-readable USDC (e.g., "0.50")
endpointFull URL called
tx_hashOn-chain transaction hash
policy_evaluation"allowed" | "flagged" | "blocked"
created_atUnix timestamp (ms)
tagsEnrichment tags

Querying Payments

import { AuditLogger } from "@valeo/x402";

const logger = new AuditLogger({ storage });

const records = await logger.query({
  agentId: "agent-weather-001",
  startTime: Date.now() - 86400000,
  endTime: Date.now(),
  status: ["allowed", "flagged"],
  minAmount: "0.10",
  limit: 100,
  orderBy: "created_at",
  order: "desc",
});

Spend Reports

const report = await dashboard.getSpend({
  agentId: "agent-1",
  range: "last_day",
});

console.log(report.totalSpend);   // "$123.45"
console.log(report.count);        // 42
console.log(report.byAgent);
console.log(report.byEndpoint);

Violations & Anomalies

import { violations, anomalies } from "@valeo/x402/dashboard";

const blocked = await violations(storage, "last_day");
const flagged = await anomalies(storage, "last_day");

const alerts = await dashboard.getAlerts();