Create a BeforeVerifyHook that checks agent reputation before verification.
Queries the Reputation Registry for the agent's score from trusted reviewers. If below threshold, aborts or warns per config.
Read-only client for contract calls
Reputation Registry contract address
Reputation check configuration
BeforeVerifyHook for registration on t402ResourceServer
const server = new t402ResourceServer(facilitatorClient);server.onBeforeVerify(erc8004ReputationCheck(viemClient, registryAddr, { minScore: 70, trustedReviewers: ["0x..."], onBelowThreshold: "reject",})); Copy
const server = new t402ResourceServer(facilitatorClient);server.onBeforeVerify(erc8004ReputationCheck(viemClient, registryAddr, { minScore: 70, trustedReviewers: ["0x..."], onBelowThreshold: "reject",}));
Create a BeforeVerifyHook that checks agent reputation before verification.
Queries the Reputation Registry for the agent's score from trusted reviewers. If below threshold, aborts or warns per config.