@override Map<String, dynamic> toJson() { // Prioritize CID string representation for JSON. // toCIDString will throw if the PeerId is invalid, which is good. return { 'cid': toCIDString(), }; }