Skip to main content
Version: 8.6.0

Namespace: v3hash

Functions​

hashDAMode​

▸ hashDAMode(nonceDAMode, feeDAMode): bigint

Parameters​

NameType
nonceDAModeBigNumberish
feeDAModeBigNumberish

Returns​

bigint

Defined in​

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


encodeResourceBoundsL1​

▸ encodeResourceBoundsL1(bounds): bigint

Encode the L1&L2 gas limits of a V3 transaction

Parameters​

NameTypeDescription
boundsResourceBoundsBNobject including the limits for L1 & L2 gas

Returns​

bigint

encoded data

Defined in​

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


encodeResourceBoundsL2​

▸ encodeResourceBoundsL2(bounds): bigint

Encode the L2 bound of a V3 transaction

Parameters​

NameTypeDescription
boundsResourceBoundsBN{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:49


encodeDataResourceBoundsL1​

▸ encodeDataResourceBoundsL1(bounds): bigint

Parameters​

NameType
boundsResourceBoundsBN

Returns​

bigint

Defined in​

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


hashFeeFieldV3B3​

▸ hashFeeFieldV3B3(tip, bounds): bigint

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

Parameters​

NameType
tipBigNumberish
boundsResourceBoundsBN

Returns​

bigint

Defined in​

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


calculateTransactionHashCommon​

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

Parameters​

NameTypeDefault value
txHashPrefix"0x6465636c617265" | "0x6465706c6f79" | "0x6465706c6f795f6163636f756e74" | "0x696e766f6b65" | "0x6c315f68616e646c6572"undefined
versionBigNumberishundefined
senderAddressBigNumberishundefined
chainId"0x534e5f4d41494e" | "0x534e5f5345504f4c4941"undefined
nonceBigNumberishundefined
tipBigNumberishundefined
paymasterDataBigNumberish[]undefined
nonceDataAvailabilityModeEDAModeundefined
feeDataAvailabilityModeEDAModeundefined
resourceBoundsResourceBoundsBNundefined
additionalDataBigNumberish[][]

Returns​

string

Defined in​

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


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
chainId"0x534e5f4d41494e" | "0x534e5f5345504f4c4941"
nonceBigNumberish
nonceDataAvailabilityModeEDAMode
feeDataAvailabilityModeEDAMode
resourceBoundsResourceBoundsBN
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

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


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
chainId"0x534e5f4d41494e" | "0x534e5f5345504f4c4941"
nonceBigNumberish
accountDeploymentDataBigNumberish[]
nonceDataAvailabilityModeEDAMode
feeDataAvailabilityModeEDAMode
resourceBoundsResourceBoundsBN
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

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


calculateInvokeTransactionHash​

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

Calculate v3 invoke transaction hash

Parameters​

NameType
senderAddressBigNumberish
versionBigNumberish
compiledCalldataCalldata
chainId"0x534e5f4d41494e" | "0x534e5f5345504f4c4941"
nonceBigNumberish
accountDeploymentDataBigNumberish[]
nonceDataAvailabilityModeEDAMode
feeDataAvailabilityModeEDAMode
resourceBoundsResourceBoundsBN
tipBigNumberish
paymasterDataBigNumberish[]

Returns​

string

format: hex-string

Defined in​

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