magicblock_magic_program_api/
pda.rs1use crate::Pubkey;
2
3pub const CRANK_SEED: &[u8] = b"crank-executor";
4pub fn crank_signer_pda(authority: &Pubkey) -> Pubkey {
5 Pubkey::find_program_address(
6 &[CRANK_SEED, authority.as_ref()],
7 &crate::CRANK_PROGRAM_ID,
8 )
9 .0
10}
11
12pub const CALLBACK_SEED: &[u8] = b"callback-executor";
14const CALLBACK_SIGNER_PDA: ([u8; 32], u8) =
15 const_crypto::ed25519::derive_program_address(
16 &[CALLBACK_SEED],
17 crate::CALLBACK_PROGRAM_ID.as_array(),
18 );
19pub const CALLBACK_SIGNER: Pubkey =
20 Pubkey::new_from_array(CALLBACK_SIGNER_PDA.0);
21pub const CALLBACK_SIGNER_BUMP: u8 = CALLBACK_SIGNER_PDA.1;