pub struct SellNftTokenPoolCoreCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for SellNftTokenPoolCore via CPI.
§Accounts:
[writable]owner[writable, signer]taker[writable]rent_payer[writable]fee_vault[writable]pool[]whitelist[optional]mint_proof[writable, optional]shared_escrow[writable, optional]maker_broker[writable, optional]taker_broker[signer, optional]cosigner[]amm_program[optional]escrow_program[]native_program[writable]asset[optional]collection[]mpl_core_program
Implementations§
Source§impl<'a, 'b> SellNftTokenPoolCoreCpiBuilder<'a, 'b>
impl<'a, 'b> SellNftTokenPoolCoreCpiBuilder<'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 buyer/recipient of the NFT.
Sourcepub fn taker(&mut self, taker: &'b AccountInfo<'a>) -> &mut Self
pub fn taker(&mut self, taker: &'b AccountInfo<'a>) -> &mut Self
The taker is the user buying or selling the NFT.
Sourcepub fn rent_payer(&mut self, rent_payer: &'b AccountInfo<'a>) -> &mut Self
pub fn rent_payer(&mut self, rent_payer: &'b AccountInfo<'a>) -> &mut Self
The original rent payer of the pool–stored on the pool. Used to refund rent in case the pool is auto-closed.
Sourcepub fn fee_vault(&mut self, fee_vault: &'b AccountInfo<'a>) -> &mut Self
pub fn fee_vault(&mut self, fee_vault: &'b AccountInfo<'a>) -> &mut Self
Fee vault account owned by the TFEE program.
Sourcepub fn pool(&mut self, pool: &'b AccountInfo<'a>) -> &mut Self
pub fn pool(&mut self, pool: &'b AccountInfo<'a>) -> &mut Self
The Pool state account that the NFT is being sold into. Stores pool state and config, but is also the owner of any NFTs in the pool, and also escrows any SOL. Any active pool can be specified provided it is a Token type and the NFT passes at least one whitelist condition.
Sourcepub fn whitelist(&mut self, whitelist: &'b AccountInfo<'a>) -> &mut Self
pub fn whitelist(&mut self, whitelist: &'b AccountInfo<'a>) -> &mut Self
The whitelist account that the pool uses to verify the NFTs being sold into it.
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.
[optional account]
The shared escrow account for pools that have liquidity in a shared account.
Sourcepub fn maker_broker(
&mut self,
maker_broker: Option<&'b AccountInfo<'a>>,
) -> &mut Self
pub fn maker_broker( &mut self, maker_broker: Option<&'b AccountInfo<'a>>, ) -> &mut Self
[optional account]
The account that receives the maker broker fee.
Sourcepub fn taker_broker(
&mut self,
taker_broker: Option<&'b AccountInfo<'a>>,
) -> &mut Self
pub fn taker_broker( &mut self, taker_broker: Option<&'b AccountInfo<'a>>, ) -> &mut Self
[optional account]
The account that receives the taker broker fee.
Sourcepub fn cosigner(&mut self, cosigner: Option<&'b AccountInfo<'a>>) -> &mut Self
pub fn cosigner(&mut self, cosigner: Option<&'b AccountInfo<'a>>) -> &mut Self
[optional account]
The optional cosigner account that must be passed in if the pool has a cosigner.
Sourcepub fn amm_program(&mut self, amm_program: &'b AccountInfo<'a>) -> &mut Self
pub fn amm_program(&mut self, amm_program: &'b AccountInfo<'a>) -> &mut Self
The AMM program account, used for self-cpi logging.
Sourcepub fn escrow_program(
&mut self,
escrow_program: Option<&'b AccountInfo<'a>>,
) -> &mut Self
pub fn escrow_program( &mut self, escrow_program: Option<&'b AccountInfo<'a>>, ) -> &mut Self
[optional account]
The escrow program account for shared liquidity pools.
pub fn native_program( &mut self, native_program: &'b AccountInfo<'a>, ) -> &mut Self
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.
pub fn min_price(&mut self, min_price: u64) -> &mut Self
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 SellNftTokenPoolCoreCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for SellNftTokenPoolCoreCpiBuilder<'a, 'b>
Source§fn clone(&self) -> SellNftTokenPoolCoreCpiBuilder<'a, 'b>
fn clone(&self) -> SellNftTokenPoolCoreCpiBuilder<'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 SellNftTokenPoolCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for SellNftTokenPoolCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for SellNftTokenPoolCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for SellNftTokenPoolCoreCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for SellNftTokenPoolCoreCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for SellNftTokenPoolCoreCpiBuilder<'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