Struct mpl_token_metadata::instructions::UtilizeBuilder
source · pub struct UtilizeBuilder { /* private fields */ }
Expand description
Instruction builder for Utilize
.
Accounts:
[writable]
metadata[writable]
token_account[writable]
mint[writable, signer]
use_authority[]
owner[optional]
token_program (default toTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
)[optional]
ata_program (default toATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL
)[optional]
system_program (default to11111111111111111111111111111111
)[optional]
rent (default toSysvarRent111111111111111111111111111111111
)[writable, optional]
use_authority_record[optional]
burner
Implementations§
source§impl UtilizeBuilder
impl UtilizeBuilder
pub fn new() -> Self
sourcepub fn token_account(&mut self, token_account: Pubkey) -> &mut Self
pub fn token_account(&mut self, token_account: Pubkey) -> &mut Self
Token Account Of NFT
A Use Authority / Can be the current Owner of the NFT
sourcepub fn token_program(&mut self, token_program: Pubkey) -> &mut Self
pub fn token_program(&mut self, token_program: Pubkey) -> &mut Self
[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']
Token program
sourcepub fn ata_program(&mut self, ata_program: Pubkey) -> &mut Self
pub fn ata_program(&mut self, ata_program: Pubkey) -> &mut Self
[optional account, default to 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL']
Associated Token program
sourcepub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
pub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
[optional account, default to '11111111111111111111111111111111']
System program
sourcepub fn rent(&mut self, rent: Pubkey) -> &mut Self
pub fn rent(&mut self, rent: Pubkey) -> &mut Self
[optional account, default to 'SysvarRent111111111111111111111111111111111']
Rent info
[optional account]
Use Authority Record PDA If present the program Assumes a delegated use authority
sourcepub fn burner(&mut self, burner: Option<Pubkey>) -> &mut Self
pub fn burner(&mut self, burner: Option<Pubkey>) -> &mut Self
[optional account]
Program As Signer (Burner)
pub fn number_of_uses(&mut self, number_of_uses: u64) -> &mut Self
sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an aditional account to the instruction.
sourcepub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
source§impl Default for UtilizeBuilder
impl Default for UtilizeBuilder
source§fn default() -> UtilizeBuilder
fn default() -> UtilizeBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for UtilizeBuilder
impl Send for UtilizeBuilder
impl Sync for UtilizeBuilder
impl Unpin for UtilizeBuilder
impl UnwindSafe for UtilizeBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more