pub fn generate_claim_key(
participant_id: [u8; 32],
epoch: u64,
participant_type: u8,
claim_type: u8,
) -> [u8; 32]
Expand description
Generate a unique claim key for tracking claims.
The claim key is a hash of participant ID, epoch, participant type, and claim type. This ensures each claim is uniquely identifiable and prevents double-spending.
§Parameters
participant_id
: 32-byte participant ID (wallet hash)epoch
: Epoch numberparticipant_type
: 0 = customer, 1 = merchantclaim_type
: 1 = payment only, 3 = payment + social
§Returns
- 32-byte claim key hash
§Security
- Unique: Each (participant, epoch, type) combination has unique key
- Collision Resistant: Uses SHA-256 for cryptographic security
- Deterministic: Same inputs always produce same key