publish method

Future<Ipns> publish(
  1. String cid
)

Publish an IPNS record to IPFS and link it to a CID. @param {string} cid - CID to which this ipns name will point. @returns IPNS record with updated data after publish

Implementation

Future<Ipns> publish(String cid) async {
  final data = await ApillonApi.post<Ipns>(
      '$apiPrefix/publish',
      {
        'cid': cid,
      },
      mapper: Ipns.fromMap);
  ApillonLogger.log('IPNS record published successfully');
  return data;
}