Skip to main content

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 compressed vs uncompressed Program

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.