@1llet.xyz/erc4337-gasless-sdk 0.4.50 → 0.4.51

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.d.mts CHANGED
@@ -50,6 +50,7 @@ interface GasEstimate {
50
50
  preVerificationGas: string;
51
51
  maxFeePerGas: string;
52
52
  maxPriorityFeePerGas: string;
53
+ paymasterAndData?: string;
53
54
  }
54
55
  interface UserOpReceipt {
55
56
  userOpHash: Hash;
package/dist/index.d.ts CHANGED
@@ -50,6 +50,7 @@ interface GasEstimate {
50
50
  preVerificationGas: string;
51
51
  maxFeePerGas: string;
52
52
  maxPriorityFeePerGas: string;
53
+ paymasterAndData?: string;
53
54
  }
54
55
  interface UserOpReceipt {
55
56
  userOpHash: Hash;
package/dist/index.js CHANGED
@@ -423,7 +423,7 @@ var BundlerClient = class {
423
423
  return result.result;
424
424
  }
425
425
  async estimateGas(userOp) {
426
- return await this.call("eth_estimateUserOperationGas", [
426
+ const result = await this.call("eth_estimateUserOperationGas", [
427
427
  {
428
428
  sender: userOp.sender,
429
429
  nonce: userOp.nonce ? "0x" + userOp.nonce.toString(16) : "0x0",
@@ -434,6 +434,14 @@ var BundlerClient = class {
434
434
  },
435
435
  this.entryPointAddress
436
436
  ]);
437
+ return {
438
+ callGasLimit: result.callGasLimit,
439
+ verificationGasLimit: result.verificationGasLimit,
440
+ preVerificationGas: result.preVerificationGas,
441
+ maxFeePerGas: result.maxFeePerGas,
442
+ maxPriorityFeePerGas: result.maxPriorityFeePerGas,
443
+ paymasterAndData: result.paymasterAndData
444
+ };
437
445
  }
438
446
  async sendUserOperation(userOp) {
439
447
  return await this.call("eth_sendUserOperation", [
@@ -608,6 +616,7 @@ var UserOpBuilder = class {
608
616
  preVerificationGas: BigInt(gasEstimate.preVerificationGas),
609
617
  maxFeePerGas: BigInt(gasEstimate.maxFeePerGas),
610
618
  maxPriorityFeePerGas: BigInt(gasEstimate.maxPriorityFeePerGas),
619
+ paymasterAndData: gasEstimate.paymasterAndData || partialOp.paymasterAndData,
611
620
  signature: "0x"
612
621
  };
613
622
  }
@@ -632,6 +641,7 @@ var UserOpBuilder = class {
632
641
  preVerificationGas: BigInt(gasEstimate.preVerificationGas),
633
642
  maxFeePerGas: BigInt(gasEstimate.maxFeePerGas),
634
643
  maxPriorityFeePerGas: BigInt(gasEstimate.maxPriorityFeePerGas),
644
+ paymasterAndData: gasEstimate.paymasterAndData || partialOp.paymasterAndData,
635
645
  signature: "0x"
636
646
  };
637
647
  }