programId and optional disclosure parameters; the SDK handles credential discovery, consent, proof generation, and result handling.
Verification Flow
- Start verification — the verifier starts a session with a
programId. The program defines what to check and how. - Consent + discovery — the SDK requests the holder’s consent and loads the matching encrypted credential from DStorage.
- Proof generation — the holder decrypts the credential and generates a signature-based proof, including a zero-knowledge proof where the program requires one, disclosing only the requested claims.
- Verification — the proof is checked against the program’s settings off-chain by default, or recorded on-chain through the Universal Verifier when the program requires it.
- Result — on success the SDK returns a W3C Verifiable Presentation containing the disclosed claims and proof material.
Verifier integration checklist
- Create or select a Verification Program in the Developer Dashboard (Verifier → Program).
- Configure the program:
- Accepted proof type (
BJJ_SIG_2021) - Requested claims and whether selective disclosure is required
- Whether ZKP is required
- Off-chain vs on-chain verification
- The Issuer’s DID to constrain trusted issuers (optional)
- Accepted proof type (
- Publish the program and take note of the
programId. - Integrate the AIR Verifier SDK.
- Start verification with the
programId. - Handle outcomes: Compliant, Non-compliant, No matching credential, User declined consent, or proof/verification failure.
- On success, consume the returned Verifiable Presentation.
The dashboard link above uses Sandbox for development. For production launches, use the production Developer Dashboard. Moca Chain is on private Mainnet stage. Contact us for access and required $MOCA gas tokens before launching on production. See Production mainnet access.
Start verification
Generate a Partner JWT withscope=verify, then start verification with the SDK. Proof type, ZKP requirement, and off-chain / on-chain mode come from the program configuration, so your call stays minimal.
- Web
- Flutter
Input Parameters
Response
The function returns aPromise<CredentialVerificationResult>, a discriminated union on status.For non-compliant statuses ("Non-Compliant", "Pending", "Revoked", "Expired", "NotFound"):For compliant status (
"Compliant"):When compliance encryption (CAK) is enabled for the issuance program, the compliant result also includes a
cakPrivateKey used to decrypt compliance data. See Selective Disclosure for how requested fields populate disclosedData.disclosedData is a W3C Verifiable Presentation–shaped object containing the disclosed claims and proof material.
Compliance encryption private key
When a result is"Compliant" and compliance encryption was enabled at issuance, the response includes a cakPrivateKey corresponding to the cakPublicKey returned during issuance. This lets verifiers decrypt regulated disclosure data or participate in threshold decryption, only after a successful verification.
Full CAK Verifier Guide
For handling user consent, receiving the private key, decrypting user data, and security best practices, see the dedicated CAK Verifier Guide.