Skip to content

Commit

Permalink
remove checkq zkp test
Browse files Browse the repository at this point in the history
  • Loading branch information
maycon-mello committed Dec 9, 2024
1 parent d1d9492 commit 15f1b3e
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions integration-tests/cheqd-credentials.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,53 +53,5 @@ describe('Cheq integration tests', () => {
expect(certsResponse.verified).toBe(true);
});


it('should verify a ZKP cheqd credential', async () => {
const wallet: IWallet = await getWallet();

getCredentialProvider().addCredential(CheqdCredentialZKP);

const proofRequest = await createProofRequest(
ProofTemplateIds.ANY_CREDENTIAL,
);

const result: any = await getCredentialProvider().isValid(CheqdCredentialZKP);

expect(result).toBeTruthy();

const controller = await createVerificationController({
wallet,
});

await controller.start({
template: proofRequest,
});

const attributesToReveal = ['credentialSubject.name'];

controller.selectedCredentials.set(CheqdCredentialZKP.id, {
credential: CheqdCredentialZKP,
attributesToReveal
});

const presentation = await controller.createPresentation();
console.log('Presentation generated');
console.log(JSON.stringify(presentation, null, 2));
console.log('Sending presentation to Certs API');

let certsResponse;
try {
certsResponse = await controller.submitPresentation(presentation);
console.log('CERTS response');
console.log(JSON.stringify(certsResponse, null, 2));
} catch (err) {
certsResponse = err.response.data;
console.log('Certs API returned an error');
console.log(JSON.stringify(certsResponse, null, 2));
}

expect(certsResponse.verified).toBe(true);
});

afterAll(() => closeWallet());
});

0 comments on commit 15f1b3e

Please sign in to comment.