v0.15.0
What's Changed
Unified 402 flow for free and paid predicate-gated tools (#401).
predicateGatenow speaks the x402-style 402 challenge for both free and paid tools. When no auth is provided andoperatorAddressis configured, it returns a 402 withPaymentRequirements(payTo=operator,maxAmountRequired=0) instead of a 401. The gate accepts anX-Paymentheader as the auth source (taking precedence overAuthorization), recovers the signer from the EIP-712TransferWithAuthorizationpayload, and extracts caller identity from thefromfield.PaymentRequirementsare chain-aware;x402Versionand theexactscheme are validated.
Breaking changes
eip3009AuthenticatedFetchandpaidAuthenticatedFetchno longer takechainIdortoparams. On a 402 they signX-Paymentwith the advertisedpayToand retry; the redundantAuthorization: EIP-3009header has been removed.EIP3009_CHAIN_MAPandZERO_ADDRESSexports were removed.
New features
eip3009AuthenticatedFetchgains anallowedRecipientsguard that prevents signingX-Paymentfor arbitrarypayToaddresses returned by a malicious 402 response.- New free, predicate-gated example:
token-nft-overlap-tool(#398). usageReportingwired into thenft-appraisalexample (#397).
Full Changelog: v0.14.2...v0.15.0