@dcentralab/d402-client 0.3.14 → 0.3.15

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
@@ -95,8 +95,7 @@ var init_constants = __esm({
95
95
  { name: "provider", type: "address" },
96
96
  { name: "token", type: "address" },
97
97
  { name: "amount", type: "uint256" },
98
- { name: "deadline", type: "uint256" },
99
- { name: "requestPath", type: "string" }
98
+ { name: "deadline", type: "uint256" }
100
99
  ]
101
100
  };
102
101
  }
@@ -299,13 +298,8 @@ async function signD402Payment(params) {
299
298
  walletClient,
300
299
  paymentRequirement,
301
300
  iatpWalletAddress,
302
- requestPath,
303
301
  d402Version = 1
304
302
  } = params;
305
- let finalRequestPath = requestPath || paymentRequirement.resource || "/mcp";
306
- if (!finalRequestPath || finalRequestPath.trim() === "") {
307
- finalRequestPath = "/mcp";
308
- }
309
303
  const nonce = generateNonce();
310
304
  const now = getCurrentTimestamp();
311
305
  const validAfter = (now - 60).toString();
@@ -325,8 +319,7 @@ async function signD402Payment(params) {
325
319
  provider: paymentRequirement.payTo,
326
320
  token: paymentRequirement.asset,
327
321
  amount: BigInt(paymentRequirement.maxAmountRequired),
328
- deadline: BigInt(validBefore),
329
- requestPath: finalRequestPath
322
+ deadline: BigInt(validBefore)
330
323
  };
331
324
  let signature;
332
325
  if (walletClient) {
@@ -363,8 +356,7 @@ async function signD402Payment(params) {
363
356
  value: paymentRequirement.maxAmountRequired,
364
357
  validAfter,
365
358
  validBefore,
366
- nonce,
367
- requestPath: finalRequestPath
359
+ nonce
368
360
  }
369
361
  }
370
362
  };