pub fn assert_pda_external(
account: &AccountView,
seeds: &[&[u8]],
program_id: &Address,
) -> Result<u8, ProgramError>Expand description
Verify a PDA derived from an external program’s seeds. Returns the bump.
Same as assert_pda but makes intent clear: the program_id belongs
to another program (metadata, ATA, etc.), not yours.
ⓘ
let bump = assert_pda_external(
metadata_account,
&[b"metadata", metadata_program.as_ref(), mint.as_ref()],
&programs::METADATA,
)?;