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/cli/index.js +11 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +11 -3
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.js +11 -3
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +11 -3
- package/dist/client/index.mjs.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
30967
|
-
|
|
30968
|
-
|
|
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...`);
|