#[non_exhaustive]pub enum MintExtension<'a> {
Show 13 variants
TransferFeeConfig {
authority: Option<&'a Address>,
withdraw_authority: Option<&'a Address>,
basis_points: u16,
maximum_fee: u64,
},
MintCloseAuthority(Option<&'a Address>),
NonTransferable,
PermanentDelegate(&'a Address),
TransferHook {
authority: Option<&'a Address>,
program_id: Option<&'a Address>,
},
MetadataPointer {
authority: Option<&'a Address>,
metadata_address: Option<&'a Address>,
},
DefaultAccountState(u8),
InterestBearing {
rate_authority: Option<&'a Address>,
rate: i16,
},
ScaledUiAmount {
authority: Option<&'a Address>,
multiplier: f64,
},
Pausable(&'a Address),
GroupPointer {
authority: Option<&'a Address>,
group_address: Option<&'a Address>,
},
GroupMemberPointer {
authority: Option<&'a Address>,
member_address: Option<&'a Address>,
},
PermissionedBurn(&'a Address),
}Expand description
Fixed-size mint extensions supported by MintPlan.
Extension authorities and hook/metadata addresses use Token-2022’s nullable
address encoding where applicable. Some(zero_address) is rejected for
those fields, rather than silently being interpreted as None.
Token-2022 keeps adding extensions, and each one Hopper supports is a new
variant, so a match outside this crate needs a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TransferFeeConfig
MintCloseAuthority(Option<&'a Address>)
NonTransferable
PermanentDelegate(&'a Address)
TransferHook
MetadataPointer
DefaultAccountState(u8)
New token accounts start in this state: 1 initialized, 2 frozen.
InterestBearing
Balances display with continuously compounding interest at rate
basis points; rate_authority may change the rate.
ScaledUiAmount
Balances display multiplied by multiplier (positive and finite);
authority may schedule a new multiplier.
Pausable(&'a Address)
The authority that may pause and resume the mint.
GroupPointer
GroupMemberPointer
PermissionedBurn(&'a Address)
Burns need this authority’s signature next to the holder’s.
Implementations§
Source§impl MintExtension<'_>
impl MintExtension<'_>
Sourcepub const fn extension_type(&self) -> u16
pub const fn extension_type(&self) -> u16
Token-2022’s TLV extension discriminator (not an instruction tag).
Sourcepub const fn value_len(&self) -> usize
pub const fn value_len(&self) -> usize
The extension’s TLV value length: the size of its on-chain state.
Sourcepub fn instruction_data(&self) -> Result<MintInstructionData, ProgramError>
pub fn instruction_data(&self) -> Result<MintInstructionData, ProgramError>
Canonical instruction bytes, also usable by off-chain instruction builders.