mint method

@param {IMintNftData} params - NFT mint parameters @returns {INftActionResponse} - success status and transaction hash of the mint

Implementation

Future<INftActionResponse> mint(IMintNftData params) async {
  if (params.idsToMint?.isNotEmpty ?? false) {
    params.quantity = params.idsToMint?.length;
  }

  final data = await ApillonApi.post<INftActionResponse>(
      '$apiPrefix/mint', params.toJson(),
      mapper: INftActionResponse.fromJson);

  ApillonLogger.log(
    '${params.quantity} NFTs minted successfully to ${params.receivingAddress}',
  );

  return data;
}