Bubblegum (Compressed NFTs)

Fetch Compressed NFT

The mplx bg nft fetch command retrieves the asset data and merkle proof for a compressed NFT using the DAS (Digital Asset Standard) API.

Basic Usage

mplx bg nft fetch <assetId>

Download to Files

mplx bg nft fetch <assetId> --download --output ./nfts

Fetch Proof Only

mplx bg nft fetch <assetId> --proof-only

Arguments

ArgumentDescription
ASSET_IDThe compressed NFT asset ID (leaf asset ID)

Options

OptionDescription
--downloadDownload asset data and proof to files
--output <value>Directory path for downloaded files (requires --download)
--proof-onlyOnly fetch and display the merkle proof

Global Flags

FlagDescription
-c, --config <value>Path to config file. Default is ~/.config/mplx/config.json
-r, --rpc <value>RPC URL for the cluster
--jsonFormat output as JSON

Examples

  1. Fetch and display NFT information:
mplx bg nft fetch CNFTAssetIdHere
  1. Download asset data to files:
mplx bg nft fetch CNFTAssetIdHere --download
  1. Download to specific directory:
mplx bg nft fetch CNFTAssetIdHere --download --output ./nft-data
  1. Fetch only the merkle proof:
mplx bg nft fetch CNFTAssetIdHere --proof-only
  1. Output as JSON:
mplx bg nft fetch CNFTAssetIdHere --json

Output

--------------------------------
Compressed NFT Details
Asset ID: CNFTAssetIdHere
Name: My Compressed NFT
Symbol: CNFT
Description: A beautiful compressed NFT
Compressed: true
Tree: 9hRvTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Leaf ID: 42
Owner: OwnerWalletAddressHere
Collection: CollectionAddressHere
Metadata URI: https://arweave.net/xxx
Image: https://arweave.net/yyy
Mutable: true
Burnt: false
Merkle Proof:
Root: RootHashHere
Node Index: 42
Proof Length: 6 nodes
Tree ID: 9hRvTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Royalty:
Basis Points: 500 (5%)
Primary Sale: No
Creators:
CreatorAddress1 (100%) ✓
--------------------------------

Downloaded Files

When using --download, two files are created:

  • <assetId>-asset.json - Full asset data including metadata, ownership, compression info
  • <assetId>-proof.json - Merkle proof required for write operations (transfer, burn, update)

Notes

  • The RPC must support DAS API
  • Standard Solana RPC endpoints will fail with "Asset not found or RPC does not support DAS API"
  • The merkle proof is essential for transfer, burn, and update operations
  • The --json flag outputs machine-readable JSON for scripting