Expand description
Input validation and sanitization for ColdStar.
Provides security-focused validation functions ported from the Python
security_validation.py module. Every validator returns Result<(), ValidationError>
(or a sanitized value) so callers get structured, actionable errors.
Enums§
- Platform
- Target operating system for platform-specific validations.
- Validation
Error - Structured validation errors with context.
- Validation
Warning - Optional warning returned alongside a successful validation.
Constants§
- LAMPORTS_
PER_ SOL - Lamports per SOL.
- MAX_
BALANCE_ SOL - Upper-bound balance in SOL (greater than total supply).
- MIN_
PASSWORD_ LENGTH - Minimum acceptable password length.
Functions§
- sanitize_
filename - Sanitize a filename to prevent path traversal and injection attacks.
- validate_
amount_ sol - Validate a transfer amount in SOL.
- validate_
balance_ value - Validate a balance value (in SOL, as
f64) is within[0, MAX_BALANCE_SOL]. - validate_
device_ path - Validate a device path for the given platform.
- validate_
mount_ point - Validate a mount-point path for the given platform.
- validate_
password_ strength - Validate that a password meets ColdStar’s minimum strength requirements.
- validate_
rpc_ url - Validate an RPC URL.
- validate_
solana_ address - Validate a base58-encoded Solana public-key address.