Deep dive into trust chain verification with performance optimization and custom policies.
Platform → Verifies → AgentCredential → Links to → DeveloperCredential → Issued by → Issuer
const result = await verifyAgentTrustChain(agentToken, { fetchDeveloperCredential: async (id) => { return await fetch(`https://api.beltic.dev/credentials/${id}`); } });
const credentialCache = new Map(); const result = await verifyAgentTrustChain(agentToken, { fetchDeveloperCredential: async (id) => { if (credentialCache.has(id)) { return credentialCache.get(id); } const cred = await fetchFromAPI(id); credentialCache.set(id, cred); return cred; } });
const result = await verifyAgentTrustChain(agentToken, { policy: { minKybTier: 'tier_2', minPromptInjectionScore: 85, minPiiLeakageScore: 90, prohibitedDataCategories: ['health_phi', 'biometric'] } }); // Custom checks if (result.agent.credential.dataCategoriesProcessed.includes('financial')) { // Require PCI-DSS certification if (!result.agent.credential.complianceCertifications?.includes('pci_dss')) { throw new Error('PCI-DSS required for financial data'); } }
const cache = new LRUCache({ max: 1000, ttl: 300000 // 5 minutes });
import { StatusListCache } from '@beltic/sdk'; const statusCache = new StatusListCache(300000);
const [agentResult, devResult] = await Promise.all([ verifyCredential(agentToken, options), verifyCredential(developerToken, options) ]);
Was this page helpful?
Suggestions