I want to combine NFT minting and (fund new account with min balance , opt-in nft and transfer nft ) into a single group id (atomic transfer) to ensure that minted nft is directly transfer on creation and i don’t want to run different method/transaction separately for fund new account with min balance, opt-in and nft transfer. But the issue arises since i will get asset id after nft minted and then i can process for asset opt-in Is it possible to achieve using atomic transfer?
If the NFT is an ASA that has been already created (and thus you know its asset ID) and you just need to transfer it, then you can do an atomic transfer / group of transactions with 3 transactions:
- funding the account
- opt-in to the asset/NFT (you will need the account to sign this transaction which you can do using usual methods such as WalletConnect/AlgoSigner/MyAlgoConnect)
- transfer of the asset to the account
See also Can i get ASA-ID if i am creating asa creation transaction in grouped transaction - #3 by fabrice
However, if the asset ID is not yet created, this is not possible without rekeying which I don’t recommend for this use case.
See Is asset creation and transfer in a single transaction group possible? - #2 by barnji