burn method

Future<INftActionResponse> burn(
  1. String tokenId
)

Burns a nft. @warn Can only burn NFTs if the collection is revokable. @param tokenId Token ID of the NFT we want to burn. @returns Status.

Implementation

Future<INftActionResponse> burn(String tokenId) async {
  if (isRevokable != null && !isRevokable!) {
    throw Exception('Collection is not revokable.');
  }
  final data = await ApillonApi.post<INftActionResponse>(
    '$apiPrefix/burn',
    {'tokenId': tokenId},
  );

  ApillonLogger.log('NFT $tokenId burned successfully');
  return data;
}