Metaplex 标志

Metaplex

组织
sendaifun
metaplex

Complete Metaplex Protocol guide for Solana NFTs and digital assets. Covers Core (next-gen NFTs), Token Metadata, Bubblegum (compressed NFTs), Candy Machine, Genesis (token launches), MPL-Hybrid, Inscriptions, DAS API, and the Umi framework. The single source of truth for all Metaplex integrations.

Add to TypingMind

概览

发布者sendaifun
代码仓库skills
技能名称metaplex
星标数
128
复刻数
81
附带文件
10
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 10 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 sendaifun 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Metaplex AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/sendaifun/skills/tree/main/skills/metaplex
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sendaifun/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/metaplex .claude/skills/metaplex
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Metaplex,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Metaplex。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Metaplex 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Metaplex Protocol Development Guide

A comprehensive guide for building NFTs, digital assets, and token launches on Solana using the Metaplex Protocol - the industry standard powering 99% of Solana NFTs and tokens.

What is Metaplex?

Metaplex is the leading tokenization protocol on Solana, providing smart contracts and tools for creating, selling, and managing digital assets. From simple NFTs to compressed collections of billions, from fair token launches to hybrid token/NFT systems, Metaplex provides the infrastructure.

Key Statistics

  • 99% of Solana NFTs use Metaplex standards
  • $10B+ in transaction value facilitated
  • 78% of Solana NFTs minted via Candy Machine (as of 2022)
  • Billions of compressed NFTs possible at minimal cost

Overview

Metaplex provides multiple products for different use cases:

NFT Standards

ProductDescriptionCost per Mint
CoreNext-gen single-account NFT standard~0.0029 SOL
Token MetadataOriginal NFT standard with PDAs~0.022 SOL
Bubblegum v2Compressed NFTs (cNFTs)~0.00009 SOL

Launch & Distribution

ProductDescription
Candy MachineNFT collection minting with guards
Core Candy MachineCandy Machine for Core assets
GenesisToken Generation Event (TGE) platform

Utilities

ProductDescription
MPL-HybridSwap between fungible and non-fungible
InscriptionsOn-chain data storage (up to 10MB)
DAS APIUnified API for fetching digital assets
UmiJavaScript framework for Solana clients

Program IDs

Core Programs (Mainnet & Devnet)

ProgramAddress
MPL CoreCoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d
Token MetadatametaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s
BubblegumBGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY
Candy Machine V3CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR
Candy GuardGuard1JwRhJkVH6XZhzoYxeBVQe872VH6QggF4BWmS9g
Core Candy MachineCMACYFENjoBMHzapRXyo1JZkVS6EtaDDzkjMrmQLvr4J
Core Candy GuardCMAGAKJ67e9hRZgfC5SFTbZH8MgEmtqazKXjmkaJjWTJ
MPL HybridMPL4o4wMzndgh8T1NVDxELQCj5UQfYTYEkabX3wNKtb
Inscription1NSCRfGeyo7wPUazGbaPBUsTM49e1k2aXewHGARfzSo

SPL Programs (Required)

ProgramAddress
SPL TokenTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
Token 2022TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Associated TokenATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL
Account CompressioncmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK

Quick Start

Installation

bash
# Core NFTs (Recommended for new projects)
npm install @metaplex-foundation/mpl-core \
  @metaplex-foundation/umi \
  @metaplex-foundation/umi-bundle-defaults

# Token Metadata NFTs
npm install @metaplex-foundation/mpl-token-metadata \
  @metaplex-foundation/umi \
  @metaplex-foundation/umi-bundle-defaults

# Compressed NFTs (Bubblegum)
npm install @metaplex-foundation/mpl-bubblegum \
  @metaplex-foundation/umi \
  @metaplex-foundation/umi-bundle-defaults

# Candy Machine
npm install @metaplex-foundation/mpl-candy-machine \
  @metaplex-foundation/umi \
  @metaplex-foundation/umi-bundle-defaults

# Core Candy Machine
npm install @metaplex-foundation/mpl-core-candy-machine \
  @metaplex-foundation/umi \
  @metaplex-foundation/umi-bundle-defaults

# Genesis (Token Launches)
npm install @metaplex-foundation/mpl-genesis \
  @metaplex-foundation/umi \
  @metaplex-foundation/umi-bundle-defaults

