1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
pub mod errors;
pub mod instructions;
pub mod state;

use {anchor_lang::prelude::*, instructions::*};

declare_id!("pmvYY6Wgvpe3DEj3UX1FcRpMx43sMLYLJrFTVGcqpdn");

#[program]
pub mod solana_nft_programs_payment_manager {
    use super::*;

    pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> {
        init::handler(ctx, ix)
    }

    pub fn manage_payment(ctx: Context<HandlePaymentCtx>, payment_amount: u64) -> Result<()> {
        handle_payment::handler(ctx, payment_amount)
    }

    pub fn handle_payment_with_royalties<'info>(ctx: Context<'_, '_, '_, 'info, HandlePaymentWithRoyaltiesCtx<'info>>, payment_amount: u64) -> Result<()> {
        handle_payment_with_royalties::handler(ctx, payment_amount)
    }

    pub fn handle_native_payment_with_royalties<'info>(ctx: Context<'_, '_, '_, 'info, HandleNativePaymentWithRoyaltiesCtx<'info>>, payment_amount: u64) -> Result<()> {
        handle_native_payment_with_royalties::handler(ctx, payment_amount)
    }

    pub fn close(ctx: Context<CloseCtx>) -> Result<()> {
        close::handler(ctx)
    }

    pub fn update(ctx: Context<UpdateCtx>, ix: UpdateIx) -> Result<()> {
        update::handler(ctx, ix)
    }
}