pub enum AllowlistInstruction {
InitializeAdminAuthority,
UpdateAdminAuthority,
AdminAddPrivateAllowlist,
AdminRemovePrivateAllowlist,
Thaw {
user_system_account: Pubkey,
},
AdminAddPublicAllowedAccount,
AdminAddPrivateAllowedAccount,
AdminRemovePublicAllowedAccount,
AdminRemovePrivateAllowedAccount,
AdminFreeze,
AdminBurn {
amount: u64,
decimals: u8,
},
}Variants§
InitializeAdminAuthority
Initializes the allowlist admin account.
It creates a new system account.
This can only be called once.
The InitializeAdminAuthority instruction MUST be in the same Transaction as the program deployment
Otherwise another party can acquire ownership of the uninitialized admin account.
Accounts expected by this instruction:
[signer]The Admin Authority account[writable]The Admin’s Program Derived Account[]System Program
UpdateAdminAuthority
Updates the allowlist admin account.
This can only be called by the existing admin authority.
Accounts expected by this instruction:
[signer]The current Admin Authority account[signer]The new Admin Authority account[writable]The Admin’s Program Derived Account
AdminAddPrivateAllowlist
Associates a Token Mint as a Private Instrument.
This can only be called by the existing admin authority.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[]The token mint for the private instrument[writable]The Private Allowlist’s Program Derived Account[]System Program
AdminRemovePrivateAllowlist
Changes Token Mint from a Public Instrument to a Private Instrument.
This can only be called by the existing admin authority.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[]The token mint for the private instrument[writable]The Private Allowlist’s Program Derived Account[]System Program
Thaw
Thaws the underlying Token Account of the provided system wallet account if the wallet is on the allow list.
Accounts expected by this instruction:
[]The token mint[]The wallet system account Program Derived Address for the Public Instrument Allowlist[]The wallet system account Program Derived Address for the Private Instrument Allowlist[writable]The wallet’s Token Account for the Mint[]The token program[]The Allowlist PDA for the Freeze Authority
Fields
AdminAddPublicAllowedAccount
Adds a new account to the Public Instrument Allowlist, and can only be called by the Admin Authority.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[signer]The wallet system account to add to the allow list. Note: this can optionally be a signer.[]The wallet system account Program Derived Address for the Private Instrument Allowlist[]System Program
AdminAddPrivateAllowedAccount
Adds a new account to the Private Instrument Allowlist, and can only be called by the Admin Authority.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[signer]The wallet system account to add to the allow list. Note: this can optionally be a signer.[]The wallet system account Program Derived Address for the Private Instrument Allowlist[]The token mint for the private instrument[]System Program
AdminRemovePublicAllowedAccount
Removes an existing account from the allowlist, and can only be called by the Admin Authority.
This instruction WILL NOT freeze existing Token Accounts, which is instead done via AdminFreeze.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[]The wallet system account to remove from the allow list.[]The wallet system account Program Derived Address for the allow list
AdminRemovePrivateAllowedAccount
Removes an existing account from the allowlist, and can only be called by the Admin Authority.
This instruction WILL NOT freeze existing Token Accounts, which is instead done via AdminFreeze.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[]The wallet system account to remove from the allow list.[]The wallet system account Program Derived Address for the allow list[]The token mint for the private instrument
AdminFreeze
Freezes an Token Account, and can only be called by the Admin Authority.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[]The wallet system account[writable]The wallet’s Token Account for the Mint[]The token mint[]The token program[]The Allowlist PDA for the Freeze Authority
AdminBurn
Burns tokens by removing them from an account. If they account is frozen, it will unfreeze it first, and then refreeze it.
This instruction can only be called by the Admin Authority
The wallet address does NOT need to be on the allowlist to be burned.
Accounts expected by this instruction:
[signer]The Admin Authority account[]The Admin’s Program Derived Account[]The wallet system account[writable]The wallet’s Token Account for the Mint[]The token mint[]The token program[]The Allowlist PDA for the Freeze Authority
Trait Implementations§
Source§impl BorshDeserialize for AllowlistInstruction
impl BorshDeserialize for AllowlistInstruction
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl Clone for AllowlistInstruction
impl Clone for AllowlistInstruction
Source§fn clone(&self) -> AllowlistInstruction
fn clone(&self) -> AllowlistInstruction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AllowlistInstruction
impl Debug for AllowlistInstruction
Source§impl EnumExt for AllowlistInstruction
impl EnumExt for AllowlistInstruction
Source§impl PartialEq for AllowlistInstruction
impl PartialEq for AllowlistInstruction
Source§fn eq(&self, other: &AllowlistInstruction) -> bool
fn eq(&self, other: &AllowlistInstruction) -> bool
self and other values to be equal, and is used by ==.