Skip to main content

Airdrop Claim Reference Implementations

  • Basic: simple-claim - Distributes compressed tokens that get decompressed to SPL on claim.
  • Advanced: merkle-distributor - Distributes SPL tokens, uses compressed PDAs to track claims with linear vesting, partial claims, clawback and admin controls.
For simple client side distribution visit this example.

Basic Operations

Basic Operations include:
  • create - Initialize a new compressed account
  • update - Modify data of an existing compressed account
  • close - Close a compressed account (it can be initialized again).
  • reinit - Reinitialize a closed account
  • burn - Permanently delete a compressed account (it cannot be initialized again).

Counter Program

Full compressed account lifecycle (create, increment, decrement, reset, close):

Create-and-update Program

  • create-and-update - Create a new compressed account and update an existing compressed account with a single validity proof in one instruction.

Create-and-read Program

  • read-only - Create a new compressed account and read it on-chain.

Compare Programs with Solana and Compressed Accounts

ZK-ID Program

  • zk-id - A minimal Solana program that uses zero-knowledge proofs for identity verification with compressed accounts.

Next Steps

Follow our guides to these program examples.