antegen_fiber_program/
lib.rs1pub mod constants;
2pub mod errors;
3pub mod instructions;
4pub mod state;
5
6pub use constants::*;
7use instructions::*;
8use state::*;
9
10use anchor_lang::prelude::*;
11use anchor_lang::solana_program::instruction::Instruction;
12
13declare_id!("AgFv5afjW9DmSPkiEvJ1er5bAAmRUqaBeTB6Cr8e1hKx");
14
15#[program]
16pub mod antegen_fiber {
17 use super::*;
18
19 pub fn create(
23 ctx: Context<Create>,
24 fiber_index: u8,
25 instruction: SerializableInstruction,
26 priority_fee: u64,
27 lookup_tables: Vec<Pubkey>,
28 ) -> Result<()> {
29 let instruction: Instruction = instruction.into();
30 instructions::create::create(ctx, fiber_index, instruction, priority_fee, lookup_tables)
31 }
32
33 pub fn update(
39 ctx: Context<Update>,
40 fiber_index: u8,
41 instruction: Option<SerializableInstruction>,
42 priority_fee: Option<u64>,
43 lookup_tables: Option<Vec<Pubkey>>,
44 ) -> Result<()> {
45 let instruction = instruction.map(|i| i.into());
46 instructions::update::update(ctx, fiber_index, instruction, priority_fee, lookup_tables)
47 }
48
49 pub fn close(ctx: Context<Close>) -> Result<()> {
51 instructions::close::close(ctx)
52 }
53
54 pub fn swap(ctx: Context<Swap>) -> Result<()> {
57 instructions::swap::swap(ctx)
58 }
59}