Skip to content
Docs

Concepts

Credentials

Four committed attributes, their expiries and the epoch.

A credential binds four attributes to one wallet. The verifier establishes the values; Solana stores only a commitment to each, so the chain can check a proof about the values without ever holding them.

The four attributes#

AttributeValue the verifier commitsIndex
ResidencyA region code from 0 to 630
Investor statusA level from 0 to 31
AgeThe minimum age the verifier attests, 0 to 1502
ScreeningWhen the screening took place, as a Unix time3

Region codes and status levels are shared by every verifier and issuer:

Region codeRegion
0EU
1UK
2CH
3SG
4US
LevelInvestor status
0Retail
1Qualified
2Professional
3Accredited

Commitments#

Each attribute is committed with Poseidon over eight inputs: the value, a random salt, the wallet as two 128-bit halves, the verifier as two 128-bit halves, the credential's epoch, and the attribute's index. A commitment therefore belongs to one wallet, one verifier and one epoch; it cannot be moved to another wallet or reused after the credential changes.

The values and salts form your credential file. The verifier generates the salts, gives you the file, and keeps no copy in Writ. You need the file to build proofs.

What the credential account holds#

  • The wallet and the verifier that issued it, with the verifier's generation at issuance.
  • The four commitments.
  • When it was issued, when it expires, and a separate expiry for each attribute.
  • The epoch, which starts at 1 and moves up by one on every reissue and every revocation.
  • Whether it is revoked.

Issuance needs two signatures: your wallet's, which is your consent and pays the account rent, and the verifier's. The program sets the issuance time from the chain clock.

When a credential is live#

A credential is live while all of these hold:

  • It is not revoked, and its epoch is at least 1.
  • Its verifier is registered, active, and still on the generation the credential was issued under.
  • The credential and every attribute expiry are still in the future.