user4168: I wish to write a script that will automatically mint NFTs given payment to an address.
Firstly, I haven't found anyone that has shown how to do this, but if anyone has, or is willing to share, please let me know.
I notice the tutorial here suggests using cardano-cli, however, this requires cardano-node to be running which seems very brittle to me, because if you have issues keeping up with the current state of the blockchain, then you'll miss out on payments.
https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-cli/
Would using cardano-wallet be a better or safer option to listen for transactions?
What would be the steps to automatically minting NFTs based on payment?
And would anyone have any recommendations on how you'd host the script once you've written it? Would you have cardano-node constantly running in a virtual machine (e.g. EC2 instance).

user4384: Look into dbsync as that is how you can actually look at transactions and not just the txhashes.
Basic setup would be dbsync server (postgres) + cnode (cli || wallet):
dbsync

query slot every couple seconds to see if new block (new block means new potential transactions)
if new block, then grab any new transactions that meet your criteria (verify the amount of ada and grab the addr)

cli / wallet

Send to minting script and mint and send in same tx :)

side notes

either mint 1 at a time, or do about 30 at a time in one tx.
If you need to do more then 30 you will need multiple addresses. To make this work the address you are sending too is different from the addresses you will be minting from. Assuming thousands of requests per block, you could mint 1200 NFTs, with 40 addresses, just need to keep track of them all


user2868: setting up the cardano node is very simple, and once set-up, as long as your resource is available, the node stays up-to-date with the blockchain. The CoinCashew tutorial (https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#14-configure-your-topology-files) is great for this & there are a number of YouTube videos that explain what do to do too (although tip from my experience, avoid DigitalOcean as a provider for VMs).
I then used this tutorial (https://developers.cardano.org/docs/native-tokens/minting/), to mint NFTs using the cardano-cli & it worked great. I would imagine that based on this, it shouldn't be too complicated to derive a script to do it automatically.
Unfortunately, I cannot help you on your "minting on payment" answer as I am also just beginning to look into this. Also, I'm sure the new smart contracts would have that functionality?

user1045: Code for minting Spacebudz is actually open-source, so you could probably use that with a bit of tweaking.
As far as I know this code should basically mint tokens in order for every new transaction back to the transaction sender.
Here's the link to source repo: https://github.com/Berry-Pool/nft-server

4168: <p>I wish to write a script that will automatically mint NFTs given payment to an address.
Firstly, I haven't found anyone that has shown how to do this, but if anyone has, or is willing to share, please let me know.</p>
<p>I notice the tutorial here suggests using cardano-cli, however, this requires cardano-node to be running which seems very brittle to me, because if you have issues keeping up with the current state of the blockchain, then you'll miss out on payments.
<a href="https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-cli/" rel="noreferrer">https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-cli/</a></p>
<p>Would using cardano-wallet be a better or safer option to listen for transactions?</p>
<p>What would be the steps to automatically minting NFTs based on payment?
And would anyone have any recommendations on how you'd host the script once you've written it? Would you have cardano-node constantly running in a virtual machine (e.g. EC2 instance).</p>
 4384: <p>Look into dbsync as that is how you can actually look at transactions and not just the txhashes.</p>
<p>Basic setup would be dbsync server (postgres) + cnode (cli || wallet):</p>
<p><em><strong>dbsync</strong></em></p>
<ol>
<li>query slot every couple seconds to see if new block (new block means new potential transactions)</li>
<li>if new block, then grab any new transactions that meet your criteria (verify the amount of ada and grab the addr)</li>
</ol>
<p><em><strong>cli / wallet</strong></em></p>
<ol start="3">
<li>Send to minting script and mint and send in same tx :)</li>
</ol>
<p><em>side notes</em></p>
<ul>
<li>either mint 1 at a time, or do about 30 at a time in one tx.</li>
<li>If you need to do more then 30 you will need multiple addresses. To make this work the address you are sending too is different from the addresses you will be minting from. Assuming thousands of requests per block, you could mint 1200 NFTs, with 40 addresses, just need to keep track of them all</li>
</ul>
 2868: <p>setting up the cardano node is very simple, and once set-up, as long as your resource is available, the node stays up-to-date with the blockchain. The CoinCashew tutorial (<a href="https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#14-configure-your-topology-files" rel="nofollow noreferrer">https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#14-configure-your-topology-files</a>) is great for this &amp; there are a number of YouTube videos that explain what do to do too (although tip from my experience, avoid DigitalOcean as a provider for VMs).</p>
<p>I then used this tutorial (<a href="https://developers.cardano.org/docs/native-tokens/minting/" rel="nofollow noreferrer">https://developers.cardano.org/docs/native-tokens/minting/</a>), to mint NFTs using the cardano-cli &amp; it worked great. I would imagine that based on this, it shouldn't be too complicated to derive a script to do it automatically.</p>
<p>Unfortunately, I cannot help you on your &quot;minting on payment&quot; answer as I am also just beginning to look into this. Also, I'm sure the new smart contracts would have that functionality?</p>
 1045: <p>Code for minting Spacebudz is actually open-source, so you could probably use that with a bit of tweaking.</p>
<p>As far as I know this code should basically mint tokens in order for every new transaction back to the transaction sender.</p>
<p>Here's the link to source repo: <a href="https://github.com/Berry-Pool/nft-server" rel="nofollow noreferrer">https://github.com/Berry-Pool/nft-server</a></p>
