gokite-aa-sdk 1.0.8 → 1.0.9

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.
@@ -78,8 +78,10 @@ class BundlerProvider {
78
78
  callGasLimit: BigInt(result.result.callGasLimit),
79
79
  verificationGasLimit: BigInt(result.result.verificationGasLimit),
80
80
  preVerificationGas: BigInt(result.result.preVerificationGas),
81
- maxFeePerGas: BigInt(result.result.maxFeePerGas || 1000000000n),
82
- maxPriorityFeePerGas: BigInt(result.result.maxPriorityFeePerGas || 1000000000n), // 1 gwei
81
+ // maxFeePerGas: BigInt(result.result.maxFeePerGas || 1000000000n), // 1 gwei
82
+ // maxPriorityFeePerGas: BigInt(result.result.maxPriorityFeePerGas || 1000000000n), // 1 gwei
83
+ maxFeePerGas: BigInt(1000000000n),
84
+ maxPriorityFeePerGas: BigInt(1000000000n),
83
85
  };
84
86
  }
85
87
  catch (error) {
@@ -314,6 +316,7 @@ class GokiteAASDK {
314
316
  // Update gas fields in packed format (verificationGasLimit first, callGasLimit second)
315
317
  userOp.accountGasLimits = (0, utils_1.packAccountGasLimits)(gasEstimate.verificationGasLimit, gasEstimate.callGasLimit);
316
318
  userOp.preVerificationGas = gasEstimate.preVerificationGas;
319
+ userOp.gasFees = (0, utils_1.packAccountGasLimits)(gasEstimate.maxPriorityFeePerGas, gasEstimate.maxFeePerGas);
317
320
  const userOpHash = await this.getUserOpHash(userOp);
318
321
  // Sign user operation
319
322
  const signature = await signFn(userOpHash);
@@ -426,8 +429,10 @@ class GokiteAASDK {
426
429
  gasEstimate.callGasLimit = gasEstimate.callGasLimit + 5000000n;
427
430
  gasEstimate.verificationGasLimit = gasEstimate.verificationGasLimit + 1000000n;
428
431
  gasEstimate.preVerificationGas = gasEstimate.preVerificationGas + 1000000n;
429
- gasEstimate.maxFeePerGas = BigInt(100000000);
430
- gasEstimate.maxPriorityFeePerGas = BigInt(1);
432
+ // gasEstimate.maxFeePerGas = BigInt(gasEstimate.maxFeePerGas || 1000000000n); // 1 gwei
433
+ // gasEstimate.maxPriorityFeePerGas = BigInt(gasEstimate.maxPriorityFeePerGas || 1000000000n); // 1 gwei
434
+ gasEstimate.maxFeePerGas = BigInt(1000000000n);
435
+ gasEstimate.maxPriorityFeePerGas = BigInt(1000000000n);
431
436
  userOp.gasFees = (0, utils_1.packAccountGasLimits)(gasEstimate.maxPriorityFeePerGas, gasEstimate.maxFeePerGas);
432
437
  // Pack gas limits and fees (note: verificationGasLimit first, callGasLimit second)
433
438
  userOp.accountGasLimits = (0, utils_1.packAccountGasLimits)(gasEstimate.verificationGasLimit, gasEstimate.callGasLimit);
package/dist/utils.js CHANGED
@@ -130,7 +130,7 @@ function serializeUserOperation(userOp) {
130
130
  exports.serializeUserOperation = serializeUserOperation;
131
131
  // default salt is 0
132
132
  function generateSalt() {
133
- return BigInt(5);
133
+ return BigInt(0);
134
134
  }
135
135
  exports.generateSalt = generateSalt;
136
136
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gokite-aa-sdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Simple and clean Account Abstraction SDK for Gokite",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",