import { requireV3X402Release } from '../_lib/release';
import { evaluateV3CapabilityEvidence } from '../_lib/capabilities';

export function GET(): Response {
  const closed = requireV3X402Release();
  if (closed) return closed;
  return Response.json(
    {
      schema: 'vaultfire.v3.x402.challenge-status.v1',
      schemaVersion: '1.0.0',
      protocolVersion: '3.0.0',
      challengeAvailable: false,
      paymentAccepted: false,
      settlementEnabled: false,
      reason: 'no-real-v3-address-or-durable-route-bound-settlement-evidence',
      capabilityGate: evaluateV3CapabilityEvidence(),
      bazaar: { publicationState: 'not-published', listingReceiptIds: [], indexingVerified: false },
    },
    { headers: { 'Cache-Control': 'no-store', 'X-Robots-Tag': 'noindex' } },
  );
}