# File uploads (Arweave via Irys)
npm install @metaplex-foundation/umi-uploader-irys

Umi Setup

All Metaplex SDKs use Umi, a modular Solana framework:

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import { mplCore } from '@metaplex-foundation/mpl-core';
import {
  keypairIdentity,
  generateSigner
} from '@metaplex-foundation/umi';

// Create Umi instance
const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplCore());

// Option 1: Use generated keypair
const signer = generateSigner(umi);
umi.use(keypairIdentity(signer));

// Option 2: Use existing keypair
import { createSignerFromKeypair } from '@metaplex-foundation/umi';
const keypair = umi.eddsa.createKeypairFromSecretKey(secretKeyBytes);
const signer = createSignerFromKeypair(umi, keypair);
umi.use(keypairIdentity(signer));

// Option 3: Use wallet adapter (browser)
import { walletAdapterIdentity } from '@metaplex-foundation/umi-signer-wallet-adapters';
umi.use(walletAdapterIdentity(wallet));

MPL Core (Recommended)

The next-generation NFT standard with single-account design, lower costs, and built-in plugins.

Why Core?

FeatureCoreToken Metadata
Accounts per NFT14+
Mint Cost~0.0029 SOL~0.022 SOL
Compute Units~17,000~205,000
Enforced RoyaltiesYesNo
Plugin SystemYesNo

Create a Core NFT

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import {
  mplCore,
  create,
  fetchAsset
} from '@metaplex-foundation/mpl-core';
import {
  generateSigner,
  keypairIdentity
} from '@metaplex-foundation/umi';
import { irysUploader } from '@metaplex-foundation/umi-uploader-irys';

// Setup
const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplCore())
  .use(irysUploader());

// Upload metadata
const metadata = {
  name: 'My Core NFT',
  description: 'A next-gen NFT on Solana',
  image: 'https://arweave.net/your-image',
  attributes: [
    { trait_type: 'Background', value: 'Blue' },
    { trait_type: 'Rarity', value: 'Legendary' }
  ]
};
const metadataUri = await umi.uploader.uploadJson(metadata);

// Create NFT
const asset = generateSigner(umi);
await create(umi, {
  asset,
  name: 'My Core NFT',
  uri: metadataUri,
}).sendAndConfirm(umi);

console.log('Asset created:', asset.publicKey);

// Fetch the asset
const fetchedAsset = await fetchAsset(umi, asset.publicKey);
console.log('Asset data:', fetchedAsset);

Core with Plugins

typescript
import {
  create,
  ruleSet,
  plugin,
} from '@metaplex-foundation/mpl-core';

// Create with royalty enforcement
await create(umi, {
  asset,
  name: 'Royalty Enforced NFT',
  uri: metadataUri,
  plugins: [
    {
      type: 'Royalties',
      basisPoints: 500, // 5%
      creators: [
        { address: creatorAddress, percentage: 100 }
      ],
      ruleSet: ruleSet('None'), // or 'ProgramAllowList', 'ProgramDenyList'
    },
    {
      type: 'FreezeDelegate',
      frozen: false,
      authority: { type: 'Owner' },
    },
    {
      type: 'TransferDelegate',
      authority: { type: 'Owner' },
    },
  ],
}).sendAndConfirm(umi);

Core Collections

typescript
import {
  createCollection,
  create,
  fetchCollection,
} from '@metaplex-foundation/mpl-core';

// Create collection
const collection = generateSigner(umi);
await createCollection(umi, {
  collection,
  name: 'My Collection',
  uri: collectionUri,
}).sendAndConfirm(umi);

// Create asset in collection
const asset = generateSigner(umi);
await create(umi, {
  asset,
  name: 'Collection Item #1',
  uri: assetUri,
  collection: collection.publicKey,
}).sendAndConfirm(umi);

Transfer & Burn

typescript
import { transfer, burn } from '@metaplex-foundation/mpl-core';

// Transfer
await transfer(umi, {
  asset: assetPublicKey,
  newOwner: recipientPublicKey,
}).sendAndConfirm(umi);

// Burn
await burn(umi, {
  asset: assetPublicKey,
}).sendAndConfirm(umi);

