cow_settlement_interface/
lib.rs1pub use solana_instruction::{AccountMeta, Instruction};
4pub use solana_pubkey::Pubkey;
5
6solana_pubkey::declare_id!("C7PXyLpLQBh3Ce7e9DNj3rDVUvwqa5orDwQG5hs1rfNi");
7
8pub mod data;
9pub mod error;
10pub mod instruction;
11pub mod pda;
12pub mod role;
13pub mod token_program;
14
15pub use error::SettlementError;
16pub use instruction::{recover_discriminator, SettlementInstruction};
17pub use pda::SettlementAccount;
18pub use role::Role;
19
20#[cfg(any(test, feature = "test-fixtures"))]
24pub mod fixtures {
25 use std::sync::LazyLock;
26
27 use crate::pda::state::state_pda_seeds;
28 use crate::Pubkey;
29
30 pub fn pubkey_from_seed(seed: &str) -> Pubkey {
33 Pubkey::new_from_array(solana_sha256_hasher::hash(seed.as_bytes()).to_bytes())
34 }
35
36 pub static PROGRAM_ID: LazyLock<Pubkey> = LazyLock::new(|| pubkey_from_seed("program id"));
40
41 pub static STATE_PDA: LazyLock<Pubkey> =
44 LazyLock::new(|| Pubkey::find_program_address(&state_pda_seeds(), &PROGRAM_ID).0);
45}