Reference
Accounts and addresses
Program accounts, their fields and their seeds.
Every Writ account is a program-derived address of the Writ program, J3VTqKGjnwQApAuCj3ja87q3xVR5CwsgpYUn7j853R8y. Integers in seeds are little-endian.
Addresses#
| Account | Seeds |
|---|
| Config | "config" |
| Verifier registry | "verifier", verifier key |
| Credential | "credential", wallet |
| Circuit | "circuit", version as u32 |
| Rule set | "rule", issuer, nonce as u64 |
| Rule pass | "pass", wallet, rule set |
| Mint binding | "mint", mint |
| Extra account list | "extra-account-metas", mint |
| Protocol | "protocol" |
The SDK derives each one: configPda, verifierPda, credentialPda, circuitPda, rulePda, passPda, bindingPda, extraAccountMetasPda and protocolPda.
Fields#
Config#
| Field | Meaning |
|---|
| admin | The governance admin |
| pending_admin | A proposed admin, or the empty key |
| paused | Whether new credentials, rule sets, bindings, passes, issuance and transfers are stopped |
Verifier registry#
| Field | Meaning |
|---|
| authority | The verifier's signing key |
| active | Whether it may issue |
| generation | Moves on every deactivation and reactivation |
Credential#
| Field | Meaning |
|---|
| wallet | The wallet it belongs to |
| verifier | The verifier that issued it |
| verifier_generation | The verifier's generation at issuance |
| commitments | Four 32-byte big-endian BN254 scalars |
| issued_at, expires_at | Chain times |
| attribute_expiries | One expiry per attribute |
| epoch | Moves on every issuance and revocation |
| revoked | Set by revocation |
Circuit#
| Field | Meaning |
|---|
| version | 1 |
| expected_sha256 | Digest of the verifying key |
| uploaded | Bytes uploaded so far, out of 2,816 |
| finalized | Whether the key is complete and fixed |
| verifying_key | The 2,816-byte key |
Rule set#
| Field | Meaning |
|---|
| issuer | The issuer's wallet |
| nonce | The 64-bit nonce in its address |
| circuit, circuit_version | The circuit it is proved against |
| clauses, clause_count | Up to four groups: region set, minimum status, minimum age, screening window |
| max_pass_age_seconds | The longest a pass may last |
| created_at | Chain time |
The lamports a rule set holds above its rent-exempt minimum are its pass funds; each recorded pass pays the pass fee from them.
Rule pass#
| Field | Meaning |
|---|
| wallet, rule_set, credential | What it belongs to |
| epoch, verifier_generation | Copied from the credential at proving |
| expires_at | Chosen at proving, within the rule's limits |
| proved_at | Chain time of the proof |
Mint binding#
| Field | Meaning |
|---|
| mint, rule_set, issuer | The binding |
| require_source | Whether senders need a live pass too |
| created_at | Chain time |
Protocol#
| Field | Meaning |
|---|
| pass_fee | What each recorded rule pass costs its rule set's issuer, in lamports; set by governance |
Every pass fee lands in this account, above its rent. No key signs for it.