import "server-only";

import { getAddress } from "viem";
import { listOperatorWallets } from "./operator-wallets-db";

export const allowedPublicAgentWallets = () => new Set([
  ...(process.env.PUBLIC_AGENT_WALLETS ?? "")
    .split(",")
    .map((value) => value.trim())
    .filter(Boolean)
    .map((value) => getAddress(value).toLowerCase()),
  ...listOperatorWallets(),
]);
