pub fn assert_derivation(
    program_id: &Pubkey,
    account: &AccountInfo<'_>,
    path: &[&[u8]]
) -> Result<u8>
Expand description

Receives a program id, account info, and seeds and verifies that the pubkey of the account is the PDA generated by the seeds and the program id. Returns the bump seed.