Person nullifier
N, the one public value per person, and why a second enrollment is refused.
The person nullifier N is the one public value that stands for a person in Once. It keys the person's enrollment, so a person can hold only one active enrollment however many wallets they use.
How N is made
N = Poseidon(2^128 + 0x504552534f4e, s)s is the person secret from the threshold OPRF. The first input is a domain tag (0x504552534f4e is ASCII PERSON) above 2^64, so N can never equal a scope nullifier Poseidon(s, scope_id), whose scope IDs are 64-bit. N is public, but it gives no way to compute any scope nullifier of the same person, since that needs s.
The enroll proof shows that N comes from the s of a valid credential and a correct OPRF transcript. Same person, same issuer fields and the same OPRF key give the same N, from any wallet and any device.
The person account
enroll creates the person account at the address derived from ["person", N]. It records the enrolling wallet, the leaf and its index in the person tree, when it enrolled, whether it is active, and when it was last revoked. The fields are listed under Person.
When enroll finds the account already active, from whichever wallet, it refuses with AlreadyEnrolled, and the app shows Already enrolled.
Revoking
Only the wallet that enrolled can revoke. revoke takes N and the 20 sibling hashes from the person's leaf to the current root; the program checks them against the root, replaces the leaf with zero, records the new root and marks the person account revoked.
The same N can enroll again 24 hours after the revocation, from any wallet, with a new leaf at a new index. Before then enroll refuses with RevokeCooldown. The scope nullifiers don't change across a revoke and a new enrollment, because they come from the same s, so a scope already claimed in stays claimed. Revoke and enroll again walks through it.
Reading an enrollment
The API answers by wallet or by N, with the status (not_enrolled, enrolled or revoked), the leaf index, since when, the expiry and the tree's size:
$ curl "$ONCE_API/v1/people/wallet/<wallet>"
$ curl "$ONCE_API/v1/people/nullifier/<N>"