Skip to main content
Version: Next

Namespace: v3hash

Functions​

hashDAMode​

â–¸ hashDAMode(nonceDAMode, feeDAMode): bigint

Parameters​

NameType
nonceDAModeBigNumberish
feeDAModeBigNumberish

Returns​

bigint

Defined in​

src/utils/hash/transactionHash/v3.ts:23


encodeResourceBoundsL1​

â–¸ encodeResourceBoundsL1(bounds): bigint

Encode the L1&L2 gas limits of a V3 transaction

Parameters​

NameTypeDescription
boundsRESOURCE_BOUNDS_MAPPINGobject including the limits for L1 & L2 gas

Returns​

bigint

encoded data

Defined in​

src/utils/hash/transactionHash/v3.ts:32


encodeResourceBoundsL2​

â–¸ encodeResourceBoundsL2(bounds): bigint

Encode the L2 bound of a V3 transaction

Parameters​

NameTypeDescription
boundsRESOURCE_BOUNDS_MAPPING{l1_gas: {max_amount: u64, max_price_per_unit: u128}, l2_gas: {max_amount: u64, max_price_per_unit: u128}} }

Returns​

bigint

encoded data

Defined in​

src/utils/hash/transactionHash/v3.ts:48


hashFeeField​

â–¸ hashFeeField(tip, bounds): bigint

Parameters​

NameType
tipBigNumberish
boundsRESOURCE_BOUNDS_MAPPING

Returns​

bigint

Defined in​

src/utils/hash/transactionHash/v3.ts:56


calculateTransactionHashCommon​

â–¸ calculateTransactionHashCommon(txHashPrefix, version, senderAddress, chainId, nonce, tip, paymasterData, nonceDataAvailabilityMode, feeDataAvailabilityMode, resourceBounds, additionalData?): string

Parameters​

NameTypeDefault value
txHashPrefixTransactionHashPrefixundefined
versionBigNumberishundefined
senderAddressBigNumberishundefined
chainIdStarknetChainIdundefined
nonceBigNumberishundefined
tipBigNumberishundefined
paymasterDataBigNumberish[]undefined
nonceDataAvailabilityModeEDAModeundefined
feeDataAvailabilityModeEDAModeundefined
resourceBoundsRESOURCE_BOUNDS_MAPPINGundefined
additionalDataBigNumberish[][]

Returns​

string

Defined in​

src/utils/hash/transactionHash/v3.ts:62


calculateDeployAccountTransactionHash​

â–¸ calculateDeployAccountTransactionHash(contractAddress, classHash, compiledConstructorCalldata, salt, version, chainId, nonce, nonceDataAvailabilityMode, feeDataAvailabilityMode, resourceBounds, tip, paymasterData): string

Calculate v3 deploy_account transaction hash

Parameters​

NameType
contractAddressBigNumberish
classHashBigNumberish
compiledConstructorCalldataCalldata
saltBigNumberish
versionBigNumberish
chainIdStarknetChainId
nonceBigNumberish
nonceDataAvailabilityModeEDAMode
feeDataAvailabilityModeEDAMode
resourceBoundsRESOURCE_BOUNDS_MAPPING
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

src/utils/hash/transactionHash/v3.ts:95


calculateDeclareTransactionHash​

â–¸ calculateDeclareTransactionHash(classHash, compiledClassHash, senderAddress, version, chainId, nonce, accountDeploymentData, nonceDataAvailabilityMode, feeDataAvailabilityMode, resourceBounds, tip, paymasterData): string

Calculate v3 declare transaction hash

Parameters​

NameType
classHashstring
compiledClassHashstring
senderAddressBigNumberish
versionBigNumberish
chainIdStarknetChainId
nonceBigNumberish
accountDeploymentDataBigNumberish[]
nonceDataAvailabilityModeEDAMode
feeDataAvailabilityModeEDAMode
resourceBoundsRESOURCE_BOUNDS_MAPPING
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

src/utils/hash/transactionHash/v3.ts:128


calculateInvokeTransactionHash​

â–¸ calculateInvokeTransactionHash(senderAddress, version, compiledCalldata, chainId, nonce, accountDeploymentData, nonceDataAvailabilityMode, feeDataAvailabilityMode, resourceBounds, tip, paymasterData): string

Calculate v3 invoke transaction hash

Parameters​

NameType
senderAddressBigNumberish
versionBigNumberish
compiledCalldataCalldata
chainIdStarknetChainId
nonceBigNumberish
accountDeploymentDataBigNumberish[]
nonceDataAvailabilityModeEDAMode
feeDataAvailabilityModeEDAMode
resourceBoundsRESOURCE_BOUNDS_MAPPING
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

src/utils/hash/transactionHash/v3.ts:161