Skip to content

blackpandan/Ticket-Validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎟️ TICKET VALIDATOR CLI (RUST)


This cli tool allows creation and validation of ticket for events.

A Rust command-line application for creating, validating, and burning event tickets.
This project reflects my current stage in learning Rust and is the first step in my journey toward blockchain development.

The setup is done using cargo, you can also use the exe from the release , you'll need to install rust if it's not available


Features

  • Create tickets with unique UUIDs
  • generation of SigningKey deterministically
  • Sign and verify tickets using master_seed(32 bytes) -> Hdkf -> seed(32 bytes) -> ed25519-dalek -> key/pair
  • Validate tickets once and burn them after scanning
  • Store tickets with pickledb
  • Simple CLI commands: create, scan, help

Tech Stack


Sample Commands Usage

Ensure to create a .env file with key MASTER_SEED containing your 32 byte seed Example

MASTER_KEY="[125,213,213,143,89,111]"
# Create a new ticket
cargo run -- create "<Event_Name>" <Price>

#Scan a ticket/ Use a ticket
cargo run -- scan <ticket_uuid>

Example Usage

# Create a new ticket
cargo run -- create "Test Event" 500.00

# Scan a ticket
cargo run -- scan 886e447c-1adf-4d9e-84e5-92348344f759


Why This Project Matters

  • Builds a foundation in Rust with traits, error handling, and modular design
  • Applies cryptography concepts in a practical way
  • Sets the stage for blockchain integration
  • Shows my ability to learn quickly and apply concepts to working code

Usage with cargo

cargo run -- {COMMAND}

Usage with exe

ticket_validator.exe {COMMAND}

Commmands

  • create <event_name> <price> -> Creates a new ticket
  • scan <ticket_uuid> Scans a ticket and burns it up if unsed
  • help <command_name:optional> Print this message or the help of the given subcommand(s)

Options

  • -h, --help Print help
  • -V, --version Print version

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages