Intro to State Transtion
When an identity adds a new claim to her Claims Tree, the root of the tree and, consequently, the identity state change. The process of moving from one state to another is defined State Transition.
The State Transtion is executed inside a circuit. The
stateTransition circuit encodes a set of rules that must be respected to complete the state transition such as:
- The prover is the owner of the identity (checked using a digital signature by the private key corresponding the
authClaimof the prover hasn't been revoked.
The identity state gets updated by calling the
transitState smart contract function. To call this function, it is necessary to pass in the proof generated previously.
On verification, the
identities mapping gets updated associating the
ID with a new
This tutorial is split in 3 parts:
Note: The Identity State Transition happens not only when an identity adds a new claim to the Claims Tree, but also when a claim gets updated or revoked (by adding it to the revocation tree).