solana-gateway-anchor

Crates.iosolana-gateway-anchor
lib.rssolana-gateway-anchor
version0.1.3
sourcesrc
created_at2024-10-05 07:26:53.328113
updated_at2024-10-05 07:55:19.065082
descriptionAllows anchor programs to check the status of Civic Passes
homepage
repositoryhttps://github.com/civicteam/on-chain-identity-gateway
max_upload_size
id1397476
size3,891
Daniel Kelleher (dankelleher)

documentation

README

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.

Commit count: 1832

cargo fmt