Reference

Events

The event each instruction emits, and how to find it in a transaction.

Every instruction emits one event with Anchor's emit_cpi!: the program calls itself with the event as instruction data, signed by its event authority PDA ["__event_authority"]. An indexer finds the event among the transaction's inner instructions, as data that starts with Anchor's event tag e445a52e51cb9a1d followed by the event's 8-byte discriminator, then the fields in Borsh. Events in program logs are not used, since logs can be cut short.

Enrolled

A person enrolled. Replayed with Revoked in chain order, these rebuild the person tree. Emitted by enroll. Discriminator 819c66d65ec4dc7f.

NameTypeDescription
n[u8; 32]The person nullifier N.
indexu32The leaf’s index.
leaf[u8; 32]The leaf.
root[u8; 32]The tree’s root after the append.
ati64Unix seconds.

Revoked

A person revoked; the leaf at index is now zero. Emitted by revoke. Discriminator 71d894637cb80041.

NameTypeDescription
indexu32The revoked leaf’s index.
root[u8; 32]The tree’s root after the revoke.
ati64Unix seconds.

ScopeCreated

A scope was opened. Emitted by create_scope. Discriminator abd04671093bd8e8.

NameTypeDescription
scopePubkeyThe scope account.
idu64The scope ID.
creatorPubkeyThe creator.

Claimed

A claim landed. Emitted by claim. Discriminator d9c07b486c96f821.

NameTypeDescription
scopePubkeyThe scope account.
n[u8; 32]The scope nullifier.
optionOption<u8>The option voted for; empty for a drop.
binding[u8; 32]The binding the proof committed to.
ati64Unix seconds.

ScopeClosed

A scope was settled and closed. Emitted by close_scope. Discriminator 661d69f7d0fdddea.

NameTypeDescription
scopePubkeyThe scope account.
ati64Unix seconds.

ClaimsClosed

Claim receipts of a closed scope were closed. Emitted by close_claims. Discriminator dab9f62aa4b2596c.

NameTypeDescription
scopePubkeyThe scope account.
countu32How many.

Withdrawn

A relayed withdrawal from a private balance landed. Emitted by withdraw. Discriminator 1459dfc6c27cdb0d.

NameTypeDescription
relayerPubkeyThe relayer.
ati64Unix seconds.

Initialized

The program was initialized. Emitted by initialize. Discriminator d0d573627352c9d1.

NameTypeDescription
adminPubkeyThe admin.

FeesUpdated

The fee recipient or a relay fee changed. Emitted by update_fees. Discriminator 4122ea3bf8f26576.

NameTypeDescription
recipientPubkeyThe fee recipient.
solu64The SOL relay fee.
usdcu64The USDC relay fee.

IssuerUpdated

An issuer was added, retired or reactivated. Emitted by set_issuer. Discriminator 84299600eaa93c9d.

NameTypeDescription
keyCurvePointThe issuer key.
activeboolWhether it can enroll.

OprfUpdated

The OPRF registry was written. Emitted by set_oprf. Discriminator 095b274335ef245c.

NameTypeDescription
versionu64The new version.
digest[u8; 32]The registry digest.