BubblegumNifs.Native (bubblegum_nifs v0.1.2) View Source

Native Implemented Functions for Metaplex Bubblegum compressed NFTs operations

Link to this section Summary

Link to this section Functions

Link to this function

create_tree_config_ix(payer_info, merkle_tree, max_depth, max_buffer_size, recent_blockhash, public, lamports, account_size)

View Source

Specs

Creates an instruction to configure a new compressed NFT tree.

Parameters:

  • payer_info: The keypair that will fund the transaction
  • merkle_tree: The public key of the merkle tree (as string)
  • max_depth: The maximum depth of the merkle tree
  • max_buffer_size: The maximum buffer size for the merkle tree
  • recent_blockhash: The recent blockhash to use for the transaction
  • public: Whether the tree should be public

Returns:

A serialized transaction

Specs

generate_keypair() :: BubblegumNifs.KeyPairInfo.t()
Link to this function

get_tree_authority_pda_address(merkle_tree)

View Source

Specs

get_tree_authority_pda_address(String.t()) :: String.t()
Link to this function

mint_to_collection_v1_ix(tree_authority, leaf_owner, leaf_delegate, merkle_tree, payer, collection_authority, collection_mint, collection_metadata, collection_master_edition, metadata_args, recent_blockhash)

View Source

Specs

Creates an instruction to mint a compressed NFT to a collection.

Parameters:

  • tree_authority: The public key of the tree authority (as string)
  • leaf_owner: The public key of the leaf owner (as string)
  • leaf_delegate: The public key of the leaf delegate (as string)
  • merkle_tree: The public key of the merkle tree (as string)
  • payer: Keypair info for the transaction payer
  • collection_authority: The public key of the collection authority (as string)
  • collection_mint: The public key of the collection mint (as string)
  • collection_metadata: The public key of the collection metadata (as string)
  • collection_master_edition: The public key of the collection master edition (as string)
  • metadata_args: The metadata for the NFT
  • recent_blockhash: The recent blockhash to use for the transaction

Returns:

A serialized transaction

Link to this function

mint_v1_ix(tree_authority, leaf_owner, leaf_delegate, merkle_tree, payer, metadata_args, recent_blockhash)

View Source

Specs

Creates an instruction to mint a compressed NFT (version 1).

Parameters:

  • tree_authority: The public key of the tree authority (as string)
  • leaf_owner: The public key of the leaf owner (as string)
  • leaf_delegate: The public key of the leaf delegate (as string)
  • merkle_tree: The public key of the merkle tree (as string)
  • payer: Keypair info for the transaction payer
  • metadata_args: The metadata for the NFT
  • recent_blockhash: The recent blockhash to use for the transaction

Returns:

A serialized transaction

Link to this function

transfer_ix(tree_authority, leaf_owner, leaf_delegate, new_leaf_owner, merkle_tree, root, data_hash, creator_hash, nonce, index, proof_addresses, recent_blockhash, payer)

View Source

Specs

Creates an instruction to transfer a compressed NFT.

Parameters:

  • tree_authority: The public key of the tree authority (as string)
  • leaf_owner: The public key of the current leaf owner (as string)
  • leaf_delegate: The public key of the leaf delegate (as string)
  • new_leaf_owner: The public key of the new leaf owner (as string)
  • merkle_tree: The public key of the merkle tree (as string)
  • root: The root hash of the merkle tree (as binary)
  • data_hash: The data hash of the asset (as binary)
  • creator_hash: The creator hash of the asset (as binary)
  • nonce: The nonce (leaf_id) of the asset
  • index: The index (leaf_id as u32) of the asset
  • proof_addresses: List of public keys in the merkle proof (as strings)
  • recent_blockhash: The recent blockhash to use for the transaction
  • payer: Keypair info for the transaction payer

Returns:

A serialized transaction