find_spl_interface_pda_with_index

Function find_spl_interface_pda_with_index 

Source
pub fn find_spl_interface_pda_with_index(
    mint: &Pubkey,
    index: u8,
    restricted: bool,
) -> (Pubkey, u8)
Expand description

Find the SPL interface PDA for a given mint and index.

§Arguments

  • mint - The mint public key
  • index - The pool index (0-4)
  • restricted - Whether to use restricted derivation (for mints with restricted extensions)

§Seed format

  • Regular index 0: ["pool", mint]
  • Regular index 1-4: ["pool", mint, index]
  • Restricted index 0: ["pool", mint, "restricted"]
  • Restricted index 1-4: ["pool", mint, "restricted", index]