Metaplex Bubblegum example codes.
STEP1: Create Merkle Tree STEP2: Create Collection Standard NFT (Standard NFT = Non-compressed) STEP3: Mint Compressed NFT to Collection
Use Parse Leaf function in @metaplex-foundation/mpl-bubblegum.
- without Collection: parseLeafFromMintV1Transaction
- with Collection: parseLeafFromMintToCollectionV1Transaction
Look at src folder.
- Merkle Tree x Leaf Index => Asset ID(cNFT)
- Merkle Tree x cNFT Mint Signatuer => Asset ID(cNFT)
It's similar Mint Address.
It's same as Mint Owner.
I recommend mint with Collection. Because it's standard(e.g. Marketplace).
% cp .env.example .env
Then, write your Helius or Shyft API in .env.
% npm i
% ts-node src/<TS_FILE>
Explorers | Devnet | Mainnet |
---|---|---|
XRAY | ✅ | ✅ |
SolanaFM | N/A | ✅ |
Solscan | N/A | N/A |
Shyft Translator | N/A | N/A |
Solana Explorer | N/A | N/A |
as of Jan.7.2024