/**
 * @vaultfire/vns — Vaultfire Name Service
 *
 * On-chain name service mapping human-readable .vns names to wallet addresses
 * for the Vaultfire AI accountability ecosystem.
 *
 * Contract: 0x1437c4081233A4f0B6907dDf5374Ed610cBD6B25 (Base mainnet)
 * Hub: https://theloopbreaker.com
 *
 * @example
 * ```typescript
 * import { resolver, registerVNSName, checkVNSAvailability } from '@vaultfire/vns';
 *
 * // Resolve a .vns name
 * const profile = await resolver.resolve('ghostkey316');
 * console.log(profile?.address);
 *
 * // Check availability
 * const avail = await checkVNSAvailability('my-agent');
 * console.log(avail.available);
 *
 * // Register a name (requires ethers)
 * const result = await registerVNSName(
 *   '0xYourAddress',
 *   '0xYourPrivateKey',
 *   'my-agent',
 *   'agent',
 *   'base',
 *   { bondAmountEth: 0.01 }
 * );
 * ```
 */

// ── Core Client ────────────────────────────────────────────────────────────────
export {
  // Constants
  VNS_SUFFIX,
  VNS_STORAGE_KEY,
  VNS_CACHE_KEY,
  VNS_CACHE_TTL,
  VNS_CONTRACT_ADDRESS,
  BOND_REQUIREMENTS,
  BOND_TIERS,

  // Name validation
  validateVNSName,
  formatVNSName,
  stripVNSSuffix,
  getBondTier,
  getBondTierInfo,
  parseIdentityType,

  // ABI helpers
  encodeAddress,
  encodeUint256,
  encodeString,
  abiEncodeStringCall,
  decodeAgentResponse,

  // Core lookup
  lookupAddressByAddress,
  getProfileByAddress,
  resolveVNSName,

  // Payment resolution
  resolvePaymentAddress,
  reverseResolveVNS,
  setPaymentPreferences,
  getPaymentCapableAgents,

  // Availability
  checkVNSAvailability,

  // Anti-gaming
  getHumanVNSForAddress,
  getCompanionVNSForAddress,
  getAgentVNSNamesForAddress,
  validateRegistrationRules,

  // User identity helpers
  getMyVNSName,
  setMyVNSName,
  getMyVNSFullName,
  getMyIdentityType,

  // Gas
  estimateVNSRegistrationGas,

  // Registration
  registerVNSName,
  stakeAgentBond,
  invokeAgentPrivacy,

  // Display helpers
  formatAddressOrVNS,
  getDisplayName,
  getIdentityTypeLabel,
  getIdentityTypeColor,

  // Agent registry
  getOnChainAgentCount,
  getOnChainHubStats,
  getOnChainAgents,
  getKnownAgents,
  getAgentByName,
  isRegisteredAgent,
  getTotalVNSRegistrations,
  verifyContractAlive,
} from './vns-client.js';

// ── Resolver ───────────────────────────────────────────────────────────────────
export {
  VNSResolver,
  resolver,
  resolve,
  reverseResolve,
  resolveToAddress,
  resolveToPayment,
  checkAvailability,
  batchResolve,
  isValidName,
} from './vns-resolver.js';

// ── Types ──────────────────────────────────────────────────────────────────────
export type {
  IdentityType,
  BondTier,
  VNSProfile,
  VNSAvailability,
  VNSRegistrationResult,
  VNSGasEstimate,
  AgentRegistrationParams,
  AgentLaunchResult,
  LocalVNSEntry,
  RegisteredAgent,
  OnChainHubStats,
} from './types.js';
