w3c-ccg / vc-test-suite-implementations

Implementations for VC HTTP API tests
BSD 3-Clause "New" or "Revised" License
0 stars 11 forks source link

Add endpoint class #32

Closed aljones15 closed 2 years ago

aljones15 commented 2 years ago

Addresses: https://github.com/w3c-ccg/vc-api-test-suite-implementations/issues/30

Solves a growing problem where we have multiple endpoints that all share common functionality (POST or GET requests), but up to this point required specialized classes such as Issuer.js, Verifier.js, and DidResolver.js. Now we have one Endpoint class that wraps the items from an /implementations Json manifest. This deprecates the following methods:

issuer.issue, didResolver.resolve, & verifier.verify

These can be replaced with issuer.post, didResolver.get, & verifier.post

Also no longer are settings stored inside of an object that shares the class name so const {issuer: {id: issuerId} = issuer; is now const {settings: {id: issuerId} = issuer;

This solves a few naming problems.

All test suites should have branches using this library and related libs.

https://github.com/w3c-ccg/di-ed25519-test-suite/pull/25 https://github.com/w3c-ccg/vc-api-verifier-test-suite/pull/22 https://github.com/w3c-ccg/vc-api-issuer-test-suite/pull/19 https://github.com/w3c-ccg/data-integrity-test-suite-assertion/pull/9 https://github.com/w3c-ccg/status-list-2021-test-suite/pull/18 https://github.com/w3c-ccg/did-key-test-suite/pull/16