CNFT (cnft v0.1.0)
View SourceCNFT is a module for handling transactions related to creating, minting, and transferring NFTs on the Solana blockchain.
This module uses Rustler to interface with native Rust code for performance-critical operations.
Summary
Functions
Creates a tree transaction and logs the result.
Creates a tree transaction.
Mints a new NFT and logs the result.
Transfers an NFT to a new owner and logs the result.
Transfers an NFT to a new owner.
Functions
Creates a tree transaction and logs the result.
Parameters
- rpc_client: The RPC client to interact with the Solana blockchain.
- payer: The account that will pay for the transaction.
Creates a tree transaction.
Parameters
- rpc_client: The RPC client to interact with the Solana blockchain.
- payer: The account that will pay for the transaction.
Returns
- A transaction data structure.
Mints a new NFT and logs the result.
Parameters
- rpc_client: The RPC client to interact with the Solana blockchain.
- tree: The tree structure where the NFT will be minted.
- owner: The account that will own the minted NFT.
- payer: The account that will pay for the transaction.
- name: The name of the NFT.
- symbol: The symbol of the NFT.
- uri: The URI pointing to the NFT metadata.
- nounce: A unique identifier for the minting process.
Mints a new NFT.
Parameters
- rpc_client: The RPC client to interact with the Solana blockchain.
- tree: The tree structure where the NFT will be minted.
- owner: The account that will own the minted NFT.
- payer: The account that will pay for the transaction.
- name: The name of the NFT.
- symbol: The symbol of the NFT.
- uri: The URI pointing to the NFT metadata.
- nounce: A unique identifier for the minting process.
Returns
- A transaction data structure.
Transfers an NFT to a new owner and logs the result.
Parameters
- rpc_client: The RPC client to interact with the Solana blockchain.
- asset: The NFT asset to be transferred.
- owner: The current owner of the NFT.
- payer: The account that will pay for the transaction.
- receiver: The account that will receive the NFT.
Transfers an NFT to a new owner.
Parameters
- rpc_client: The RPC client to interact with the Solana blockchain.
- asset: The NFT asset to be transferred.
- owner: The current owner of the NFT.
- payer: The account that will pay for the transaction.
- receiver: The account that will receive the NFT.
Returns
- A transaction data structure.