Skip to main content
For some use cases, such as sending payments, you might want to prevent your onchain instruction from being executed more than once. The nullifier program utility solves this for you. We also deployed a reference implementation to public networks so you can get started quickly:
For the usage example source code, see here: create_nullifier.rs

How It Works

  1. Derives PDA from ["nullifier", id] seeds (where id is your unique identifier, e.g. a nonce, uuid, hash of signature, etc.)
  2. Creates an empty rent-free PDA at that address
  3. If the address exists, the whole transaction fails
  4. Prepend or append this instruction to your transaction.

Dependencies

Using the Helper

Manually Fetching Proof

Check If Nullifier Exists


Note that this is a reference implementation. Feel free to fork the program as you see fit.
Questions or need support? Telegram | email | Discord