Mint a single unique NFT with metadata.
import { Contract } from "./mod.ts";
import {
Blockfrost,
Lucid,
} from "https://deno.land/x/[email protected]/mod.ts";
const lucid = await Lucid.new(
new Blockfrost(
"https://cardano-preprod.blockfrost.io/api/v0",
"<project_id>",
),
"Preprod",
);
lucid.selectWalletFromSeed(
"<seed_phrase>",
);
const { instanceId } = await new Contract(lucid)
.deploy({
name: "MyNFT",
image: "ipfs://<hash>",
});
// ... wait for confirmation
const contract = new Contract(
lucid,
instanceId,
);
console.log(await contract.getMetadata());
// Burn the NFT
await contract.burn();
deploy(metadata: Metadata): Promise<{ txHash: string; instanceId: string; }>
getMetadata(): Promise<Metadata>
burn(): Promise<string>