Namespace: v3hash
Functions​
hashDAMode​
â–¸ hashDAMode(nonceDAMode, feeDAMode): bigint
Parameters​
| Name | Type |
|---|---|
nonceDAMode | BigNumberish |
feeDAMode | BigNumberish |
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​
| Name | Type | Description |
|---|---|---|
bounds | RESOURCE_BOUNDS_MAPPING | object 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​
| Name | Type | Description |
|---|---|---|
bounds | RESOURCE_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​
| Name | Type |
|---|---|
tip | BigNumberish |
bounds | RESOURCE_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​
| Name | Type | Default value |
|---|---|---|
txHashPrefix | TransactionHashPrefix | undefined |
version | BigNumberish | undefined |
senderAddress | BigNumberish | undefined |
chainId | StarknetChainId | undefined |
nonce | BigNumberish | undefined |
tip | BigNumberish | undefined |
paymasterData | BigNumberish[] | undefined |
nonceDataAvailabilityMode | EDAMode | undefined |
feeDataAvailabilityMode | EDAMode | undefined |
resourceBounds | RESOURCE_BOUNDS_MAPPING | undefined |
additionalData | BigNumberish[] | [] |
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​
| Name | Type |
|---|---|
contractAddress | BigNumberish |
classHash | BigNumberish |
compiledConstructorCalldata | Calldata |
salt | BigNumberish |
version | BigNumberish |
chainId | StarknetChainId |
nonce | BigNumberish |
nonceDataAvailabilityMode | EDAMode |
feeDataAvailabilityMode | EDAMode |
resourceBounds | RESOURCE_BOUNDS_MAPPING |
tip | BigNumberish |
paymasterData | BigNumberish[] |
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​
| Name | Type |
|---|---|
classHash | string |
compiledClassHash | string |
senderAddress | BigNumberish |
version | BigNumberish |
chainId | StarknetChainId |
nonce | BigNumberish |
accountDeploymentData | BigNumberish[] |
nonceDataAvailabilityMode | EDAMode |
feeDataAvailabilityMode | EDAMode |
resourceBounds | RESOURCE_BOUNDS_MAPPING |
tip | BigNumberish |
paymasterData | BigNumberish[] |
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​
| Name | Type |
|---|---|
senderAddress | BigNumberish |
version | BigNumberish |
compiledCalldata | Calldata |
chainId | StarknetChainId |
nonce | BigNumberish |
accountDeploymentData | BigNumberish[] |
nonceDataAvailabilityMode | EDAMode |
feeDataAvailabilityMode | EDAMode |
resourceBounds | RESOURCE_BOUNDS_MAPPING |
tip | BigNumberish |
paymasterData | BigNumberish[] |
Returns​
string
format: hex-string