Smart Contracts
Polygon ID Smart Contracts - Github
CredentialAtomicQuerySigValidator
CredentialAtomicQuerySigValidator.sol - Github
The CredentialAtomicQuerySigValidator contract is used to verify any credential-related zk proof generated by user using the credentialAtomicQuerySigV2OnChain
circuit. The contract only verifies proofs based on credential of type Signature
The core of the contract is its verify
function that takes the proof generated by a user and executes a set of verifications:
- Verifies that the proof is valid. This verification is actually performed inside the
verifierSig
contract which is automatically generated using circom. - Verifies that the input used to generate the proof matches the query associated to that specific Request.
- Verifies that the user's and the Issuer's identity states are valid based on the State Contract.
The CredentialAtomicQuerySigValidator executes the same set of verifications of the Verification Library. The former is required when performing on-chain verification while the latter is required for off-chain verification.
CredentialAtomicQuerySigValidator address:
CredentialAtomicQueryMTPValidator
CredentialAtomicQueryMTPValidator.sol - Github
Performs the same set of verifications of the CredentialAtomicQuerySigValidator but for credential of type MTP
CredentialAtomicQueryMTPValidator address:
Further protocol related contracts can found at Iden3 - Smart Contracts