1pub mod errors;
2pub mod id;
3pub mod state;
4
5mod instructions;
6
7pub use id::ID;
8
9use anchor_lang::prelude::*;
10use clockwork_crank::state::CrankResponse;
11use instructions::*;
12use state::*;
13
14#[program]
15pub mod clockwork_network {
16 use super::*;
17
18 pub fn config_update(ctx: Context<ConfigUpdate>, settings: ConfigSettings) -> Result<()> {
19 config_update::handler(ctx, settings)
20 }
21
22 pub fn entry_close(ctx: Context<EntryClose>) -> Result<CrankResponse> {
23 entry_close::handler(ctx)
24 }
25
26 pub fn entry_create(ctx: Context<EntryCreate>) -> Result<CrankResponse> {
27 entry_create::handler(ctx)
28 }
29
30 pub fn initialize<'info>(ctx: Context<'_, '_, '_, 'info, Initialize<'info>>) -> Result<()> {
31 initialize::handler(ctx)
32 }
33
34 pub fn node_register(ctx: Context<NodeRegister>) -> Result<()> {
35 node_register::handler(ctx)
36 }
37
38 pub fn node_stake(ctx: Context<NodeStake>, amount: u64) -> Result<()> {
39 node_stake::handler(ctx, amount)
40 }
41
42 pub fn node_update(ctx: Context<NodeUpdate>, settings: NodeSettings) -> Result<()> {
43 node_update::handler(ctx, settings)
44 }
45
46 pub fn node_unstake(ctx: Context<NodeUnstake>, amount: u64) -> Result<()> {
47 node_unstake::handler(ctx, amount)
48 }
49
50 pub fn pool_create(ctx: Context<PoolCreate>, name: String, size: usize) -> Result<()> {
51 pool_create::handler(ctx, name, size)
52 }
53
54 pub fn pools_rotate<'info>(ctx: Context<'_, '_, '_, 'info, PoolsRotate<'info>>) -> Result<()> {
55 pools_rotate::handler(ctx)
56 }
57
58 pub fn snapshot_close(ctx: Context<SnapshotClose>) -> Result<CrankResponse> {
59 snapshot_close::handler(ctx)
60 }
61
62 pub fn snapshot_create(ctx: Context<SnapshotCreate>) -> Result<CrankResponse> {
63 snapshot_create::handler(ctx)
64 }
65
66 pub fn snapshot_kickoff(ctx: Context<SnapshotKickoff>) -> Result<CrankResponse> {
67 snapshot_kickoff::handler(ctx)
68 }
69
70 pub fn snapshot_pause(ctx: Context<SnapshotPause>) -> Result<()> {
71 snapshot_pause::handler(ctx)
72 }
73
74 pub fn snapshot_resume(ctx: Context<SnapshotResume>) -> Result<()> {
75 snapshot_resume::handler(ctx)
76 }
77
78 pub fn snapshot_rotate(ctx: Context<SnapshotRotate>) -> Result<CrankResponse> {
79 snapshot_rotate::handler(ctx)
80 }
81}