toProto method

PBLink toProto()

Converts the link to its protobuf representation.

Implementation

dag_proto.PBLink toProto() {
  return dag_proto.PBLink()
    ..name = name
    ..hash = cid
        .toBytes() // Assuming CID has toBytes()
    ..size = size;
}