Namespace: v2hash
Functions​
computeHashOnElements​
â–¸ computeHashOnElements(data
): string
Compute pedersen hash from data
Parameters​
Name | Type |
---|---|
data | BigNumberish [] |
Returns​
string
format: hex-string - pedersen hash
Defined in​
src/utils/hash/transactionHash/v2.ts:16
calculateTransactionHashCommon​
â–¸ calculateTransactionHashCommon(txHashPrefix
, version
, contractAddress
, entryPointSelector
, calldata
, maxFee
, chainId
, additionalData?
): string
Calculate transaction pedersen hash for common properties
Following implementation is based on this python implementation #
Parameters​
Name | Type | Default value |
---|---|---|
txHashPrefix | TransactionHashPrefix | undefined |
version | BigNumberish | undefined |
contractAddress | BigNumberish | undefined |
entryPointSelector | BigNumberish | undefined |
calldata | RawCalldata | undefined |
maxFee | BigNumberish | undefined |
chainId | StarknetChainId | undefined |
additionalData | BigNumberish [] | [] |
Returns​
string
format: hex-string
Defined in​
src/utils/hash/transactionHash/v2.ts:28
calculateDeclareTransactionHash​
â–¸ calculateDeclareTransactionHash(classHash
, senderAddress
, version
, maxFee
, chainId
, nonce
, compiledClassHash?
): string
Calculate declare transaction hash
Parameters​
Name | Type | Description |
---|---|---|
classHash | string | hex-string |
senderAddress | BigNumberish | - |
version | BigNumberish | - |
maxFee | BigNumberish | - |
chainId | StarknetChainId | - |
nonce | BigNumberish | - |
compiledClassHash? | string | hex-string |
Returns​
string
format: hex-string
Defined in​
src/utils/hash/transactionHash/v2.ts:58
calculateDeployAccountTransactionHash​
â–¸ calculateDeployAccountTransactionHash(contractAddress
, classHash
, constructorCalldata
, salt
, version
, maxFee
, chainId
, nonce
): string
Calculate deploy_account transaction hash
Parameters​
Name | Type |
---|---|
contractAddress | BigNumberish |
classHash | BigNumberish |
constructorCalldata | RawCalldata |
salt | BigNumberish |
version | BigNumberish |
maxFee | BigNumberish |
chainId | StarknetChainId |
nonce | BigNumberish |
Returns​
string
format: hex-string
Defined in​
src/utils/hash/transactionHash/v2.ts:83
calculateTransactionHash​
â–¸ calculateTransactionHash(contractAddress
, version
, calldata
, maxFee
, chainId
, nonce
): string
Calculate invoke transaction hash
Parameters​
Name | Type |
---|---|
contractAddress | BigNumberish |
version | BigNumberish |
calldata | RawCalldata |
maxFee | BigNumberish |
chainId | StarknetChainId |
nonce | BigNumberish |
Returns​
string
format: hex-string