Skip to content

w3c-ccg/data-integrity-test-suite-assertion

Repository files navigation

data-integrity-test-suite-assertion

Table of Contents

Background

This library exports a function checkDataIntegrityProofFormat() that can be called in other test suites (such as Ed25519, BBS+, etc.) to validate the structure of the proofs on a document.

Install

npm i

Test

npm test

Usage

// Import `data-integrity-test-suite-assertion` in the test suite
import {endpoints} from 'vc-api-test-suite-implementations';
import {
  checkDataIntegrityProofFormat,
  checkDataIntegrityProofVerifyErrors
} from 'data-integrity-test-suite-assertion';

// examples =>
const tag = 'eddsa-2022';
const {
  match: matchingIssuers,
  nonMatch: nonMatchingIssuers
} = endpoints.filterByTag({
  tags: [tag],
  property: 'issuers'
});

const {
  match: matchingVerifiers,
  nonMatch: nonMatchingVerifiers
} = endpoints.filterByTag({
  tags: [tag],
  property: 'verifiers'
});

checkDataIntegrityProofFormat({
  implemented: matchingIssuers
});

checkDataIntegrityProofVerifyErrors({
  implemented: matchingVerifiers
});

About

Library for Data Integrity related test suites

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •