Skip to content

Commit

Permalink
Further work on algorithms setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Nov 10, 2024
1 parent a57915d commit 055b0f5
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions tests/suites/algorithms.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
issueCloned
} from 'data-integrity-test-suite-assertion';
import {createInitialVc, endpointCheck} from '../helpers.js';
import {getMultiKey} from '../vc-generator/key-gen.js';
import {getSuites} from './helpers.js';
import {localVerifier} from '../vc-verifier/index.js';

export function commonAlgorithms({
Expand Down Expand Up @@ -188,12 +190,37 @@ async function _setup({
selectivePointers,
suiteName,
keyType
}) {
// stub suite canonize via Proxy cryptosuite.canonize and set safe to false
const credentials = new Map();
const keyPair = await getMultiKey({keyType});
const signer = keyPair.signer();
const _credential = structuredClone(credential);
_credential.issuer = keyPair.controller;
const {invalidCreated} = generators?.dates;
credentials.set('invalidCreated', await issueCloned(invalidCreated({
credential: structuredClone(_credential),
...getSuites({
signer,
suiteName,
selectivePointers,
mandatoryPointers
})
})));
return credentials;
}

async function _generateNoTypeCryptosuite({

Check failure on line 213 in tests/suites/algorithms.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

'_generateNoTypeCryptosuite' is defined but never used
signer,

Check failure on line 214 in tests/suites/algorithms.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

'signer' is defined but never used
credential,

Check failure on line 215 in tests/suites/algorithms.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

'credential' is defined but never used
mandatoryPointers,

Check failure on line 216 in tests/suites/algorithms.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

'mandatoryPointers' is defined but never used
selectivePointers

Check failure on line 217 in tests/suites/algorithms.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

'selectivePointers' is defined but never used
}) {
const {
invalidProofType,
invalidCryptosuite

Check failure on line 221 in tests/suites/algorithms.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

'invalidCryptosuite' is assigned a value but never used
} = generators?.mandatory;
const credentials = new Map();
const {invalidCreated} = generators?.dates;
const noType = invalidProofType({

Check failure on line 223 in tests/suites/algorithms.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

'noType' is assigned a value but never used

});
}

0 comments on commit 055b0f5

Please sign in to comment.