Leap Near SDK
  • Leap Near SDK
    • Introduction
    • Installation
    • Social Login and Wallet Creation
      • Desktop
      • Mobile
    • Fetch Token Balances
    • Fetch NFTs
    • Mint NFTs
      • Desktop
      • Mobile
    • Examples
      • React
      • React Native
    • FAQ
      • Webpack 5 issue
Powered by GitBook
On this page
  • Prerequisite
  • Response
  1. Leap Near SDK
  2. Mint NFTs

Desktop

Prerequisite

Since we are using mintbase behind the scenes, you need to create a account on mintbase first and then follow these steps

  1. Once you connect your wallet, create a mintbase store

  2. You will get a store contractId which will be your nftContractId to mint NFT

  3. If you want to mint NFT using some other wallet address(different from one which you used to create the store), first add that as a minter to the store

const nftMetadata = {
    title: 'SampleNFT#1'
    description: 'sample NFT from Leap Near SDK',
    file: [Object] // uploaded file object,
    amount: 1 // amount of NFTs to be minted, max value - 99
}

await sdk.mintNFT(nftContractId, nftMetadata, accountId)

nftContractId is the NFT contract Id using which you want to mint the NFT

accountId is user's wallet address which will act as the owner and the minter of the NFT

Response

the method also returns the transaction JSON

const transaction = await sdk.mintNFT(nftContractId, nftMetadata, accountId)
PreviousMint NFTsNextMobile

Last updated 2 years ago