anchor_metaplex/
lib.rs

1
2//! # Anchor Metaplex
3//!
4//! `anchor_metaplex` is a collection of helper numeric operation functions that allows seamless
5//! interaction of your Solana Anchor program with the Metaplex ecosystem
6//! 
7//! # Examples
8//!
9//! ```
10//! use anchor_metaplex::{CreateMetadata, create_metadata};
11//! 
12//! pub fn Initialize(
13//!    ctx: Context<Initialize>,
14//!    name: String,
15//!    symbol: String,
16//!    uri: String,
17//! ) -> Result<()> {
18//!   let seeds: &[&[u8]] = &[
19//!     b"mint_authority", name.as_bytes(), symbol.as_bytes(),
20//!     &[state.bumps.mint_authority]
21//!   ];
22//!   let signer_seeds:&[&[&[u8]]] = &[&seeds[..]];
23//!   let cpi_accounts = CreateMetadata {
24//!     mint: *ctx.accounts.index_token.clone(),
25//!     mint_authority: ctx.accounts.mint_authority.clone(),
26//!     metadata_account: ctx.accounts.metadata_account.clone(),
27//!     payer: (*ctx.accounts.deployer).to_account_info(),
28//!     update_authority: ctx.accounts.mint_authority.to_account_info(),
29//!     system_program: ctx.accounts.system_program.to_account_info(),
30//!     rent: ctx.accounts.rent.to_account_info(),
31//!   };
32//!   
33//!   create_metadata(
34//!     cpi_accounts,
35//!     signer_seeds,
36//!     name.clone(),
37//!     symbol.clone(),
38//!     uri,
39//!     None,
40//!     0,
41//!     true,
42//!     true,
43//!     None,
44//!     None
45//!    )
46//! }
47pub mod create_metadata;
48pub mod update_metadata;
49pub mod create_master_edition;
50pub mod set_and_verify_collection;
51pub mod verify_creator;
52pub mod update_primary_sale;
53pub mod mint_new_edition_from_master_edition_via_token;
54
55pub use mpl_token_metadata;
56pub use crate::{
57  create_metadata::*,
58  update_metadata::*,
59  create_master_edition::*,
60  set_and_verify_collection::*,
61  verify_creator::*,
62  update_primary_sale::*,
63};