Embed proof

Important

Before embedding your proof request please ensure you have set your request.

The Verifier creates a proof request for the wallet holder, encoding it into a QR code for easy access. When the holder scans the QR code using their mobile device, the wallet application decodes the request, creates a credential request (CR) and checks for the necessary Verifiable Credentials (VC). You can view the demo to scan the Proof Request here.

Continuing the above example “to be born before 01/01/2002”; we create a request of CREDENTIAL_TYPE of DriversLicenceCredential which can be found in constants.ts.

This can be modified or be replaced with a credential type of your choice whose schema and claimPathKey are generted by modifying main.go.

{
    id: requestId,
    circuitId,
    query: {
      allowedIssuers: ["*"], // Accepts any issuer; use trusted issuer DIDs in production.
      type: credentialType,
      context:
        "https://redbellynetwork.github.io/did-schema/driversLicence/credential/v1.jsonld",
      credentialSubject: {
        birthDate: {
          $lt: CRITERIA_VALUE,
        }
      }
    }
  }
  • id: Request Id
  • circuitId: MTP Circuit Id
  • query:
    • allowedIssuers: ["*"] accepts credentials from any issuer. For production and mainnet flows, replace it with the DID values of issuers you trust.
    • type: Type of Credential
    • context: JSON-LD Context of credential.
    • credentialSubject: Contains User’s details

Next Up: Queries →