Skip to content

Releases

v0.2.0

Choose a tag to compare

@TokioGaijin TokioGaijin released this 07 Oct 11:43

Spend limits now hold against x402 v2 servers

The CabalSpy API speaks x402 v2. Earlier versions only read the v1 locations, which meant:

  • The price was unreadable, so max_spend_per_call was skipped. The price is now read from the PAYMENT-REQUIRED header (v1 body as fallback), taking the highest amount across offered networks.
  • No payment was counted, so max_spend_total never tripped: v2 receipts carry no amount. The checked price is now recorded, and PAYMENT-RESPONSE is read before X-PAYMENT-RESPONSE.

Behaviour change

A 402 without a readable price is now refused with SpendLimitError (kind == "unpriced") instead of paid blind. It is only allowed when both limits are float("inf").

Also

  • New export: read_price(response). price_of(body) is kept and now takes the highest offered amount.
  • A pytest suite (16 checks) now runs in the publish workflow before anything is built.
  • README: testnet section corrected — api.cabalspy.xyz takes mainnet payments only.

🤖 Generated with Claude Code

v0.1.1

Choose a tag to compare

@TokioGaijin TokioGaijin released this 02 Oct 10:43

Documentation and metadata update.

No API changes.

v0.1.0

Choose a tag to compare

@TokioGaijin TokioGaijin released this 28 Jul 22:56
1e87861
  • initial commit of x402 on python