File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
lazer/contracts/solana/programs/pyth-lazer-solana-contract/src Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,28 @@ pub mod pyth_lazer_solana_contract {
224224 }
225225}
226226
227+ pub fn verify_message_direct < ' a > (
228+ pyth_storage_account : & Storage ,
229+ instruction_sysvar : & AccountInfo ,
230+ message_data : & ' a [ u8 ] ,
231+ ed25519_instruction_index : u16 ,
232+ signature_index : u8 ,
233+ message_offset : u16 ,
234+ ) -> Result < VerifiedMessage > {
235+ signature:: verify_message (
236+ pyth_storage_account,
237+ instruction_sysvar,
238+ & message_data,
239+ ed25519_instruction_index,
240+ signature_index,
241+ message_offset,
242+ )
243+ . map_err ( |err| {
244+ msg ! ( "signature verification error: {:?}" , err) ;
245+ err. into ( )
246+ } )
247+ }
248+
227249#[ derive( Accounts ) ]
228250pub struct Initialize < ' info > {
229251 #[ account( mut ) ]
You can’t perform that action at this time.
0 commit comments