pub struct CreateBuilder { /* private fields */ }Expand description
Instruction builder for Create.
§Accounts:
[writable]asset[writable]vault[]mint[]metadata[signer]update_authority[optional]collection[writable, signer]payer[optional]system_program (default to11111111111111111111111111111111)[optional]nifty_asset_program (default toAssetGtQBTSgm5s91d1RAQod5JmaZiJDxqsgtqrZud73)
Implementations§
Source§impl CreateBuilder
impl CreateBuilder
pub fn new() -> Self
Sourcepub fn asset(&mut self, asset: Pubkey) -> &mut Self
pub fn asset(&mut self, asset: Pubkey) -> &mut Self
Asset account of the mint (pda of ['nifty::bridge::asset', mint pubkey])
Sourcepub fn vault(&mut self, vault: Pubkey) -> &mut Self
pub fn vault(&mut self, vault: Pubkey) -> &mut Self
Bridge account for the asset (pda of ['nifty::bridge::vault', mint pubkey])
Update authority of the metadata
Sourcepub fn collection(&mut self, collection: Option<Pubkey>) -> &mut Self
pub fn collection(&mut self, collection: Option<Pubkey>) -> &mut Self
[optional account]
Asset account of the collection (pda of ['nifty::bridge::asset', collection mint pubkey])
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 nifty_asset_program(&mut self, nifty_asset_program: Pubkey) -> &mut Self
pub fn nifty_asset_program(&mut self, nifty_asset_program: Pubkey) -> &mut Self
[optional account, default to 'AssetGtQBTSgm5s91d1RAQod5JmaZiJDxqsgtqrZud73']
Nifty Asset program
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 Freeze for CreateBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more