x402_core 0.2.0 copy "x402_core: ^0.2.0" to clipboard
x402_core: ^0.2.0 copied to clipboard

Core protocol definitions and shared logic for the x402 protocol, providing blockchain-agnostic interfaces and data structures.

0.2.0 #

  • Breaking Change: X402Signer.sign now returns Future<SignedPayment> instead of Future<String>.
  • Added SignedPayment class to wrap the base64-encoded payment payload.
  • Added PaymentRequirement.fromHeader factory constructor.
  • Added extensions field to PaymentPayload.
  • X402Client now includes loop protection to prevent infinite retries.
  • X402Client no longer drains the response stream when returning the original response, fixing issues with non-streaming requests.
  • Updated X402Exception.toString to include error code if present.

0.1.0 #

  • Initial release of the x402 core protocol definitions and shared logic.
  • Defined base interfaces for X402Signer and SchemeClient.
  • Implemented core models: PaymentPayload, PaymentRequirement, PaymentRequiredResponse, and ResourceInfo.
  • Added X402Client for automated 402 Payment Required handling.
0
likes
160
points
151
downloads

Publisher

unverified uploader

Weekly Downloads

Core protocol definitions and shared logic for the x402 protocol, providing blockchain-agnostic interfaces and data structures.

Repository (GitHub)
View/report issues

Topics

#http #payment #web3 #blockchain #crypto

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

http

More

Packages that depend on x402_core