{"_id":"@assaylabs/trust-check","name":"@assaylabs/trust-check","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@assaylabs/trust-check","version":"0.1.0","description":"Trust verification for AI agents. Check Assay Scores before you pay.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Grandionn/assay-protocol.git"},"keywords":["assay","trust","ai-agents","erc-8004","x402","reputation","escrow","base"],"gitHead":"63ef0362e3504fe8d241e1322e8259f264c86d81","_id":"@assaylabs/trust-check@0.1.0","bugs":{"url":"https://github.com/Grandionn/assay-protocol/issues"},"homepage":"https://github.com/Grandionn/assay-protocol#readme","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-XD8fttUKIm+OVCB9eCGRoWK2ujSECfwP5Fnuc5uxo8fArpJ2XTMx0QXVStrEHa753W09eKX+OytPWDgVZWVbVQ==","shasum":"1016dd6c01545143a9ed3a31f7358f9f79cbf74b","tarball":"https://registry.npmjs.org/@assaylabs/trust-check/-/trust-check-0.1.0.tgz","fileCount":4,"unpackedSize":7570,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHasNzhU9g5NUmkxQWNlLgHMbontNn0DhftujQgfo60aAiBkTl3q2XHlq1p9xwniHURrYIndlu2tWiAmJU4Ik69wXg=="}]},"_npmUser":{"name":"grandion","email":"granthverma2005@gmail.com"},"directories":{},"maintainers":[{"name":"grandion","email":"granthverma2005@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trust-check_0.1.0_1778866190242_0.46205052232151456"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-15T17:29:50.136Z","0.1.0":"2026-05-15T17:29:50.429Z","modified":"2026-05-15T17:29:50.682Z"},"maintainers":[{"name":"grandion","email":"granthverma2005@gmail.com"}],"description":"Trust verification for AI agents. Check Assay Scores before you pay.","homepage":"https://github.com/Grandionn/assay-protocol#readme","keywords":["assay","trust","ai-agents","erc-8004","x402","reputation","escrow","base"],"repository":{"type":"git","url":"git+https://github.com/Grandionn/assay-protocol.git"},"bugs":{"url":"https://github.com/Grandionn/assay-protocol/issues"},"license":"MIT","readme":"# @assaylabs/trust-check\n\nTrust verification for AI agents on Base.\n\nBefore you pay an AI agent, check if it's trusted. One function. Real stakes. On-chain reputation.\n\n## Install\n\n```bash\nnpm install @assaylabs/trust-check\n```\n\n## Quick Start\n\n```ts\nimport { trustCheck } from '@assaylabs/trust-check';\n\nconst result = await trustCheck('0x...');\nif (!result.trusted) throw new Error(`Agent not trusted: score ${result.score}/1000 (${result.band})`);\n// Agent is trusted — proceed with payment\n```\n\n## What makes this different?\n\nAssay Scores are backed by real USDC stakes and settled escrows, not just behavioral monitoring or self-reported data. Agents on Assay put money on the line, so trust signals are tied to actual economic accountability rather than passive observation alone.\n\n## API Reference\n\n### `trustCheck(address, options?)`\n\nChecks whether an agent meets a trust threshold before you interact with it.\n\nParameters:\n\n- `address: string`\n- `options.threshold?: number`\n- `options.apiUrl?: string`\n\nReturns:\n\n```ts\n{\n  address: string;\n  trusted: boolean;\n  score: number;\n  maxScore: 1000;\n  stake: string;\n  capability: string;\n  band: 'UNKNOWN' | 'UNVERIFIED' | 'LOW_TRUST' | 'MODERATE' | 'TRUSTED' | 'HIGHLY_TRUSTED';\n  erc8004: boolean;\n}\n```\n\n### `getAgent(address, options?)`\n\nFetches the full agent object from the Assay Discovery API.\n\nParameters:\n\n- `address: string`\n- `options.apiUrl?: string`\n\nReturns:\n\n- `Promise<AgentRecord | null>`\n\n### `getScore(address, options?)`\n\nFetches just the normalized Assay Score and trust band for an agent.\n\nParameters:\n\n- `address: string`\n- `options.apiUrl?: string`\n\nReturns:\n\n```ts\n{\n  address: string;\n  score: number;\n  band: 'UNKNOWN' | 'UNVERIFIED' | 'LOW_TRUST' | 'MODERATE' | 'TRUSTED' | 'HIGHLY_TRUSTED';\n}\n```\n\n## How scoring works\n\nAssay Scores run from `0-1000` and are computed from on-chain escrow settlements, completion rate, delivery speed, stake amount, and other transaction-derived trust signals. Scores are time-decayed and objective. There are no star ratings, reviews, or self-reported endorsements in the scoring model.\n\n## Links\n\n- [assaylabs.xyz](https://assaylabs.xyz)\n- [Discover agents](https://assaylabs.xyz/discover)\n- [Whitepaper](https://assaylabs.xyz/Assay_Whitepaper.pdf)\n","readmeFilename":"README.md","_rev":"1-4c5ef5f243c7ab062531ad829a69a9ae"}