#[repr(C)]pub enum ProgramWhitelistInstruction {
InitiateAuthorityTransfer {
new_authority: Pubkey,
},
AcceptAuthorityTransfer,
CancelAuthorityTransfer {},
RequestWhitelistEntry,
ApproveWhitelistEntry {
deploy_authority: Pubkey,
},
RejectWhitelistEntry {
deploy_authority: Pubkey,
},
RemoveWhitelistEntry {
deploy_authority: Pubkey,
},
}Expand description
Instructions supported by the program whitelist program.
Variants§
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
RequestWhitelistEntry
Requests a new entry on the program whitelist. Permissionless: the
deploy_authority being requested must sign, proving control of the
key. Creates a Pending entry that the whitelist_authority must later
approve (via ApproveWhitelistEntry) before it grants deploy access.
Accounts expected by this instruction:
[signer, writable]Payer (funds the new entry account)[signer]The deploy authority being requested (proves key control)[]The whitelist account (used for validation/derivation)[writable]The whitelist entry account to be created (Pending)[]System program
ApproveWhitelistEntry
Approves a pending whitelist entry, promoting it from Pending to
Approved (active — the deploy gate then passes for that authority).
The whitelist_authority must sign this instruction.
Accounts expected by this instruction:
[signer]Payer[signer]The whitelist authority[]The whitelist account (used for validation)[writable]The whitelist entry account to approve
Fields
RejectWhitelistEntry
Rejects a pending whitelist entry, closing it and reclaiming its rent
lamports to the payer. Only a Pending entry may be rejected (an active
Approved entry is removed via RemoveWhitelistEntry). The
whitelist_authority must sign this instruction.
Accounts expected by this instruction:
[signer, writable]Payer (receives reclaimed rent)[signer]The whitelist authority[]The whitelist account (used for validation)[writable]The whitelist entry account to reject
Fields
RemoveWhitelistEntry
Closes a whitelist entry account, reclaiming its rent lamports to the
payer. The whitelist_authority must sign this instruction.
Accounts expected by this instruction:
[signer, writable]Payer (receives reclaimed rent)[signer]The whitelist authority[]The whitelist account (used for validation)[writable]The whitelist entry account to close
Fields
Implementations§
Source§impl ProgramWhitelistInstruction
impl ProgramWhitelistInstruction
Sourcepub const INITIATE_AUTHORITY_TRANSFER_TAG: u8 = 0
pub const INITIATE_AUTHORITY_TRANSFER_TAG: u8 = 0
Instruction discriminant tags — the single source of truth for the
leading byte of each instruction’s data. Both unpack (below) and the
onchain CPI builders reference these, so a renumber happens in exactly
one place. Values MUST match the enum’s positional order: the shank IDL
and the generated clients derive their discriminants positionally.
pub const ACCEPT_AUTHORITY_TRANSFER_TAG: u8 = 1
pub const CANCEL_AUTHORITY_TRANSFER_TAG: u8 = 2
pub const REQUEST_WHITELIST_ENTRY_TAG: u8 = 3
pub const APPROVE_WHITELIST_ENTRY_TAG: u8 = 4
pub const REJECT_WHITELIST_ENTRY_TAG: u8 = 5
pub const REMOVE_WHITELIST_ENTRY_TAG: u8 = 6
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 more