Generate proof

Important

Before you generate proof please ensure you have a Credential Request from verifier.

Sample Credential Request

const CR = {
  id: 7,
  circuitId: "credentialAtomicQueryMTPV2OnChain",
  query: {
    allowedIssuers: ["*"],
    type: "DriversLicenceCredential",
    context: "https://redbellynetwork.github.io/did-schema/driversLicence/credential/v1.jsonld",
    credentialSubject: {
      birthDate: {
        $lt: 20020101,
      },
    },
  },
};
This is used by the holder, to generate the proof with the help of the proofService.

const proof = await proofService.generateProof(CR, userDID, {
    challenge: BigInt(123123123123123), // any random big int
    skipRevocation: false,
});

Next Up: Submit proof →