Skip to content

Mayank1170/Bubblegum_NIFs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPL-Bubblegum Elixir

Elixir NIFs for Metaplex Bubblegum compressed NFTs on Solana.

Features

  • Create compressed NFT merkle trees
  • Mint compressed NFTs
  • Transfer NFTs between wallets
  • Burn NFTs

Installation

def deps do
  [
    {:mpl_bubblegum, "~> 0.1.0"}
  ]
end

Quick Examples

Create a tree

keypair = :crypto.strong_rand_bytes(64)
params = %{max_depth: 14, max_buffer_size: 64}
{:ok, tree_id} = MplBubblegum.create_tree_config(params, keypair)

Mint an NFT

metadata = %{name: "My NFT", uri: "https://example.com/metadata.json", symbol: "CNFT"}
{:ok, asset_id} = MplBubblegum.mint_compressed_nft(tree_id, metadata, keypair)

Transfer an NFT

recipient = "5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"
{:ok, signature} = MplBubblegum.transfer_compressed_nft(asset_id, recipient, keypair)

Burn an NFT

{:ok, signature} = MplBubblegum.burn(asset_id, keypair)

Testing

mix test

License

Apache License 2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published