Skip to content
Docs

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#

AccountSeeds
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#

FieldMeaning
adminThe governance admin
pending_adminA proposed admin, or the empty key
pausedWhether new credentials, rule sets, bindings, passes, issuance and transfers are stopped

Verifier registry#

FieldMeaning
authorityThe verifier's signing key
activeWhether it may issue
generationMoves on every deactivation and reactivation

Credential#

FieldMeaning
walletThe wallet it belongs to
verifierThe verifier that issued it
verifier_generationThe verifier's generation at issuance
commitmentsFour 32-byte big-endian BN254 scalars
issued_at, expires_atChain times
attribute_expiriesOne expiry per attribute
epochMoves on every issuance and revocation
revokedSet by revocation

Circuit#

FieldMeaning
version1
expected_sha256Digest of the verifying key
uploadedBytes uploaded so far, out of 2,816
finalizedWhether the key is complete and fixed
verifying_keyThe 2,816-byte key

Rule set#

FieldMeaning
issuerThe issuer's wallet
nonceThe 64-bit nonce in its address
circuit, circuit_versionThe circuit it is proved against
clauses, clause_countUp to four groups: region set, minimum status, minimum age, screening window
max_pass_age_secondsThe longest a pass may last
created_atChain 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#

FieldMeaning
wallet, rule_set, credentialWhat it belongs to
epoch, verifier_generationCopied from the credential at proving
expires_atChosen at proving, within the rule's limits
proved_atChain time of the proof

Mint binding#

FieldMeaning
mint, rule_set, issuerThe binding
require_sourceWhether senders need a live pass too
created_atChain time

Protocol#

FieldMeaning
pass_feeWhat 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.