The StarkNet Transaction Tool is a command-line utility designed to ensure the integrity and correctness of transactions on the StarkNet network. This tool performs two critical functions:
-
Signature Verification: It verifies the cryptographic signature of the transaction to ensure that it has been signed by the correct private key corresponding to the provided public key.
-
Transaction Structure Validation: It checks the structure of the transaction JSON file to ensure it conforms to the expected format and includes all required fields.
Invoke_V1
cargo run -p t9n -- --file-path t9n/examples/invoke/invoke_txn_v1.json --public-key 0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b --chain-id 0x534e5f5345504f4c4941
Invoke_V3
cargo run -p t9n -- --file-path t9n/examples/invoke/invoke_txn_v3.json --public-key 0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b --chain-id 0x534e5f5345504f4c4941
Declare_V2
cargo run -p t9n -- --file-path t9n/examples/declare/declare_txn_v2.json --public-key 0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b --chain-id 0x534e5f5345504f4c4941
Declare_V3
cargo run -p t9n -- --file-path t9n/examples/declare/declare_txn_v3.json --public-key 0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b --chain-id 0x534e5f5345504f4c4941
DeployAccount_V1
cargo run -p t9n -- --file-path t9n/examples/deploy_acc/deploy_acc_txn_v1.json --public-key 0x539751391da90f5789033ecf54ba0bdb4cbad7f92068418e22951e9973c05ea --chain-id 0x534e5f5345504f4c4941
DeployAccount_V3
cargo run -p t9n -- --file-path t9n/examples/deploy_acc/deploy_acc_txn_v3.json --public-key 0x6ac091f93bebf5d88f4905415d9878ad2c1892e8b4a72fa3c3a497df76f3bb0 --chain-id 0x534e5f5345504f4c4941
Environment variables are also working
[env]
FILE_PATH = "t9n/examples/invoke/invoke_txn_v1.json"
PUBLIC_KEY = "0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b"
CHAIN_ID = "0x534e5f5345504f4c4941"
Now simply run:
cargo run -p t9n
For any questions or feedback, please open an issue on the GitHub repository.