starknet 11.10.0 → 11.10.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,15 @@
1
+ ## [11.10.2](https://github.com/starknet-io/starknet.js/compare/v11.10.1...v11.10.2) (2026-11-30)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **calldata:** keep a Span or fixed array of tuples whole inside a tuple ([#1771](https://github.com/starknet-io/starknet.js/issues/1771)) ([106a701](https://github.com/starknet-io/starknet.js/commit/106a70156047e6e9130c8cc6eaee2db62457989a))
6
+
7
+ ## [11.10.1](https://github.com/starknet-io/starknet.js/compare/v11.10.0...v11.10.1) (2026-11-30)
8
+
9
+ ### Bug Fixes
10
+
11
+ - **batch:** return the node error when a whole batch is rejected ([#1769](https://github.com/starknet-io/starknet.js/issues/1769)) ([86b3c65](https://github.com/starknet-io/starknet.js/commit/86b3c6529ccc703f33d5afa4d8e438248305c2a4))
12
+
1
13
  # [11.10.0](https://github.com/starknet-io/starknet.js/compare/v11.9.3...v11.10.0) (2026-11-26)
2
14
 
3
15
  ### Features
package/dist/index.d.ts CHANGED
@@ -9492,7 +9492,7 @@ declare class RpcProvider implements ProviderInterface {
9492
9492
  getBlock(blockIdentifier: 'pre_confirmed'): Promise<PreConfirmedBlock>;
9493
9493
  getBlock(blockIdentifier: 'latest'): Promise<Block$1>;
9494
9494
  getBlock(blockIdentifier: BlockIdentifier): Promise<GetBlockResponse>;
9495
- getBlockLatestAccepted(): Promise<RPC$1.BlockHashAndNumber>;
9495
+ getBlockLatestAccepted(): Promise<RPC.BlockHashAndNumber>;
9496
9496
  getBlockNumber(): Promise<number>;
9497
9497
  getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<({
9498
9498
  status: RPC.BLOCK_STATUS;
@@ -9640,7 +9640,7 @@ declare class RpcProvider implements ProviderInterface {
9640
9640
  getTransactionReceipt(txHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
9641
9641
  getTransactionTrace<V extends _SupportedRpcVersion = _SupportedRpcVersion>(txHash: BigNumberish): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0105.TRANSACTION_TRACE : RPC.TRANSACTION_TRACE>;
9642
9642
  getTransactionTrace(txHash: BigNumberish): Promise<RPCSPEC0105.TRANSACTION_TRACE | RPC.TRANSACTION_TRACE>;
9643
- getTransactionStatus(transactionHash: BigNumberish): Promise<RPC$1.TXN_STATUS_RESULT>;
9643
+ getTransactionStatus(transactionHash: BigNumberish): Promise<RPC.TXN_STATUS_RESULT>;
9644
9644
  getSimulateTransaction(invocations: AccountInvocations, options?: getSimulateTransactionOptions): Promise<SimulateTransactionOverheadResponse>;
9645
9645
  waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<GetTransactionReceiptResponse>;
9646
9646
  getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier, responseFlags?: RPCSPEC0105.STORAGE_RESPONSE_FLAG[]): Promise<STORAGE_RESULT>;
@@ -9770,7 +9770,7 @@ declare class RpcProvider implements ProviderInterface {
9770
9770
  callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<string[]>;
9771
9771
  estimateMessageFee<V extends _SupportedRpcVersion = _SupportedRpcVersion>(message: RPC.L1Message, blockIdentifier?: BlockIdentifier): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0105.FEE_ESTIMATE : RPC.MESSAGE_FEE_ESTIMATE>;
9772
9772
  estimateMessageFee(message: RPC.L1Message, blockIdentifier?: BlockIdentifier): Promise<RPCSPEC0105.FEE_ESTIMATE | RPC.MESSAGE_FEE_ESTIMATE>;
9773
- getSyncingStats(): Promise<RPC$1.Syncing>;
9773
+ getSyncingStats(): Promise<RPC.Syncing>;
9774
9774
  getEvents<V extends _SupportedRpcVersion = _SupportedRpcVersion>(eventFilter: V extends SupportedRpcVersion0_10 ? RPCSPEC0105.EventFilter : RPC.EventFilter): Promise<V extends SupportedRpcVersion0_10 ? RPCSPEC0105.EVENTS_CHUNK : RPC.EVENTS_CHUNK>;
9775
9775
  getEvents(eventFilter: RPCSPEC0105.EventFilter | RPC.EventFilter): Promise<RPCSPEC0105.EVENTS_CHUNK | RPC.EVENTS_CHUNK>;
9776
9776
  verifyMessageInStarknet(message: BigNumberish | TypedData, signature: Signature, accountAddress: BigNumberish, signatureVerificationFunctionName?: string, signatureVerificationResponse?: {
@@ -12587,39 +12587,25 @@ ${indent}}` : "}";
12587
12587
  }
12588
12588
  return recomposed;
12589
12589
  }
12590
- function getClosureOffset(input, open, close) {
12591
- for (let i = 0, counter = 0; i < input.length; i++) {
12592
- if (input[i] === open) {
12593
- counter++;
12594
- } else if (input[i] === close && --counter === 0) {
12595
- return i;
12596
- }
12597
- }
12598
- return Number.POSITIVE_INFINITY;
12599
- }
12600
12590
  function extractCairo1Tuple(type) {
12601
12591
  const input = type.slice(1, -1);
12602
12592
  const result = [];
12593
+ let depth = 0;
12603
12594
  let currentIndex = 0;
12604
- let limitIndex;
12605
- while (currentIndex < input.length) {
12606
- switch (true) {
12607
- // Tuple
12608
- case input[currentIndex] === "(": {
12609
- limitIndex = currentIndex + getClosureOffset(input.slice(currentIndex), "(", ")") + 1;
12610
- break;
12611
- }
12612
- case (input.startsWith("core::result::Result::<", currentIndex) || input.startsWith("core::array::Array::<", currentIndex) || input.startsWith("core::option::Option::<", currentIndex)): {
12613
- limitIndex = currentIndex + getClosureOffset(input.slice(currentIndex), "<", ">") + 1;
12614
- break;
12615
- }
12616
- default: {
12617
- const commaIndex = input.indexOf(",", currentIndex);
12618
- limitIndex = commaIndex !== -1 ? commaIndex : Number.POSITIVE_INFINITY;
12619
- }
12595
+ for (let i = 0; i < input.length; i++) {
12596
+ const char = input[i];
12597
+ if (char === "(" || char === "<" || char === "[") {
12598
+ depth++;
12599
+ } else if (char === ")" || char === ">" || char === "]") {
12600
+ depth--;
12601
+ } else if (char === "," && depth === 0) {
12602
+ result.push(input.slice(currentIndex, i));
12603
+ currentIndex = i + 2;
12604
+ i++;
12620
12605
  }
12621
- result.push(input.slice(currentIndex, limitIndex));
12622
- currentIndex = limitIndex + 2;
12606
+ }
12607
+ if (currentIndex < input.length) {
12608
+ result.push(input.slice(currentIndex));
12623
12609
  }
12624
12610
  return result;
12625
12611
  }
@@ -19479,8 +19465,17 @@ ${indent}}` : "}";
19479
19465
  this.batchPromises[key] = promise;
19480
19466
  });
19481
19467
  }
19482
- const results = await this.batchPromises[requestId];
19483
- delete this.batchPromises[requestId];
19468
+ let results;
19469
+ try {
19470
+ results = await this.batchPromises[requestId];
19471
+ } finally {
19472
+ delete this.batchPromises[requestId];
19473
+ }
19474
+ if (!Array.isArray(results)) {
19475
+ const reply = results;
19476
+ if (reply?.error) return reply;
19477
+ throw new Error(`Unexpected reply to a batch request. Method: ${String(method)}`);
19478
+ }
19484
19479
  const result = results.find((res) => res.id === requestId);
19485
19480
  if (!result)
19486
19481
  throw new Error(`Couldn't find the result for the request. Method: ${String(method)}`);