#[repr(C)]pub enum ProgramWhitelistInstruction {
CreateWhitelist {},
InitiateAuthorityTransfer {
new_authority: Pubkey,
},
AcceptAuthorityTransfer,
CancelAuthorityTransfer {},
AddEntry {
program_authority: Pubkey,
},
RemoveEntry {
program_authority: Pubkey,
},
}Expand description
Instructions supported by the program whitelist program.
Variants§
CreateWhitelist
Initializes the program whitelist account, setting its initial state with the initial authority.
Accounts expected by this instruction:
[writable]The whitelist account to initialize[signer]The authority that will control the whitelist[signer]Account that will pay for the account creation[]The system program
InitiateAuthorityTransfer
Proposes a new authority for the program whitelist. The current
whitelist_authority must sign this instruction. The proposed
new_authority must then sign an AcceptAuthorityTransfer
instruction to finalize the transfer.
Accounts expected by this instruction:
[writable]The whitelist account[signer]The current whitelist authority
Fields
AcceptAuthorityTransfer
Accepts the pending authority transfer for the program whitelist. The
pending_whitelist_authority must sign this instruction to assume
authority over the whitelist.
Accounts expected by this instruction:
[writable]The whitelist account[signer]The pending whitelist authority
CancelAuthorityTransfer
Cancels a pending authority transfer for the program whitelist. The
current whitelist_authority must sign this instruction.
Accounts expected by this instruction:
[writable]The whitelist account[signer]The current whitelist authority
AddEntry
Adds an address to the program whitelist or unrevokes a previously
revoked address. If the whitelist_entry_account does not exist,
this instruction creates and initializes it. If the account already
exists and is marked as revoked, this instruction marks it as active
again. The whitelist_authority must sign.
Accounts expected by this instruction:
[]The whitelist account (Used for validation/derivation)[signer]The whitelist authority[writable]The whitelist entry account to be created/initialized or updated[writable, signer]Payer account (must be a system account)[]System program
Fields
RemoveEntry
Closes a specific whitelist entry account, transferring its rent
lamports to a designated destination account. The whitelist_authority
must sign this instruction.
Accounts expected by this instruction:
[]The whitelist account (Used for validation)[signer]The whitelist authority[writable]The whitelist entry account to close[writable]The destination account for reclaimed lamports[]System program
Fields
Implementations§
Source§impl ProgramWhitelistInstruction
impl ProgramWhitelistInstruction
Sourcepub fn unpack(input: &[u8]) -> Result<Self, ProgramError>
pub fn unpack(input: &[u8]) -> Result<Self, ProgramError>
Unpack a program whitelist instruction from a byte slice.
Trait Implementations§
Source§impl Clone for ProgramWhitelistInstruction
impl Clone for ProgramWhitelistInstruction
Source§fn clone(&self) -> ProgramWhitelistInstruction
fn clone(&self) -> ProgramWhitelistInstruction
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 ProgramWhitelistInstruction
impl Debug for ProgramWhitelistInstruction
Source§impl PartialEq for ProgramWhitelistInstruction
impl PartialEq for ProgramWhitelistInstruction
Source§fn eq(&self, other: &ProgramWhitelistInstruction) -> bool
fn eq(&self, other: &ProgramWhitelistInstruction) -> bool
self and other values to be equal, and is used by ==.