/**
 * @vaultfire/a2a
 *
 * Bridge Google's A2A (Agent-to-Agent) protocol with Vaultfire Protocol's on-chain trust.
 *
 * Enrich Agent Cards with Street Cred scores, verify trust before delegation,
 * and discover trusted agents from the Vaultfire registry.
 *
 * @example
 * ```typescript
 * import { enrichAgentCard, verifyAgentCard } from '@vaultfire/a2a';
 *
 * const enriched = await enrichAgentCard({
 *   agentCard: myCard,
 *   chain: 'base',
 *   agentAddress: '0x...',
 * });
 * ```
 */

// ─── Types ─────────────────────────────────────────────────────────────────────

export type {
  SupportedChain,
  ChainConfig,
  AgentCard,
  AgentCapabilities,
  AgentSkill,
  AgentProvider,
  EnrichedAgentCard,
  VaultfireExtensionData,
  VaultfireStreetCred,
  VaultfireBonds,
  VaultfireReputation,
  VaultfireIdentity,
  VerificationResult,
  OnChainAgentData,
  DiscoverOptions,
  DiscoveredAgent,
  EnrichOptions,
} from './types';

export {
  CHAIN_CONFIGS,
  SUPPORTED_CHAINS,
  STREET_CRED_TIERS,
  IDENTITY_ABI,
  PARTNERSHIP_ABI,
  REPUTATION_ABI,
  BRIDGE_ABI,
  getStreetCredTier,
  // Zod schemas for validation
  AgentCardSchema,
  AgentCapabilitiesSchema,
  AgentSkillSchema,
  AgentProviderSchema,
  VaultfireExtensionDataSchema,
  VaultfireStreetCredSchema,
  VaultfireBondsSchema,
  VaultfireReputationSchema,
  VaultfireIdentitySchema,
} from './types';

// ─── Core Functions ────────────────────────────────────────────────────────────

export {
  enrichAgentCard,
  verifyAgentCard,
  fetchOnChainData,
  buildExtensionData,
  calculateStreetCred,
} from './enrich';

// ─── Discovery ─────────────────────────────────────────────────────────────────

export {
  discoverTrustedAgents,
  getTotalAgentCount,
  isAgentRecognized,
} from './discover';

// ─── Middleware ────────────────────────────────────────────────────────────────

export {
  vaultfireAgentCardMiddleware,
  createMiddlewareWithCache,
} from './middleware';

export type { VaultfireMiddlewareOptions } from './middleware';