Token Metadata

The original Solana NFT standard using Program Derived Addresses (PDAs).

Create NFT with Token Metadata

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import {
  mplTokenMetadata,
  createNft,
  fetchDigitalAsset,
} from '@metaplex-foundation/mpl-token-metadata';
import { generateSigner, percentAmount } from '@metaplex-foundation/umi';

const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplTokenMetadata());

// Create NFT
const mint = generateSigner(umi);
await createNft(umi, {
  mint,
  name: 'My NFT',
  symbol: 'MNFT',
  uri: 'https://arweave.net/metadata.json',
  sellerFeeBasisPoints: percentAmount(5.5), // 5.5% royalty
  creators: [
    { address: umi.identity.publicKey, share: 100, verified: true }
  ],
}).sendAndConfirm(umi);

// Fetch NFT
const asset = await fetchDigitalAsset(umi, mint.publicKey);
console.log(asset);

Create Programmable NFT (pNFT)

typescript
import {
  createProgrammableNft,
  TokenStandard,
} from '@metaplex-foundation/mpl-token-metadata';

// pNFTs have enforced royalties
const mint = generateSigner(umi);
await createProgrammableNft(umi, {
  mint,
  name: 'My pNFT',
  uri: metadataUri,
  sellerFeeBasisPoints: percentAmount(10), // 10% royalty
  ruleSet: ruleSetPublicKey, // Optional: custom rules
}).sendAndConfirm(umi);

Create Fungible Token with Metadata

typescript
import {
  createFungible,
  mintV1,
  TokenStandard,
} from '@metaplex-foundation/mpl-token-metadata';

// Create fungible token
const mint = generateSigner(umi);
await createFungible(umi, {
  mint,
  name: 'My Token',
  symbol: 'MTK',
  uri: 'https://arweave.net/token-metadata.json',
  sellerFeeBasisPoints: percentAmount(0),
  decimals: 9,
}).sendAndConfirm(umi);

// Mint tokens
await mintV1(umi, {
  mint: mint.publicKey,
  amount: 1_000_000_000n, // 1 token with 9 decimals
  tokenOwner: recipientPublicKey,
  tokenStandard: TokenStandard.Fungible,
}).sendAndConfirm(umi);

Update Metadata

typescript
import { updateV1 } from '@metaplex-foundation/mpl-token-metadata';

await updateV1(umi, {
  mint: mintPublicKey,
  data: {
    name: 'Updated Name',
    symbol: 'UPDT',
    uri: 'https://arweave.net/new-metadata.json',
    sellerFeeBasisPoints: 500,
    creators: null, // Keep existing
  },
}).sendAndConfirm(umi);

Bubblegum (Compressed NFTs)

Create billions of NFTs at minimal cost using Merkle tree compression.

Cost Comparison

Collection SizeBubblegum CostToken Metadata Cost
10,000~0.27 SOL~220 SOL
1,000,000~50 SOL~22,000 SOL
1,000,000,000~5,007 SOL~22,000,000 SOL

Create Merkle Tree

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import {
  mplBubblegum,
  createTree,
} from '@metaplex-foundation/mpl-bubblegum';
import { generateSigner } from '@metaplex-foundation/umi';

const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplBubblegum());

// Create tree (max depth determines capacity)
// maxDepth 14 = 16,384 NFTs, maxDepth 20 = 1,048,576 NFTs
const merkleTree = generateSigner(umi);
await createTree(umi, {
  merkleTree,
  maxDepth: 14,
  maxBufferSize: 64,
}).sendAndConfirm(umi);

console.log('Tree created:', merkleTree.publicKey);

Mint Compressed NFT

typescript
import { mintV1 } from '@metaplex-foundation/mpl-bubblegum';

await mintV1(umi, {
  leafOwner: recipientPublicKey,
  merkleTree: merkleTreePublicKey,
  metadata: {
    name: 'Compressed NFT #1',
    symbol: 'CNFT',
    uri: 'https://arweave.net/metadata.json',
    sellerFeeBasisPoints: 500,
    collection: { key: collectionMint, verified: false },
    creators: [
      { address: umi.identity.publicKey, share: 100, verified: true }
    ],
  },
}).sendAndConfirm(umi);

Mint to Collection

