LegacyCredential
The LegacyCredential object allows users to easily manage their legacy credentials off-chain, and send updates on-chain when they see necessary.
Defining a LegacyCredential Object
Users can either use this library to create a new legacy credential on-chain, or connect to an existing one.
Creating a New Legacy Credential
You can create a new legacy credential with the following syntax:
Where the legacyCredentialRecipients
is a list of objects which contains information about the credential recipients in the form of:
With the user secret being a value thatis only known by the user and the credential issuer. Credential issuers will then have the ability to change user's identity commitments via setting a new user identity
To see the officially supported networks, check out the deployed contracts
Loading an Existing Legacy Credential
You can create a new legacy credential with the following syntax:
Where the groups being provided must match the roots that were stored on-chain, and the signer provided must match the on-chain admin.
Setting a New User Identity
Once added into groups, legacy credential issuers can give users the ability to define their own Semaphore identities that are only known by them. This is done via:
Adding a Recipient
Legacy credential issuers can still add more recipients by calling:
Publishing Changes On-Chain
After managing the legacy credential groups on-chain, credential issuers can then update the on-chain state by calling:
Last updated