moltspay 0.8.7 → 0.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -30963,9 +30963,17 @@ var MoltsPayClient = class {
30963
30963
  const authorization = await this.signEIP3009(payTo, amount, chain2);
30964
30964
  const payload = {
30965
30965
  x402Version: X402_VERSION2,
30966
- scheme: "exact",
30967
- network,
30968
- payload: authorization
30966
+ payload: authorization,
30967
+ // v2 requires 'accepted' field with the requirements being fulfilled
30968
+ accepted: {
30969
+ scheme: "exact",
30970
+ network,
30971
+ asset: req.asset || chain2.usdc,
30972
+ amount: amountRaw,
30973
+ payTo,
30974
+ maxTimeoutSeconds: req.maxTimeoutSeconds || 300,
30975
+ extra: req.extra || { name: "USD Coin", version: "2" }
30976
+ }
30969
30977
  };
30970
30978
  const paymentHeader = Buffer.from(JSON.stringify(payload)).toString("base64");
30971
30979
  console.log(`[MoltsPay] Sending request with payment...`);