pub enum ExtensionInitializationParams {
ConfidentialTransferMint {
authority: Option<Pubkey>,
auto_approve_new_accounts: bool,
auditor_elgamal_pubkey: Option<ElGamalPubkey>,
},
DefaultAccountState {
state: AccountState,
},
MintCloseAuthority {
close_authority: Option<Pubkey>,
},
TransferFeeConfig {
transfer_fee_config_authority: Option<Pubkey>,
withdraw_withheld_authority: Option<Pubkey>,
transfer_fee_basis_points: u16,
maximum_fee: u64,
},
InterestBearingConfig {
rate_authority: Option<Pubkey>,
rate: i16,
},
NonTransferable,
PermanentDelegate {
delegate: Pubkey,
},
TransferHook {
authority: Option<Pubkey>,
program_id: Option<Pubkey>,
},
MetadataPointer {
authority: Option<Pubkey>,
metadata_address: Option<Pubkey>,
},
ConfidentialTransferFeeConfig {
authority: Option<Pubkey>,
withdraw_withheld_authority_elgamal_pubkey: ElGamalPubkey,
},
GroupPointer {
authority: Option<Pubkey>,
group_address: Option<Pubkey>,
},
GroupMemberPointer {
authority: Option<Pubkey>,
member_address: Option<Pubkey>,
},
}
Expand description
Encapsulates initializing an extension
Variants§
ConfidentialTransferMint
DefaultAccountState
Fields
§
state: AccountState
MintCloseAuthority
Fields
TransferFeeConfig
InterestBearingConfig
NonTransferable
PermanentDelegate
TransferHook
MetadataPointer
ConfidentialTransferFeeConfig
Fields
GroupPointer
GroupMemberPointer
Implementations§
source§impl ExtensionInitializationParams
impl ExtensionInitializationParams
sourcepub fn extension(&self) -> ExtensionType
pub fn extension(&self) -> ExtensionType
Get the extension type associated with the init params
sourcepub fn instruction(
self,
token_program_id: &Pubkey,
mint: &Pubkey
) -> Result<Instruction, ProgramError>
pub fn instruction( self, token_program_id: &Pubkey, mint: &Pubkey ) -> Result<Instruction, ProgramError>
Generate an appropriate initialization instruction for the given mint
Trait Implementations§
source§impl Clone for ExtensionInitializationParams
impl Clone for ExtensionInitializationParams
source§fn clone(&self) -> ExtensionInitializationParams
fn clone(&self) -> ExtensionInitializationParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl PartialEq for ExtensionInitializationParams
impl PartialEq for ExtensionInitializationParams
source§fn eq(&self, other: &ExtensionInitializationParams) -> bool
fn eq(&self, other: &ExtensionInitializationParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ExtensionInitializationParams
Auto Trait Implementations§
impl Freeze for ExtensionInitializationParams
impl RefUnwindSafe for ExtensionInitializationParams
impl Send for ExtensionInitializationParams
impl Sync for ExtensionInitializationParams
impl Unpin for ExtensionInitializationParams
impl UnwindSafe for ExtensionInitializationParams
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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