typescript
import { mintToCollectionV1 } from '@metaplex-foundation/mpl-bubblegum';

await mintToCollectionV1(umi, {
  leafOwner: recipientPublicKey,
  merkleTree: merkleTreePublicKey,
  collectionMint: collectionMintPublicKey,
  metadata: {
    name: 'Collection cNFT #1',
    symbol: 'CCNFT',
    uri: metadataUri,
    sellerFeeBasisPoints: 500,
    creators: [
      { address: umi.identity.publicKey, share: 100, verified: true }
    ],
  },
}).sendAndConfirm(umi);

Transfer Compressed NFT

typescript
import { transfer } from '@metaplex-foundation/mpl-bubblegum';
import { getAssetWithProof } from '@metaplex-foundation/mpl-bubblegum';

// Get asset with proof from DAS API
const assetWithProof = await getAssetWithProof(umi, assetId);

await transfer(umi, {
  ...assetWithProof,
  leafOwner: currentOwner,
  newLeafOwner: newOwner,
}).sendAndConfirm(umi);

Decompress to Regular NFT

typescript
import { decompressV1 } from '@metaplex-foundation/mpl-bubblegum';

// Decompress creates on-chain Token Metadata NFT
await decompressV1(umi, {
  ...assetWithProof,
  mint: mintSigner,
}).sendAndConfirm(umi);

Candy Machine

The leading NFT minting system for fair collection launches.

Create Candy Machine

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import {
  mplCandyMachine,
  create,
  addConfigLines,
} from '@metaplex-foundation/mpl-candy-machine';
import { generateSigner, some, sol, dateTime } from '@metaplex-foundation/umi';

const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplCandyMachine());

// Create candy machine
const candyMachine = generateSigner(umi);
const collection = generateSigner(umi);

await create(umi, {
  candyMachine,
  collection: collection.publicKey,
  collectionUpdateAuthority: umi.identity,
  itemsAvailable: 1000,
  sellerFeeBasisPoints: percentAmount(5),
  creators: [
    { address: umi.identity.publicKey, percentageShare: 100, verified: true }
  ],
  configLineSettings: some({
    prefixName: 'My NFT #',
    nameLength: 4,
    prefixUri: 'https://arweave.net/',
    uriLength: 43,
    isSequential: false,
  }),
  guards: {
    botTax: some({ lamports: sol(0.01), lastInstruction: true }),
    solPayment: some({ lamports: sol(0.5), destination: treasury }),
    startDate: some({ date: dateTime('2024-01-01T00:00:00Z') }),
    mintLimit: some({ id: 1, limit: 3 }),
  },
}).sendAndConfirm(umi);

Add Items to Candy Machine

typescript
await addConfigLines(umi, {
  candyMachine: candyMachine.publicKey,
  index: 0,
  configLines: [
    { name: '0001', uri: 'abc123...' },
    { name: '0002', uri: 'def456...' },
    { name: '0003', uri: 'ghi789...' },
  ],
}).sendAndConfirm(umi);

Mint from Candy Machine

typescript
import {
  mintV1,
  fetchCandyMachine,
  fetchCandyGuard,
} from '@metaplex-foundation/mpl-candy-machine';

const candyMachine = await fetchCandyMachine(umi, candyMachinePublicKey);
const candyGuard = await fetchCandyGuard(umi, candyMachine.mintAuthority);

const nftMint = generateSigner(umi);

await mintV1(umi, {
  candyMachine: candyMachine.publicKey,
  candyGuard: candyGuard.publicKey,
  nftMint,
  collectionMint: candyMachine.collectionMint,
  collectionUpdateAuthority: candyMachine.authority,
  mintArgs: {
    solPayment: some({ destination: treasury }),
    mintLimit: some({ id: 1 }),
  },
}).sendAndConfirm(umi);

Available Guards (21+)

