Skip to content

Releases: MeshJS/mesh-x402

Release list

v0.0.1

Choose a tag to compare

@Temasar1 Temasar1 released this 16 Oct 08:14

x402

First release of Cardano x402 payments. A server answers 402, the client signs, a facilitator submits, and the content unlocks.

npm install @meshsdk/x402

What this version includes

  • Client: fetchWithPayment pays a 402 and retries with PAYMENT-SIGNATURE
  • Server: createPaywall plus buildDefaultOffer, buildScriptOffer, and buildMasumiOffer
  • Facilitator: createFacilitatorApp verifies, submits once, and waits for confirmations

Payment methods

  • default — pay a wallet address; after settle, the funds are yours
  • script — lock into a Plutus script you choose; you spend it yourself
  • masumi — lock into Masumi vested_pay escrow; later spends for result, refund, and dispute

Masumi withdrawal

buildSubmitResultTx, buildWithdrawTx, buildAuthorizeRefundTx, buildSetRefundRequestedTx, buildAuthorizeWithdrawalTx, buildWithdrawRefundTx, and buildWithdrawDisputedTx

Docs: meshjs.dev/apis/x402