TransactionHashBroadcastDeclareV3
Calculates the transaction hash for a Broadcast Declare V3 transaction using the Poseidon hash algorithm.
Function Signature
func TransactionHashBroadcastDeclareV3(
txn *rpc.BroadcastDeclareTxnV3,
chainID *felt.Felt,
) (*felt.Felt, error)Parameters
txn- The Broadcast Declare V3 transaction containing:Version- Transaction version stringSenderAddress- Address of the account declaring the classContractClass- The Sierra contract class being declaredCompiledClassHash- Hash of the compiled (CASM) classNonce- Account nonceResourceBounds- Resource bounds for L1 gas, L2 gas, and L1 data gasTip- Additional fee tipPayMasterData- Optional paymaster dataAccountDeploymentData- Optional account deployment dataFeeMode- Fee data availability modeNonceDataMode- Nonce data availability mode
chainID- The Starknet chain ID
Returns
*felt.Felt- The calculated transaction hasherror- Error if required parameters are missing
Description
This function calculates the transaction hash for Broadcast Declare V3 transactions. It's similar to TransactionHashDeclareV3 but works with BroadcastDeclareTxnV3 which includes the full contract class instead of just the class hash.
Used by: account.TransactionHashDeclare() method
Specification
Follows the V3 Declare hash calculation specification and SNIP-8.
Related Functions
- TransactionHashDeclareV3 - Standard V3 declare hash
- ClassHash - Calculate class hashes from contract class

