Collections & Verification
Collections group NFTs under a shared identity. Verification proves an asset truly belongs to that collection - critical because unverified collection fields can be spoofed by anyone.
Recipe
// Core: create Collection, mint Asset with collection plugin, verify
import { createCollection, create, addPlugin } from "@metaplex-foundation/mpl-core";
// Token Metadata: set collection on metadata + verifyCollectionV1When to reach for this:
- Launching multi-item generative or profile-picture collections
- Showing verified badge in wallet and marketplace UIs
- Token-gating by collection membership via DAS
getAssetsByGroup - Preventing fake collection labels on unrelated mints
Working Example
import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
import { mplCore } from "@metaplex-foundation/mpl-core";
import {
createCollection,
create,
fetchCollection,
ruleSetNone,
} from "@metaplex-foundation/mpl-core";
import { generateSigner } from "@metaplex-foundation/umi";
const umi = createUmi("https://api.devnet.solana.com").use(mplCore());
const collection = generateSigner(umi);
await createCollection(umi, {
collection,
name: "Demo Collection",
uri: "https://arweave.net/collection.json",
}).sendAndConfirm(umi);
const asset = generateSigner(umi);
await create(umi, {
asset,
name: "Item #1",
uri: "https://arweave.net/1.json",
collection: collection.publicKey,
}).sendAndConfirm(umi);
const col = await fetchCollection(umi, collection.publicKey);
console.log(col.name, col.numMinted);// DAS: query by collection
await dasRpc("getAssetsByGroup", {
groupKey: "collection",
groupValue: collection.publicKey.toString(),
page: 1,
limit: 100,
});What this demonstrates:
- Collection account is the canonical group identifier for Core
- Assets reference collection at mint time
- DAS groups assets for gallery and gating queries
Deep Dive
How It Works
- Core: Collection account + plugin linking each Asset
- Token Metadata:
collectionfield on metadata +verified: boolafter authority signs verify - Unverified collection metadata is cosmetic only - marketplaces ignore it
- Indexers and DAS expose
grouping/collectionfor verified sets
Verification States
| State | Marketplace trust |
|---|---|
| Unverified | Low - anyone can set field |
| Verified | High - collection authority signed |
| No collection | Standalone 1/1 |
TypeScript Notes
// After mint, run verify instruction if not auto-verified in your SDK flow
// Token-gate: getAssetsByOwner + filter grouping.key === "collection"Gotchas
- Skipping verify step - collection name shows but not trusted. Fix: collection authority signs verify instruction.
- Wrong collection pubkey in UI - gating bypass. Fix: compare to official collection address from project docs.
- Mixing Core and Token Metadata collection models - incompatible account layouts. Fix: one standard per collection.
- DAS pagination gaps during mint - incomplete gallery. Fix: cursor pagination + retry after mint ends.
- Revoked collection authority - cannot verify future items. Fix: secure authority in multisig before launch.
Alternatives
| Alternative | Use When | Don't Use When |
|---|---|---|
| Off-chain collection id | MVP only | On-chain verification required |
| Merkle allowlist | Mint gate only | Post-mint provenance display |
| Single shared trait in JSON | Analytics hack | Security-critical gating |
FAQs
Why verify collections?
Without verification, attackers set collection field to famous collection names on unrelated NFTs.
Core vs Token Metadata collections?
Different account types - pick one standard per project.
Who can verify?
Collection update authority / collection authority per program rules.
Does DAS show verification?
Yes - grouping metadata includes verified flag where applicable.
Can asset change collection?
Generally requires authority operations - not casual metadata edit.
Token-gate by collection?
getAssetsByGroup or filter owner assets by collection grouping.
Collection size limits?
No on-chain hard cap - operational limits from rent and indexer performance.
Sub-collections?
Product pattern - often separate collection accounts or trait conventions.
Verify after mint?
Yes - batch verify instructions common in reveal workflows.
Marketplace APIs?
Many read DAS - ensure your collection verifies on-chain for badge display.
Broken verification?
Re-run verify with correct authority if mint succeeded but verify tx failed.
cNFT collections?
Bubblegum supports collection metadata in compressed mint - see cNFT section.
Related
- Metaplex Core - collection accounts
- Token Metadata - legacy verify flow
- Reading NFTs (DAS API) - group queries
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.