starknet 4.20.0 → 4.21.0

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,14 @@
1
+ # [4.21.0](https://github.com/0xs34n/starknet.js/compare/v4.20.0...v4.21.0) (2023-01-18)
2
+
3
+ ### Bug Fixes
4
+
5
+ - fix merge conflicts from develop ([a8b01e3](https://github.com/0xs34n/starknet.js/commit/a8b01e351bb2d62f98d874d836a3f4046d5e046f))
6
+
7
+ ### Features
8
+
9
+ - add get_block_traces support in sequencer ([b8dec62](https://github.com/0xs34n/starknet.js/commit/b8dec62c06dabcd3b917d6b53f318df2a0a8dfe4))
10
+ - update types get_block_traces in sequencer ([2a8d97a](https://github.com/0xs34n/starknet.js/commit/2a8d97a532bb2c9f84436daa2b88abc81a4efa41))
11
+
1
12
  # [4.20.0](https://github.com/0xs34n/starknet.js/compare/v4.19.3...v4.20.0) (2023-01-17)
2
13
 
3
14
  ### Bug Fixes
package/dist/index.d.ts CHANGED
@@ -1188,6 +1188,11 @@ declare namespace Sequencer {
1188
1188
  unit: string;
1189
1189
  };
1190
1190
  type EstimateFeeResponseBulk = AllowArray<EstimateFeeResponse>;
1191
+ type BlockTransactionTracesResponse = {
1192
+ traces: Array<TransactionTraceResponse & {
1193
+ transaction_hash: string;
1194
+ }>;
1195
+ };
1191
1196
  type StateUpdateResponse = {
1192
1197
  block_hash: string;
1193
1198
  new_root: string;
@@ -1336,6 +1341,14 @@ declare namespace Sequencer {
1336
1341
  REQUEST: EstimateFeeRequestBulk;
1337
1342
  RESPONSE: EstimateFeeResponseBulk;
1338
1343
  };
1344
+ get_block_traces: {
1345
+ QUERY: {
1346
+ blockHash?: string;
1347
+ blockNumber?: BlockNumber;
1348
+ };
1349
+ REQUEST: never;
1350
+ RESPONSE: BlockTransactionTracesResponse;
1351
+ };
1339
1352
  };
1340
1353
  }
1341
1354
 
@@ -1870,6 +1883,7 @@ declare class SequencerProvider implements ProviderInterface {
1870
1883
  estimateMessageFee({ from_address, to_address, entry_point_selector, payload }: CallL1Handler, blockIdentifier?: BlockIdentifier): Promise<Sequencer.EstimateFeeResponse>;
1871
1884
  getSimulateTransaction(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<TransactionSimulationResponse>;
1872
1885
  getStateUpdate(blockIdentifier?: BlockIdentifier): Promise<StateUpdateResponse>;
1886
+ getBlockTraces(blockIdentifier?: BlockIdentifier): Promise<Sequencer.BlockTransactionTracesResponse>;
1873
1887
  }
1874
1888
 
1875
1889
  interface ProviderOptions {
@@ -21626,6 +21626,10 @@ ${res.tx_failure_reason.error_message}` : res.tx_status;
21626
21626
  this.responseParser.parseGetStateUpdateResponse
21627
21627
  );
21628
21628
  }
21629
+ async getBlockTraces(blockIdentifier = this.blockIdentifier) {
21630
+ const args = new Block(blockIdentifier).sequencerIdentifier;
21631
+ return this.fetchEndpoint("get_block_traces", { ...args });
21632
+ }
21629
21633
  };
21630
21634
 
21631
21635
  // src/provider/default.ts