starknet 11.6.1 → 11.6.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [11.6.2](https://github.com/starknet-io/starknet.js/compare/v11.6.1...v11.6.2) (2026-11-11)
2
+
3
+ ### Bug Fixes
4
+
5
+ - bound waitForTransaction polling for pending statuses ([76e3501](https://github.com/starknet-io/starknet.js/commit/76e3501b482eb69071a63225a1f71196a8158c33))
6
+
1
7
  ## [11.6.1](https://github.com/starknet-io/starknet.js/compare/v11.6.0...v11.6.1) (2026-11-06)
2
8
 
3
9
  ### Bug Fixes
package/dist/index.d.ts CHANGED
@@ -879,7 +879,7 @@ type waitForTransactionOptions = {
879
879
  */
880
880
  lifeCycleRetries?: number;
881
881
  /**
882
- * Define the number of retries before throwing an error
882
+ * Limit status polling, including pending statuses, and receipt retries.
883
883
  */
884
884
  retries?: number;
885
885
  /**
@@ -13013,15 +13013,6 @@ ${indent}}` : "}";
13013
13013
  return acc;
13014
13014
  }, {});
13015
13015
  }
13016
- if (isTypeArray(element.type)) {
13017
- const parsedDataArr = [];
13018
- const el = { name: "", type: getArrayType(element.type) };
13019
- const len = BigInt(responseIterator.next().value);
13020
- while (parsedDataArr.length < len) {
13021
- parsedDataArr.push(parseResponseValue(responseIterator, el, parser, structs, enums));
13022
- }
13023
- return parsedDataArr;
13024
- }
13025
13016
  return parseBaseTypes2(element.type, responseIterator, parser);
13026
13017
  }
13027
13018
  function responseParser({
@@ -16478,7 +16469,6 @@ ${indent}}` : "}";
16478
16469
 
16479
16470
  // src/utils/calldata/parser/parsingStrategy.ts
16480
16471
  var hdParsingStrategy = {
16481
- // TODO: provjeri svi request parseri stvaraju array, dali je to ok sa requstParserom
16482
16472
  request: {
16483
16473
  [CairoBytes31.abiSelector]: (val) => {
16484
16474
  return new CairoBytes31(val).toApiRequest();
@@ -19738,7 +19728,6 @@ ${indent}}` : "}";
19738
19728
  }
19739
19729
  return this.specVersion;
19740
19730
  }
19741
- // TODO: New Method add test
19742
19731
  /**
19743
19732
  * Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
19744
19733
  */
@@ -19748,7 +19737,6 @@ ${indent}}` : "}";
19748
19737
  transaction_hash
19749
19738
  });
19750
19739
  }
19751
- // TODO: New Method add test
19752
19740
  getStorageProof(classHashes = [], contractAddresses = [], contractsStorageKeys = [], blockIdentifier = this.blockIdentifier) {
19753
19741
  const block_id = new Block(blockIdentifier).identifier;
19754
19742
  const class_hashes = bigNumberishArrayToHexadecimalStringArray(classHashes);
@@ -19760,7 +19748,6 @@ ${indent}}` : "}";
19760
19748
  contracts_storage_keys: contractsStorageKeys
19761
19749
  });
19762
19750
  }
19763
- // TODO: New Method add test
19764
19751
  getCompiledCasm(classHash) {
19765
19752
  const class_hash = toHex(classHash);
19766
19753
  return this.fetchEndpoint("starknet_getCompiledCasm", {
@@ -19873,7 +19860,8 @@ ${indent}}` : "}";
19873
19860
  }
19874
19861
  async waitForTransaction(txHash, options) {
19875
19862
  const transactionHash = toHex(txHash);
19876
- let retries = options?.retries ?? this.retries;
19863
+ const maxRetries = options?.retries ?? this.retries;
19864
+ let retries = maxRetries;
19877
19865
  let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
19878
19866
  let onchain = false;
19879
19867
  let isErrorState = false;
@@ -19923,9 +19911,9 @@ ${indent}}` : "}";
19923
19911
  }
19924
19912
  lifeCycleRetries -= 1;
19925
19913
  }
19926
- if (retries <= 0) {
19927
- throw new Error(`waitForTransaction timed-out with retries ${this.retries}`);
19928
- }
19914
+ }
19915
+ if (!onchain && retries <= 0) {
19916
+ throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
19929
19917
  }
19930
19918
  retries -= 1;
19931
19919
  }
@@ -19935,7 +19923,7 @@ ${indent}}` : "}";
19935
19923
  txReceipt = await this.getTransactionReceipt(transactionHash);
19936
19924
  } catch (error) {
19937
19925
  if (retries <= 0) {
19938
- throw new Error(`waitForTransaction timed-out with retries ${this.retries}`);
19926
+ throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
19939
19927
  }
19940
19928
  retries -= 1;
19941
19929
  await wait(retryInterval);
@@ -20606,7 +20594,8 @@ ${indent}}` : "}";
20606
20594
  }
20607
20595
  async waitForTransaction(txHash, options) {
20608
20596
  const transactionHash = toHex(txHash);
20609
- let retries = options?.retries ?? this.retries;
20597
+ const maxRetries = options?.retries ?? this.retries;
20598
+ let retries = maxRetries;
20610
20599
  let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
20611
20600
  let onchain = false;
20612
20601
  let isErrorState = false;
@@ -20656,9 +20645,9 @@ ${indent}}` : "}";
20656
20645
  }
20657
20646
  lifeCycleRetries -= 1;
20658
20647
  }
20659
- if (retries <= 0) {
20660
- throw new Error(`waitForTransaction timed-out with retries ${this.retries}`);
20661
- }
20648
+ }
20649
+ if (!onchain && retries <= 0) {
20650
+ throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
20662
20651
  }
20663
20652
  retries -= 1;
20664
20653
  }
@@ -20668,7 +20657,7 @@ ${indent}}` : "}";
20668
20657
  txReceipt = await this.getTransactionReceipt(transactionHash);
20669
20658
  } catch (error) {
20670
20659
  if (retries <= 0) {
20671
- throw new Error(`waitForTransaction timed-out with retries ${this.retries}`);
20660
+ throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
20672
20661
  }
20673
20662
  retries -= 1;
20674
20663
  await wait(retryInterval);
@@ -25380,7 +25369,6 @@ ${indent}}` : "}";
25380
25369
  }
25381
25370
  return this.cairoVersion;
25382
25371
  }
25383
- // TODO: TT Cairo version is still needed for invoke on existing contracts
25384
25372
  async estimateInvokeFee(calls, details = {}) {
25385
25373
  const invocations = [{ type: ETransactionType2.INVOKE, payload: [calls].flat() }];
25386
25374
  const estimateBulk = await this.estimateFeeBulk(invocations, details);
@@ -26227,7 +26215,6 @@ ${indent}}` : "}";
26227
26215
  static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
26228
26216
  return _WalletAccount.connect(provider, walletProvider, cairoVersion, paymaster, true);
26229
26217
  }
26230
- // TODO: MISSING ESTIMATES
26231
26218
  };
26232
26219
 
26233
26220
  // src/wallet/connectV5.ts
@@ -26607,7 +26594,6 @@ ${indent}}` : "}";
26607
26594
  static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
26608
26595
  return _WalletAccountV5.connect(provider, walletProvider, cairoVersion, paymaster, true);
26609
26596
  }
26610
- // TODO: MISSING ESTIMATES
26611
26597
  };
26612
26598
 
26613
26599
  // src/wallet/adapterV6.ts