In short
Optional features of the Token-2022 program, such as metadata, pausing, default-frozen accounts, and transfer hooks, switched on per mint. Most must be chosen when the mint is created.You’ve used this in: Tokenized asset Step 2
What are Token Extensions?
The Token Extensions Program (Token 2022) provides more features through extra instructions referred to as extensions. Extensions are optional features you can add to a token mint or token account. You can find the implementation of these extension instructions in the Token Extensions Program source code. Each extension adds specific state that’s generally initialized during mint or token account creation. When initializing either account, you can enable specific extensions simultaneously for different functionality. Most extensions can’t be added after an account is initialized. This is an important consideration when designing your token, as you’ll need to plan ahead for which features you want your token to support. The pages in this section describe each extension and how to integrate it.Some extensions can’t be combined on the same mint, and some require another.
Mint initialization fails with
InvalidExtensionCombination (0x33) when:ScaledUiAmountandInterestBearingConfigare both present (each changes how the UI amount is calculated).TransferFeeConfigandConfidentialTransferMintare present withoutConfidentialTransferFeeConfig, orConfidentialTransferFeeConfigis present without both of them.ConfidentialMintBurnis present withoutConfidentialTransferMint.NonTransferableandConfidentialTransferMintare present withoutConfidentialMintBurn.
check_for_invalid_mint_extension_combinations.ExtensionType
enum that lists all available extensions you can add to a token mint or token
account. Each variant represents a different extension with unique
functionality.
The ExtensionType enum is defined as follows (Token-2022 program@v11.1.0):
Token Extensions
tlv_data
field, which follows the base account data type. You must further deserialize
the tlv_data (containing extension state) according to the specific extension
types enabled for that account.
Token Extensions