Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Reference — x402-client · Boson Protocol
Skip to content

@bosonprotocol/x402-client (+ -fetch)

Exports (x402-client)

  • createX402bClient({ signer, preferences }).
  • buildPayment(challenge) — produce the X-PAYMENT header value.
  • parseChallenge(rawResponse) — decode a 402 response.

Exports (x402-client-fetch)

  • createX402bClientFetch({ signer, preferences }) — drop-in replacement for fetch that handles 402s transparently.

Source