pub struct CreateDistributionBuilder { /* private fields */ }Expand description
Instruction builder for CreateDistribution.
§Accounts:
[writable]distribution[]mint[writable, signer]payer[signer, optional]authority[writable, optional]fee_wallet (default to9kFjQsxtpBsaw8s7aUyiY3wazYDNgFP4Lj5rsBVVF8tb)[signer]seed[optional]system_program (default to11111111111111111111111111111111)
Implementations§
Source§impl CreateDistributionBuilder
impl CreateDistributionBuilder
pub fn new() -> Self
Sourcepub fn distribution(&mut self, distribution: Pubkey) -> &mut Self
pub fn distribution(&mut self, distribution: Pubkey) -> &mut Self
The address of the new distribution
[optional account]
The authority of the distribution
Sourcepub fn fee_wallet(&mut self, fee_wallet: Pubkey) -> &mut Self
pub fn fee_wallet(&mut self, fee_wallet: Pubkey) -> &mut Self
[optional account, default to '9kFjQsxtpBsaw8s7aUyiY3wazYDNgFP4Lj5rsBVVF8tb']
The wallet where fees are sent
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']
The system program
pub fn merkle_root(&mut self, merkle_root: [u8; 32]) -> &mut Self
pub fn tree_height(&mut self, tree_height: u8) -> &mut Self
pub fn start_time(&mut self, start_time: i64) -> &mut Self
pub fn end_time(&mut self, end_time: i64) -> &mut Self
pub fn total_claimants(&mut self, total_claimants: u64) -> &mut Self
pub fn name(&mut self, name: String) -> &mut Self
Sourcepub fn distribution_type(
&mut self,
distribution_type: DistributionType,
) -> &mut Self
pub fn distribution_type( &mut self, distribution_type: DistributionType, ) -> &mut Self
[optional argument, defaults to 'DistributionType::Wallet']
Sourcepub fn subsidize_receipts(&mut self, subsidize_receipts: bool) -> &mut Self
pub fn subsidize_receipts(&mut self, subsidize_receipts: bool) -> &mut Self
[optional argument, defaults to 'false']
Sourcepub fn allowed_distributor(
&mut self,
allowed_distributor: AllowedDistributor,
) -> &mut Self
pub fn allowed_distributor( &mut self, allowed_distributor: AllowedDistributor, ) -> &mut Self
[optional argument, defaults to 'AllowedDistributor::Permissionless']
Sourcepub fn permissioned_distributor(
&mut self,
permissioned_distributor: Pubkey,
) -> &mut Self
pub fn permissioned_distributor( &mut self, permissioned_distributor: Pubkey, ) -> &mut Self
[optional argument, defaults to 'pubkey!("11111111111111111111111111111111")']
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 CreateDistributionBuilder
impl Default for CreateDistributionBuilder
Source§fn default() -> CreateDistributionBuilder
fn default() -> CreateDistributionBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateDistributionBuilder
impl RefUnwindSafe for CreateDistributionBuilder
impl Send for CreateDistributionBuilder
impl Sync for CreateDistributionBuilder
impl Unpin for CreateDistributionBuilder
impl UnsafeUnpin for CreateDistributionBuilder
impl UnwindSafe for CreateDistributionBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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