Plugins

Edition Plugin

The Edition Plugin is a Authority Managed plugin that stores an Edition Number within the asset. Together with the soon to be added Master Edition Plugin those Editions could be compared to the Edition concept in Metaplex Token Metadata.

The Edition Plugin will work in areas such as:

  • Prints of the same Asset

Intended Useage

We recommend to

  • Group the Editions using the Master Edition Plugin
  • use Candy Machine with the Edition Guard to handled numbering automatically.

Works With

MPL Core Asset
MPL Core Collection

Arguments

ArgValue
numbernumber

The number is a specific value that is assigned to the asset. Usually this number is unique, therefore the Creator should make sure that a number is not used twice.

Creating an Asset with the editions plugin

The Editions Plugin must be added on creation of the asset. As long as it is mutable the number can be changed.

Create with a mutable Plugin

Creating an MPL Core Asset with the Edition Plugin

import { publicKey } from '@metaplex-foundation/umi'
import { createV1, pluginAuthorityPair } from '@metaplex-foundation/mpl-core'

const asset = generateSigner(umi)

const result = createV1(umi, {
  asset: asset,
  name: 'My Nft',
  uri: 'https://example.com/my-nft',
  plugins: [
    pluginAuthorityPair({
      type: 'Edition',
      data: { number: 1 },
    }),
  ],
}).sendAndConfirm(umi)

Create with a immutable Plugin

To create the Asset with immutable Edition Plugin the following code can be used:

Adding the Editions Plugin to an MPL Core Asset

To have the editions Plugin immutable the authority has to be set to nonePluginAuthority() like this:

import { publicKey } from '@metaplex-foundation/umi'
import { createV1, pluginAuthorityPair } from '@metaplex-foundation/mpl-core'

const asset = generateSigner(umi)

const result = createV1(umi, {
  asset: asset,
  name: 'My Nft',
  uri: 'https://example.com/my-nft',
  plugins: [
    pluginAuthorityPair({
      type: 'Edition',
      data: { number: 1 },
      authority: nonePluginAuthority(),
    }),
  ],
}).sendAndConfirm(umi)

Update the Editions Plugin

If the Editions Plugin is mutable it can be updated similar to other Plugins:

Update The Edition Plugin on an Asset

import { publicKey } from '@metaplex-foundation/umi'
import { updatePluginV1, createPlugin } from '@metaplex-foundation/mpl-core'

const asset = publicKey('11111111111111111111111111111111')

await updatePluginV1(umi, {
  asset: asset,
  plugin: createPlugin({ type: 'Edition', data: { number: 2 } }),
  authority: delegateAuthority
}).sendAndConfirm(umi);
Previous
Attribute Plugin