pub fn verify_message<'a>(
pyth_storage_account: &AccountInfo<'_>,
instruction_sysvar: &AccountInfo<'_>,
message_data: &'a [u8],
ed25519_instruction_index: u16,
signature_index: u8,
message_offset: u16,
) -> Result<VerifiedMessage<'a>, SignatureVerificationError>
Expand description
Verifies a ed25519 signature on Solana by checking that the transaction contains
a correct call to the built-in ed25519_program
.
message_data
is the signed message that is being verified.ed25519_instruction_index
is the index of theed25519_program
instruction within the transaction. This instruction must precede the current instruction.signature_index
is the index of the signature within the inputs to theed25519_program
.message_offset
is the offset of the signed message within the input data for the current instruction.