|
| 1 | +import Foundation |
| 2 | + |
| 3 | +public enum Token2022ExtensionType: UInt16, Codable, Hashable { |
| 4 | + /// Used as padding if the account size would otherwise be 355, same as a |
| 5 | + /// multisig |
| 6 | + case uninitialized |
| 7 | + /// Includes transfer fee rate info and accompanying authorities to withdraw |
| 8 | + /// and set the fee |
| 9 | + case transferFeeConfig |
| 10 | + /// Includes withheld transfer fees |
| 11 | + case transferFeeAmount |
| 12 | + /// Includes an optional mint close authority |
| 13 | + case mintCloseAuthority |
| 14 | + /// Auditor configuration for confidential transfers |
| 15 | + case confidentialTransferMint |
| 16 | + /// State for confidential transfers |
| 17 | + case confidentialTransferAccount |
| 18 | + /// Specifies the default Account::state for new Accounts |
| 19 | + case defaultAccountState |
| 20 | + /// Indicates that the Account owner authority cannot be changed |
| 21 | + case immutableOwner |
| 22 | + /// Require inbound transfers to have memo |
| 23 | + case memoTransfer |
| 24 | + /// Indicates that the tokens from this mint can't be transferred |
| 25 | + case nonTransferable |
| 26 | + /// Tokens accrue interest over time, |
| 27 | + case interestBearingConfig |
| 28 | + /// Locks privileged token operations from happening via CPI |
| 29 | + case cpiGuard |
| 30 | + /// Includes an optional permanent delegate |
| 31 | + case permanentDelegate |
| 32 | + /// Indicates that the tokens in this account belong to a non-transferable |
| 33 | + /// mint |
| 34 | + case nonTransferableAccount |
| 35 | + /// Mint requires a CPI to a program implementing the "transfer hook" |
| 36 | + /// interface |
| 37 | + case transferHook |
| 38 | + /// Indicates that the tokens in this account belong to a mint with a |
| 39 | + /// transfer hook |
| 40 | + case transferHookAccount |
| 41 | + /// Includes encrypted withheld fees and the encryption public that they are |
| 42 | + /// encrypted under |
| 43 | + case confidentialTransferFeeConfig |
| 44 | + /// Includes confidential withheld transfer fees |
| 45 | + case confidentialTransferFeeAmount |
| 46 | + /// Mint contains a pointer to another account (or the same account) that |
| 47 | + /// holds metadata |
| 48 | + case metadataPointer |
| 49 | + /// Mint contains token-metadata |
| 50 | + case tokenMetadata |
| 51 | + /// Mint contains a pointer to another account (or the same account) that |
| 52 | + /// holds group configurations |
| 53 | + case groupPointer |
| 54 | + /// Mint contains token group configurations |
| 55 | + case tokenGroup |
| 56 | + /// Mint contains a pointer to another account (or the same account) that |
| 57 | + /// holds group member configurations |
| 58 | + case groupMemberPointer |
| 59 | + /// Mint contains token group member configurations |
| 60 | + case tokenGroupMember |
| 61 | + |
| 62 | + // MARK: - Test only |
| 63 | + |
| 64 | + // /// Test variable-length mint extension |
| 65 | + // case variableLenMintTest = UInt16.max - 2, |
| 66 | + // /// Padding extension used to make an account exactly Multisig::LEN, used |
| 67 | + // /// for testing |
| 68 | + // case accountPaddingTest = UInt16.max - 1 |
| 69 | + // /// Padding extension used to make a mint exactly Multisig::LEN, used for |
| 70 | + // /// testing |
| 71 | + // case mintPaddingTest = UInt16.max |
| 72 | +} |
0 commit comments