facinet 2.1.0 → 2.1.1

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/browser.js CHANGED
@@ -22567,8 +22567,9 @@ var CHAINS = {
22567
22567
  };
22568
22568
  var Facinet = class _Facinet {
22569
22569
  constructor(config = {}) {
22570
+ const apiUrl = (config.apiUrl || "https://x402-avalanche-chi.vercel.app").replace(/\/$/, "");
22570
22571
  this.config = {
22571
- apiUrl: config.apiUrl || "https://x402-avalanche-chi.vercel.app",
22572
+ apiUrl,
22572
22573
  privateKey: config.privateKey || "",
22573
22574
  network: config.network || "avalanche",
22574
22575
  rpcUrl: config.rpcUrl || ""
@@ -22679,9 +22680,23 @@ var Facinet = class _Facinet {
22679
22680
  method: "eth_signTypedData_v4",
22680
22681
  params: [payerAddress, jsonMessage]
22681
22682
  });
22683
+ console.log("\u{1F510} Browser signature created:", {
22684
+ signature,
22685
+ signatureLength: signature.length,
22686
+ payerAddress
22687
+ });
22682
22688
  } else {
22683
22689
  throw new Error("No signing method available");
22684
22690
  }
22691
+ console.log("\u{1F4DD} Final authorization:", {
22692
+ from: payerAddress,
22693
+ to: params.recipient,
22694
+ value: amount.toString(),
22695
+ validAfter: validAfter.toString(),
22696
+ validBefore: validBefore.toString(),
22697
+ nonce,
22698
+ signature: signature?.slice(0, 20) + "..."
22699
+ });
22685
22700
  const paymentPayload = {
22686
22701
  signature,
22687
22702
  authorization: {