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:29


encodeResourceBoundsL1​

â–¸ encodeResourceBoundsL1(bounds): bigint

Encode the L1&L2 gas limits of a V3 transaction

Parameters​

NameTypeDescription
boundsResourceBoundsobject including the limits for L1 & L2 gas

Returns​

bigint

encoded data

Defined in​

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


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:54


encodeDataResourceBoundsL1​

â–¸ encodeDataResourceBoundsL1(bounds): bigint

Parameters​

NameType
boundsRESOURCE_BOUNDS_MAPPING

Returns​

bigint

Defined in​

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


hashFeeField​

â–¸ hashFeeField(tip, bounds): bigint

hash tip and resource bounds (2 bound parameters) V3 RPC 0.7

Parameters​

NameType
tipBigNumberish
boundsRESOURCE_BOUNDS_MAPPING

Returns​

bigint

Defined in​

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


hashFeeFieldV3B3​

â–¸ hashFeeFieldV3B3(tip, bounds): bigint

hash tip and resource bounds (3 bounds params) V3 RPC 0.8

Parameters​

NameType
tipBigNumberish
boundsRESOURCE_BOUNDS_MAPPING

Returns​

bigint

Defined in​

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


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
resourceBoundsResourceBoundsundefined
additionalDataBigNumberish[][]

Returns​

string

Defined in​

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


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
resourceBoundsResourceBounds
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

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


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
resourceBoundsResourceBounds
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

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


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
resourceBoundsResourceBounds
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

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