1#![allow(clippy::result_large_err)]
2
3use anchor_lang::prelude::*;
4
5use instructions::*;
6
7pub mod errors;
8pub mod guards;
9pub mod instructions;
10pub mod state;
11pub mod utils;
12
13declare_id!("CguarSUzT8jJEudNF9adPGeQnwcaf7i5CgFWdRbLEvfN");
14
15#[program]
16pub mod candy_guard {
17 use super::*;
18
19 pub fn initialize(ctx: Context<Initialize>, data: Vec<u8>) -> Result<()> {
21 instructions::initialize(ctx, data)
22 }
23
24 pub fn mint<'info>(
26 ctx: Context<'_, '_, '_, 'info, Mint<'info>>,
27 mint_args: Vec<u8>,
28 label: Option<String>,
29 ) -> Result<()> {
30 instructions::mint(ctx, mint_args, label)
31 }
32
33 pub fn mint_v2<'info>(
35 ctx: Context<'_, '_, '_, 'info, MintV2<'info>>,
36 mint_args: Vec<u8>,
37 label: Option<String>,
38 ) -> Result<()> {
39 instructions::mint_v2(ctx, mint_args, label)
40 }
41
42 pub fn route<'info>(
44 ctx: Context<'_, '_, '_, 'info, Route<'info>>,
45 args: RouteArgs,
46 label: Option<String>,
47 ) -> Result<()> {
48 instructions::route(ctx, args, label)
49 }
50
51 pub fn set_authority(ctx: Context<SetAuthority>, new_authority: Pubkey) -> Result<()> {
53 instructions::set_authority(ctx, new_authority)
54 }
55
56 pub fn unwrap(ctx: Context<Unwrap>) -> Result<()> {
59 instructions::unwrap(ctx)
60 }
61
62 pub fn update(ctx: Context<Update>, data: Vec<u8>) -> Result<()> {
64 instructions::update(ctx, data)
65 }
66
67 pub fn withdraw(ctx: Context<Withdraw>) -> Result<()> {
69 instructions::withdraw(ctx)
70 }
71
72 pub fn wrap(ctx: Context<Wrap>) -> Result<()> {
75 instructions::wrap(ctx)
76 }
77}