CarHeader class

Immutable CAR file header.

Contains the CAR format version (1 or 2) and the list of root CIDs. The header is encoded as a DAG-CBOR map with the canonical key ordering { "roots": [...], "version": 1 }.

Constructors

CarHeader({required int version, required List<CID> roots})
Creates a CarHeader with the given version and roots.

Properties

hashCode int
The hash code for this object.
no setteroverride
roots List<CID>
The root CIDs of the archive.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int
The CAR format version (1 or 2).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override