#gateway #solana #anchor #status #passes #pass #civic

solana-gateway-anchor

Allows anchor programs to check the status of Civic Passes

4 releases

0.1.3 Oct 5, 2024
0.1.2 Oct 5, 2024
0.1.1 Oct 5, 2024
0.1.0 Oct 5, 2024

#568 in Magic Beans

Download history 252/week @ 2024-10-04 24/week @ 2024-10-11

276 downloads per month

Apache-2.0

4KB

Solana Gateway Anchor

An anchor macro for evaluating the status of Civic Passes.

Usage

use solana_gateway_anchor::Pass;

/// Instruction to be gated by Civic Pass
#[derive(Accounts)]
pub struct MyInstruction<'info> {
    /// An account struct containing the pass type
    pub my_account: Account<'info, MyAccount>,

    #[account(constraint = pass.valid(&recipient.key, &my_account.pass_type))]
    pub pass: Account<'info, Pass>,
}

See a more complete example here.

Dependencies

~18–27MB
~462K SLoC