x402_core 0.2.0
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.signnow returnsFuture<SignedPayment>instead ofFuture<String>. - Added
SignedPaymentclass to wrap the base64-encoded payment payload. - Added
PaymentRequirement.fromHeaderfactory constructor. - Added
extensionsfield toPaymentPayload. X402Clientnow includes loop protection to prevent infinite retries.X402Clientno longer drains the response stream when returning the original response, fixing issues with non-streaming requests.- Updated
X402Exception.toStringto include error code if present.
0.1.0 #
- Initial release of the x402 core protocol definitions and shared logic.
- Defined base interfaces for
X402SignerandSchemeClient. - Implemented core models:
PaymentPayload,PaymentRequirement,PaymentRequiredResponse, andResourceInfo. - Added
X402Clientfor automated 402 Payment Required handling.