1pub mod borrow;
2pub mod flashloan;
3pub mod liquidity;
4pub mod math;
5pub mod oracle;
6pub mod programs;
7pub mod utils;
8
9pub use anchor_client;
10use anchor_client::solana_sdk::signer::Signer;
11pub use anchor_lang;
12use anchor_lang::prelude::Pubkey;
13
14#[derive(Debug, Clone)]
15pub struct ReadKeypair {
16 pub pubkey: Pubkey,
17}
18
19impl ReadKeypair {
20 pub fn new() -> Self {
21 ReadKeypair {
22 pubkey: Pubkey::from_str_const("HEyJLdMfZhhQ7FHCtjD5DWDFNFQhaeAVAsHeWqoY6dSD"),
23 }
24 }
25
26 pub fn from_pubkey(pubkey: Pubkey) -> Self {
27 ReadKeypair { pubkey }
28 }
29}
30
31impl Signer for ReadKeypair {
32 fn pubkey(&self) -> Pubkey {
33 self.pubkey
34 }
35
36 fn try_pubkey(&self) -> Result<Pubkey, anchor_client::solana_sdk::signer::SignerError> {
37 Ok(self.pubkey())
38 }
39
40 fn try_sign_message(
41 &self,
42 _message: &[u8],
43 ) -> Result<
44 anchor_client::solana_sdk::signature::Signature,
45 anchor_client::solana_sdk::signer::SignerError,
46 > {
47 Ok(anchor_client::solana_sdk::signature::Signature::default())
48 }
49
50 fn is_interactive(&self) -> bool {
51 true
52 }
53}