Context
MainStreet is a reputation oracle for AI agents on Base (ERC-8004 + x402, EIP-712 attestations). Deployed verifier: 0x7397adb9713934c36d22aa54b4dbbcd70263592b.
Browsing your typescript/examples/ folder, I noticed there's no example showing how a buyer agent vets a recipient before paying. Right now, examples like langchain-cdp-smart-wallet-chatbot show how to send onchain, not whether to trust the destination.
Proposal
Add typescript/examples/langchain-mainstreet-trust-gate/ showing a 10-line trust check before any x402 payment:
import { CdpAgentkit } from '@coinbase/cdp-agentkit-core';
import { recoverTypedDataAddress } from 'viem';
// Before paying any wallet via x402, fetch MainStreet attestation
async function safePay(agentkit, recipient, amountUSDC, minScore = 30) {
const att = await fetch(`https://avisradar.app/api/agent/attestation/${recipient}`).then(r => r.json());
if (!att.payload || att.payload.score < minScore) throw new Error(`MainStreet score ${att.payload?.score ?? 'unknown'} < ${minScore}`);
return agentkit.run('transfer', { to: recipient, amount: amountUSDC });
}
Or onchain via the deployed verifier — see recipe.
Why this matters
833+ Base agents in x402 Bazaar. Some real, some throwaway. Today AgentKit users can pay any of them. A trust gate prevents users from paying low-rep wallets they wouldn't pay if they could see the score.
Happy to file a PR if this lands as priority. MIT-licensed, no MainStreet token, free score reads, $0.25 audit for deep due-diligence.
— @rakshasar on Farcaster · mainstreetxyz.base.eth · github.com/philpof102-svg/mainstreet
Context
MainStreet is a reputation oracle for AI agents on Base (ERC-8004 + x402, EIP-712 attestations). Deployed verifier:
0x7397adb9713934c36d22aa54b4dbbcd70263592b.Browsing your
typescript/examples/folder, I noticed there's no example showing how a buyer agent vets a recipient before paying. Right now, examples likelangchain-cdp-smart-wallet-chatbotshow how to send onchain, not whether to trust the destination.Proposal
Add
typescript/examples/langchain-mainstreet-trust-gate/showing a 10-line trust check before any x402 payment:Or onchain via the deployed verifier — see recipe.
Why this matters
833+ Base agents in x402 Bazaar. Some real, some throwaway. Today AgentKit users can pay any of them. A trust gate prevents users from paying low-rep wallets they wouldn't pay if they could see the score.
Happy to file a PR if this lands as priority. MIT-licensed, no MainStreet token, free score reads, $0.25 audit for deep due-diligence.
— @rakshasar on Farcaster · mainstreetxyz.base.eth · github.com/philpof102-svg/mainstreet