GuardDescription
solPaymentCharge SOL for minting
tokenPaymentCharge SPL tokens
nftPaymentRequire NFT payment
startDateSet mint start time
endDateSet mint end time
mintLimitLimit mints per wallet
allowListMerkle tree allowlist
tokenGateRequire token ownership
nftGateRequire NFT ownership
botTaxPenalize failed mints
gatekeeperCaptcha verification
freezeSolPaymentFreeze SOL until conditions met
freezeTokenPaymentFreeze tokens until conditions met
addressGateRestrict to specific addresses
allocationLimit total mints per group
redeemedAmountStop after X mints
thirdPartySignerRequire additional signature
token2022PaymentToken-2022 payment
nftBurnBurn NFT to mint
tokenBurnBurn tokens to mint
programGateRestrict calling programs

Genesis (Token Launches)

Fair token generation events (TGEs) on Solana.

Launch Types

TypeDescriptionPrice Discovery
PresaleFixed-price token salePredetermined
Launch PoolDeposits determine priceAt close
Uniform Price AuctionBidding mechanismClearing price

Create Presale

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import {
  mplGenesis,
  createGenesis,
  addBucket,
  finalize,
} from '@metaplex-foundation/mpl-genesis';

const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplGenesis());

// Create genesis account
const genesis = generateSigner(umi);
await createGenesis(umi, {
  genesis,
  name: 'My Token',
  symbol: 'MTK',
  uri: 'https://arweave.net/token-metadata.json',
  decimals: 9,
  totalSupply: 1_000_000_000n * 10n ** 9n, // 1 billion tokens
}).sendAndConfirm(umi);

// Add presale bucket
await addBucket(umi, {
  genesis: genesis.publicKey,
  bucket: {
    type: 'Presale',
    price: sol(0.001), // 0.001 SOL per token
    maxTokens: 100_000_000n * 10n ** 9n, // 100M tokens
    startTime: dateTime('2024-06-01T00:00:00Z'),
    endTime: dateTime('2024-06-07T00:00:00Z'),
  },
}).sendAndConfirm(umi);

// Finalize (locks configuration)
await finalize(umi, {
  genesis: genesis.publicKey,
}).sendAndConfirm(umi);

Participate in Launch

typescript
import { deposit, claim } from '@metaplex-foundation/mpl-genesis';

// Deposit SOL
await deposit(umi, {
  genesis: genesisPublicKey,
  amount: sol(10), // 10 SOL
}).sendAndConfirm(umi);

// After launch ends, claim tokens
await claim(umi, {
  genesis: genesisPublicKey,
}).sendAndConfirm(umi);

MPL-Hybrid (MPL-404)

Swap between fungible tokens and NFTs.

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import {
  mplHybrid,
  createEscrow,
  swapNftToToken,
  swapTokenToNft,
} from '@metaplex-foundation/mpl-hybrid';

const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplHybrid());

// Create escrow for swapping
await createEscrow(umi, {
  escrow: escrowSigner,
  collection: collectionPublicKey,
  token: tokenMint,
  feeWallet: feeWallet,
  name: 'My Hybrid Collection',
  uri: 'https://arweave.net/escrow-metadata.json',
  max: 10000n,
  min: 0n,
  amount: 1000n, // Tokens per NFT
  feeAmount: sol(0.005),
  path: 0,
}).sendAndConfirm(umi);

// Swap NFT for tokens
await swapNftToToken(umi, {
  escrow: escrowPublicKey,
  asset: nftPublicKey,
}).sendAndConfirm(umi);

// Swap tokens for NFT
await swapTokenToNft(umi, {
  escrow: escrowPublicKey,
}).sendAndConfirm(umi);

Inscriptions

Store data directly on-chain (up to 10MB).

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import {
  mplInscription,
  initializeFromMint,
  writeData,
  fetchInscription,
} from '@metaplex-foundation/mpl-inscription';

const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(mplInscription());

// Initialize inscription for existing NFT
const inscriptionAccount = findInscriptionPda(umi, { mint: nftMint });
await initializeFromMint(umi, {
  mintAccount: nftMint,
}).sendAndConfirm(umi);

// Write JSON metadata
await writeData(umi, {
  inscriptionAccount: inscriptionAccount[0],
  value: Buffer.from(JSON.stringify({
    name: 'On-chain NFT',
    description: 'Fully on-chain!',
  })),
  offset: 0,
}).sendAndConfirm(umi);

