v0.20.0
What's Changed
- Caller-side usage reporting: new
reportCallerX402Usage,reportCallerEip3009Usage, andextractSettlementTxHashexports. Tool callers can report usage by endpoint URL with auto-provisioned API keys, integrated intopaidFetch,paidAuthenticatedFetch(via thereportCallerUsageoption), and thepayCLI (--report-usage). - Settlement-response header from
createToolHandler: after a paid call settles, the handler now echoes the onchain settlement tx hash to the caller viaPAYMENT-RESPONSE(v2) /X-PAYMENT-RESPONSE(v1). This lets caller-side reporting (and any x402 client) read the tx hash viaextractSettlementTxHash. Adds thebuildSettlementResponseHeaderhelper. - Security hardening: caller reporters reject non-
httpsaggregator URLs (allowinghttp://localhostfor dev), andreportCallerEip3009Usagedocuments/warns about transmitting a replayable authorization.
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.19.0...tool-sdk-v0.20.0