toJson method

  1. @override
Map<String, dynamic> toJson()

Implementation

@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(),
  };
}