#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

#11 in #passes

Download history 236/week @ 2024-10-02 38/week @ 2024-10-09 2/week @ 2024-10-16

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
~456K SLoC