Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@metaplex-foundation/mpl-token-metadata

Package Overview
Dependencies
Maintainers
4
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metaplex-foundation/mpl-token-metadata

MPL Token Metadata JavaScript API.

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
105K
increased by2.11%
Maintainers
4
Weekly downloads
 
Created

What is @metaplex-foundation/mpl-token-metadata?

@metaplex-foundation/mpl-token-metadata is an npm package that provides tools and utilities for interacting with token metadata on the Solana blockchain. It is part of the Metaplex ecosystem, which is designed to facilitate the creation, management, and trading of NFTs and other digital assets on Solana.

What are @metaplex-foundation/mpl-token-metadata's main functionalities?

Create Metadata

This feature allows you to create a new metadata account for a token on the Solana blockchain. The code sample demonstrates how to use the `createCreateMetadataAccountV2Instruction` function to set up the necessary parameters for creating metadata.

const { createCreateMetadataAccountV2Instruction } = require('@metaplex-foundation/mpl-token-metadata');

const createMetadata = (metadataAccount, mint, mintAuthority, payer, updateAuthority, metadataData) => {
  return createCreateMetadataAccountV2Instruction({
    metadata: metadataAccount,
    mint,
    mintAuthority,
    payer,
    updateAuthority,
    metadataData,
  });
};

Update Metadata

This feature allows you to update the metadata of an existing token. The code sample shows how to use the `createUpdateMetadataAccountV2Instruction` function to update the metadata with new information.

const { createUpdateMetadataAccountV2Instruction } = require('@metaplex-foundation/mpl-token-metadata');

const updateMetadata = (metadataAccount, updateAuthority, metadataData) => {
  return createUpdateMetadataAccountV2Instruction({
    metadata: metadataAccount,
    updateAuthority,
    metadataData,
  });
};

Verify Collection

This feature allows you to verify a collection of NFTs. The code sample demonstrates how to use the `createVerifyCollectionInstruction` function to verify that a token belongs to a specific collection.

const { createVerifyCollectionInstruction } = require('@metaplex-foundation/mpl-token-metadata');

const verifyCollection = (metadataAccount, collectionAuthority, collectionMint) => {
  return createVerifyCollectionInstruction({
    metadata: metadataAccount,
    collectionAuthority,
    collectionMint,
  });
};
0

Keywords

FAQs

Package last updated on 04 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc