x402 integration - #846
Open
Technosophorso wants to merge 1 commit into
Open
x402 integration#846Technosophorso wants to merge 1 commit into
Technosophorso wants to merge 1 commit into
Conversation
Adding x402 into Mesh SDK
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
@meshsdk/x402, a wire-compatible Mesh SDK implementation of the x402 HTTP-402 payment protocol's Cardanoexactscheme (client + facilitator), plus the full spend-side lifecycle of Masumi'svested_payescrow contract — an alternative to the upstream@x402/cardanopackage (Evolution SDK-based), built entirely on Mesh's own primitives.default), Plutus-script-gated, and Masumi escrow lockvested_payspend-side lifecycle:SubmitResult,Withdraw,SetRefundRequested,AuthorizeWithdrawal,WithdrawRefund,AuthorizeRefund,WithdrawDisputed(M-of-N CIP-8 admin quorum) — previously only the lock side existed anywhere in the Mesh or x402-foundation ecosystemextra.script(noscriptHash) was given@harmoniclabs/plutus-data'sdataToCborencodes non-empty Plutus Data Maps with indefinite-length CBOR, while Aiken'scbor.serialise(used on-chain) uses definite-length — silently broke everyWithdrawDisputedadmin signature over a non-zero payout. Confirmed via the pinnedaikenCLI against the real validator; fixed with a canonical CBOR encoder and locked in with a byte-exact regression test.Testing
npm test— 9 suites / 32 tests, in-memory only, no live networktsc --noEmitcleanvested_payactions confirmed, including the full dispute lifecycle (lock →SubmitResult→SetRefundRequested→WithdrawDisputed) — example. Requires a funded preprod wallet + Blockfrost key (npm run test:integration), not part of CI.