nestMint method

Future<INftActionResponse> nestMint(
  1. String parentCollectionUuid,
  2. int parentNftId,
  3. int quantity
)

Mints new nfts directly to an existing nft. @warn This method is only available for nestable collections. @param parentCollectionUuid UUID of the collection we want to nest mint to. @param parentNftId ID of the nft in the collection we want to nest mint to. @param quantity Amount of nfts we want to mint. @returns Call status.

Implementation

Future<INftActionResponse> nestMint(
    String parentCollectionUuid, int parentNftId, int quantity) async {
  if (collectionType != CollectionType.nestable) {
    throw Exception('Collection is not nestable.');
  }
  final data = await ApillonApi.post<INftActionResponse>(
    '$apiPrefix/nest-mint',
    {
      'parentCollectionUuid': parentCollectionUuid,
      'parentNftId': parentNftId,
      'quantity': quantity,
    },
  );

  ApillonLogger.log('NFT nest minted successfully on NFT $parentNftId');
  return data;
}