Skip to content

v0.20.0

Choose a tag to compare

@ryanio ryanio released this 17 Jun 18:48
· 17 commits to main since this release

What's Changed

  • Caller-side usage reporting: new reportCallerX402Usage, reportCallerEip3009Usage, and extractSettlementTxHash exports. Tool callers can report usage by endpoint URL with auto-provisioned API keys, integrated into paidFetch, paidAuthenticatedFetch (via the reportCallerUsage option), and the pay CLI (--report-usage).
  • Settlement-response header from createToolHandler: after a paid call settles, the handler now echoes the onchain settlement tx hash to the caller via PAYMENT-RESPONSE (v2) / X-PAYMENT-RESPONSE (v1). This lets caller-side reporting (and any x402 client) read the tx hash via extractSettlementTxHash. Adds the buildSettlementResponseHeader helper.
  • Security hardening: caller reporters reject non-https aggregator URLs (allowing http://localhost for dev), and reportCallerEip3009Usage documents/​warns about transmitting a replayable authorization.

Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.19.0...tool-sdk-v0.20.0