import { SolanaAgentKit } from "solana-agent-kit";
import { PublicKey } from "@solana/web3.js";
async function mintCollectionNFTs(agent: SolanaAgentKit) {
// Collection address
const collection = new PublicKey("collection-address");
// Mint to own wallet
const nft1 = await agent.mintNFT(
collection,
{
name: "My NFT #1",
uri: "https://arweave.net/nft1.json"
}
);
console.log("Minted NFT:", nft1.mint.toString());
// Mint to recipient
const recipient = new PublicKey("recipient-address");
const nft2 = await agent.mintNFT(
collection,
{
name: "Gift NFT #1",
uri: "https://arweave.net/nft2.json"
},
recipient
);
console.log("Minted gift NFT:", nft2.mint.toString());
}