starknet 9.0.0-beta.1 → 9.0.0-beta.3
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 +16 -0
- package/dist/index.d.ts +97 -75
- package/dist/index.global.js +12 -17
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +12 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# [9.0.0-beta.3](https://github.com/starknet-io/starknet.js/compare/v9.0.0-beta.2...v9.0.0-beta.3) (2025-11-26)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- problem of default starknet version in extractContractHashes ([8a48ae2](https://github.com/starknet-io/starknet.js/commit/8a48ae21ad735e19585f9ddcfc8f820d3fb67849))
|
|
6
|
+
- relocate default value of starknet version ([98c1be0](https://github.com/starknet-io/starknet.js/commit/98c1be0a30a1dd6b05d31f660febb8ea5ec17a9b))
|
|
7
|
+
|
|
8
|
+
# [9.0.0-beta.2](https://github.com/starknet-io/starknet.js/compare/v9.0.0-beta.1...v9.0.0-beta.2) (2025-11-24)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- fix also fastWaitForTransaction ([1c1fe69](https://github.com/starknet-io/starknet.js/commit/1c1fe693101cab332262646f7c334233533ec799))
|
|
13
|
+
- remove not more necessary rpc version test ([c783cb2](https://github.com/starknet-io/starknet.js/commit/c783cb20420d460eda5e14917b667105a3606c6c))
|
|
14
|
+
- remove test not rpc0.8 ([4ee93f0](https://github.com/starknet-io/starknet.js/commit/4ee93f04b39d99e4943b5e6545e89b6c5744b9fb))
|
|
15
|
+
- spec 10rc2 ([13ddab9](https://github.com/starknet-io/starknet.js/commit/13ddab953cde0e95207813f849bf1f27fc82e42a))
|
|
16
|
+
|
|
1
17
|
# [9.0.0-beta.1](https://github.com/starknet-io/starknet.js/compare/v8.9.0...v9.0.0-beta.1) (2025-11-20)
|
|
2
18
|
|
|
3
19
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -1958,7 +1958,6 @@ declare abstract class ProviderInterface {
|
|
|
1958
1958
|
/**
|
|
1959
1959
|
* Gets the block information
|
|
1960
1960
|
*
|
|
1961
|
-
* @param blockIdentifier block identifier
|
|
1962
1961
|
* @returns the block object
|
|
1963
1962
|
*/
|
|
1964
1963
|
abstract getBlock(): Promise<PreConfirmedBlock>;
|
|
@@ -2188,7 +2187,6 @@ declare abstract class ProviderInterface {
|
|
|
2188
2187
|
* Gets the state changes in a specific block (result of executing the requested block)
|
|
2189
2188
|
* Alternative method name for getStateUpdate with specific overloads
|
|
2190
2189
|
*
|
|
2191
|
-
* @param blockIdentifier - block identifier
|
|
2192
2190
|
* @returns StateUpdateResponse
|
|
2193
2191
|
*/
|
|
2194
2192
|
abstract getBlockStateUpdate(): Promise<StateUpdate>;
|
|
@@ -2451,7 +2449,6 @@ declare abstract class DeployerInterface {
|
|
|
2451
2449
|
* Parse Transaction Receipt Event from a Deployer contract transaction and
|
|
2452
2450
|
* create DeployContractResponse compatible response with addition of the Deployer Event data
|
|
2453
2451
|
* @param {InvokeTransactionReceiptResponse} txReceipt Transaction receipt
|
|
2454
|
-
* @param {DeployerDefinition} deployer Deployer contract definition
|
|
2455
2452
|
*
|
|
2456
2453
|
* @returns {DeployContractUDCResponse} parsed Deployer event data
|
|
2457
2454
|
*/
|
|
@@ -2623,21 +2620,21 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2623
2620
|
* Estimate fee for executing an INVOKE transaction on Starknet
|
|
2624
2621
|
*
|
|
2625
2622
|
* @param calls - Single call or array of calls to estimate fees for
|
|
2626
|
-
*
|
|
2627
|
-
*
|
|
2628
|
-
*
|
|
2623
|
+
* - .contractAddress - The address of the contract to invoke
|
|
2624
|
+
* - .entrypoint - The function selector of the contract method
|
|
2625
|
+
* - .calldata - The serialized function parameters (defaults to [])
|
|
2629
2626
|
*
|
|
2630
2627
|
* @param estimateFeeDetails - Optional details for fee estimation
|
|
2631
|
-
*
|
|
2632
|
-
*
|
|
2633
|
-
*
|
|
2634
|
-
*
|
|
2635
|
-
*
|
|
2636
|
-
*
|
|
2637
|
-
*
|
|
2638
|
-
*
|
|
2639
|
-
*
|
|
2640
|
-
*
|
|
2628
|
+
* - .blockIdentifier - Block to estimate against
|
|
2629
|
+
* - .nonce - Account nonce (defaults to current nonce)
|
|
2630
|
+
* - .skipValidate - Skip account validation (default: true)
|
|
2631
|
+
* - .tip - Priority fee tip in fri/wei for faster inclusion
|
|
2632
|
+
* - .accountDeploymentData - Include account deployment
|
|
2633
|
+
* - .paymasterData - Paymaster sponsorship data
|
|
2634
|
+
* - .nonceDataAvailabilityMode - DA mode for nonce
|
|
2635
|
+
* - .feeDataAvailabilityMode - DA mode for fee
|
|
2636
|
+
* - .version - Transaction version (v3 uses fri, v1/v2 use wei)
|
|
2637
|
+
* - .resourceBounds - Resource limits for v3 transactions
|
|
2641
2638
|
*
|
|
2642
2639
|
* @returns Fee estimation including overall_fee and resourceBounds
|
|
2643
2640
|
* @example
|
|
@@ -2653,18 +2650,19 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2653
2650
|
/**
|
|
2654
2651
|
* Estimate fee for executing a DECLARE transaction on Starknet
|
|
2655
2652
|
*
|
|
2656
|
-
* @param contractPayload - Contract declaration payload
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2659
|
-
*
|
|
2660
|
-
*
|
|
2653
|
+
* @param contractPayload - Contract declaration payload.
|
|
2654
|
+
* - .contract - Compiled contract (Sierra JSON).
|
|
2655
|
+
* - .casm - Compiled Cairo assembly (required for Cairo 1).
|
|
2656
|
+
* - .classHash - Pre-computed class hash (optional optimization).
|
|
2657
|
+
* - .compiledClassHash - Pre-computed CASM hash (alternative to casm).
|
|
2661
2658
|
*
|
|
2662
|
-
* @param estimateFeeDetails - Optional details for fee estimation
|
|
2663
|
-
*
|
|
2664
|
-
*
|
|
2665
|
-
*
|
|
2666
|
-
*
|
|
2667
|
-
*
|
|
2659
|
+
* @param estimateFeeDetails - Optional details for fee estimation.
|
|
2660
|
+
*
|
|
2661
|
+
* - .blockIdentifier - Block to estimate against.
|
|
2662
|
+
* - .nonce - Account nonce (defaults to current nonce)
|
|
2663
|
+
* - .skipValidate - Skip account validation (default: true)
|
|
2664
|
+
* - .tip - Priority fee tip for faster inclusion
|
|
2665
|
+
* - .version - Transaction version (v3 uses fri, v1/v2 use wei)
|
|
2668
2666
|
*
|
|
2669
2667
|
* @returns Fee estimation including overall_fee and resourceBounds
|
|
2670
2668
|
* @example
|
|
@@ -2680,10 +2678,10 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2680
2678
|
* Estimate fee for executing a DEPLOY_ACCOUNT transaction on Starknet
|
|
2681
2679
|
*
|
|
2682
2680
|
* @param contractPayload - Account deployment payload
|
|
2683
|
-
*
|
|
2684
|
-
*
|
|
2685
|
-
*
|
|
2686
|
-
*
|
|
2681
|
+
* - .classHash - Class hash of the account contract
|
|
2682
|
+
* - .constructorCalldata - Constructor parameters
|
|
2683
|
+
* - .contractAddress - Pre-computed account address
|
|
2684
|
+
* - .addressSalt - Salt for address generation
|
|
2687
2685
|
*
|
|
2688
2686
|
* @param estimateFeeDetails - Optional details for fee estimation
|
|
2689
2687
|
* @inheritdoc estimateInvokeFee
|
|
@@ -2703,10 +2701,10 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2703
2701
|
* Estimate fee for deploying contract(s) through the Universal Deployer Contract (UDC)
|
|
2704
2702
|
*
|
|
2705
2703
|
* @param deployContractPayload - Single or array of deployment payloads
|
|
2706
|
-
*
|
|
2707
|
-
*
|
|
2708
|
-
*
|
|
2709
|
-
*
|
|
2704
|
+
* - .classHash - Class hash of contract to deploy
|
|
2705
|
+
* - .salt - Deployment salt (optional)
|
|
2706
|
+
* - .unique - Ensure unique deployment address
|
|
2707
|
+
* - .constructorCalldata - Constructor parameters
|
|
2710
2708
|
*
|
|
2711
2709
|
* @param estimateFeeDetails - Optional details for fee estimation
|
|
2712
2710
|
* @inheritdoc estimateInvokeFee
|
|
@@ -2726,8 +2724,8 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2726
2724
|
* Estimate fees for executing multiple transactions in a single request
|
|
2727
2725
|
*
|
|
2728
2726
|
* @param invocations - Array of transactions to estimate
|
|
2729
|
-
*
|
|
2730
|
-
*
|
|
2727
|
+
* - .type - Transaction type: DECLARE, DEPLOY, INVOKE, DEPLOY_ACCOUNT
|
|
2728
|
+
* - .payload - Transaction-specific payload
|
|
2731
2729
|
*
|
|
2732
2730
|
* @param details - Optional details for fee estimation
|
|
2733
2731
|
* @inheritdoc estimateInvokeFee
|
|
@@ -2746,16 +2744,16 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2746
2744
|
* Execute one or multiple calls through the account contract
|
|
2747
2745
|
*
|
|
2748
2746
|
* @param transactions - Single call or array of calls to execute
|
|
2749
|
-
*
|
|
2750
|
-
*
|
|
2751
|
-
*
|
|
2747
|
+
* - .contractAddress - Target contract address
|
|
2748
|
+
* - .entrypoint - Function to invoke on the contract
|
|
2749
|
+
* - .calldata - Function parameters
|
|
2752
2750
|
*
|
|
2753
2751
|
* @param transactionsDetail - Transaction execution options
|
|
2754
|
-
*
|
|
2755
|
-
*
|
|
2756
|
-
*
|
|
2757
|
-
*
|
|
2758
|
-
*
|
|
2752
|
+
* - .nonce - Override account nonce
|
|
2753
|
+
* - .maxFee - Maximum fee for v1/v2 transactions
|
|
2754
|
+
* - .resourceBounds - Resource limits for v3 transactions
|
|
2755
|
+
* - .tip - Priority fee tip
|
|
2756
|
+
* - .version - Force specific transaction version
|
|
2759
2757
|
*
|
|
2760
2758
|
* @returns Transaction hash and response
|
|
2761
2759
|
* @example
|
|
@@ -2771,14 +2769,14 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2771
2769
|
* Estimate fees for a paymaster-sponsored transaction
|
|
2772
2770
|
*
|
|
2773
2771
|
* @param calls - Array of calls to be sponsored
|
|
2774
|
-
*
|
|
2775
|
-
*
|
|
2776
|
-
*
|
|
2772
|
+
* - .contractAddress - Target contract address
|
|
2773
|
+
* - .entrypoint - Function to invoke
|
|
2774
|
+
* - .calldata - Function parameters
|
|
2777
2775
|
*
|
|
2778
2776
|
* @param paymasterDetails - Paymaster configuration
|
|
2779
|
-
*
|
|
2780
|
-
*
|
|
2781
|
-
*
|
|
2777
|
+
* - .feeMode - Sponsorship mode: 'sponsored' or gas token
|
|
2778
|
+
* - .deploymentData - Account deployment data if needed
|
|
2779
|
+
* - .timeBounds - Valid execution time window
|
|
2782
2780
|
*
|
|
2783
2781
|
* @returns Fee estimates in both STRK and gas token
|
|
2784
2782
|
* @example
|
|
@@ -2812,9 +2810,9 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2812
2810
|
*
|
|
2813
2811
|
* @param calls - Array of calls to execute
|
|
2814
2812
|
* @param paymasterDetails - Paymaster configuration
|
|
2815
|
-
*
|
|
2816
|
-
*
|
|
2817
|
-
*
|
|
2813
|
+
* - .feeMode - 'sponsored' or gas token payment
|
|
2814
|
+
* - .deploymentData - Deploy account if needed
|
|
2815
|
+
* - .timeBounds - Execution validity window (UNIX timestamps)
|
|
2818
2816
|
*
|
|
2819
2817
|
* @param maxFeeInGasToken - Maximum acceptable fee in gas token
|
|
2820
2818
|
*
|
|
@@ -2834,11 +2832,12 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2834
2832
|
/**
|
|
2835
2833
|
* Declare a contract class on Starknet
|
|
2836
2834
|
*
|
|
2835
|
+
// eslint-disable-next-line prettier/prettier
|
|
2837
2836
|
* @param contractPayload - Contract declaration payload
|
|
2838
|
-
*
|
|
2839
|
-
*
|
|
2840
|
-
*
|
|
2841
|
-
*
|
|
2837
|
+
* - .contract - Compiled Sierra contract
|
|
2838
|
+
* - .classHash - Pre-computed class hash (optional)
|
|
2839
|
+
* - .casm - Compiled CASM (required for Cairo 1)
|
|
2840
|
+
* - .compiledClassHash - Pre-computed CASM hash
|
|
2842
2841
|
*
|
|
2843
2842
|
* @param transactionsDetail - Transaction execution options
|
|
2844
2843
|
* @inheritdoc execute
|
|
@@ -2856,11 +2855,11 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2856
2855
|
/**
|
|
2857
2856
|
* Deploy contract(s) using the Universal Deployer Contract (UDC)
|
|
2858
2857
|
*
|
|
2859
|
-
* @param payload - Single or multiple deployment configurations
|
|
2860
|
-
*
|
|
2861
|
-
*
|
|
2862
|
-
*
|
|
2863
|
-
*
|
|
2858
|
+
* @param payload - Single or multiple deployment configurations.
|
|
2859
|
+
* - .classHash - Class hash of declared contract.
|
|
2860
|
+
* - .constructorCalldata - Constructor parameters.
|
|
2861
|
+
* - .salt - Deployment salt (random if not specified).
|
|
2862
|
+
* - .unique - Modify salt for unique address (default: true).
|
|
2864
2863
|
*
|
|
2865
2864
|
* @param details - Transaction execution options
|
|
2866
2865
|
* @inheritdoc execute
|
|
@@ -2901,13 +2900,13 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2901
2900
|
* Declare and deploy a contract in a single method
|
|
2902
2901
|
*
|
|
2903
2902
|
* @param payload - Combined declare and deploy configuration
|
|
2904
|
-
*
|
|
2905
|
-
*
|
|
2906
|
-
*
|
|
2907
|
-
*
|
|
2908
|
-
*
|
|
2909
|
-
*
|
|
2910
|
-
*
|
|
2903
|
+
* - .contract - Compiled Sierra contract
|
|
2904
|
+
* - .casm - Compiled CASM (required for Cairo 1)
|
|
2905
|
+
* - .compiledClassHash - Pre-computed CASM hash
|
|
2906
|
+
* - .classHash - Pre-computed class hash
|
|
2907
|
+
* - .constructorCalldata - Constructor parameters
|
|
2908
|
+
* - .salt - Deployment salt
|
|
2909
|
+
* - .unique - Ensure unique deployment address
|
|
2911
2910
|
*
|
|
2912
2911
|
* @param details - Transaction execution options
|
|
2913
2912
|
* @inheritdoc execute
|
|
@@ -2931,10 +2930,10 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2931
2930
|
* Deploy the account contract itself on Starknet
|
|
2932
2931
|
*
|
|
2933
2932
|
* @param contractPayload - Account deployment configuration
|
|
2934
|
-
*
|
|
2935
|
-
*
|
|
2936
|
-
*
|
|
2937
|
-
*
|
|
2933
|
+
* - .classHash - Account contract class hash
|
|
2934
|
+
* - .constructorCalldata - Constructor parameters
|
|
2935
|
+
* - .addressSalt - Salt for address generation
|
|
2936
|
+
* - .contractAddress - Pre-computed address
|
|
2938
2937
|
*
|
|
2939
2938
|
* @param transactionsDetail - Transaction execution options
|
|
2940
2939
|
* @inheritdoc execute
|
|
@@ -3929,6 +3928,7 @@ declare const SYSTEM_MESSAGES: {
|
|
|
3929
3928
|
consensusFailed: string;
|
|
3930
3929
|
txFailsBlockBuildingValidation: string;
|
|
3931
3930
|
};
|
|
3931
|
+
declare const SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS: "0.14.1";
|
|
3932
3932
|
|
|
3933
3933
|
declare const constants_ADDR_BOUND: typeof ADDR_BOUND;
|
|
3934
3934
|
declare const constants_API_VERSION: typeof API_VERSION;
|
|
@@ -3958,6 +3958,7 @@ declare const constants_RANGE_U96: typeof RANGE_U96;
|
|
|
3958
3958
|
declare const constants_RPC_DEFAULT_NODES: typeof RPC_DEFAULT_NODES;
|
|
3959
3959
|
declare const constants_SNIP9_V1_INTERFACE_ID: typeof SNIP9_V1_INTERFACE_ID;
|
|
3960
3960
|
declare const constants_SNIP9_V2_INTERFACE_ID: typeof SNIP9_V2_INTERFACE_ID;
|
|
3961
|
+
declare const constants_SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS: typeof SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS;
|
|
3961
3962
|
declare const constants_SYSTEM_MESSAGES: typeof SYSTEM_MESSAGES;
|
|
3962
3963
|
type constants_SupportedCairoVersion = SupportedCairoVersion;
|
|
3963
3964
|
type constants_SupportedTransactionVersion = SupportedTransactionVersion;
|
|
@@ -3965,7 +3966,7 @@ declare const constants_TEXT_TO_FELT_MAX_LEN: typeof TEXT_TO_FELT_MAX_LEN;
|
|
|
3965
3966
|
declare const constants_UDC: typeof UDC;
|
|
3966
3967
|
declare const constants_ZERO: typeof ZERO;
|
|
3967
3968
|
declare namespace constants {
|
|
3968
|
-
export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, _BaseUrl as BaseUrl, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_LegacyUDC as LegacyUDC, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PAYMASTER_RPC_NODES as PAYMASTER_RPC_NODES, constants_PRIME as PRIME, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_I16 as RANGE_I16, constants_RANGE_I32 as RANGE_I32, constants_RANGE_I64 as RANGE_I64, constants_RANGE_I8 as RANGE_I8, constants_RANGE_U128 as RANGE_U128, constants_RANGE_U16 as RANGE_U16, constants_RANGE_U32 as RANGE_U32, constants_RANGE_U64 as RANGE_U64, constants_RANGE_U8 as RANGE_U8, constants_RANGE_U96 as RANGE_U96, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, type constants_SupportedCairoVersion as SupportedCairoVersion, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
|
|
3969
|
+
export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, _BaseUrl as BaseUrl, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_LegacyUDC as LegacyUDC, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PAYMASTER_RPC_NODES as PAYMASTER_RPC_NODES, constants_PRIME as PRIME, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_I16 as RANGE_I16, constants_RANGE_I32 as RANGE_I32, constants_RANGE_I64 as RANGE_I64, constants_RANGE_I8 as RANGE_I8, constants_RANGE_U128 as RANGE_U128, constants_RANGE_U16 as RANGE_U16, constants_RANGE_U32 as RANGE_U32, constants_RANGE_U64 as RANGE_U64, constants_RANGE_U8 as RANGE_U8, constants_RANGE_U96 as RANGE_U96, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS as SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, type constants_SupportedCairoVersion as SupportedCairoVersion, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
|
|
3969
3970
|
}
|
|
3970
3971
|
|
|
3971
3972
|
declare class RpcChannel$1 {
|
|
@@ -4191,6 +4192,13 @@ declare class RpcChannel {
|
|
|
4191
4192
|
new_root?: undefined;
|
|
4192
4193
|
status?: undefined;
|
|
4193
4194
|
parent_hash?: undefined;
|
|
4195
|
+
event_commitment?: undefined;
|
|
4196
|
+
transaction_commitment?: undefined;
|
|
4197
|
+
receipt_commitment?: undefined;
|
|
4198
|
+
state_diff_commitment?: undefined;
|
|
4199
|
+
event_count?: undefined;
|
|
4200
|
+
transaction_count?: undefined;
|
|
4201
|
+
state_diff_length?: undefined;
|
|
4194
4202
|
})>;
|
|
4195
4203
|
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<({
|
|
4196
4204
|
status: RPC.BLOCK_STATUS;
|
|
@@ -4199,6 +4207,13 @@ declare class RpcChannel {
|
|
|
4199
4207
|
new_root?: undefined;
|
|
4200
4208
|
status?: undefined;
|
|
4201
4209
|
parent_hash?: undefined;
|
|
4210
|
+
event_commitment?: undefined;
|
|
4211
|
+
transaction_commitment?: undefined;
|
|
4212
|
+
receipt_commitment?: undefined;
|
|
4213
|
+
state_diff_commitment?: undefined;
|
|
4214
|
+
event_count?: undefined;
|
|
4215
|
+
transaction_count?: undefined;
|
|
4216
|
+
state_diff_length?: undefined;
|
|
4202
4217
|
})>;
|
|
4203
4218
|
getBlockWithReceipts(blockIdentifier?: BlockIdentifier): Promise<({
|
|
4204
4219
|
status: RPC.BLOCK_STATUS;
|
|
@@ -4207,6 +4222,13 @@ declare class RpcChannel {
|
|
|
4207
4222
|
new_root?: undefined;
|
|
4208
4223
|
status?: undefined;
|
|
4209
4224
|
parent_hash?: undefined;
|
|
4225
|
+
event_commitment?: undefined;
|
|
4226
|
+
transaction_commitment?: undefined;
|
|
4227
|
+
receipt_commitment?: undefined;
|
|
4228
|
+
state_diff_commitment?: undefined;
|
|
4229
|
+
event_count?: undefined;
|
|
4230
|
+
transaction_count?: undefined;
|
|
4231
|
+
state_diff_length?: undefined;
|
|
4210
4232
|
})>;
|
|
4211
4233
|
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<(RPC.STATE_UPDATE & {}) | (RPC.PRE_CONFIRMED_STATE_UPDATE & {
|
|
4212
4234
|
new_root?: undefined;
|
package/dist/index.global.js
CHANGED
|
@@ -214,6 +214,7 @@ var starknet = (() => {
|
|
|
214
214
|
RPC_DEFAULT_NODES: () => RPC_DEFAULT_NODES,
|
|
215
215
|
SNIP9_V1_INTERFACE_ID: () => SNIP9_V1_INTERFACE_ID,
|
|
216
216
|
SNIP9_V2_INTERFACE_ID: () => SNIP9_V2_INTERFACE_ID,
|
|
217
|
+
SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS: () => SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS,
|
|
217
218
|
SYSTEM_MESSAGES: () => SYSTEM_MESSAGES,
|
|
218
219
|
StarknetChainId: () => _StarknetChainId,
|
|
219
220
|
SupportedRpcVersion: () => _SupportedRpcVersion,
|
|
@@ -1221,6 +1222,7 @@ var starknet = (() => {
|
|
|
1221
1222
|
consensusFailed: "Consensus failed to finalize the block proposal",
|
|
1222
1223
|
txFailsBlockBuildingValidation: "Transaction fails block building validation"
|
|
1223
1224
|
};
|
|
1225
|
+
var SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS = "0.14.1";
|
|
1224
1226
|
|
|
1225
1227
|
// src/global/config.ts
|
|
1226
1228
|
var Configuration = class _Configuration {
|
|
@@ -9960,8 +9962,8 @@ ${indent}}` : "}";
|
|
|
9960
9962
|
}
|
|
9961
9963
|
return computeLegacyContractClassHash(compiledContract);
|
|
9962
9964
|
}
|
|
9963
|
-
function computeCompiledClassHash(casm, starknetVersion) {
|
|
9964
|
-
if (
|
|
9965
|
+
function computeCompiledClassHash(casm, starknetVersion = SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS) {
|
|
9966
|
+
if (compareVersions(starknetVersion, SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS) >= 0) {
|
|
9965
9967
|
return computeCompiledClassHashBlake(casm);
|
|
9966
9968
|
}
|
|
9967
9969
|
return computeCompiledClassHashPoseidon(casm);
|
|
@@ -17730,7 +17732,7 @@ ${indent}}` : "}";
|
|
|
17730
17732
|
let isTargetBlock = false;
|
|
17731
17733
|
while (!isTargetBlock) {
|
|
17732
17734
|
const currBlock = await this.getBlockNumber();
|
|
17733
|
-
if (currBlock
|
|
17735
|
+
if (currBlock >= targetBlock) {
|
|
17734
17736
|
isTargetBlock = true;
|
|
17735
17737
|
} else {
|
|
17736
17738
|
await wait(retryInterval);
|
|
@@ -17828,16 +17830,13 @@ ${indent}}` : "}";
|
|
|
17828
17830
|
* throw an error in case of provider communication.
|
|
17829
17831
|
*/
|
|
17830
17832
|
async fastWaitForTransaction(txHash, address, initNonce, options) {
|
|
17831
|
-
|
|
17832
|
-
|
|
17833
|
-
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
return isSuccess;
|
|
17839
|
-
}
|
|
17840
|
-
throw new Error("Unsupported channel type");
|
|
17833
|
+
const isSuccess = await this.channel.fastWaitForTransaction(
|
|
17834
|
+
txHash,
|
|
17835
|
+
address,
|
|
17836
|
+
initNonce,
|
|
17837
|
+
options
|
|
17838
|
+
);
|
|
17839
|
+
return isSuccess;
|
|
17841
17840
|
}
|
|
17842
17841
|
async getStorageAt(contractAddress, key, blockIdentifier) {
|
|
17843
17842
|
return this.channel.getStorageAt(contractAddress, key, blockIdentifier);
|
|
@@ -20665,10 +20664,6 @@ ${indent}}` : "}";
|
|
|
20665
20664
|
* ```
|
|
20666
20665
|
*/
|
|
20667
20666
|
async fastExecute(transactions, transactionsDetail = {}, waitDetail = {}) {
|
|
20668
|
-
assert(
|
|
20669
|
-
this.channel instanceof rpc_0_9_0_exports.RpcChannel,
|
|
20670
|
-
"Wrong Rpc version in Provider. At least Rpc v0.9 required."
|
|
20671
|
-
);
|
|
20672
20667
|
assert(
|
|
20673
20668
|
this.channel.blockIdentifier === BlockTag.PRE_CONFIRMED,
|
|
20674
20669
|
"Provider needs to be initialized with `pre_confirmed` blockIdentifier option."
|