Launch and mint your first NFT collection
Last updated
Last updated
Time: 15-30min
The Comet SDK lets you launch new Solana NFT collections, and lets anyone mint them using a credit card. Never worry about a wallet private key or clunky fiat onramp again.
You’ll need your Comet API key and Comet publishable key. For instructions, go to the link below:
In addition, if you want to launch a paid NFT collection, you need to set up Stripe x Comet to send payments to your bank account. To do this, go to withcomet.com/settings/payments and log in using the same phone number you used to create your API key.
To launch a new collection, you’ll need one thing - an image. Preferably 840x840, which will be part of the membership pass. Once you have that file on your computer, you’re ready to get started.
The examples in this doc will use cURL
to call the Comet REST API, but you can do this via Javascript, Python, or any other language you’d like!
To launch a collection using the Comet REST API, you’ll need the following information:
Your Comet API key (see First things first above)
The name and symbol you want for your NFT
The description of the membership pass
The price you want to sell your pass for (in USD)
The maximum supply of the token
The path to the image on your computer
Once you have those ingredients, you can call the REST API as follows:
You’ll get a result that looks like this:
Congrats! You’ve started to deploy your first NFT collection with Comet. You can use the id
to retrieve this collection from the API later on:
Once deployed
is equal to true
, you’re officially live on Solana mainnet! Usually deployment takes 30-60 seconds.
Comet provides a React component you can drop in to any project, which lets any user mint your NFT (including accepting credit card if the NFT requires it). To get started, create a new Create React App project (instructions are in the link). Once you’ve created it, just do the following:
First, install the Comet React SDK (v1 alpha) in your project:
In your index.js
, you will need to wrap your entire app in a CometProvider
. The CometProvider
component unlocks Comet's Web3 functionality for the rest of your app's components. You will need to provide your Comet publishable key here.
Then, in your App.js
, you can simply import the MintButton
component and drop it into the page. Here you will need the collectionId
from the collection you created earlier in the tutorial.
Run npm run start
and you’ll see a mint button. Now mint your NFT with a credit card without ever touching a crypto wallet!