Expand description
Chunk message types for the ANT protocol.
Chunks are immutable, content-addressed data blocks where the address is the BLAKE3 hash of the content. Maximum size is 4MB.
This module defines the wire protocol messages for chunk operations using postcard serialization for compact, fast encoding.
Structs§
- Chunk
GetRequest - Request to retrieve a chunk.
- Chunk
Message - Wire-format wrapper that pairs a sender-assigned
request_idwith aChunkMessageBody. - Chunk
PutRequest - Request to store a chunk.
- Chunk
Quote Request - Request a storage quote for a chunk.
- Merkle
Candidate Quote Request - Request a merkle candidate quote for batch payments.
Enums§
- Chunk
GetResponse - Response to a GET request.
- Chunk
Message Body - Enum of all chunk protocol message types.
- Chunk
PutResponse - Response to a PUT request.
- Chunk
Quote Response - Response with a storage quote.
- Merkle
Candidate Quote Response - Response with a merkle candidate quote.
- Protocol
Error - Errors that can occur during protocol operations.
Constants§
- CHUNK_
PROTOCOL_ ID - Protocol identifier for chunk operations.
- DATA_
TYPE_ CHUNK - Data type identifier for chunks.
- MAX_
CHUNK_ SIZE - Maximum chunk size in bytes (4MB).
- MAX_
WIRE_ MESSAGE_ SIZE - Maximum wire message size in bytes (5MB).
- PROOF_
TAG_ MERKLE - Version byte prefix for merkle payment proofs.
- PROOF_
TAG_ SINGLE_ NODE - Version byte prefix for payment proof serialization. Allows the verifier to detect proof type before deserialization.
- PROTOCOL_
VERSION - Current protocol version.
Type Aliases§
- XorName
- Content-addressed identifier (32 bytes).