Releases: ProjectOpenSea/tool-sdk
v0.24.0
What's Changed
- Add support for the
uptox402 payment scheme, which allows variable pricing (charge up toamountPerCall, with the actual charge potentially less).createX402Clientnow registers bothExactEip3009SchemeandUptoEip3009Schemeinternally, letting@x402/coreroute to the correct scheme based on the challenge'sschemefield. ThepayCLI,paidFetch, andpaidAuthenticatedFetchroute to the appropriate scheme automatically, so callers no longer need to know which scheme to instantiate. (#459)
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.23.1...tool-sdk-v0.24.0
v0.23.1
What's Changed
--tool-refand the usage reporters now support non-address registries such asx402:bazaarandx402:bankrfor tools that are not registered onchain (#455).toolRegistryAddressis widened tostring, andtoolOnchainIdis kept as a string to preserve precision for IDs exceedingNumber.MAX_SAFE_INTEGER.--tool-refnow uses a comma delimiter (chainId,registryAddress,onchainId) instead of a colon, so a registry identifier that itself contains a colon stays unambiguous (#457). Example:8453,x402:bazaar,8679018179619845322.
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.23.0...tool-sdk-v0.23.1
v0.23.0
What's Changed
- Caller-side usage reporting can now identify a tool by its ERC-8257 composite key instead of only its endpoint URL.
reportCallerX402Usageaccepts optionaltoolChainId,toolRegistryAddress, andtoolOnchainId, and thepayCLI gains a--tool-ref <chainId:registryAddress:onchainId>flag (e.g.--tool-ref 8453:0x265b...2cf1:65). When supplied, these are sent in place oftool_endpoint, matching the server-side reporter's payload. This fixes the400 Multiple tools registered for endpointerror when reporting usage for a tool whose endpoint maps to more than one registry entry. (#453)
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.22.0...tool-sdk-v0.23.0
v0.22.0
What's Changed
- Migrate
paidFetch,paidAuthenticatedFetch, and thepayCLI to the@x402/coreclient infrastructure (x402Client,x402HTTPClient,SchemeNetworkClient) for payment payload creation and header encoding. Adds anExactEip3009Schemeadapter wrapping tool-sdk's existing EIP-3009 signing into the standard x402 scheme interface. No public API changes. (#447)
This also resolves a payment-blocking bug in the previous home-rolled encoder: btoa(JSON.stringify(...)) threw InvalidCharacterError whenever a server's 402 challenge echoed a non-Latin1 character (e.g. an em-dash in resource.description). The @x402/core encoder is UTF-8-safe, and the v2 payload no longer embeds resource/accepted.
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.21.0...tool-sdk-v0.22.0
v0.21.0
What's Changed
- Usage report fires via platform
waitUntil(createToolHandler): the fire-and-forget usage report now runs as keep-alive-after-response work instead of being awaited inline. This removes reporting latency from every successful call and closes a billing edge — x402 settlement runs before the report, so awaiting it meant a function freeze in that window could charge a paid caller without returning a result. Auto-detected on Vercel (no@vercel/functionsdependency), wired on Cloudflare viatoCloudflareHandler(itsfetchgains an optionalctxarg), overridable via a newwaitUntiloption onToolHandlerConfig, and awaited as before when nowaitUntilis available. (#449) initVercel template defaultsmaxDuration = 60on the tool entrypoint, so LLM-backed tools don't 502 on Vercel's 10s Hobby default. (#448)
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.20.1...tool-sdk-v0.21.0
v0.20.1
What's Changed
- Caller usage reporting, default-on:
paynow sends a caller-side usage report by default (--no-report-usageto opt out).--api-keyfalls back toOPENSEA_API_KEYbefore auto-provisioning an instant key. A duplicate-report rejection (the tool's own server-side reporter already recorded the settlement) is treated as success.reportCallerX402Usage/reportCallerEip3009Usagenow return aCallerUsageReportResult(reported|already-reported|skipped|failed) so callers can surface the real outcome. (#445) - Reject x402 payment on 5xx:
paidFetchandpaidAuthenticatedFetchnow throwX402PaymentErrorwhen the server responds 5xx after a payment is sent, instead of silently returning the error response. The error exposesresponseandsettledso callers can detect a possibly-settled payment and avoid double charges. (#441)
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.20.0...tool-sdk-v0.20.1
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
v0.19.0
What's Changed
Support x402 v2 and GET endpoints in pay (#437). Bazaar-discovered x402 tools are frequently GET endpoints that speak x402 v2, where the SDK previously could not transact at all: pay only issued POST, only read the v1 body accepts challenge, and signed the v1 X-PAYMENT envelope.
- New
x402-challenge.ts:resolveNetwork()acceptsbase,eip155:8453, and8453;parseX402Challenge()reads thePAYMENT-REQUIREDheader or the body and normalizes the v2amountfield tomaxAmountRequired. signX402Paymentemits the version-correct envelope (v1{scheme,network,payload}vs v2{payload,resource,accepted}) and echoes the challenge'sx402Version. Newx402PaymentHeaderName()(X-PAYMENTfor v1,PAYMENT-SIGNATUREfor v2) andX402_SETTLEMENT_HEADERSexports.paidFetchroutes through the shared parser and the version-correct header.paycommand:--methodflag (defaults to POST) with auto-fallback to GET on 404/405, query-string encoding for bodyless verbs, version-correct payment header, on-chain settlement readout,RPC_URLdefaulting to a public Base endpoint, and clearer wallet-config errors.smokeandpaid-authenticated-fetchresolve networks so CAIP-2 networks still get USDC validation.
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.18.0...tool-sdk-v0.19.0
v0.18.0
What's Changed
- Hash the manifest as served, per ERC-8257 §2: the full JCS document including any namespaced extension fields, with no schema stripping and no injected defaults. The result agrees with any RFC 8785 implementation and with the OpenSea backend.
computeManifestHashnow accepts the raw served or authored object and hashes it as-is.- The manifest schema is open: namespaced extension fields (reverse-DNS, e.g.
io.opensea.paymentHint, or the legacyx-prefix) are preserved. Thetypefield is no longer defaulted. validate,hash, andregisterwarn about bare un-namespaced extension fields. NewfindBareExtensionKeys(data)export.
Compatibility: tools whose served manifest contains extra fields or omits type will now produce a different (correct) hash than prior versions, and should re-register or update so their onchain hash matches the served document.
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.17.1...tool-sdk-v0.18.0
v0.17.1
What's Changed
- Thread
--rpc-urlthrough to registry reads in CLI commands. Previously the flag only applied to writes; read paths (status, get, list) fell back to the default RPC endpoint. (#426) - Add ERC-8257 image metadata to chonks and overlap example tool manifests. (#423)
Full Changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.17.0...tool-sdk-v0.17.1