This library implements Starknet transactions using the Cairo language, has same API with Starknet.js. It is particularly useful when testing generating specific tx hashes in Cairo.
In Scarb.toml
[dependencies]
cairo_transaction = { git = "https://github.com/script-money/cairo_transaction.git" }
In cairo
use cairo_transaction::transaction::get_execute_call_data;
use cairo_transaction::hash::{
compute_hash_on_elements, calculate_declare_transaction_hash, calculate_deploy_transaction_hash,
calculate_transaction_hash
};