starknet 5.23.0 → 5.24.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,13 @@
1
+ # [5.24.0](https://github.com/starknet-io/starknet.js/compare/v5.23.0...v5.24.0) (2023-11-13)
2
+
3
+ ### Bug Fixes
4
+
5
+ - skip chainId eager load for RpcProvider initialization ([3bccc4d](https://github.com/starknet-io/starknet.js/commit/3bccc4d9f0e07d42a3855891cb5b4efce3692001))
6
+
7
+ ### Features
8
+
9
+ - rpc 0.5.1 ([0306b90](https://github.com/starknet-io/starknet.js/commit/0306b90f0cec30a3db99925a83f05d6c66f4100c))
10
+
1
11
  # [5.23.0](https://github.com/starknet-io/starknet.js/compare/v5.22.0...v5.23.0) (2023-11-10)
2
12
 
3
13
  ### Bug Fixes
package/dist/index.d.ts CHANGED
@@ -789,7 +789,7 @@ type STRUCT_ABI_TYPE = 'struct';
789
789
  type EVENT_ABI_TYPE = 'event';
790
790
  type FUNCTION_ABI_TYPE = 'function' | 'l1_handler' | 'constructor';
791
791
  type ENTRY_POINT_TYPE = 'EXTERNAL' | 'L1_HANDLER' | 'CONSTRUCTOR';
792
- type CALL_TYPE = 'LIBRARY_CALL' | 'CALL';
792
+ type CALL_TYPE = 'DELEGATE' | 'LIBRARY_CALL' | 'CALL';
793
793
  type TXN_STATUS = 'RECEIVED' | 'REJECTED' | 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
794
794
  type SIMULATION_FLAG$1 = 'SKIP_VALIDATE' | 'SKIP_FEE_CHARGE';
795
795
  type DA_MODE = 'L1' | 'L2';
@@ -1176,30 +1176,31 @@ type TRANSACTION_TRACE = {
1176
1176
  l1_handler_tx_trace?: L1_HANDLER_TXN_TRACE;
1177
1177
  };
1178
1178
  type INVOKE_TXN_TRACE = {
1179
- validate_invocation: FUNCTION_INVOCATION;
1179
+ type: 'INVOKE';
1180
1180
  execute_invocation: FUNCTION_INVOCATION | {
1181
1181
  revert_reason: string;
1182
1182
  };
1183
- fee_transfer_invocation: FUNCTION_INVOCATION;
1184
- state_diff: STATE_DIFF;
1185
- type: 'INVOKE';
1183
+ validate_invocation?: FUNCTION_INVOCATION;
1184
+ fee_transfer_invocation?: FUNCTION_INVOCATION;
1185
+ state_diff?: STATE_DIFF;
1186
1186
  };
1187
1187
  type DECLARE_TXN_TRACE = {
1188
- validate_invocation: FUNCTION_INVOCATION;
1189
- fee_transfer_invocation: FUNCTION_INVOCATION;
1190
- state_diff: STATE_DIFF;
1191
1188
  type: 'DECLARE';
1189
+ validate_invocation?: FUNCTION_INVOCATION;
1190
+ fee_transfer_invocation?: FUNCTION_INVOCATION;
1191
+ state_diff?: STATE_DIFF;
1192
1192
  };
1193
1193
  type DEPLOY_ACCOUNT_TXN_TRACE = {
1194
- validate_invocation: FUNCTION_INVOCATION;
1195
- constructor_invocation: FUNCTION_INVOCATION;
1196
- fee_transfer_invocation: FUNCTION_INVOCATION;
1197
- state_diff: STATE_DIFF;
1198
1194
  type: 'DEPLOY_ACCOUNT';
1195
+ constructor_invocation: FUNCTION_INVOCATION;
1196
+ validate_invocation?: FUNCTION_INVOCATION;
1197
+ fee_transfer_invocation?: FUNCTION_INVOCATION;
1198
+ state_diff?: STATE_DIFF;
1199
1199
  };
1200
1200
  type L1_HANDLER_TXN_TRACE = {
1201
- function_invocation: FUNCTION_INVOCATION;
1202
1201
  type: 'L1_HANDLER';
1202
+ function_invocation: FUNCTION_INVOCATION;
1203
+ state_diff?: STATE_DIFF;
1203
1204
  };
1204
1205
  type NESTED_CALL = FUNCTION_INVOCATION;
1205
1206
  type FUNCTION_INVOCATION = {
@@ -10852,7 +10852,6 @@ var starknet = (() => {
10852
10852
  this.headers = { ...defaultOptions.headers, ...headers };
10853
10853
  this.blockIdentifier = blockIdentifier || defaultOptions.blockIdentifier;
10854
10854
  this.chainId = chainId;
10855
- this.getChainId();
10856
10855
  }
10857
10856
  fetch(method, params, id = 0) {
10858
10857
  const rpcRequestBody = {
@@ -10985,7 +10984,6 @@ var starknet = (() => {
10985
10984
  const transaction_hash = toHex(txHash);
10986
10985
  return this.fetchEndpoint("starknet_traceTransaction", { transaction_hash });
10987
10986
  }
10988
- // TODO: implement in waitforTransaction, add add tests, when RPC 0.5 become standard /
10989
10987
  /**
10990
10988
  * NEW: Get the status of a transaction
10991
10989
  */