Back
CorePlayground/ My Core NFT

Asset Image

My Core NFT

Metaplex Core · Devnet

Active Plugins

💎Royalties

Asset Settings

Select a plugin from the sidebar

or click an active plugin on the asset to configure it

34 lines·TS· Live output
1import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
2import {
3 create,
4 ruleSet,
5} from '@metaplex-foundation/mpl-core';
6import {
7 generateSigner,
8} from '@metaplex-foundation/umi';
9
10const umi = createUmi('https://api.devnet.solana.com');
11// Connect wallet: umi.use(walletAdapterIdentity(wallet));
12
13const assetSigner = generateSigner(umi);
14
15await create(umi, {
16 asset: assetSigner,
17 name: 'My Core NFT',
18 uri: 'https://example.com/metadata.json',
19 plugins: [
20 {
21 type: 'Royalties',
22 basisPoints: 500,
23 creators: [
24 {
25 address: umi.identity.publicKey,
26 percentage: 100,
27 },
28 ],
29 ruleSet: ruleSet('None'),
30 },
31 ],
32}).sendAndConfirm(umi);
33
34console.log('Minted:', assetSigner.publicKey.toString());

This is production-ready code using official @metaplex-foundation/mpl-core + umi SDKs. Copy and use it directly in your project.