@0xpolygonid/js-sdk 1.4.0 → 1.4.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.
@@ -57732,8 +57732,23 @@ var PolygonIdSdk = (function (exports) {
57732
57732
  ],
57733
57733
  proof.proof.pi_c.slice(0, 2)
57734
57734
  ];
57735
- await contract.transitState.estimateGas(...payload);
57736
- const tx = await contract.transitState(...payload);
57735
+ const feeData = await this.provider.getFeeData();
57736
+ const maxFeePerGas = defaultEthConnectionConfig.maxFeePerGas
57737
+ ? BigInt(defaultEthConnectionConfig.maxFeePerGas)
57738
+ : feeData.maxFeePerGas;
57739
+ const maxPriorityFeePerGas = defaultEthConnectionConfig.maxPriorityFeePerGas
57740
+ ? BigInt(defaultEthConnectionConfig.maxPriorityFeePerGas)
57741
+ : feeData.maxPriorityFeePerGas;
57742
+ const gasLimit = await contract.transitState.estimateGas(...payload);
57743
+ const txData = await contract.transitState.populateTransaction(...payload);
57744
+ const request = {
57745
+ to: txData.to,
57746
+ data: txData.data,
57747
+ gasLimit,
57748
+ maxFeePerGas,
57749
+ maxPriorityFeePerGas
57750
+ };
57751
+ const tx = await signer.sendTransaction(request);
57737
57752
  const txnReceipt = await tx.wait();
57738
57753
  if (!txnReceipt) {
57739
57754
  throw new Error(`transaction: ${tx.hash} failed to mined`);
@@ -58213,7 +58228,23 @@ var PolygonIdSdk = (function (exports) {
58213
58228
  ],
58214
58229
  zkProof.proof.pi_c.slice(0, 2)
58215
58230
  ];
58216
- const tx = await contract.submitZKPResponse(...payload);
58231
+ const feeData = await provider.getFeeData();
58232
+ const maxFeePerGas = chainConfig.maxFeePerGas
58233
+ ? BigInt(chainConfig.maxFeePerGas)
58234
+ : feeData.maxFeePerGas;
58235
+ const maxPriorityFeePerGas = chainConfig.maxPriorityFeePerGas
58236
+ ? BigInt(chainConfig.maxPriorityFeePerGas)
58237
+ : feeData.maxPriorityFeePerGas;
58238
+ const gasLimit = await contract.submitZKPResponse.estimateGas(...payload);
58239
+ const txData = await contract.submitZKPResponse.populateTransaction(...payload);
58240
+ const request = {
58241
+ to: txData.to,
58242
+ data: txData.data,
58243
+ gasLimit,
58244
+ maxFeePerGas,
58245
+ maxPriorityFeePerGas
58246
+ };
58247
+ const tx = await ethSigner.sendTransaction(request);
58217
58248
  const txnReceipt = await tx.wait();
58218
58249
  if (!txnReceipt) {
58219
58250
  throw new Error(`transaction: ${tx.hash} failed to mined`);
@@ -81590,7 +81621,7 @@ var PolygonIdSdk = (function (exports) {
81590
81621
  this._identityWallet = _identityWallet;
81591
81622
  this._credentialWallet = _credentialWallet;
81592
81623
  this._stateStorage = _stateStorage;
81593
- this._prover = new NativeProver(_circuitStorage);
81624
+ this._prover = opts?.prover ?? new NativeProver(_circuitStorage);
81594
81625
  this._ldOptions = { ...opts, documentLoader: opts?.documentLoader ?? cacheLoader(opts) };
81595
81626
  }
81596
81627
  /** {@inheritdoc IProofService.verifyProof} */