starknet 11.10.0 → 11.10.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [11.10.1](https://github.com/starknet-io/starknet.js/compare/v11.10.0...v11.10.1) (2026-11-30)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **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))
6
+
1
7
  # [11.10.0](https://github.com/starknet-io/starknet.js/compare/v11.9.3...v11.10.0) (2026-11-26)
2
8
 
3
9
  ### 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?: {
@@ -19479,8 +19479,17 @@ ${indent}}` : "}";
19479
19479
  this.batchPromises[key] = promise;
19480
19480
  });
19481
19481
  }
19482
- const results = await this.batchPromises[requestId];
19483
- delete this.batchPromises[requestId];
19482
+ let results;
19483
+ try {
19484
+ results = await this.batchPromises[requestId];
19485
+ } finally {
19486
+ delete this.batchPromises[requestId];
19487
+ }
19488
+ if (!Array.isArray(results)) {
19489
+ const reply = results;
19490
+ if (reply?.error) return reply;
19491
+ throw new Error(`Unexpected reply to a batch request. Method: ${String(method)}`);
19492
+ }
19484
19493
  const result = results.find((res) => res.id === requestId);
19485
19494
  if (!result)
19486
19495
  throw new Error(`Couldn't find the result for the request. Method: ${String(method)}`);