x402agent/SolanaOS / .agents/skills/metaplex
metaplex
VerifiedMetaplex development on Solana — NFTs, tokens, compressed NFTs, candy machines, token launches. Use when working with Token Metadata, Core, Bubblegum, Candy Machine, Genesis, or the mplx CLI.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.2 KB |
| references/cli-bubblegum.md | markdown | 4.8 KB |
| references/cli-candy-machine.md | markdown | 10.7 KB |
| references/cli-core.md | markdown | 4.1 KB |
| references/cli-genesis.md | markdown | 16.9 KB |
| references/cli-token-metadata.md | markdown | 2.5 KB |
| references/cli.md | markdown | 9.8 KB |
| references/concepts.md | markdown | 9.9 KB |
| references/metadata-json.md | markdown | 1.3 KB |
| references/sdk-bubblegum.md | markdown | 10.3 KB |
| references/sdk-core.md | markdown | 11.3 KB |
| references/sdk-genesis.md | markdown | 29.8 KB |
| references/sdk-token-metadata-kit.md | markdown | 7.7 KB |
| references/sdk-token-metadata.md | markdown | 12.6 KB |
| references/sdk-umi.md | markdown | 5.3 KB |
references/cli-bubblegum.md
View on GitHub# Bubblegum CLI Reference
Commands for creating and managing compressed NFTs (cNFTs) via the `mplx` CLI.
> **Prerequisites**: Run Initial Setup from `./cli.md` first (RPC, keypair, SOL balance).
>
> **Batch limit**: CLI is practical for up to ~100 cNFTs. For larger mints (thousands+), use the Umi SDK (`./sdk-bubblegum.md`) or Candy Machine instead.
---
## When to Use Bubblegum
| Use Bubblegum | Use Core Instead |
|---------------|------------------|
| Minting thousands+ of NFTs | Small collections (< 1000) |
| Lowest possible cost per NFT | Need on-chain plugins (royalties, freeze) |
| Airdrops, loyalty programs, tickets | Marketplace-focused projects |
| Proof of attendance, credentials | Simple 1/1 NFTs |
---
## Key Concepts
### Merkle Trees
Bubblegum stores NFTs as leaves in a concurrent Merkle tree. Only the **Merkle root** (a single hash) lives on-chain — the actual NFT data is stored in transactions and indexed by RPC providers via the **DAS API**.
Each tree has two on-chain accounts:
- **Merkle Tree Account** — stores the tree structure, change log, and canopy
- **TreeConfigV2 Account** — PDA tracking tree creator, delegate, capacity, and mint count
### Tree Sizing
| cNFTs | Tree Depth | Canopy Depth | Buffer Size | Tree Cost | Cost per cNFT |
|-------|-----------|-------------|-------------|-----------|---------------|
| 16,384 | 14 | 8 | 64 | ~0.34 SOL | ~0.00002 SOL |
| 65,536 | 16 | 10 | 64 | ~0.71 SOL | ~0.00001 SOL |
| 262,144 | 18 | 12 | 64 | ~2.10 SOL | ~0.00001 SOL |
| 1,048,576 | 20 | 13 | 1024 | ~8.50 SOL | ~0.000008 SOL |
| 16,777,216 | 24 | 15 | 2048 | ~26.12 SOL | ~0.000002 SOL |
| 1,073,741,824 | 30 | 17 | 2048 | ~72.65 SOL | ~0.00000005 SOL |
- **Tree Depth** — determines max capacity (2^depth leaves)
- **Max Buffer Size** — concurrency limit (parallel mints in same block)
- **Canopy Depth** — cached upper tree nodes; higher = smaller proofs, better composability, but higher rent
### Proofs and DAS API
Operations on existing cNFTs (transfer, burn, update) require a **Merkle proof** to verify the leaf. Proofs are fetched from RPC providers via the DAS API — not from on-chain data.
---
## Commands
```bash
# Tree management
mplx bg tree create --wizard # Interactive (recommended)
mplx bg tree create --maxDepth <N> --maxBufferSize <N> --canopyDepth <N> # Manual
mplx bg tree list # List trees created via --wizard only
# cNFT operations
mplx bg nft create --wizard # Interactive
mplx bg nft create <TREE> --name <NAME> --uri <URI> # With pre-uploaded metadata
mplx bg nft create <TREE> --name <NAME> --image <PATH> --description <DESC> # With local files
mplx bg nft create <TREE> --name <NAME> --uri <URI> --collection <ADDR> # In collection
mplx bg nft fetch <ASSETID>
mplx bg nft transfer <ASSETID> <NEWOWNER>
mplx bg nft burn <ASSETID>
mplx bg nft update <ASSETID> --name <NAME>
# Collection for cNFTs (uses MPL Core collections)
mplx bg collection create --name <NAME> --uri <URI>
mplx bg collection create --name <NAME> --uri <URI> --royalties <PERCENT>
```
---
## CLI Workflow
```bash
# 1. Create a tree (wizard guides through depth/buffer/canopy selection)
mplx bg tree create --wizard
# 2. (Optional) Create a collection for your cNFTs
mplx bg collection create --name "My Collection" --uri "https://arweave.net/xxx"
# 3. Mint cNFTs into the tree
mplx bg nft create <TREE_NAME_OR_ADDRESS> --name "My cNFT" --image ./image.png --description "A compressed NFT"
# 4. Transfer (requires DAS-compatible RPC, not available on localnet)
mplx bg nft transfer <ASSETID> <RECIPIENT_ADDRESS>
```
For batch minting, chain commands:
```bash
mplx bg nft create <TREE> --name "cNFT #1" --uri "<URI_1>" && \
mplx bg nft create <TREE> --name "cNFT #2" --uri "<URI_2>" && \
mplx bg nft create <TREE> --name "cNFT #3" --uri "<URI_3>"
```
---
## Localnet Limitations
Only tree creation (`mplx bg tree create`) and minting (`mplx bg nft create`) work on localhost/localnet. Operations that require DAS API -- fetch, transfer, burn, update -- do NOT work on localnet because the test validator does not support DAS.
---
## Program IDs
```
Bubblegum V1: BGUMAp9SX3uS4efGcFjPjkAQZ4cUNZhtHaMq64nrGf9D
Bubblegum V2: BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY
```
---
## Cost Comparison
| Standard | Cost per NFT | Accounts | Best For |
|----------|-------------|----------|----------|
| **Bubblegum** | ~$0.000005 | 0 (shared tree) | Massive scale |
| **Core** | ~0.0029 SOL | 1 | Small-medium collections |
| **Token Metadata** | ~0.022 SOL | 3-4 | Fungibles, legacy |
Bubblegum is ~98% cheaper than Token Metadata and ~90% cheaper than Core at scale. The trade-off is that cNFT operations require DAS API access for proof fetching.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |