import { agentscoreGate } from "@agent-score/gate";
import type { AgentScoreGateOptions } from "@agent-score/gate";
agentscoreGate({
// Required
apiKey: string,
// Policy (optional)
minGrade: "A" | "B" | "C" | "D" | "F",
minScore: number, // minimum score (0-100)
requireVerifiedActivity: boolean, // default: false
// Wallet extraction (optional)
extractAddress: (req) => string | undefined, // default: reads X-Wallet-Address header
extractChain: (req) => string | undefined, // default: "base"
// Behavior (optional)
failOpen: boolean, // default: false — deny on API errors
cacheSeconds: number, // default: 300 — TTL for cached results
baseUrl: string, // default: "https://api.agentscore.sh"
onDenied: (req, res, reason) => void, // custom deny handler
})