credGates({
// Required
apiKey: process.env.CRED_API_KEY,
// Policy (pick one)
policy: 'standard', // Named template
// gates: ['human', 'verified'], // Or custom gates
// operator: 'AND',
// Dynamic pricing
pricing: {
enabled: true,
curve: 'step',
basePriceUsdc: 0.01,
},
// Failure handling
on402: 'challenge', // 'challenge' (402), 'deny' (403), 'pass'
// Response headers
headers: true, // X-Cred-Trust-Score, X-Cred-Trust-Tier
// Custom wallet extraction
extractWallet: (req) => req.headers['x-agent-wallet'] as string,
})