Skip to content

Commit 1080a74

Browse files
committed
Further work on algorithms setup.
1 parent 2467e6e commit 1080a74

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

tests/suites/algorithms.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
issueCloned
99
} from 'data-integrity-test-suite-assertion';
1010
import {createInitialVc, endpointCheck} from '../helpers.js';
11+
import {getMultiKey} from '../vc-generator/key-gen.js';
12+
import {getSuites} from './helpers.js';
1113
import {localVerifier} from '../vc-verifier/index.js';
1214

1315
export function commonAlgorithms({
@@ -188,12 +190,37 @@ async function _setup({
188190
selectivePointers,
189191
suiteName,
190192
keyType
193+
}) {
194+
// stub suite canonize via Proxy cryptosuite.canonize and set safe to false
195+
const credentials = new Map();
196+
const keyPair = await getMultiKey({keyType});
197+
const signer = keyPair.signer();
198+
const _credential = structuredClone(credential);
199+
_credential.issuer = keyPair.controller;
200+
const {invalidCreated} = generators?.dates;
201+
credentials.set('invalidCreated', await issueCloned(invalidCreated({
202+
credential: structuredClone(_credential),
203+
...getSuites({
204+
signer,
205+
suiteName,
206+
selectivePointers,
207+
mandatoryPointers
208+
})
209+
})));
210+
return credentials;
211+
}
212+
213+
async function _generateNoTypeCryptosuite({
214+
signer,
215+
credential,
216+
mandatoryPointers,
217+
selectivePointers
191218
}) {
192219
const {
193220
invalidProofType,
194221
invalidCryptosuite
195222
} = generators?.mandatory;
196-
const credentials = new Map();
197-
const {invalidCreated} = generators?.dates;
223+
const noType = invalidProofType({
198224

225+
});
199226
}

0 commit comments

Comments
 (0)