derive_manager_program_accounts

Function derive_manager_program_accounts 

Source
pub fn derive_manager_program_accounts(
    seed: &[u8],
    program_id: &Pubkey,
    is_ephemeral: bool,
) -> Result<(Pubkey, Pubkey), Box<dyn Error>>
Expand description

Derives both meta and program account pubkeys for a manager program

§Arguments

  • seed - The seed bytes for account derivation (must not be empty)
  • program_id - The program ID pubkey
  • is_ephemeral - Whether the program is ephemeral

§Returns

A Result containing a tuple of (meta_account_pubkey, program_account_pubkey)

§Errors

Returns an error if the seed is empty