Expand description
Content validation utilities for CHIE Protocol.
This module provides comprehensive validation functions for content, chunks, proofs, and other protocol elements.
Structs§
- Content
Limits - Content size limits.
Enums§
- Content
Validation Error - Content validation errors.
Functions§
- calculate_
expected_ chunks - Calculate expected number of chunks for content.
- sanitize_
cid - Sanitize content ID (CID) for safe filesystem usage.
- validate_
bandwidth - Validate bandwidth calculation is reasonable.
- validate_
chunk_ index - Validate chunk index is within bounds.
- validate_
content_ size - Validate content size against limits.
- validate_
proof_ structure - Validate bandwidth proof structure.
- validate_
request_ timestamp - Validate chunk request timestamp is within acceptable window.
- validate_
response_ signature - Validate chunk response has proper signature length.