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