// Write image in chunks
const imageBytes = fs.readFileSync('./image.png');
const chunkSize = 800;
for (let i = 0; i < imageBytes.length; i += chunkSize) {
  const chunk = imageBytes.slice(i, i + chunkSize);
  await writeData(umi, {
    inscriptionAccount: associatedInscriptionAccount,
    value: Buffer.from(chunk),
    offset: i,
  }).sendAndConfirm(umi);
}

// Access via Inscription Gateway
const gatewayUrl = `https://igw.metaplex.com/mainnet/${inscriptionAccount[0]}`;

DAS API

Unified API for fetching digital assets across all Metaplex standards.

Using DAS API

typescript
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import { dasApi } from '@metaplex-foundation/digital-asset-standard-api';

const umi = createUmi('https://api.mainnet-beta.solana.com')
  .use(dasApi());

// Get single asset
const asset = await umi.rpc.getAsset(assetId);

// Get assets by owner
const assets = await umi.rpc.getAssetsByOwner({
  owner: ownerPublicKey,
  limit: 100,
});

// Get assets by collection
const collectionAssets = await umi.rpc.getAssetsByGroup({
  groupKey: 'collection',
  groupValue: collectionPublicKey,
  limit: 1000,
});

// Search assets
const searchResults = await umi.rpc.searchAssets({
  owner: ownerPublicKey,
  burnt: false,
  compressed: true,
});

// Get asset proof (for compressed NFTs)
const proof = await umi.rpc.getAssetProof(assetId);

DAS-Compatible RPC Providers

  • Helius
  • Triton
  • Shyft
  • QuickNode
  • Alchemy (with DAS)

Protocol Fees

ProgramOperationFee
CoreCreate0.0015 SOL
CoreExecute0.00004872 SOL
Token MetadataCreate0.01 SOL
Bubblegum v2Create0.00009 SOL
Bubblegum v2Transfer0.000006 SOL
Bubblegum v1CreateFree
GenesisLaunch Pool2% deposit/withdraw, 5% graduation
GenesisPresale2% deposit, 5% graduation
MPL-HybridSwap0.005 SOL

Best Practices

Choosing the Right Standard

Use CaseRecommended
New NFT collectionCore
Large collection (10K+)Bubblegum
PFP with royaltiesCore or pNFT
Gaming itemsCore (plugins)
Existing ecosystemToken Metadata
Token launchGenesis
Hybrid token/NFTMPL-Hybrid

Security

  1. Never share private keys - Use wallet adapters in browsers
  2. Verify transactions - Always review before signing
  3. Test on devnet - Use devnet before mainnet
  4. Audit smart contracts - If building custom guards

Performance

  1. Batch operations - Use transaction builders
  2. Cache DAS responses - Reduce API calls
  3. Use compression - Bubblegum for large collections
  4. Priority fees - Add during congestion

Resources

Documentation

GitHub Repositories

API References

Community


Skill Structure

metaplex/
├── SKILL.md                           # This file
├── resources/
│   ├── program-ids.md                 # All program addresses
│   ├── sdk-packages.md                # NPM packages reference
│   └── protocol-fees.md               # Fee schedule
├── examples/
│   ├── core/
│   │   └── create-nft.ts              # Core NFT examples
│   ├── token-metadata/
│   │   └── create-nft.ts              # Token Metadata examples
│   ├── bubblegum/
│   │   └── compressed-nfts.ts         # cNFT examples
│   ├── candy-machine/
│   │   └── launch-collection.ts       # Candy Machine examples
│   └── genesis/
│       └── token-launch.ts            # Genesis TGE examples
├── templates/
│   └── metaplex-client.ts             # Ready-to-use client
└── docs/
    └── troubleshooting.md             # Common issues

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Metaplex AI 技能有什么作用?

Complete Metaplex Protocol guide for Solana NFTs and digital assets. Covers Core (next-gen NFTs), Token Metadata, Bubblegum (compressed NFTs), Candy Machine, Genesis (token launches), MPL-Hybrid, Inscriptions, DAS API, and the Umi framework. The single source of truth for all Metaplex integrations.

为什么在 TypingMind 中使用 Metaplex?

因为您只需安装一次,就能搭配任何模型使用。Metaplex 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Metaplex?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/sendaifun/skills/tree/main/skills/metaplex。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Metaplex?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Metaplex 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Metaplex 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Metaplex AI 技能免费吗?

是的。sendaifun 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