@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.
- package/dist/browser/esm/index.js +35 -4
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +35 -4
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/proof/proof-service.js +1 -1
- package/dist/node/cjs/storage/blockchain/onchain-zkp-verifier.js +17 -1
- package/dist/node/cjs/storage/blockchain/state.js +17 -2
- package/dist/node/esm/proof/proof-service.js +1 -1
- package/dist/node/esm/storage/blockchain/onchain-zkp-verifier.js +17 -1
- package/dist/node/esm/storage/blockchain/state.js +17 -2
- package/dist/types/proof/proof-service.d.ts +8 -1
- package/dist/types/storage/blockchain/state.d.ts +2 -0
- package/package.json +1 -1
|
@@ -57732,8 +57732,23 @@ var PolygonIdSdk = (function (exports) {
|
|
|
57732
57732
|
],
|
|
57733
57733
|
proof.proof.pi_c.slice(0, 2)
|
|
57734
57734
|
];
|
|
57735
|
-
await
|
|
57736
|
-
const
|
|
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
|
|
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} */
|