x402-trust-audit
Vet an x402 counterparty before settling USDC: scores the advertised payment requirements AND (when supplied) the EIP-3009 authorization you are about to sign. Returns a machine-enforceable trust verdict (per-entry scores, coverage-honest trustScore, spend-constraint + tamper-evident fingerprint) for buyer agents and wallet/spend-policy layers. No endpoint fetch. [security; up to 200c/call]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | Optional free-form context. | |
| expected | No | Optional caller expectations. | |
| endpointUrl | No | Resource URL being paid (context only; never fetched). | |
| spendPolicy | No | Optional buyer spend policy to evaluate against and to pin facilitators. | |
| paymentPayload | No | The UNSIGNED EIP-3009 authorization the buyer is about to sign: { authorization|message: {from,to,value,validAfter,validBefore,nonce}, domain: {name,version,chainId,verifyingContract} }. Lets the audit bind the menu to the actual charge (server-enforced to/value/verifyingContract/chainId). Omit to vet requirements only - but then the verdict is never auto-settle-safe. | |
| serverMetadata | No | Optional server metadata the caller already holds (context only; not fetched). | |
| paymentRequirements | Yes | The x402 payment requirements from the counterparty: the 402 `accepts` array, or a single object. | |
| selectedOptionIndex | No | Index in the accepts array the buyer intends to settle (default 0). The verdict is scoped to it. |