Struct mpl_token_metadata::instructions::CreateBuilder
source · pub struct CreateBuilder { /* private fields */ }
Expand description
Instruction builder for Create
.
§Accounts:
[writable]
metadata[writable, optional]
master_edition[writable, signer]
mint[signer]
authority[writable, signer]
payer[signer]
update_authority[optional]
system_program (default to11111111111111111111111111111111
)[optional]
sysvar_instructions (default toSysvar1nstructions1111111111111111111111111
)[optional]
spl_token_program
Implementations§
source§impl CreateBuilder
impl CreateBuilder
pub fn new() -> Self
sourcepub fn metadata(&mut self, metadata: Pubkey) -> &mut Self
pub fn metadata(&mut self, metadata: Pubkey) -> &mut Self
Unallocated metadata account with address as pda of [‘metadata’, program id, mint id]
sourcepub fn master_edition(&mut self, master_edition: Option<Pubkey>) -> &mut Self
pub fn master_edition(&mut self, master_edition: Option<Pubkey>) -> &mut Self
[optional account]
Unallocated edition account with address as pda of [‘metadata’, program id, mint, ‘edition’]
Mint authority
Update authority for the metadata account
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 sysvar_instructions(&mut self, sysvar_instructions: Pubkey) -> &mut Self
pub fn sysvar_instructions(&mut self, sysvar_instructions: Pubkey) -> &mut Self
[optional account, default to 'Sysvar1nstructions1111111111111111111111111']
Instructions sysvar account
sourcepub fn spl_token_program(
&mut self,
spl_token_program: Option<Pubkey>
) -> &mut Self
pub fn spl_token_program( &mut self, spl_token_program: Option<Pubkey> ) -> &mut Self
[optional account]
SPL Token program
pub fn create_args(&mut self, create_args: CreateArgs) -> &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 CreateBuilder
impl Default for CreateBuilder
source§fn default() -> CreateBuilder
fn default() -> CreateBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CreateBuilder
impl Send for CreateBuilder
impl Sync for CreateBuilder
impl Unpin for CreateBuilder
impl UnwindSafe for CreateBuilder
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