pub struct CreateV1CpiBuilder<'a, 'b> { /* private fields */ }
Expand description
Instruction builder for CreateV1
via CPI.
Accounts:
[writable]
metadata[writable, optional]
master_edition[writable, signer]
mint[signer]
authority[writable, signer]
payer[signer]
update_authority[]
system_program[]
sysvar_instructions[]
spl_token_program
Implementations§
source§impl<'a, 'b> CreateV1CpiBuilder<'a, 'b>
impl<'a, 'b> CreateV1CpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
sourcepub fn metadata(&mut self, metadata: &'b AccountInfo<'a>) -> &mut Self
pub fn metadata(&mut self, metadata: &'b AccountInfo<'a>) -> &mut Self
Unallocated metadata account with address as pda of [‘metadata’, program id, mint id]
sourcepub fn master_edition(
&mut self,
master_edition: Option<&'b AccountInfo<'a>>
) -> &mut Self
pub fn master_edition( &mut self, master_edition: Option<&'b AccountInfo<'a>> ) -> &mut Self
[optional account]
Unallocated edition account with address as pda of [‘metadata’, program id, mint, ‘edition’]
sourcepub fn mint(&mut self, mint: &'b AccountInfo<'a>, as_signer: bool) -> &mut Self
pub fn mint(&mut self, mint: &'b AccountInfo<'a>, as_signer: bool) -> &mut Self
Mint of token asset
Mint authority
sourcepub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
pub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
Payer
Update authority for the metadata account
sourcepub fn system_program(
&mut self,
system_program: &'b AccountInfo<'a>
) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a> ) -> &mut Self
System program
sourcepub fn sysvar_instructions(
&mut self,
sysvar_instructions: &'b AccountInfo<'a>
) -> &mut Self
pub fn sysvar_instructions( &mut self, sysvar_instructions: &'b AccountInfo<'a> ) -> &mut Self
Instructions sysvar account
sourcepub fn spl_token_program(
&mut self,
spl_token_program: &'b AccountInfo<'a>
) -> &mut Self
pub fn spl_token_program( &mut self, spl_token_program: &'b AccountInfo<'a> ) -> &mut Self
SPL Token program
pub fn name(&mut self, name: String) -> &mut Self
sourcepub fn symbol(&mut self, symbol: String) -> &mut Self
pub fn symbol(&mut self, symbol: String) -> &mut Self
[optional argument, defaults to 'String::from("")']
pub fn uri(&mut self, uri: String) -> &mut Self
pub fn seller_fee_basis_points( &mut self, seller_fee_basis_points: u16 ) -> &mut Self
sourcepub fn primary_sale_happened(
&mut self,
primary_sale_happened: bool
) -> &mut Self
pub fn primary_sale_happened( &mut self, primary_sale_happened: bool ) -> &mut Self
[optional argument, defaults to 'false']
sourcepub fn is_mutable(&mut self, is_mutable: bool) -> &mut Self
pub fn is_mutable(&mut self, is_mutable: bool) -> &mut Self
[optional argument, defaults to 'true']
pub fn token_standard(&mut self, token_standard: TokenStandard) -> &mut Self
sourcepub fn collection(&mut self, collection: Collection) -> &mut Self
pub fn collection(&mut self, collection: Collection) -> &mut Self
[optional argument]
sourcepub fn collection_details(
&mut self,
collection_details: CollectionDetails
) -> &mut Self
pub fn collection_details( &mut self, collection_details: CollectionDetails ) -> &mut Self
[optional argument]
sourcepub fn print_supply(&mut self, print_supply: PrintSupply) -> &mut Self
pub fn print_supply(&mut self, print_supply: PrintSupply) -> &mut Self
[optional argument]
sourcepub fn add_remaining_account(
&mut self,
account: &'b AccountInfo<'a>,
is_writable: bool,
is_signer: bool
) -> &mut Self
pub fn add_remaining_account( &mut self, account: &'b AccountInfo<'a>, is_writable: bool, is_signer: bool ) -> &mut Self
Add an additional account to the instruction.
sourcepub fn add_remaining_accounts(
&mut self,
accounts: &[(&'b AccountInfo<'a>, bool, bool)]
) -> &mut Self
pub fn add_remaining_accounts( &mut self, accounts: &[(&'b AccountInfo<'a>, bool, bool)] ) -> &mut Self
Add additional accounts to the instruction.
Each account is represented by a tuple of the AccountInfo
, a bool
indicating whether the account is writable or not,
and a bool
indicating whether the account is a signer or not.