Guides

How to Mint an NFT on DropChain

Minting an NFT on DropChain is a simple process. First, create asset metadata using the provided API. Then, mint the NFT using the appropriate endpoint. Integration with the DropChain SDK is optional.

Carter Razink

May 10, 2023

Minting an NFT on DropChain is a straightforward process, thanks to the user-friendly API provided by the platform. In this article, we will walk you through the steps to mint an NFT using DropChain.

1. Create Asset Metadata

First, you need to create the metadata for your NFT. This metadata includes information such as the name, description, image URL, and other traits of your NFT. To create the metadata, use the create_asset_metadata endpoint source (https://dropchain.gitbook.io/dropchain-api-beta/reference/endpoints).

POST https://dropchain1.p.rapidapi.com/dropchain/v1/create_asset_metadata

Pass the required parameters in the request body, such as app_id, user1_uid, asset_metadata_description, asset_metadata_external_url, asset_metadata_image_url, and asset_metadata_name. You can also include optional trait types and values if your NFT has specific traits source (https://dropchain.gitbook.io/dropchain-api-beta/reference/endpoints).

2. Mint the NFT

After creating the metadata, you can mint the NFT using the asset_mint_testnet or asset_mint_dropnet endpoints, depending on whether you want to mint on the testnet or the DropChain network source (https://dropchain.gitbook.io/dropchain-api-beta/reference/endpoints).

POST https://dropchain1.p.rapidapi.com/dropchain/v1/asset_mint_testnet or POST https://dropchain1.p.rapidapi.com/dropchain/v1/asset_mint_dropnet

Pass the required parameters in the request body, such as app_id, user1_uid, created_asset_name, created_asset_unit_name, created_asset_amount_int, and created_asset_decimals. If you want to include the metadata created in step 1, pass the IPFS hash returned by the create_asset_metadata endpoint in the created_asset_url field source (https://dropchain.gitbook.io/dropchain-api-beta/reference/endpoints). For example, if you want to create an NFT with no decimals (indivisible), set created_asset_decimals to 0. If you pass the value for created_asset_amount_int as 1, there will be 1 indivisible NFT created source (https://dropchain.gitbook.io/dropchain-api-beta/reference/passed-parameters). ## 3. Integrate with DropChain SDK (Optional) If you prefer to use the DropChain SDK, you can mint NFTs using just a few lines of code in Python. The DropChain SDK currently supports Python, with JavaScript support coming soon source (https://dropchain.gitbook.io/dropchain-api-beta/dropchain-overview/dropchain-sdk).

from dropchain_sdk import DropChainSDK

dropchain_sdk = DropChainSDK("<Your RapidAPI Key>", "<Your App ID>")

response = dropchain_sdk.asset_mint_testnet(created_asset_amount_int, created_asset_decimals, created_asset_name, created_asset_unit_name, created_asset_url, session1_token, user1_uid)

By following these steps, you can easily mint an NFT on DropChain and start building your web3 applications.

Ready to start building?

Start building in web3 to enhance your app with all the web3 functionality you'll ever need.

Get Started for Free

Don't build Alone

Join a community of builders creating the future of web3.

What do you want to know??
Submit a question or topic you want us to answer
Thanks for joining us!

Join the rest of the community in the Discord Server. See ya there!
Oops! Something went wrong while submitting the form.
Developer Stories
Join us as we create a global community of builders
Thanks for joining us!

Join the rest of the community in the Discord Server. See ya there!
Oops! Something went wrong while submitting the form.
Join the Discord
Get Access
DropChain is just better
See how DropChain stacks up against the competition
Compare
Can't Code? No Worries
Learn how to build a fully functional web3 app using no-code tools
Get the Guide