atlas_config_interface/types.rs
1//! Type definitions for the Atlas config program.
2
3/// A simple public key representation
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub struct Pubkey([u8; 32]);
6
7impl Pubkey {
8 /// Create a new Pubkey from bytes
9 pub fn new(bytes: [u8; 32]) -> Self {
10 Self(bytes)
11 }
12
13 /// Get the bytes of the public key
14 pub fn to_bytes(&self) -> [u8; 32] {
15 self.0
16 }
17}
18
19/// Configuration keys structure
20#[derive(Debug, Default)]
21pub struct ConfigKeys {
22 /// Keys associated with the configuration
23 pub keys: Vec<(Pubkey, bool)>,
24}