starknet 8.5.5 → 8.7.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 +16 -0
- package/dist/index.d.ts +148 -22
- package/dist/index.global.js +667 -90
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +260 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +259 -91
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# [8.7.0](https://github.com/starknet-io/starknet.js/compare/v8.6.0...v8.7.0) (2025-11-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- public node hotfix ([#1510](https://github.com/starknet-io/starknet.js/issues/1510)) ([4165a3c](https://github.com/starknet-io/starknet.js/commit/4165a3c74c94053b60ed2aca12d8bebab5b72f68))
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- configurable websocket exponential backoff ([#1503](https://github.com/starknet-io/starknet.js/issues/1503)) ([6d0593f](https://github.com/starknet-io/starknet.js/commit/6d0593f2fcdf6da79fb0aaccef42071a8c0e8126))
|
|
10
|
+
|
|
11
|
+
# [8.6.0](https://github.com/starknet-io/starknet.js/compare/v8.5.5...v8.6.0) (2025-10-17)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- blake2s ([#1502](https://github.com/starknet-io/starknet.js/issues/1502)) ([dd3f8ec](https://github.com/starknet-io/starknet.js/commit/dd3f8eca44091a01d240f03e488a25b1119af524))
|
|
16
|
+
|
|
1
17
|
## [8.5.5](https://github.com/starknet-io/starknet.js/compare/v8.5.4...v8.5.5) (2025-10-03)
|
|
2
18
|
|
|
3
19
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -360,7 +360,7 @@ interface Program {
|
|
|
360
360
|
}>;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
/**
|
|
363
|
+
/** Cairo Assembly .casm */
|
|
364
364
|
type CairoAssembly = {
|
|
365
365
|
prime: string;
|
|
366
366
|
compiler_version: string;
|
|
@@ -3903,10 +3903,22 @@ declare const DEFAULT_GLOBAL_CONFIG: {
|
|
|
3903
3903
|
fetch: any;
|
|
3904
3904
|
websocket: any;
|
|
3905
3905
|
buffer: any;
|
|
3906
|
+
/**
|
|
3907
|
+
* Custom blake function
|
|
3908
|
+
* @param uint8Array - The uint8Array to hash
|
|
3909
|
+
* @returns The hash of the uint8Array
|
|
3910
|
+
* @example
|
|
3911
|
+
* ```typescript
|
|
3912
|
+
* config.set('blake', (uint8Array: Uint8Array) => {
|
|
3913
|
+
* return blake2s(uint8Array, { dkLen: 32 });
|
|
3914
|
+
* });
|
|
3915
|
+
* ```
|
|
3916
|
+
*/
|
|
3917
|
+
blake: ((uint8Array: Uint8Array) => Uint8Array) | undefined;
|
|
3906
3918
|
};
|
|
3907
3919
|
declare const RPC_DEFAULT_NODES: {
|
|
3908
|
-
readonly SN_MAIN: readonly ["https://starknet-mainnet.
|
|
3909
|
-
readonly SN_SEPOLIA: readonly ["https://starknet-sepolia.
|
|
3920
|
+
readonly SN_MAIN: readonly ["https://starknet-mainnet.g.alchemy.com/starknet/version/rpc"];
|
|
3921
|
+
readonly SN_SEPOLIA: readonly ["https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/"];
|
|
3910
3922
|
};
|
|
3911
3923
|
declare const PAYMASTER_RPC_NODES: {
|
|
3912
3924
|
readonly SN_MAIN: readonly ["https://starknet.paymaster.avnu.fi"];
|
|
@@ -4394,10 +4406,14 @@ type ReconnectOptions = {
|
|
|
4394
4406
|
retries?: number;
|
|
4395
4407
|
/**
|
|
4396
4408
|
* The initial delay in milliseconds before the first retry.
|
|
4397
|
-
* This delay will be doubled for each subsequent retry (exponential backoff).
|
|
4398
4409
|
* @default 2000
|
|
4399
4410
|
*/
|
|
4400
4411
|
delay?: number;
|
|
4412
|
+
/**
|
|
4413
|
+
* Whether to use the exponential backoff (delay being doubled for each subsequent retry).
|
|
4414
|
+
* @default true
|
|
4415
|
+
*/
|
|
4416
|
+
exponential?: number | boolean;
|
|
4401
4417
|
};
|
|
4402
4418
|
/**
|
|
4403
4419
|
* The type of the WebSocket implementation.
|
|
@@ -5773,11 +5789,10 @@ type CalcDeployAccountTxHashArgs = CalcV3DeployAccountTxHashArgs;
|
|
|
5773
5789
|
declare function calculateDeployAccountTransactionHash$1(args: CalcDeployAccountTxHashArgs): string;
|
|
5774
5790
|
|
|
5775
5791
|
/**
|
|
5776
|
-
* Class Hash
|
|
5792
|
+
* Cairo 0 Class Hash computation using Pedersen hash
|
|
5777
5793
|
*/
|
|
5778
5794
|
|
|
5779
5795
|
declare function computePedersenHash(a: BigNumberish, b: BigNumberish): string;
|
|
5780
|
-
declare function computePoseidonHash(a: BigNumberish, b: BigNumberish): string;
|
|
5781
5796
|
/**
|
|
5782
5797
|
* Compute Pedersen hash from data
|
|
5783
5798
|
*
|
|
@@ -5792,7 +5807,6 @@ declare function computePoseidonHash(a: BigNumberish, b: BigNumberish): string;
|
|
|
5792
5807
|
*/
|
|
5793
5808
|
declare function computeHashOnElements(data: BigNumberish[]): string;
|
|
5794
5809
|
declare const computePedersenHashOnElements: typeof computeHashOnElements;
|
|
5795
|
-
declare function computePoseidonHashOnElements(data: BigNumberish[]): string;
|
|
5796
5810
|
/**
|
|
5797
5811
|
* Calculate contract address from class hash
|
|
5798
5812
|
*
|
|
@@ -5808,17 +5822,6 @@ declare function computePoseidonHashOnElements(data: BigNumberish[]): string;
|
|
|
5808
5822
|
* ```
|
|
5809
5823
|
*/
|
|
5810
5824
|
declare function calculateContractAddressFromHash(salt: BigNumberish, classHash: BigNumberish, constructorCalldata: RawArgs, deployerAddress: BigNumberish): string;
|
|
5811
|
-
/**
|
|
5812
|
-
* Format json-string without spaces to conform starknet json-string
|
|
5813
|
-
* @param {string} json json-string without spaces
|
|
5814
|
-
* @returns {string} json-string with additional spaces after `:` and `,`
|
|
5815
|
-
* @example
|
|
5816
|
-
* ```typescript
|
|
5817
|
-
* const result = hash.formatSpaces("{'onchain':true,'isStarknet':true}");
|
|
5818
|
-
* // result = "{'onchain': true, 'isStarknet': true}"
|
|
5819
|
-
* ```
|
|
5820
|
-
*/
|
|
5821
|
-
declare function formatSpaces(json: string): string;
|
|
5822
5825
|
/**
|
|
5823
5826
|
* Compute hinted class hash for legacy compiled contract (Cairo 0)
|
|
5824
5827
|
* @param {LegacyCompiledContract} compiledContract
|
|
@@ -5842,6 +5845,13 @@ declare function computeHintedClassHash(compiledContract: LegacyCompiledContract
|
|
|
5842
5845
|
* ```
|
|
5843
5846
|
*/
|
|
5844
5847
|
declare function computeLegacyContractClassHash(contract: LegacyCompiledContract | string): string;
|
|
5848
|
+
|
|
5849
|
+
/**
|
|
5850
|
+
* Cairo 1 Class Hash computation using Poseidon hash
|
|
5851
|
+
*/
|
|
5852
|
+
|
|
5853
|
+
declare function computePoseidonHash(a: BigNumberish, b: BigNumberish): string;
|
|
5854
|
+
declare function computePoseidonHashOnElements(data: BigNumberish[]): string;
|
|
5845
5855
|
/**
|
|
5846
5856
|
* Compute hash of the bytecode for Sierra v1.5.0 onwards (Cairo 2.6.0)
|
|
5847
5857
|
* Each segment is Poseidon hashed.
|
|
@@ -5867,7 +5877,7 @@ declare function hashByteCodeSegments(casm: CompiledSierraCasm): bigint;
|
|
|
5867
5877
|
* // result = "0x4087905743b4fa2b3affc1fc71333f1390c8c5d1e8ea47d6ba70786de3fc01a"
|
|
5868
5878
|
```
|
|
5869
5879
|
*/
|
|
5870
|
-
declare function
|
|
5880
|
+
declare function computeCompiledClassHashPoseidon(casm: CompiledSierraCasm): string;
|
|
5871
5881
|
/**
|
|
5872
5882
|
* Compute sierra contract class hash (Cairo 1)
|
|
5873
5883
|
* @param {CompiledSierra} sierra Cairo 1 Sierra contract content
|
|
@@ -5880,6 +5890,83 @@ declare function computeCompiledClassHash(casm: CompiledSierraCasm): string;
|
|
|
5880
5890
|
```
|
|
5881
5891
|
*/
|
|
5882
5892
|
declare function computeSierraContractClassHash(sierra: CompiledSierra): string;
|
|
5893
|
+
|
|
5894
|
+
/**
|
|
5895
|
+
* Blake2s hash function for Starknet that produces a field element.
|
|
5896
|
+
* Matches the Blake2Felt252 implementation from Rust.
|
|
5897
|
+
*
|
|
5898
|
+
* The implementation:
|
|
5899
|
+
* 1. Encodes each Felt into u32 words (small: 2 words, large: 8 words)
|
|
5900
|
+
* 2. Serializes u32 words as little-endian bytes
|
|
5901
|
+
* 3. Computes Blake2s hash (32-byte output)
|
|
5902
|
+
* 4. Interprets hash as little-endian Felt
|
|
5903
|
+
*/
|
|
5904
|
+
declare function blake2sHashMany(data: bigint[]): bigint;
|
|
5905
|
+
/**
|
|
5906
|
+
* Compute hash of the bytecode using Blake2s for nested segments.
|
|
5907
|
+
* Each segment is Blake2s hashed according to the segment structure.
|
|
5908
|
+
* For non-leaf nodes: 1 + Blake2sHash(len0, h0, len1, h1, ...)
|
|
5909
|
+
* @param {CompiledSierraCasm} casm compiled Sierra CASM file content.
|
|
5910
|
+
* @returns {bigint} the bytecode hash as bigint.
|
|
5911
|
+
* @example
|
|
5912
|
+
* ```typescript
|
|
5913
|
+
* const compiledCasm = json.parse(fs.readFileSync("./contractC260.casm.json").toString("ascii"));
|
|
5914
|
+
* const result = hash.hashByteCodeSegmentsBlake(compiledCasm);
|
|
5915
|
+
* ```
|
|
5916
|
+
*/
|
|
5917
|
+
declare function hashByteCodeSegmentsBlake(casm: CompiledSierraCasm): bigint;
|
|
5918
|
+
/**
|
|
5919
|
+
* Compute compiled class hash for contract (Cairo 1) using Blake2s hashing (V2).
|
|
5920
|
+
* This implements the V2 hash version as specified in Starknet.
|
|
5921
|
+
* @param {CompiledSierraCasm} casm Cairo 1 compiled contract content
|
|
5922
|
+
* @returns {string} hex-string of compiled class hash
|
|
5923
|
+
* @example
|
|
5924
|
+
* ```typescript
|
|
5925
|
+
* const compiledCasm = json.parse(fs.readFileSync("./cairo260.casm.json").toString("ascii"));
|
|
5926
|
+
* const result = hash.computeCompiledClassHashBlake(compiledCasm);
|
|
5927
|
+
* ```
|
|
5928
|
+
*/
|
|
5929
|
+
declare function computeCompiledClassHashBlake(casm: CompiledSierraCasm): string;
|
|
5930
|
+
|
|
5931
|
+
/**
|
|
5932
|
+
* Shared utilities for class hash computation
|
|
5933
|
+
*/
|
|
5934
|
+
|
|
5935
|
+
/**
|
|
5936
|
+
* Compiled class version constant used in Cairo 1 compiled class hashing
|
|
5937
|
+
*/
|
|
5938
|
+
declare const COMPILED_CLASS_VERSION = "COMPILED_CLASS_V1";
|
|
5939
|
+
/**
|
|
5940
|
+
* Format json-string without spaces to conform starknet json-string
|
|
5941
|
+
* @param {string} json json-string without spaces
|
|
5942
|
+
* @returns {string} json-string with additional spaces after `:` and `,`
|
|
5943
|
+
* @example
|
|
5944
|
+
* ```typescript
|
|
5945
|
+
* const result = hash.formatSpaces("{'onchain':true,'isStarknet':true}");
|
|
5946
|
+
* // result = "{'onchain': true, 'isStarknet': true}"
|
|
5947
|
+
* ```
|
|
5948
|
+
*/
|
|
5949
|
+
declare function formatSpaces(json: string): string;
|
|
5950
|
+
/**
|
|
5951
|
+
* JSON replacer function that skips null values and empty arrays for specific keys
|
|
5952
|
+
* Used in legacy contract class serialization
|
|
5953
|
+
*/
|
|
5954
|
+
declare function nullSkipReplacer(key: string, value: any): any;
|
|
5955
|
+
/**
|
|
5956
|
+
* Convert builtins array to encoded BigInt array
|
|
5957
|
+
* Common pattern used in both Poseidon and Blake2s hashing
|
|
5958
|
+
*/
|
|
5959
|
+
declare function encodeBuiltins(builtins: Builtins): bigint[];
|
|
5960
|
+
/**
|
|
5961
|
+
* Extract entry point data for hashing
|
|
5962
|
+
* Returns flattened array of [selector, offset, ...builtins] for each entry point
|
|
5963
|
+
*/
|
|
5964
|
+
declare function flattenEntryPointData(data: ContractEntryPointFields[], encodedBuiltinsArray: bigint[][]): bigint[];
|
|
5965
|
+
|
|
5966
|
+
/**
|
|
5967
|
+
* Class Hash Exports
|
|
5968
|
+
*/
|
|
5969
|
+
|
|
5883
5970
|
/**
|
|
5884
5971
|
* Compute ClassHash (sierra or legacy) based on provided contract
|
|
5885
5972
|
* @param {CompiledContract | string} contract Cairo 1 contract content
|
|
@@ -5892,14 +5979,23 @@ declare function computeSierraContractClassHash(sierra: CompiledSierra): string;
|
|
|
5892
5979
|
```
|
|
5893
5980
|
*/
|
|
5894
5981
|
declare function computeContractClassHash(contract: CompiledContract | string): string;
|
|
5982
|
+
declare function computeCompiledClassHash(casm: CompiledSierraCasm,
|
|
5983
|
+
/**
|
|
5984
|
+
* Used to determine which hashing algorithm to use
|
|
5985
|
+
*/
|
|
5986
|
+
specVersion?: _SupportedRpcVersion): string;
|
|
5895
5987
|
|
|
5896
5988
|
/**
|
|
5897
5989
|
* Hashes Exports
|
|
5898
5990
|
*/
|
|
5899
5991
|
|
|
5992
|
+
declare const index$3_COMPILED_CLASS_VERSION: typeof COMPILED_CLASS_VERSION;
|
|
5993
|
+
declare const index$3_blake2sHashMany: typeof blake2sHashMany;
|
|
5900
5994
|
declare const index$3_calculateContractAddressFromHash: typeof calculateContractAddressFromHash;
|
|
5901
5995
|
declare const index$3_calculateL2MessageTxHash: typeof calculateL2MessageTxHash;
|
|
5902
5996
|
declare const index$3_computeCompiledClassHash: typeof computeCompiledClassHash;
|
|
5997
|
+
declare const index$3_computeCompiledClassHashBlake: typeof computeCompiledClassHashBlake;
|
|
5998
|
+
declare const index$3_computeCompiledClassHashPoseidon: typeof computeCompiledClassHashPoseidon;
|
|
5903
5999
|
declare const index$3_computeContractClassHash: typeof computeContractClassHash;
|
|
5904
6000
|
declare const index$3_computeHashOnElements: typeof computeHashOnElements;
|
|
5905
6001
|
declare const index$3_computeHintedClassHash: typeof computeHintedClassHash;
|
|
@@ -5909,18 +6005,22 @@ declare const index$3_computePedersenHashOnElements: typeof computePedersenHashO
|
|
|
5909
6005
|
declare const index$3_computePoseidonHash: typeof computePoseidonHash;
|
|
5910
6006
|
declare const index$3_computePoseidonHashOnElements: typeof computePoseidonHashOnElements;
|
|
5911
6007
|
declare const index$3_computeSierraContractClassHash: typeof computeSierraContractClassHash;
|
|
6008
|
+
declare const index$3_encodeBuiltins: typeof encodeBuiltins;
|
|
6009
|
+
declare const index$3_flattenEntryPointData: typeof flattenEntryPointData;
|
|
5912
6010
|
declare const index$3_formatSpaces: typeof formatSpaces;
|
|
5913
6011
|
declare const index$3_getL1MessageHash: typeof getL1MessageHash;
|
|
5914
6012
|
declare const index$3_getL2MessageHash: typeof getL2MessageHash;
|
|
5915
6013
|
declare const index$3_getSelector: typeof getSelector;
|
|
5916
6014
|
declare const index$3_getSelectorFromName: typeof getSelectorFromName;
|
|
5917
6015
|
declare const index$3_hashByteCodeSegments: typeof hashByteCodeSegments;
|
|
6016
|
+
declare const index$3_hashByteCodeSegmentsBlake: typeof hashByteCodeSegmentsBlake;
|
|
5918
6017
|
declare const index$3_keccakBn: typeof keccakBn;
|
|
6018
|
+
declare const index$3_nullSkipReplacer: typeof nullSkipReplacer;
|
|
5919
6019
|
declare const index$3_poseidon: typeof poseidon;
|
|
5920
6020
|
declare const index$3_solidityUint256PackedKeccak256: typeof solidityUint256PackedKeccak256;
|
|
5921
6021
|
declare const index$3_starknetKeccak: typeof starknetKeccak;
|
|
5922
6022
|
declare namespace index$3 {
|
|
5923
|
-
export { index$3_calculateContractAddressFromHash as calculateContractAddressFromHash, calculateDeclareTransactionHash$1 as calculateDeclareTransactionHash, calculateDeployAccountTransactionHash$1 as calculateDeployAccountTransactionHash, calculateInvokeTransactionHash$1 as calculateInvokeTransactionHash, index$3_calculateL2MessageTxHash as calculateL2MessageTxHash, index$3_computeCompiledClassHash as computeCompiledClassHash, index$3_computeContractClassHash as computeContractClassHash, index$3_computeHashOnElements as computeHashOnElements, index$3_computeHintedClassHash as computeHintedClassHash, index$3_computeLegacyContractClassHash as computeLegacyContractClassHash, index$3_computePedersenHash as computePedersenHash, index$3_computePedersenHashOnElements as computePedersenHashOnElements, index$3_computePoseidonHash as computePoseidonHash, index$3_computePoseidonHashOnElements as computePoseidonHashOnElements, index$3_computeSierraContractClassHash as computeSierraContractClassHash, index$3_formatSpaces as formatSpaces, index$3_getL1MessageHash as getL1MessageHash, index$3_getL2MessageHash as getL2MessageHash, index$3_getSelector as getSelector, index$3_getSelectorFromName as getSelectorFromName, index$3_hashByteCodeSegments as hashByteCodeSegments, index$3_keccakBn as keccakBn, index$3_poseidon as poseidon, index$3_solidityUint256PackedKeccak256 as solidityUint256PackedKeccak256, index$3_starknetKeccak as starknetKeccak };
|
|
6023
|
+
export { index$3_COMPILED_CLASS_VERSION as COMPILED_CLASS_VERSION, index$3_blake2sHashMany as blake2sHashMany, index$3_calculateContractAddressFromHash as calculateContractAddressFromHash, calculateDeclareTransactionHash$1 as calculateDeclareTransactionHash, calculateDeployAccountTransactionHash$1 as calculateDeployAccountTransactionHash, calculateInvokeTransactionHash$1 as calculateInvokeTransactionHash, index$3_calculateL2MessageTxHash as calculateL2MessageTxHash, index$3_computeCompiledClassHash as computeCompiledClassHash, index$3_computeCompiledClassHashBlake as computeCompiledClassHashBlake, index$3_computeCompiledClassHashPoseidon as computeCompiledClassHashPoseidon, index$3_computeContractClassHash as computeContractClassHash, index$3_computeHashOnElements as computeHashOnElements, index$3_computeHintedClassHash as computeHintedClassHash, index$3_computeLegacyContractClassHash as computeLegacyContractClassHash, index$3_computePedersenHash as computePedersenHash, index$3_computePedersenHashOnElements as computePedersenHashOnElements, index$3_computePoseidonHash as computePoseidonHash, index$3_computePoseidonHashOnElements as computePoseidonHashOnElements, index$3_computeSierraContractClassHash as computeSierraContractClassHash, index$3_encodeBuiltins as encodeBuiltins, index$3_flattenEntryPointData as flattenEntryPointData, index$3_formatSpaces as formatSpaces, index$3_getL1MessageHash as getL1MessageHash, index$3_getL2MessageHash as getL2MessageHash, index$3_getSelector as getSelector, index$3_getSelectorFromName as getSelectorFromName, index$3_hashByteCodeSegments as hashByteCodeSegments, index$3_hashByteCodeSegmentsBlake as hashByteCodeSegmentsBlake, index$3_keccakBn as keccakBn, index$3_nullSkipReplacer as nullSkipReplacer, index$3_poseidon as poseidon, index$3_solidityUint256PackedKeccak256 as solidityUint256PackedKeccak256, index$3_starknetKeccak as starknetKeccak };
|
|
5924
6024
|
}
|
|
5925
6025
|
|
|
5926
6026
|
/**
|
|
@@ -8009,6 +8109,32 @@ declare function toAnyPatchVersion(version: string): string;
|
|
|
8009
8109
|
* @returns {string}
|
|
8010
8110
|
*/
|
|
8011
8111
|
declare function toApiVersion(version: string): string;
|
|
8112
|
+
/**
|
|
8113
|
+
* Compare two semantic version strings segment by segment.
|
|
8114
|
+
* This function safely compares versions without collision risk between
|
|
8115
|
+
* versions like '0.0.1000' and '0.1.0'.
|
|
8116
|
+
*
|
|
8117
|
+
* @param {string} a First version string (e.g., '0.0.9')
|
|
8118
|
+
* @param {string} b Second version string (e.g., '0.0.10')
|
|
8119
|
+
* @returns {number} -1 if a < b, 0 if a === b, 1 if a > b
|
|
8120
|
+
* @example
|
|
8121
|
+
* ```typescript
|
|
8122
|
+
* const result1 = compareVersions('0.0.9', '0.0.10');
|
|
8123
|
+
* // result1 = -1 (0.0.9 < 0.0.10)
|
|
8124
|
+
*
|
|
8125
|
+
* const result2 = compareVersions('0.1.0', '0.0.1000');
|
|
8126
|
+
* // result2 = 1 (0.1.0 > 0.0.1000, correctly different!)
|
|
8127
|
+
*
|
|
8128
|
+
* const result3 = compareVersions('1.2.3', '1.2.3');
|
|
8129
|
+
* // result3 = 0 (equal versions)
|
|
8130
|
+
*
|
|
8131
|
+
* // Usage for version checks:
|
|
8132
|
+
* if (compareVersions(specVersion, '0.14.1') >= 0) {
|
|
8133
|
+
* // Use Blake2s hash for version >= 0.14.1
|
|
8134
|
+
* }
|
|
8135
|
+
* ```
|
|
8136
|
+
*/
|
|
8137
|
+
declare function compareVersions(a: string, b: string): number;
|
|
8012
8138
|
/**
|
|
8013
8139
|
* Guard Pending Block
|
|
8014
8140
|
* @param {GetBlockResponse} response answer of myProvider.getBlock()
|
|
@@ -9159,7 +9285,7 @@ declare function isSierra(contract: CairoContract | string): contract is SierraC
|
|
|
9159
9285
|
* // }
|
|
9160
9286
|
* ```
|
|
9161
9287
|
*/
|
|
9162
|
-
declare function extractContractHashes(payload: DeclareContractPayload): CompleteDeclareContractPayload;
|
|
9288
|
+
declare function extractContractHashes(payload: DeclareContractPayload, specVersion?: _SupportedRpcVersion): CompleteDeclareContractPayload;
|
|
9163
9289
|
/**
|
|
9164
9290
|
* Helper to redeclare response Cairo0 contract
|
|
9165
9291
|
*/
|
|
@@ -9404,4 +9530,4 @@ declare class Logger {
|
|
|
9404
9530
|
*/
|
|
9405
9531
|
declare const logger: Logger;
|
|
9406
9532
|
|
|
9407
|
-
export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, CairoByteArray, CairoBytes31, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFelt, CairoFelt252, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint128, CairoUint16, CairoUint256, CairoUint32, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type ReconnectOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SubscribeEventsParams, type SubscribeNewHeadsParams, type SubscribeNewTransactionReceiptsParams, type SubscribeNewTransactionsParams, type SubscribeTransactionStatusParams, Subscription, type SubscriptionBlockIdentifier, type SubscriptionNewHeadsEvent, type SubscriptionNewTransactionEvent, type SubscriptionNewTransactionReceiptsEvent, type SubscriptionOptions, type SubscriptionStarknetEventsEvent, type SubscriptionTransactionStatusEvent, type SuccessfulTransactionReceiptResponse, type SuccessfulTransactionReceiptResponseHelper, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, type fastExecuteResponse, fastParsingStrategy, type fastWaitForTransactionOptions, getAbiVersion, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isNoConstructorValid, isPendingBlock, isPendingStateUpdate, isPendingTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, toAnyPatchVersion, toApiVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet };
|
|
9533
|
+
export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, CairoByteArray, CairoBytes31, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFelt, CairoFelt252, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint128, CairoUint16, CairoUint256, CairoUint32, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type ReconnectOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SubscribeEventsParams, type SubscribeNewHeadsParams, type SubscribeNewTransactionReceiptsParams, type SubscribeNewTransactionsParams, type SubscribeTransactionStatusParams, Subscription, type SubscriptionBlockIdentifier, type SubscriptionNewHeadsEvent, type SubscriptionNewTransactionEvent, type SubscriptionNewTransactionReceiptsEvent, type SubscriptionOptions, type SubscriptionStarknetEventsEvent, type SubscriptionTransactionStatusEvent, type SuccessfulTransactionReceiptResponse, type SuccessfulTransactionReceiptResponseHelper, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, compareVersions, config, constants, contractClassResponseToLegacyCompiledContract, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, type fastExecuteResponse, fastParsingStrategy, type fastWaitForTransactionOptions, getAbiVersion, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isNoConstructorValid, isPendingBlock, isPendingStateUpdate, isPendingTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, toAnyPatchVersion, toApiVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet };
|