solana_kit_mpl_token_metadata 0.9.3 copy "solana_kit_mpl_token_metadata: ^0.9.3" to clipboard
solana_kit_mpl_token_metadata: ^0.9.3 copied to clipboard

mpl-token-metadata (compressed metadata) instruction builders for Solana Kit Dart.

solana_kit_mpl_token_metadata #

pub package docs website CI coverage

Token Metadata program client for the Solana Kit Dart SDK: instruction builders, account codecs, error helpers, and PDA derivations for the Metaplex Token Metadata program, which manages the metadata of mint accounts on Solana.

What you get #

  • Instruction builders for creating and updating metadata, master editions, delegates, collection verification, and programmable assets — 58 instructions from the shank IDL, including createMetadataAccountV3, updateMetadataAccountV2, verifyCollection, setAndVerifyCollection, and the V1 create, update, delegate, and burn family
  • Account codecs for metadata, master editions, edition markers, delegate records, token records, and collection authorities
  • PDA derivations matching the on-chain program's seeds exactly: metadata, master edition, edition markers (V1 and V2), collection and use authority records, token records, metadata delegate records, holder delegate records, and program-as-burner
  • Error helpers with all 203 program error codes
  • Instruction parsing via parseMplTokenMetadataInstruction and identifyMplTokenMetadataInstruction

Installation #

Install the package directly:

dependencies:
  "solana_kit_mpl_token_metadata": ^

If your app uses several Solana Kit packages together, you can also depend on the umbrella package instead:

dart pub add solana_kit

Inside this monorepo, Dart workspace resolution uses the local package automatically.

:::

Installation #

Install the package directly:

dependencies:
  "solana_kit_mpl_token_metadata": ^

If your app uses several Solana Kit packages together, you can also depend on the umbrella package instead:

dart pub add solana_kit

Inside this monorepo, Dart workspace resolution uses the local package automatically.

Documentation #

For architecture notes, getting-started guides, and cross-package examples, start with the workspace docs site and then drill down into the package README and API reference.

Usage #

Derive the metadata PDA #

Token metadata lives in a PDA derived from the mint. Hero derivation helpers mirror the on-chain seed structure exactly.

import 'package:solana_kit_addresses/solana_kit_addresses.dart';
import 'package:solana_kit_mpl_token_metadata/solana_kit_mpl_token_metadata.dart';

Future<void> main() async {
  final mint = Address('So11111111111111111111111111111111111111111');
  final (metadata, bump) = await findMetadataPda(mint: mint);

  print(metadata);
  print(bump);
}

Instruction builders such as getCreateMetadataAccountV3Instruction, getUpdateMetadataAccountV2Instruction, and getVerifyCollectionInstruction take explicit program and account addresses, keeping fee payment, signing, and account ordering visible in your transaction messages.

Key APIs #

  • findMetadataPda, findMasterEditionPda, findEditionMarkerPda, findEditionMarkerV2Pda, findCollectionAuthorityRecordPda, findUseAuthorityRecordPda, findTokenRecordPda, findMetadataDelegateRecordPda, findHolderDelegateRecordPda, findProgramAsBurnerPda
  • getCreateMetadataAccountV3Instruction, getUpdateMetadataAccountV2Instruction, getVerifyCollectionInstruction, and the rest of the generated builders
  • parseMplTokenMetadataInstruction, identifyMplTokenMetadataInstruction
  • getMplTokenMetadataErrorMessage, MplTokenMetadataError

Reference #

Generated with codama-renderers-dart from the metaplex-foundation / mpl-token-metadata shank IDL (program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s), mirroring the upstream TypeScript client, including the newUpdateAuthority argument naming used by the official SDK.