| Crates.io | solana-gateway-anchor |
| lib.rs | solana-gateway-anchor |
| version | 0.1.3 |
| created_at | 2024-10-05 07:26:53.328113+00 |
| updated_at | 2024-10-05 07:55:19.065082+00 |
| description | Allows anchor programs to check the status of Civic Passes |
| homepage | |
| repository | https://github.com/civicteam/on-chain-identity-gateway |
| max_upload_size | |
| id | 1397476 |
| size | 3,891 |
An anchor macro for evaluating the status of Civic Passes.
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.