pub struct WithdrawNftCoreCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for WithdrawNftCore via CPI.
§Accounts:
[writable, signer]owner[writable]pool[optional]whitelist[optional]mint_proof[writable]asset[optional]collection[]mpl_core_program[writable]nft_receipt
Implementations§
Source§impl<'a, 'b> WithdrawNftCoreCpiBuilder<'a, 'b>
impl<'a, 'b> WithdrawNftCoreCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
pub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
The owner of the pool and the NFT.
Sourcepub fn pool(&mut self, pool: &'b AccountInfo<'a>) -> &mut Self
pub fn pool(&mut self, pool: &'b AccountInfo<'a>) -> &mut Self
The pool the NFT is being transferred to/from.
Sourcepub fn whitelist(&mut self, whitelist: Option<&'b AccountInfo<'a>>) -> &mut Self
pub fn whitelist(&mut self, whitelist: Option<&'b AccountInfo<'a>>) -> &mut Self
[optional account]
The whitelist that gatekeeps which NFTs can be deposited into the pool.
Must match the whitelist stored in the pool state.
Sourcepub fn mint_proof(
&mut self,
mint_proof: Option<&'b AccountInfo<'a>>,
) -> &mut Self
pub fn mint_proof( &mut self, mint_proof: Option<&'b AccountInfo<'a>>, ) -> &mut Self
[optional account]
Optional account which must be passed in if the NFT must be verified against a
merkle proof condition in the whitelist.
Sourcepub fn asset(&mut self, asset: &'b AccountInfo<'a>) -> &mut Self
pub fn asset(&mut self, asset: &'b AccountInfo<'a>) -> &mut Self
The MPL core asset account.
Sourcepub fn collection(
&mut self,
collection: Option<&'b AccountInfo<'a>>,
) -> &mut Self
pub fn collection( &mut self, collection: Option<&'b AccountInfo<'a>>, ) -> &mut Self
[optional account]
Sourcepub fn mpl_core_program(
&mut self,
mpl_core_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn mpl_core_program( &mut self, mpl_core_program: &'b AccountInfo<'a>, ) -> &mut Self
The MPL Core program.
Sourcepub fn nft_receipt(&mut self, nft_receipt: &'b AccountInfo<'a>) -> &mut Self
pub fn nft_receipt(&mut self, nft_receipt: &'b AccountInfo<'a>) -> &mut Self
The NFT receipt account denoting that an NFT has been deposited into this pool.
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.
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
Trait Implementations§
Source§impl<'a, 'b> Clone for WithdrawNftCoreCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for WithdrawNftCoreCpiBuilder<'a, 'b>
Source§fn clone(&self) -> WithdrawNftCoreCpiBuilder<'a, 'b>
fn clone(&self) -> WithdrawNftCoreCpiBuilder<'a, 'b>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a, 'b> Freeze for WithdrawNftCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for WithdrawNftCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for WithdrawNftCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for WithdrawNftCoreCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for WithdrawNftCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for WithdrawNftCoreCpiBuilder<'a, 'b>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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