cow_settlement_interface/
lib.rs1pub use solana_instruction::{AccountMeta, Instruction};
4pub use solana_pubkey::Pubkey;
5
6solana_pubkey::declare_id!("Moook87DzJ25dELx3LXJ3dnu5a4ERVFwKo1PWWF4p7Y");
7
8pub const PROD_ID: Pubkey = ID;
10
11pub const BARN_ID: Pubkey = Pubkey::from_str_const("EzHqcdJssenE2R8xogJ8wpL66PRQet9M6ubpsX4QxpPb");
13
14pub mod data;
15pub mod error;
16pub mod instruction;
17pub mod pda;
18pub mod role;
19pub mod token_program;
20
21pub use error::{parse_settlement_error, SettlementError};
22pub use instruction::{recover_discriminator, SettlementInstruction};
23pub use pda::SettlementAccount;
24pub use role::Role;
25
26#[cfg(any(test, feature = "test-fixtures"))]
30pub mod fixtures {
31 use core::num::NonZeroU64;
32
33 use crate::Pubkey;
34
35 pub fn pubkey_from_seed(seed: &str) -> Pubkey {
38 Pubkey::new_from_array(solana_sha256_hasher::hash(seed.as_bytes()).to_bytes())
39 }
40
41 pub trait IntoNonZero {
44 fn nz(self) -> NonZeroU64;
45 }
46
47 impl IntoNonZero for u64 {
48 #[track_caller]
49 fn nz(self) -> NonZeroU64 {
50 NonZeroU64::new(self).expect("value must be non-zero")
51 }
52 }
53}