Problem
Membership token validation is scattered and untested. There is no utility to independently verify a token ID format or confirm ownership without parsing the full token contract state.
Proposed Solution
Create contracts/cntr/token_validator.rs implementing: pub fn is_valid_token_id(token_id: &str) -> bool (validates UUID v4 format using the regex ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$) and pub fn is_token_owner(token_id: &str, claimed_owner: &str, registry: &[(String, String)]) -> bool where the registry is a list of (token_id, owner_address) pairs. All implementation must live inside contracts/cntr/.
Acceptance Criteria
Problem
Membership token validation is scattered and untested. There is no utility to independently verify a token ID format or confirm ownership without parsing the full token contract state.
Proposed Solution
Create
contracts/cntr/token_validator.rsimplementing:pub fn is_valid_token_id(token_id: &str) -> bool(validates UUID v4 format using the regex^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$) andpub fn is_token_owner(token_id: &str, claimed_owner: &str, registry: &[(String, String)]) -> boolwhere the registry is a list of(token_id, owner_address)pairs. All implementation must live insidecontracts/cntr/.Acceptance Criteria
contracts/cntr/token_validator.rsis_valid_token_idvalidates UUID v4 format exactlyis_token_ownerreturnsfalsefor unregistered token IDsis_token_ownerreturnsfalsewhen owner does not matchis_valid_token_idand at least 4 foris_token_ownercargo test