Hi, I’m trying to mint an NFT using the Plug n Play Web SDK but can’t find any NFT minting reference in the docs. Anyone have a code snippet or repo link?
Thanks.
Hi, I’m trying to mint an NFT using the Plug n Play Web SDK but can’t find any NFT minting reference in the docs. Anyone have a code snippet or repo link?
Thanks.
Hi Nestor, thanks for your question!
Summary for Support Team:
Guidance for You:
Web3Auth Plug n Play SDKs (React, Vue, Vanilla JS) handle authentication and wallet management, but do not directly provide NFT minting utilities. However, once you’ve authenticated and obtained a provider (for Ethereum or Solana), you can use standard Web3 libraries (like ethers.js for Ethereum or @solana/web3.js for Solana) to interact with NFT contracts.
Here’s how you can proceed:
Authenticate the user and get the provider:
Use Web3Auth to log in and obtain the provider object.
Use a blockchain SDK to mint the NFT:
Example for Ethereum (with ethers.js):
import { ethers } from "ethers";
// After Web3Auth login
const provider = new ethers.BrowserProvider(web3auth.provider);
const signer = await provider.getSigner();
// Replace with your NFT contract's ABI and address
const contract = new ethers.Contract(CONTRACT_ADDRESS, CONTRACT_ABI, signer);
// Call the mint function (parameters depend on your contract)
const tx = await contract.mint(recipientAddress, tokenURI);
await tx.wait();
Example for Solana:
import { Connection, PublicKey, Transaction } from "@solana/web3.js";
// After Web3Auth login
const solanaProvider = web3auth.provider;
// Use solanaProvider with Solana SDK to sign and send mint transactions
Community Examples:
While there isn’t a direct NFT minting example in the Web3Auth docs, you can check out:
If you let us know whether you’re targeting Ethereum or Solana (and which framework: React, Vue, etc.), we can point you to more tailored code samples!
Let me know if you need a more detailed walkthrough for your specific blockchain or framework.
Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.
Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours
Hi,
I’m referring to this doc - NFT Minting | Documentation | Web3Auth
I’m trying to book with your business team but your calendly link is invalid.
Hi could you please share the error message. Thanks
Hey @nestora
We do have a page dedicated on NFT minting in our docs, but no docs as such dedicated to it’s implementation as it would require multiple back n forth steps between you and our team.
Please try out the NFT flow by clicking here on the demo:
Hi, the meeting link is working. I’ve requested a meeting with your BizDev team for tomorrow. Thank you.